jodit 4.15.15 → 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 +8 -0
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +4 -4
- package/es2015/jodit.js +21 -9
- 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 +21 -9
- 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 +21 -9
- 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 +21 -9
- 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/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/es2015/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
|
*/
|
|
@@ -1786,7 +1786,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1786
1786
|
* ```
|
|
1787
1787
|
* @packageDocumentation
|
|
1788
1788
|
* @module constants
|
|
1789
|
-
*/ const APP_VERSION = "4.15.
|
|
1789
|
+
*/ const APP_VERSION = "4.15.16";
|
|
1790
1790
|
// prettier-ignore
|
|
1791
1791
|
const ES = "es2015";
|
|
1792
1792
|
const IS_ES_MODERN = true;
|
|
@@ -28737,7 +28737,10 @@ class cleanHtml extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_7__.Pl
|
|
|
28737
28737
|
if (!this.j.o.cleanHTML.collapseEmptyValueToEmptyString) {
|
|
28738
28738
|
return;
|
|
28739
28739
|
}
|
|
28740
|
-
|
|
28740
|
+
// Only a text block can be an empty caret container; a lone video,
|
|
28741
|
+
// iframe or icon has no children but is content in itself
|
|
28742
|
+
const lone = /^<([a-z][a-z0-9]*)\b[^>]*>(?:<br\/?>)?<\/\1>$/i.exec(data.value.trim());
|
|
28743
|
+
if (lone && /^(p|div|h[1-6]|blockquote|pre)$/i.test(lone[1])) {
|
|
28741
28744
|
data.value = '';
|
|
28742
28745
|
}
|
|
28743
28746
|
}
|
|
@@ -30027,6 +30030,15 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_0__.pluginSystem.add('color', color);
|
|
|
30027
30030
|
|
|
30028
30031
|
|
|
30029
30032
|
jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_2__.Icon.set('brush', (_brush_svg__WEBPACK_IMPORTED_MODULE_5___default()));
|
|
30033
|
+
/**
|
|
30034
|
+
* Set a color style; an empty value removes it, and with it the `style`
|
|
30035
|
+
* attribute once nothing else is left in it
|
|
30036
|
+
*/ function setColorStyle(elm, key, value) {
|
|
30037
|
+
(0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_1__.css)(elm, key, value);
|
|
30038
|
+
if (!(0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_1__.attr)(elm, 'style')) {
|
|
30039
|
+
(0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_1__.attr)(elm, 'style', null);
|
|
30040
|
+
}
|
|
30041
|
+
}
|
|
30030
30042
|
jodit_config__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.controls.brushCell = {
|
|
30031
30043
|
isVisible: (editor)=>{
|
|
30032
30044
|
return !editor.o.disablePlugins.includes('color');
|
|
@@ -30042,7 +30054,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.controls.brushCell =
|
|
|
30042
30054
|
}
|
|
30043
30055
|
const makeColorPicker = (key)=>(0,jodit_modules_widget__WEBPACK_IMPORTED_MODULE_4__.ColorPickerWidget)(editor, (value)=>{
|
|
30044
30056
|
selected.forEach((cell)=>{
|
|
30045
|
-
|
|
30057
|
+
setColorStyle(cell, key, value);
|
|
30046
30058
|
});
|
|
30047
30059
|
editor.lock();
|
|
30048
30060
|
editor.synchronizeValues();
|
|
@@ -30128,7 +30140,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.controls.brush = {
|
|
|
30128
30140
|
if (!currentElement) {
|
|
30129
30141
|
editor.execCommand('background', false, value);
|
|
30130
30142
|
} else {
|
|
30131
|
-
(
|
|
30143
|
+
setColorStyle(currentElement, 'backgroundColor', value);
|
|
30132
30144
|
}
|
|
30133
30145
|
;(0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_1__.dataBind)(button, 'color', value);
|
|
30134
30146
|
(0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_1__.dataBind)(button, 'color-mode', 'background');
|
|
@@ -30138,7 +30150,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.controls.brush = {
|
|
|
30138
30150
|
if (!currentElement) {
|
|
30139
30151
|
editor.execCommand('forecolor', false, value);
|
|
30140
30152
|
} else {
|
|
30141
|
-
(
|
|
30153
|
+
setColorStyle(currentElement, 'color', value);
|
|
30142
30154
|
}
|
|
30143
30155
|
;(0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_1__.dataBind)(button, 'color', value);
|
|
30144
30156
|
(0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_1__.dataBind)(button, 'color-mode', 'color');
|
|
@@ -30167,10 +30179,10 @@ jodit_config__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.controls.brush = {
|
|
|
30167
30179
|
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)) {
|
|
30168
30180
|
switch(mode){
|
|
30169
30181
|
case 'color':
|
|
30170
|
-
(
|
|
30182
|
+
setColorStyle(current, 'color', color);
|
|
30171
30183
|
break;
|
|
30172
30184
|
case 'background':
|
|
30173
|
-
(
|
|
30185
|
+
setColorStyle(current, 'backgroundColor', color);
|
|
30174
30186
|
break;
|
|
30175
30187
|
}
|
|
30176
30188
|
} else {
|
|
@@ -38945,7 +38957,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.useInputsPlaceholder
|
|
|
38945
38957
|
this.placeholderElm.innerHTML = (0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_7__.attr)(editor.element, 'placeholder') || '';
|
|
38946
38958
|
}
|
|
38947
38959
|
editor.e.fire('placeholder', this.placeholderElm.innerHTML);
|
|
38948
|
-
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);
|
|
38960
|
+
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);
|
|
38949
38961
|
this.addNativeListeners();
|
|
38950
38962
|
this.toggle();
|
|
38951
38963
|
});
|