jodit 4.15.7 → 4.15.8
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 +7 -0
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +4 -4
- package/es2015/jodit.js +50 -22
- 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 +5 -5
- package/es2021/jodit.js +49 -21
- package/es2021/jodit.min.js +5 -5
- 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 +5 -5
- package/es2021.en/jodit.js +49 -21
- package/es2021.en/jodit.min.js +5 -5
- 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 +50 -22
- 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 +2 -1
- package/esm/core/constants.js +1 -1
- package/esm/plugins/clean-html/config.d.ts +2 -1
- package/esm/plugins/clean-html/helpers/visitor/filters/try-remove-node.js +10 -0
- package/esm/plugins/mobile/mobile.js +25 -4
- package/package.json +1 -1
- package/types/config.d.ts +2 -1
- package/types/plugins/clean-html/config.d.ts +2 -1
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.8
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -2107,7 +2107,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2107
2107
|
* @packageDocumentation
|
|
2108
2108
|
* @module constants
|
|
2109
2109
|
*/
|
|
2110
|
-
var APP_VERSION = "4.15.
|
|
2110
|
+
var APP_VERSION = "4.15.8";
|
|
2111
2111
|
// prettier-ignore
|
|
2112
2112
|
var ES = "es5";
|
|
2113
2113
|
var IS_ES_MODERN = false;
|
|
@@ -35243,7 +35243,14 @@ function filterStyleProperties(style, allowed) {
|
|
|
35243
35243
|
// a pending-format marker the user is about to type into (#1291). `current`
|
|
35244
35244
|
// is captured before a click moves the caret, so also check the live caret.
|
|
35245
35245
|
var liveCaret = jodit.s.isCollapsed() ? jodit.s.range.startContainer : null;
|
|
35246
|
-
return jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(node) && node.nodeName.match(jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.IS_INLINE) != null && !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isTemporary(node) && (0,jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_2__.trimInv)(node.innerHTML).length === 0 && (current == null || !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isOrContains(node, current)) && (liveCaret == null || !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isOrContains(node, liveCaret));
|
|
35246
|
+
return jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(node) && node.nodeName.match(jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.IS_INLINE) != null && !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isTemporary(node) && !isFragmentTarget(node) && (0,jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_2__.trimInv)(node.innerHTML).length === 0 && (current == null || !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isOrContains(node, current)) && (liveCaret == null || !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isOrContains(node, liveCaret));
|
|
35247
|
+
}
|
|
35248
|
+
/**
|
|
35249
|
+
* An element with an `id`, or an `<a>` with a `name`, is where an in-page link
|
|
35250
|
+
* (`#fragment`) lands. It is usually empty (`<a name="top"></a>`), and removing
|
|
35251
|
+
* it silently breaks every link that points at it.
|
|
35252
|
+
*/ function isFragmentTarget(element) {
|
|
35253
|
+
return element.hasAttribute('id') || element.nodeName === 'A' && element.hasAttribute('name');
|
|
35247
35254
|
}
|
|
35248
35255
|
|
|
35249
35256
|
|
|
@@ -44297,10 +44304,12 @@ jodit_config__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.controls.dots = {
|
|
|
44297
44304
|
"use strict";
|
|
44298
44305
|
/* unused harmony export mobile */
|
|
44299
44306
|
/* harmony import */ var _swc_helpers_to_consumable_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(42395);
|
|
44300
|
-
/* harmony import */ var
|
|
44301
|
-
/* harmony import */ var
|
|
44302
|
-
/* harmony import */ var
|
|
44303
|
-
/* harmony import */ var
|
|
44307
|
+
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(23211);
|
|
44308
|
+
/* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(28077);
|
|
44309
|
+
/* harmony import */ var jodit_core_helpers___WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(65946);
|
|
44310
|
+
/* harmony import */ var jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(85932);
|
|
44311
|
+
/* harmony import */ var jodit_core_ui_helpers_buttons__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(2496);
|
|
44312
|
+
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(3244);
|
|
44304
44313
|
/*!
|
|
44305
44314
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
44306
44315
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -44314,6 +44323,8 @@ jodit_config__WEBPACK_IMPORTED_MODULE_3__.Config.prototype.controls.dots = {
|
|
|
44314
44323
|
|
|
44315
44324
|
|
|
44316
44325
|
|
|
44326
|
+
|
|
44327
|
+
|
|
44317
44328
|
var isButtonSeparator = function isButtonSeparator(item) {
|
|
44318
44329
|
return item === '|' || item === '---' || item === '\n';
|
|
44319
44330
|
};
|
|
@@ -44329,7 +44340,7 @@ var isButtonSeparator = function isButtonSeparator(item) {
|
|
|
44329
44340
|
* the standard grouped mobile layout — groups, separators and `dots` — is
|
|
44330
44341
|
* preserved. See #1389.
|
|
44331
44342
|
*/ function fitToButtons(list, editor) {
|
|
44332
|
-
var allowed = (0,
|
|
44343
|
+
var allowed = (0,jodit_core_ui_helpers_buttons__WEBPACK_IMPORTED_MODULE_5__.flatButtonsSet)((0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_3__.splitArray)(editor.o.buttons), editor);
|
|
44333
44344
|
var groups = editor.getRegisteredButtonGroups();
|
|
44334
44345
|
var changed = false;
|
|
44335
44346
|
var hadDots = false;
|
|
@@ -44338,7 +44349,7 @@ var isButtonSeparator = function isButtonSeparator(item) {
|
|
|
44338
44349
|
try {
|
|
44339
44350
|
for(var _iterator = list[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
44340
44351
|
var item = _step.value;
|
|
44341
|
-
if ((0,
|
|
44352
|
+
if ((0,jodit_core_ui_helpers_buttons__WEBPACK_IMPORTED_MODULE_5__.isButtonGroup)(item)) {
|
|
44342
44353
|
var _flat;
|
|
44343
44354
|
var _groups_item_group;
|
|
44344
44355
|
var members = (0,_swc_helpers_to_consumable_array__WEBPACK_IMPORTED_MODULE_0__._)(item.buttons).concat((0,_swc_helpers_to_consumable_array__WEBPACK_IMPORTED_MODULE_0__._)((_groups_item_group = groups[item.group]) !== null && _groups_item_group !== void 0 ? _groups_item_group : []));
|
|
@@ -44407,8 +44418,8 @@ var isButtonSeparator = function isButtonSeparator(item) {
|
|
|
44407
44418
|
// Keep the "show all" overflow button only if some requested button is still
|
|
44408
44419
|
// hidden at this breakpoint.
|
|
44409
44420
|
if (hadDots) {
|
|
44410
|
-
var shown = (0,
|
|
44411
|
-
if ((0,
|
|
44421
|
+
var shown = (0,jodit_core_ui_helpers_buttons__WEBPACK_IMPORTED_MODULE_5__.flatButtonsSet)(cleaned, editor);
|
|
44422
|
+
if ((0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_3__.toArray)(allowed).some(function(button) {
|
|
44412
44423
|
return !shown.has(button);
|
|
44413
44424
|
})) {
|
|
44414
44425
|
cleaned.push('dots');
|
|
@@ -44416,10 +44427,25 @@ var isButtonSeparator = function isButtonSeparator(item) {
|
|
|
44416
44427
|
}
|
|
44417
44428
|
return cleaned;
|
|
44418
44429
|
}
|
|
44430
|
+
/**
|
|
44431
|
+
* The width that decides which breakpoint set the toolbar uses. A toolbar
|
|
44432
|
+
* rendered into an external container (`toolbar` set to an element or a
|
|
44433
|
+
* selector) lays out in that container, so its width is what matters there.
|
|
44434
|
+
*/ function adaptiveWidth(editor) {
|
|
44435
|
+
var _editor_container_parentElement;
|
|
44436
|
+
var toolbar = editor.o.toolbar;
|
|
44437
|
+
if ((0,jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_4__.isString)(toolbar) || jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__.Dom.isHTMLElement(toolbar)) {
|
|
44438
|
+
var width = editor.toolbarContainer.offsetWidth;
|
|
44439
|
+
if (width) {
|
|
44440
|
+
return width;
|
|
44441
|
+
}
|
|
44442
|
+
}
|
|
44443
|
+
return ((_editor_container_parentElement = editor.container.parentElement) !== null && _editor_container_parentElement !== void 0 ? _editor_container_parentElement : editor.container).offsetWidth;
|
|
44444
|
+
}
|
|
44419
44445
|
/**
|
|
44420
44446
|
* Rebuild toolbar in depends on editor's width
|
|
44421
44447
|
*/ function mobile(editor) {
|
|
44422
|
-
var timeout = 0, store = (0,
|
|
44448
|
+
var timeout = 0, store = (0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_3__.splitArray)(editor.o.buttons);
|
|
44423
44449
|
if (editor.o.mobileTapTimeout) {
|
|
44424
44450
|
// Emulate double tap
|
|
44425
44451
|
editor.e.on('touchend', function(e) {
|
|
@@ -44436,8 +44462,8 @@ var isButtonSeparator = function isButtonSeparator(item) {
|
|
|
44436
44462
|
}
|
|
44437
44463
|
editor.e.on('getDiffButtons.mobile', function(toolbar) {
|
|
44438
44464
|
if (toolbar === editor.toolbar) {
|
|
44439
|
-
var buttons = (0,
|
|
44440
|
-
return (0,
|
|
44465
|
+
var buttons = (0,jodit_core_ui_helpers_buttons__WEBPACK_IMPORTED_MODULE_5__.flatButtonsSet)((0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_3__.splitArray)(editor.o.buttons), editor), flatStore = (0,jodit_core_ui_helpers_buttons__WEBPACK_IMPORTED_MODULE_5__.flatButtonsSet)(store, editor);
|
|
44466
|
+
return (0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_3__.toArray)(buttons).reduce(function(acc, item) {
|
|
44441
44467
|
if (!flatStore.has(item)) {
|
|
44442
44468
|
acc.push(item);
|
|
44443
44469
|
}
|
|
@@ -44447,22 +44473,24 @@ var isButtonSeparator = function isButtonSeparator(item) {
|
|
|
44447
44473
|
});
|
|
44448
44474
|
if (editor.o.toolbarAdaptive) {
|
|
44449
44475
|
editor.e.on('resize afterInit recalcAdaptive changePlace afterAddPlace', function() {
|
|
44450
|
-
var _editor_container_parentElement;
|
|
44451
44476
|
if (!editor.o.toolbar) {
|
|
44452
44477
|
return;
|
|
44453
44478
|
}
|
|
44454
|
-
var width = ((_editor_container_parentElement = editor.container.parentElement) !== null && _editor_container_parentElement !== void 0 ? _editor_container_parentElement : editor.container).offsetWidth;
|
|
44455
44479
|
var newStore = function() {
|
|
44456
|
-
if (editor.isFullSize
|
|
44457
|
-
return (0,
|
|
44480
|
+
if (editor.isFullSize) {
|
|
44481
|
+
return (0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_3__.splitArray)(editor.o.buttons);
|
|
44482
|
+
}
|
|
44483
|
+
var width = adaptiveWidth(editor);
|
|
44484
|
+
if (width >= editor.o.sizeLG) {
|
|
44485
|
+
return (0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_3__.splitArray)(editor.o.buttons);
|
|
44458
44486
|
}
|
|
44459
44487
|
if (width >= editor.o.sizeMD) {
|
|
44460
|
-
return fitToButtons((0,
|
|
44488
|
+
return fitToButtons((0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_3__.splitArray)(editor.o.buttonsMD), editor);
|
|
44461
44489
|
}
|
|
44462
44490
|
if (width >= editor.o.sizeSM) {
|
|
44463
|
-
return fitToButtons((0,
|
|
44491
|
+
return fitToButtons((0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_3__.splitArray)(editor.o.buttonsSM), editor);
|
|
44464
44492
|
}
|
|
44465
|
-
return fitToButtons((0,
|
|
44493
|
+
return fitToButtons((0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_3__.splitArray)(editor.o.buttonsXS), editor);
|
|
44466
44494
|
}();
|
|
44467
44495
|
if (newStore.toString() !== store.toString()) {
|
|
44468
44496
|
var _editor_toolbar;
|
|
@@ -44475,7 +44503,7 @@ var isButtonSeparator = function isButtonSeparator(item) {
|
|
|
44475
44503
|
});
|
|
44476
44504
|
}
|
|
44477
44505
|
}
|
|
44478
|
-
|
|
44506
|
+
jodit_core_global__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('mobile', mobile);
|
|
44479
44507
|
|
|
44480
44508
|
|
|
44481
44509
|
/***/ }),
|
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.8
|
|
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.8
|
|
12
12
|
* Url: https://xdsoft.net/jodit/
|
|
13
13
|
* License(s): MIT
|
|
14
14
|
*/
|