jodit 4.15.14 → 4.15.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +4 -4
- package/es2015/jodit.js +25 -10
- package/es2015/jodit.min.js +4 -4
- package/es2015/plugins/debug/debug.css +1 -1
- package/es2015/plugins/debug/debug.js +1 -1
- package/es2015/plugins/debug/debug.min.js +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2018/jodit.fat.min.js +4 -4
- package/es2018/jodit.min.js +4 -4
- package/es2018/plugins/debug/debug.min.js +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2021/jodit.css +1 -1
- package/es2021/jodit.fat.min.js +4 -4
- package/es2021/jodit.js +25 -10
- package/es2021/jodit.min.js +4 -4
- package/es2021/plugins/debug/debug.css +1 -1
- package/es2021/plugins/debug/debug.js +1 -1
- package/es2021/plugins/debug/debug.min.js +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2021.en/jodit.css +1 -1
- package/es2021.en/jodit.fat.min.js +4 -4
- package/es2021.en/jodit.js +25 -10
- package/es2021.en/jodit.min.js +4 -4
- package/es2021.en/plugins/debug/debug.css +1 -1
- package/es2021.en/plugins/debug/debug.js +1 -1
- package/es2021.en/plugins/debug/debug.min.js +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es5/jodit.css +2 -2
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +25 -10
- package/es5/jodit.min.css +2 -2
- package/es5/jodit.min.js +2 -2
- package/es5/plugins/debug/debug.css +1 -1
- package/es5/plugins/debug/debug.js +1 -1
- package/es5/plugins/debug/debug.min.js +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es5/polyfills.fat.min.js +1 -1
- package/es5/polyfills.js +1 -1
- package/es5/polyfills.min.js +1 -1
- package/esm/config.d.ts +4 -2
- package/esm/core/constants.js +1 -1
- package/esm/plugins/clean-html/clean-html.js +4 -1
- package/esm/plugins/clean-html/config.d.ts +4 -2
- package/esm/plugins/color/config.js +16 -6
- package/esm/plugins/paste/helpers.js +6 -1
- package/esm/plugins/placeholder/placeholder.js +2 -1
- package/package.json +1 -1
- package/types/config.d.ts +4 -2
- package/types/plugins/clean-html/config.d.ts +4 -2
package/es5/jodit.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
|
|
3
3
|
* Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
|
|
4
|
-
* Version: v4.15.
|
|
4
|
+
* Version: v4.15.16
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -2110,7 +2110,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2110
2110
|
* @packageDocumentation
|
|
2111
2111
|
* @module constants
|
|
2112
2112
|
*/
|
|
2113
|
-
var APP_VERSION = "4.15.
|
|
2113
|
+
var APP_VERSION = "4.15.16";
|
|
2114
2114
|
// prettier-ignore
|
|
2115
2115
|
var ES = "es5";
|
|
2116
2116
|
var IS_ES_MODERN = false;
|
|
@@ -34352,7 +34352,10 @@ var cleanHtml = /*#__PURE__*/ function(Plugin) {
|
|
|
34352
34352
|
if (!this.j.o.cleanHTML.collapseEmptyValueToEmptyString) {
|
|
34353
34353
|
return;
|
|
34354
34354
|
}
|
|
34355
|
-
|
|
34355
|
+
// Only a text block can be an empty caret container; a lone video,
|
|
34356
|
+
// iframe or icon has no children but is content in itself
|
|
34357
|
+
var lone = /^<([a-z][a-z0-9]*)\b[^>]*>(?:<br\/?>)?<\/\1>$/i.exec(data.value.trim());
|
|
34358
|
+
if (lone && /^(p|div|h[1-6]|blockquote|pre)$/i.test(lone[1])) {
|
|
34356
34359
|
data.value = '';
|
|
34357
34360
|
}
|
|
34358
34361
|
}
|
|
@@ -35724,6 +35727,15 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_0__.pluginSystem.add('color', color);
|
|
|
35724
35727
|
|
|
35725
35728
|
|
|
35726
35729
|
jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_2__.Icon.set('brush', (_brush_svg__WEBPACK_IMPORTED_MODULE_5___default()));
|
|
35730
|
+
/**
|
|
35731
|
+
* Set a color style; an empty value removes it, and with it the `style`
|
|
35732
|
+
* attribute once nothing else is left in it
|
|
35733
|
+
*/ function setColorStyle(elm, key, value) {
|
|
35734
|
+
(0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_1__.css)(elm, key, value);
|
|
35735
|
+
if (!(0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_1__.attr)(elm, 'style')) {
|
|
35736
|
+
(0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_1__.attr)(elm, 'style', null);
|
|
35737
|
+
}
|
|
35738
|
+
}
|
|
35727
35739
|
jodit_config__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.controls.brushCell = {
|
|
35728
35740
|
isVisible: function isVisible(editor) {
|
|
35729
35741
|
return !editor.o.disablePlugins.includes('color');
|
|
@@ -35740,7 +35752,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.controls.brushCell =
|
|
|
35740
35752
|
var makeColorPicker = function makeColorPicker(key) {
|
|
35741
35753
|
return (0,jodit_modules_widget__WEBPACK_IMPORTED_MODULE_4__.ColorPickerWidget)(editor, function(value) {
|
|
35742
35754
|
selected.forEach(function(cell) {
|
|
35743
|
-
|
|
35755
|
+
setColorStyle(cell, key, value);
|
|
35744
35756
|
});
|
|
35745
35757
|
editor.lock();
|
|
35746
35758
|
editor.synchronizeValues();
|
|
@@ -35827,7 +35839,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.controls.brush = {
|
|
|
35827
35839
|
if (!currentElement) {
|
|
35828
35840
|
editor.execCommand('background', false, value);
|
|
35829
35841
|
} else {
|
|
35830
|
-
(
|
|
35842
|
+
setColorStyle(currentElement, 'backgroundColor', value);
|
|
35831
35843
|
}
|
|
35832
35844
|
;(0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_1__.dataBind)(button, 'color', value);
|
|
35833
35845
|
(0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_1__.dataBind)(button, 'color-mode', 'background');
|
|
@@ -35837,7 +35849,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.controls.brush = {
|
|
|
35837
35849
|
if (!currentElement) {
|
|
35838
35850
|
editor.execCommand('forecolor', false, value);
|
|
35839
35851
|
} else {
|
|
35840
|
-
(
|
|
35852
|
+
setColorStyle(currentElement, 'color', value);
|
|
35841
35853
|
}
|
|
35842
35854
|
;(0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_1__.dataBind)(button, 'color', value);
|
|
35843
35855
|
(0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_1__.dataBind)(button, 'color-mode', 'color');
|
|
@@ -35867,10 +35879,10 @@ jodit_config__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.controls.brush = {
|
|
|
35867
35879
|
if (current && current !== jodit.editor && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isNode(current) && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isElement(current)) {
|
|
35868
35880
|
switch(mode){
|
|
35869
35881
|
case 'color':
|
|
35870
|
-
(
|
|
35882
|
+
setColorStyle(current, 'color', color);
|
|
35871
35883
|
break;
|
|
35872
35884
|
case 'background':
|
|
35873
|
-
(
|
|
35885
|
+
setColorStyle(current, 'backgroundColor', color);
|
|
35874
35886
|
break;
|
|
35875
35887
|
}
|
|
35876
35888
|
} else {
|
|
@@ -45461,10 +45473,13 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.paste = {
|
|
|
45461
45473
|
callback(value);
|
|
45462
45474
|
});
|
|
45463
45475
|
});
|
|
45464
|
-
dialog.e.
|
|
45476
|
+
dialog.e.on(dialog, 'beforeClose', function() {
|
|
45477
|
+
jodit.e.fire('beforeClosePasteDialog', dialog);
|
|
45478
|
+
}).one(dialog, 'afterClose', function() {
|
|
45465
45479
|
if (!jodit.s.isFocused()) {
|
|
45466
45480
|
jodit.s.focus();
|
|
45467
45481
|
}
|
|
45482
|
+
jodit.e.fire('afterClosePasteDialog', dialog);
|
|
45468
45483
|
});
|
|
45469
45484
|
var cancel = (0,jodit_core_ui_button_button_button__WEBPACK_IMPORTED_MODULE_4__.Button)(jodit, {
|
|
45470
45485
|
text: 'Cancel',
|
|
@@ -45838,7 +45853,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.useInputsPlaceholder
|
|
|
45838
45853
|
_this.placeholderElm.innerHTML = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_12__.attr)(editor.element, 'placeholder') || '';
|
|
45839
45854
|
}
|
|
45840
45855
|
editor.e.fire('placeholder', _this.placeholderElm.innerHTML);
|
|
45841
|
-
editor.e.off('.placeholder').on('changePlace.placeholder', _this.addNativeListeners).on('change.placeholder focus.placeholder keyup.placeholder mouseup.placeholder keydown.placeholder ' + 'mousedown.placeholder afterSetMode.placeholder changePlace.placeholder', _this.toggle).on(window, 'load', _this.toggle);
|
|
45856
|
+
editor.e.off('.placeholder').on('changePlace.placeholder', _this.addNativeListeners).on('change.placeholder focus.placeholder keyup.placeholder mouseup.placeholder keydown.placeholder ' + 'mousedown.placeholder afterSetMode.placeholder changePlace.placeholder ' + 'internalChange.placeholder', _this.toggle).on(window, 'load', _this.toggle);
|
|
45842
45857
|
_this.addNativeListeners();
|
|
45843
45858
|
_this.toggle();
|
|
45844
45859
|
});
|
package/es5/jodit.min.css
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
|
|
3
3
|
* Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
|
|
4
|
-
* Version: v4.15.
|
|
4
|
+
* Version: v4.15.16
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
8
8
|
/*!
|
|
9
9
|
* jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
|
|
10
10
|
* Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
|
|
11
|
-
* Version: v4.15.
|
|
11
|
+
* Version: v4.15.16
|
|
12
12
|
* Url: https://xdsoft.net/jodit/
|
|
13
13
|
* License(s): MIT
|
|
14
14
|
*/
|