jodit 4.18.1 → 4.18.2
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 +6 -0
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +3 -3
- package/es2015/jodit.js +19 -8
- package/es2015/jodit.min.js +3 -3
- 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 +3 -3
- package/es2018/jodit.min.js +3 -3
- 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 +3 -3
- package/es2021/jodit.js +19 -8
- package/es2021/jodit.min.js +3 -3
- 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 +24 -24
- package/es2021.en/jodit.js +19 -8
- package/es2021.en/jodit.min.js +3 -3
- 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 -8
- 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/core/constants.js +1 -1
- package/esm/plugins/clean-html/clean-html.d.ts +2 -1
- package/esm/plugins/clean-html/clean-html.js +24 -7
- package/package.json +1 -1
- package/types/plugins/clean-html/clean-html.d.ts +2 -1
package/es2021.en/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.18.
|
|
4
|
+
* Version: v4.18.2
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -1824,7 +1824,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1824
1824
|
* ```
|
|
1825
1825
|
* @packageDocumentation
|
|
1826
1826
|
* @module constants
|
|
1827
|
-
*/ const APP_VERSION = "4.18.
|
|
1827
|
+
*/ const APP_VERSION = "4.18.2";
|
|
1828
1828
|
// prettier-ignore
|
|
1829
1829
|
const ES = "es2021";
|
|
1830
1830
|
const IS_ES_MODERN = true;
|
|
@@ -28913,7 +28913,11 @@ jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_5__.Icon.set('class-span', (_class_s
|
|
|
28913
28913
|
* Clean HTML after removeFormat and insertHorizontalRule command
|
|
28914
28914
|
*/ const TRAILING_BR_BLOCKS = 'p, div, li, td, th, h1, h2, h3, h4, h5, h6, blockquote';
|
|
28915
28915
|
class cleanHtml extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_7__.Plugin {
|
|
28916
|
-
/** @override */ afterInit(
|
|
28916
|
+
/** @override */ afterInit() {
|
|
28917
|
+
// The walker's own `:afterInit` watcher is bound on that very event,
|
|
28918
|
+
// so without this the first pass waited for the first key or click
|
|
28919
|
+
this.onChangeCleanHTML();
|
|
28920
|
+
}
|
|
28917
28921
|
get isEditMode() {
|
|
28918
28922
|
return !(this.j.isInDestruct || !this.j.isEditorMode() || this.j.getReadOnly());
|
|
28919
28923
|
}
|
|
@@ -29051,10 +29055,11 @@ class cleanHtml extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_7__.Pl
|
|
|
29051
29055
|
;(0,jodit_core_helpers_html_safe_html__WEBPACK_IMPORTED_MODULE_6__.safeHTML)(sandBox, this.j.o.cleanHTML);
|
|
29052
29056
|
}
|
|
29053
29057
|
/** @override */ beforeDestruct() {
|
|
29058
|
+
this.j.e.off('safeHTML', this.onSafeHTML).off('beforeSetNativeEditorValue', this.onBeforeSetNativeEditorValue).off('afterSetNativeEditorValue', this.onAfterSetNativeEditorValue);
|
|
29054
29059
|
this.walker.destruct();
|
|
29055
29060
|
}
|
|
29056
|
-
constructor(
|
|
29057
|
-
super(
|
|
29061
|
+
constructor(jodit){
|
|
29062
|
+
super(jodit), /** @override */ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "buttons", [
|
|
29058
29063
|
{
|
|
29059
29064
|
name: 'eraser',
|
|
29060
29065
|
group: 'font-style'
|
|
@@ -29062,6 +29067,12 @@ class cleanHtml extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_7__.Pl
|
|
|
29062
29067
|
]), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "currentSelectionNode", null), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "walker", new jodit_core_dom_lazy_walker__WEBPACK_IMPORTED_MODULE_4__.LazyWalker(this.j.async, {
|
|
29063
29068
|
timeout: this.j.o.cleanHTML.timeout
|
|
29064
29069
|
}));
|
|
29070
|
+
// `@watch` binds once the plugin is ready, which is after the initial
|
|
29071
|
+
// value has already gone into the editor. The handlers that keep
|
|
29072
|
+
// markup out of the live tree have to be there from the start, or
|
|
29073
|
+
// event handlers in a textarea's content run before anything
|
|
29074
|
+
// sanitises them.
|
|
29075
|
+
jodit.e.on('safeHTML', this.onSafeHTML).on('beforeSetNativeEditorValue', this.onBeforeSetNativeEditorValue).on('afterSetNativeEditorValue', this.onAfterSetNativeEditorValue);
|
|
29065
29076
|
}
|
|
29066
29077
|
}
|
|
29067
29078
|
;(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
@@ -29080,16 +29091,16 @@ class cleanHtml extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_7__.Pl
|
|
|
29080
29091
|
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)(':beforeCommand')
|
|
29081
29092
|
], cleanHtml.prototype, "beforeCommand", null);
|
|
29082
29093
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
29083
|
-
|
|
29094
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.autobind
|
|
29084
29095
|
], cleanHtml.prototype, "onAfterSetNativeEditorValue", null);
|
|
29085
29096
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
29086
|
-
|
|
29097
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.autobind
|
|
29087
29098
|
], cleanHtml.prototype, "onBeforeSetNativeEditorValue", null);
|
|
29088
29099
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
29089
29100
|
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)(':afterGetValueFromEditor')
|
|
29090
29101
|
], cleanHtml.prototype, "onAfterGetValueFromEditor", null);
|
|
29091
29102
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
29092
|
-
|
|
29103
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.autobind
|
|
29093
29104
|
], cleanHtml.prototype, "onSafeHTML", null);
|
|
29094
29105
|
jodit_core_global__WEBPACK_IMPORTED_MODULE_5__.pluginSystem.add('cleanHtml', cleanHtml);
|
|
29095
29106
|
|