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/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.18.
|
|
4
|
+
* Version: v4.18.2
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -1830,7 +1830,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1830
1830
|
* ```
|
|
1831
1831
|
* @packageDocumentation
|
|
1832
1832
|
* @module constants
|
|
1833
|
-
*/ const APP_VERSION = "4.18.
|
|
1833
|
+
*/ const APP_VERSION = "4.18.2";
|
|
1834
1834
|
// prettier-ignore
|
|
1835
1835
|
const ES = "es2015";
|
|
1836
1836
|
const IS_ES_MODERN = true;
|
|
@@ -29214,7 +29214,11 @@ jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_5__.Icon.set('class-span', (_class_s
|
|
|
29214
29214
|
* Clean HTML after removeFormat and insertHorizontalRule command
|
|
29215
29215
|
*/ const TRAILING_BR_BLOCKS = 'p, div, li, td, th, h1, h2, h3, h4, h5, h6, blockquote';
|
|
29216
29216
|
class cleanHtml extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_7__.Plugin {
|
|
29217
|
-
/** @override */ afterInit(
|
|
29217
|
+
/** @override */ afterInit() {
|
|
29218
|
+
// The walker's own `:afterInit` watcher is bound on that very event,
|
|
29219
|
+
// so without this the first pass waited for the first key or click
|
|
29220
|
+
this.onChangeCleanHTML();
|
|
29221
|
+
}
|
|
29218
29222
|
get isEditMode() {
|
|
29219
29223
|
return !(this.j.isInDestruct || !this.j.isEditorMode() || this.j.getReadOnly());
|
|
29220
29224
|
}
|
|
@@ -29353,10 +29357,11 @@ class cleanHtml extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_7__.Pl
|
|
|
29353
29357
|
;(0,jodit_core_helpers_html_safe_html__WEBPACK_IMPORTED_MODULE_6__.safeHTML)(sandBox, this.j.o.cleanHTML);
|
|
29354
29358
|
}
|
|
29355
29359
|
/** @override */ beforeDestruct() {
|
|
29360
|
+
this.j.e.off('safeHTML', this.onSafeHTML).off('beforeSetNativeEditorValue', this.onBeforeSetNativeEditorValue).off('afterSetNativeEditorValue', this.onAfterSetNativeEditorValue);
|
|
29356
29361
|
this.walker.destruct();
|
|
29357
29362
|
}
|
|
29358
|
-
constructor(
|
|
29359
|
-
super(
|
|
29363
|
+
constructor(jodit){
|
|
29364
|
+
super(jodit), /** @override */ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "buttons", [
|
|
29360
29365
|
{
|
|
29361
29366
|
name: 'eraser',
|
|
29362
29367
|
group: 'font-style'
|
|
@@ -29364,6 +29369,12 @@ class cleanHtml extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_7__.Pl
|
|
|
29364
29369
|
]), (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, {
|
|
29365
29370
|
timeout: this.j.o.cleanHTML.timeout
|
|
29366
29371
|
}));
|
|
29372
|
+
// `@watch` binds once the plugin is ready, which is after the initial
|
|
29373
|
+
// value has already gone into the editor. The handlers that keep
|
|
29374
|
+
// markup out of the live tree have to be there from the start, or
|
|
29375
|
+
// event handlers in a textarea's content run before anything
|
|
29376
|
+
// sanitises them.
|
|
29377
|
+
jodit.e.on('safeHTML', this.onSafeHTML).on('beforeSetNativeEditorValue', this.onBeforeSetNativeEditorValue).on('afterSetNativeEditorValue', this.onAfterSetNativeEditorValue);
|
|
29367
29378
|
}
|
|
29368
29379
|
}
|
|
29369
29380
|
;(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
@@ -29382,16 +29393,16 @@ class cleanHtml extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_7__.Pl
|
|
|
29382
29393
|
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)(':beforeCommand')
|
|
29383
29394
|
], cleanHtml.prototype, "beforeCommand", null);
|
|
29384
29395
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
29385
|
-
|
|
29396
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.autobind
|
|
29386
29397
|
], cleanHtml.prototype, "onAfterSetNativeEditorValue", null);
|
|
29387
29398
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
29388
|
-
|
|
29399
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.autobind
|
|
29389
29400
|
], cleanHtml.prototype, "onBeforeSetNativeEditorValue", null);
|
|
29390
29401
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
29391
29402
|
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)(':afterGetValueFromEditor')
|
|
29392
29403
|
], cleanHtml.prototype, "onAfterGetValueFromEditor", null);
|
|
29393
29404
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
29394
|
-
|
|
29405
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.autobind
|
|
29395
29406
|
], cleanHtml.prototype, "onSafeHTML", null);
|
|
29396
29407
|
jodit_core_global__WEBPACK_IMPORTED_MODULE_5__.pluginSystem.add('cleanHtml', cleanHtml);
|
|
29397
29408
|
|