Skip to content

Commit

Permalink
New version 3.3.19. Read more https://github.com/xdan/jodit/releases/…
Browse files Browse the repository at this point in the history
  • Loading branch information
xdan committed Feb 2, 2020
1 parent 756a009 commit eed37bf
Show file tree
Hide file tree
Showing 10 changed files with 73 additions and 45 deletions.
2 changes: 1 addition & 1 deletion build/jodit.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*!
jodit - Jodit is awesome and usefully wysiwyg editor with filebrowser
Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/)
Version: v3.3.18
Version: v3.3.19
Url: https://xdsoft.net/jodit/
License(s): MIT
*/
Expand Down
2 changes: 1 addition & 1 deletion build/jodit.es2018.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*!
jodit - Jodit is awesome and usefully wysiwyg editor with filebrowser
Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/)
Version: v3.3.18
Version: v3.3.19
Url: https://xdsoft.net/jodit/
License(s): MIT
*/
Expand Down
68 changes: 41 additions & 27 deletions build/jodit.es2018.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*!
jodit - Jodit is awesome and usefully wysiwyg editor with filebrowser
Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/)
Version: v3.3.18
Version: v3.3.19
Url: https://xdsoft.net/jodit/
License(s): MIT
*/
Expand Down Expand Up @@ -6070,7 +6070,7 @@ class view_View extends panel_Panel {
var _a, _b, _c;
super(jodit, options);
this.components = new Set();
this.version = "3.3.18";
this.version = "3.3.19";
this.__modulesInstances = {};
this.buffer = storage_Storage.makeStorage();
this.progressbar = new ProgressBar_ProgressBar(this);
Expand Down Expand Up @@ -12991,6 +12991,29 @@ function limit(jodit) {


Config_Config.prototype.link = {
formTemplate: (editor) => {
const i18n = editor.i18n.bind(editor);
return `<form class="jodit_form">
<div class="jodit_form_group">
<input ref="url_input" class="jodit_input" required type="text" name="url" placeholder="http://" type="text"/>
</div>
<div ref="content_input_box" class="jodit_form_group">
<input ref="content_input" class="jodit_input" name="text" placeholder="${i18n('Text')}" type="text"/>
</div>
<label ref="target_checkbox_box">
<input ref="target_checkbox" class="jodit_checkbox" name="target" type="checkbox"/>
<span>${i18n('Open in new tab')}</span>
</label>
<label ref="nofollow_checkbox_box">
<input ref="nofollow_checkbox" class="jodit_checkbox" name="nofollow" type="checkbox"/>
<span>${i18n('No follow')}</span>
</label>
<div class="jodit_buttons">
<button ref="unlink" class="jodit_button jodit_unlink_button" type="button">${i18n('Unlink')}</button>
<button ref="insert" class="jodit_button jodit_link_insert_button" type="submit">${i18n('Insert')}</button>
</div>
<form/>`;
},
followOnDblClick: true,
processVideoLink: true,
processPastedLink: true,
Expand All @@ -13014,30 +13037,21 @@ Config_Config.prototype.controls.link = {
return current && Dom_Dom.closest(current, 'a', editor.editor) !== false;
},
popup: (editor, current, self, close) => {
const i18n = editor.i18n.bind(editor), { openInNewTabCheckbox, noFollowCheckbox } = editor.options.link, form = editor.create.fromHTML(`<form class="jodit_form">
<div class="jodit_form_group">
<input ref="url_input" class="jodit_input" required type="text" name="url" placeholder="http://" type="text"/>
</div>
<div ref="content_input_box" class="jodit_form_group">
<input ref="content_input" class="jodit_input" name="text" placeholder="${i18n('Text')}" type="text"/>
</div>
<label ref="target_checkbox_box">
<input ref="target_checkbox" class="jodit_checkbox" name="target" type="checkbox"/>
<span>${i18n('Open in new tab')}</span>
</label>
<label ref="nofollow_checkbox_box">
<input ref="nofollow_checkbox" class="jodit_checkbox" name="nofollow" type="checkbox"/>
<span>${i18n('No follow')}</span>
</label>
<div class="jodit_buttons">
<button ref="unlink" class="jodit_button jodit_unlink_button" type="button">${i18n('Unlink')}</button>
<button ref="insert" class="jodit_button jodit_link_insert_button" type="submit">${i18n('Insert')}</button>
</div>
<form/>`, {
const i18n = editor.i18n.bind(editor), { openInNewTabCheckbox, noFollowCheckbox, formTemplate, formClassName } = editor.options.link, form = editor.create.fromHTML(formTemplate(editor), {
target_checkbox_box: openInNewTabCheckbox,
nofollow_checkbox_box: noFollowCheckbox
});
const elements = refs(form), { insert, unlink, content_input_box } = elements, { target_checkbox, nofollow_checkbox, url_input, content_input } = elements, currentElement = current, isImageContent = Dom_Dom.isImage(currentElement, editor.editorWindow);
const elements = refs(form), { insert, unlink, content_input_box } = elements, { target_checkbox, nofollow_checkbox, url_input } = elements, currentElement = current, isImageContent = Dom_Dom.isImage(currentElement, editor.editorWindow);
let { content_input } = elements;
if (!content_input) {
content_input = editor.create.element('input', {
type: 'hidden',
ref: "content_input"
});
}
if (formClassName) {
form.classList.add(formClassName);
}
if (isImageContent) {
Dom_Dom.hide(content_input_box);
}
Expand All @@ -13054,11 +13068,11 @@ Config_Config.prototype.controls.link = {
}
if (link) {
url_input.value = link.getAttribute('href') || '';
if (openInNewTabCheckbox) {
if (openInNewTabCheckbox && target_checkbox) {
target_checkbox.checked =
link.getAttribute('target') === '_blank';
}
if (noFollowCheckbox) {
if (noFollowCheckbox && nofollow_checkbox) {
nofollow_checkbox.checked =
link.getAttribute('rel') === 'nofollow';
}
Expand Down Expand Up @@ -13114,15 +13128,15 @@ Config_Config.prototype.controls.link = {
a.textContent = url_input.value;
}
}
if (openInNewTabCheckbox) {
if (openInNewTabCheckbox && target_checkbox) {
if (target_checkbox.checked) {
a.setAttribute('target', '_blank');
}
else {
a.removeAttribute('target');
}
}
if (noFollowCheckbox) {
if (noFollowCheckbox && nofollow_checkbox) {
if (nofollow_checkbox.checked) {
a.setAttribute('rel', 'nofollow');
}
Expand Down
2 changes: 1 addition & 1 deletion build/jodit.es2018.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions build/jodit.es2018.min.js

Large diffs are not rendered by default.

30 changes: 22 additions & 8 deletions build/jodit.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*!
jodit - Jodit is awesome and usefully wysiwyg editor with filebrowser
Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/)
Version: v3.3.18
Version: v3.3.19
Url: https://xdsoft.net/jodit/
License(s): MIT
*/
Expand Down Expand Up @@ -11661,7 +11661,7 @@ var View = (function (_super) {
var _a, _b, _c;
var _this = _super.call(this, jodit, options) || this;
_this.components = new Set();
_this.version = "3.3.18";
_this.version = "3.3.19";
_this.__modulesInstances = {};
_this.buffer = storage_1.Storage.makeStorage();
_this.progressbar = new ProgressBar_1.ProgressBar(_this);
Expand Down Expand Up @@ -16355,6 +16355,10 @@ var Config_1 = __webpack_require__(4);
var Dom_1 = __webpack_require__(1);
var helpers_1 = __webpack_require__(3);
Config_1.Config.prototype.link = {
formTemplate: function (editor) {
var i18n = editor.i18n.bind(editor);
return "<form class=\"jodit_form\">\n\t\t\t<div class=\"jodit_form_group\">\n\t\t\t\t<input ref=\"url_input\" class=\"jodit_input\" required type=\"text\" name=\"url\" placeholder=\"http://\" type=\"text\"/>\n\t\t\t</div>\n\t\t\t<div ref=\"content_input_box\" class=\"jodit_form_group\">\n\t\t\t\t<input ref=\"content_input\" class=\"jodit_input\" name=\"text\" placeholder=\"" + i18n('Text') + "\" type=\"text\"/>\n\t\t\t</div>\n\t\t\t<label ref=\"target_checkbox_box\">\n\t\t\t\t<input ref=\"target_checkbox\" class=\"jodit_checkbox\" name=\"target\" type=\"checkbox\"/>\n\t\t\t\t<span>" + i18n('Open in new tab') + "</span>\n\t\t\t</label>\n\t\t\t<label ref=\"nofollow_checkbox_box\">\n\t\t\t\t<input ref=\"nofollow_checkbox\" class=\"jodit_checkbox\" name=\"nofollow\" type=\"checkbox\"/>\n\t\t\t\t<span>" + i18n('No follow') + "</span>\n\t\t\t</label>\n\t\t\t<div class=\"jodit_buttons\">\n\t\t\t\t<button ref=\"unlink\" class=\"jodit_button jodit_unlink_button\" type=\"button\">" + i18n('Unlink') + "</button>\n\t\t\t\t<button ref=\"insert\" class=\"jodit_button jodit_link_insert_button\" type=\"submit\">" + i18n('Insert') + "</button>\n\t\t\t</div>\n\t\t<form/>";
},
followOnDblClick: true,
processVideoLink: true,
processPastedLink: true,
Expand All @@ -16378,11 +16382,21 @@ Config_1.Config.prototype.controls.link = {
return current && Dom_1.Dom.closest(current, 'a', editor.editor) !== false;
},
popup: function (editor, current, self, close) {
var i18n = editor.i18n.bind(editor), _a = editor.options.link, openInNewTabCheckbox = _a.openInNewTabCheckbox, noFollowCheckbox = _a.noFollowCheckbox, form = editor.create.fromHTML("<form class=\"jodit_form\">\n\t\t\t\t\t\t<div class=\"jodit_form_group\">\n\t\t\t\t\t\t\t<input ref=\"url_input\" class=\"jodit_input\" required type=\"text\" name=\"url\" placeholder=\"http://\" type=\"text\"/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div ref=\"content_input_box\" class=\"jodit_form_group\">\n\t\t\t\t\t\t\t<input ref=\"content_input\" class=\"jodit_input\" name=\"text\" placeholder=\"" + i18n('Text') + "\" type=\"text\"/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<label ref=\"target_checkbox_box\">\n\t\t\t\t\t\t\t<input ref=\"target_checkbox\" class=\"jodit_checkbox\" name=\"target\" type=\"checkbox\"/>\n\t\t\t\t\t\t\t<span>" + i18n('Open in new tab') + "</span>\n\t\t\t\t\t\t</label>\n\t\t\t\t\t\t<label ref=\"nofollow_checkbox_box\">\n\t\t\t\t\t\t\t<input ref=\"nofollow_checkbox\" class=\"jodit_checkbox\" name=\"nofollow\" type=\"checkbox\"/>\n\t\t\t\t\t\t\t<span>" + i18n('No follow') + "</span>\n\t\t\t\t\t\t</label>\n\t\t\t\t\t\t<div class=\"jodit_buttons\">\n\t\t\t\t\t\t\t<button ref=\"unlink\" class=\"jodit_button jodit_unlink_button\" type=\"button\">" + i18n('Unlink') + "</button>\n\t\t\t\t\t\t\t<button ref=\"insert\" class=\"jodit_button jodit_link_insert_button\" type=\"submit\">" + i18n('Insert') + "</button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t<form/>", {
var i18n = editor.i18n.bind(editor), _a = editor.options.link, openInNewTabCheckbox = _a.openInNewTabCheckbox, noFollowCheckbox = _a.noFollowCheckbox, formTemplate = _a.formTemplate, formClassName = _a.formClassName, form = editor.create.fromHTML(formTemplate(editor), {
target_checkbox_box: openInNewTabCheckbox,
nofollow_checkbox_box: noFollowCheckbox
});
var elements = helpers_1.refs(form), insert = elements.insert, unlink = elements.unlink, content_input_box = elements.content_input_box, _b = elements, target_checkbox = _b.target_checkbox, nofollow_checkbox = _b.nofollow_checkbox, url_input = _b.url_input, content_input = _b.content_input, currentElement = current, isImageContent = Dom_1.Dom.isImage(currentElement, editor.editorWindow);
var elements = helpers_1.refs(form), insert = elements.insert, unlink = elements.unlink, content_input_box = elements.content_input_box, _b = elements, target_checkbox = _b.target_checkbox, nofollow_checkbox = _b.nofollow_checkbox, url_input = _b.url_input, currentElement = current, isImageContent = Dom_1.Dom.isImage(currentElement, editor.editorWindow);
var content_input = elements.content_input;
if (!content_input) {
content_input = editor.create.element('input', {
type: 'hidden',
ref: "content_input"
});
}
if (formClassName) {
form.classList.add(formClassName);
}
if (isImageContent) {
Dom_1.Dom.hide(content_input_box);
}
Expand All @@ -16401,11 +16415,11 @@ Config_1.Config.prototype.controls.link = {
}
if (link) {
url_input.value = link.getAttribute('href') || '';
if (openInNewTabCheckbox) {
if (openInNewTabCheckbox && target_checkbox) {
target_checkbox.checked =
link.getAttribute('target') === '_blank';
}
if (noFollowCheckbox) {
if (noFollowCheckbox && nofollow_checkbox) {
nofollow_checkbox.checked =
link.getAttribute('rel') === 'nofollow';
}
Expand Down Expand Up @@ -16461,15 +16475,15 @@ Config_1.Config.prototype.controls.link = {
a.textContent = url_input.value;
}
}
if (openInNewTabCheckbox) {
if (openInNewTabCheckbox && target_checkbox) {
if (target_checkbox.checked) {
a.setAttribute('target', '_blank');
}
else {
a.removeAttribute('target');
}
}
if (noFollowCheckbox) {
if (noFollowCheckbox && nofollow_checkbox) {
if (nofollow_checkbox.checked) {
a.setAttribute('rel', 'nofollow');
}
Expand Down
2 changes: 1 addition & 1 deletion build/jodit.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions build/jodit.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jodit",
"version": "3.3.18",
"version": "3.3.19",
"description": "Jodit is awesome and usefully wysiwyg editor with filebrowser",
"main": "build/jodit.min.js",
"types": "index.d.ts",
Expand Down

0 comments on commit eed37bf

Please sign in to comment.