jodit 4.6.11 → 4.6.13
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 +10 -0
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +2 -2
- package/es2015/jodit.js +18 -131
- package/es2015/jodit.min.js +2 -2
- 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.css +1 -1
- package/es2018/jodit.fat.min.js +2 -2
- package/es2018/jodit.js +22 -132
- package/es2018/jodit.min.js +2 -2
- package/es2018/plugins/debug/debug.css +1 -1
- package/es2018/plugins/debug/debug.js +1 -1
- package/es2018/plugins/debug/debug.min.js +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.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 +2 -2
- package/es2021/jodit.js +21 -132
- package/es2021/jodit.min.js +2 -2
- 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 +2 -2
- package/es2021.en/jodit.js +21 -132
- package/es2021.en/jodit.min.js +2 -2
- 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/415.fat.min.js +1 -1
- package/es5/415.min.js +1 -1
- package/es5/5.fat.min.js +1 -1
- package/es5/5.min.js +1 -1
- package/es5/jodit.css +2 -2
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +18 -131
- 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/esm/core/constants.js +1 -1
- package/esm/core/helpers/array/index.d.ts +0 -1
- package/esm/core/helpers/array/index.js +0 -1
- package/esm/core/selection/style/transactions.js +15 -4
- package/package.json +1 -1
- package/types/core/helpers/array/index.d.ts +0 -1
- package/esm/core/helpers/array/reconcile-arrays.d.ts +0 -54
- package/esm/core/helpers/array/reconcile-arrays.js +0 -103
- package/types/core/helpers/array/reconcile-arrays.d.ts +0 -54
package/es2018/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.6.
|
|
4
|
+
* Version: v4.6.13
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -8389,7 +8389,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8389
8389
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
8390
8390
|
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
8391
8391
|
*/
|
|
8392
|
-
const APP_VERSION = "4.6.
|
|
8392
|
+
const APP_VERSION = "4.6.13";
|
|
8393
8393
|
// prettier-ignore
|
|
8394
8394
|
const ES = "es2018";
|
|
8395
8395
|
const IS_ES_MODERN = true;
|
|
@@ -14009,16 +14009,13 @@ function observable(obj) {
|
|
|
14009
14009
|
|
|
14010
14010
|
"use strict";
|
|
14011
14011
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
14012
|
-
/* harmony export */ $r: function() { return /* reexport safe */
|
|
14012
|
+
/* harmony export */ $r: function() { return /* reexport safe */ _to_array__WEBPACK_IMPORTED_MODULE_2__.$; },
|
|
14013
14013
|
/* harmony export */ _j: function() { return /* reexport safe */ _as_array__WEBPACK_IMPORTED_MODULE_0__._; },
|
|
14014
|
-
/* harmony export */
|
|
14015
|
-
/* harmony export */ j5: function() { return /* reexport safe */ _reconcile_arrays__WEBPACK_IMPORTED_MODULE_1__.j; },
|
|
14016
|
-
/* harmony export */ uM: function() { return /* reexport safe */ _split_array__WEBPACK_IMPORTED_MODULE_2__.u; }
|
|
14014
|
+
/* harmony export */ uM: function() { return /* reexport safe */ _split_array__WEBPACK_IMPORTED_MODULE_1__.u; }
|
|
14017
14015
|
/* harmony export */ });
|
|
14018
14016
|
/* harmony import */ var _as_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82317);
|
|
14019
|
-
/* harmony import */ var
|
|
14020
|
-
/* harmony import */ var
|
|
14021
|
-
/* harmony import */ var _to_array__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(42448);
|
|
14017
|
+
/* harmony import */ var _split_array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(42589);
|
|
14018
|
+
/* harmony import */ var _to_array__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(42448);
|
|
14022
14019
|
/*!
|
|
14023
14020
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
14024
14021
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -14032,7 +14029,6 @@ function observable(obj) {
|
|
|
14032
14029
|
|
|
14033
14030
|
|
|
14034
14031
|
|
|
14035
|
-
|
|
14036
14032
|
/***/ }),
|
|
14037
14033
|
|
|
14038
14034
|
/***/ 32782:
|
|
@@ -17105,16 +17101,27 @@ const transactions = {
|
|
|
17105
17101
|
},
|
|
17106
17102
|
[states.EXTRACT]: {
|
|
17107
17103
|
exec(value) {
|
|
17104
|
+
var _a;
|
|
17108
17105
|
const { element, jodit, style } = value;
|
|
17109
17106
|
const suit = (0,jodit_core_selection_style_api__WEBPACK_IMPORTED_MODULE_4__/* .suitableClosest */ .$s)(style, element, jodit.editor);
|
|
17110
17107
|
void 0;
|
|
17111
|
-
|
|
17112
|
-
|
|
17108
|
+
// If we're applying inline styles to a block element, don't split the block
|
|
17109
|
+
const isApplyingInlineStyle = !style.elementIsBlock && ((_a = style.options.attributes) === null || _a === void 0 ? void 0 : _a.style);
|
|
17110
|
+
const shouldNotSplitBlock = isApplyingInlineStyle && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isBlock(suit);
|
|
17111
|
+
if (!shouldNotSplitBlock) {
|
|
17112
|
+
if (!style.elementIsBlock) {
|
|
17113
|
+
(0,jodit_core_selection_style_api__WEBPACK_IMPORTED_MODULE_4__/* .extractSelectedPart */ .yP)(suit, element, jodit);
|
|
17114
|
+
}
|
|
17115
|
+
return {
|
|
17116
|
+
...value,
|
|
17117
|
+
element: suit,
|
|
17118
|
+
next: states.ELEMENT
|
|
17119
|
+
};
|
|
17113
17120
|
}
|
|
17121
|
+
// Create a new wrapper instead of splitting the block
|
|
17114
17122
|
return {
|
|
17115
17123
|
...value,
|
|
17116
|
-
|
|
17117
|
-
next: states.ELEMENT
|
|
17124
|
+
next: states.WRAP
|
|
17118
17125
|
};
|
|
17119
17126
|
}
|
|
17120
17127
|
},
|
|
@@ -29156,121 +29163,6 @@ function moveCursorOutFromSpecialTags(jodit, fake, tags) {
|
|
|
29156
29163
|
}
|
|
29157
29164
|
|
|
29158
29165
|
|
|
29159
|
-
/***/ }),
|
|
29160
|
-
|
|
29161
|
-
/***/ 63784:
|
|
29162
|
-
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
29163
|
-
|
|
29164
|
-
"use strict";
|
|
29165
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
29166
|
-
/* harmony export */ f: function() { return /* binding */ applyArrayReconciliation; },
|
|
29167
|
-
/* harmony export */ j: function() { return /* binding */ reconcileArrays; }
|
|
29168
|
-
/* harmony export */ });
|
|
29169
|
-
/*!
|
|
29170
|
-
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
29171
|
-
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
29172
|
-
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
29173
|
-
*/
|
|
29174
|
-
/**
|
|
29175
|
-
* Reconciles two arrays and returns the differences
|
|
29176
|
-
* @param oldArray - The original array
|
|
29177
|
-
* @param newArray - The new array to compare against
|
|
29178
|
-
* @param keyFn - Optional function to generate unique keys for items (for object comparison)
|
|
29179
|
-
* @returns Object containing added, removed, kept and moved items
|
|
29180
|
-
*
|
|
29181
|
-
* @example
|
|
29182
|
-
* ```typescript
|
|
29183
|
-
* const old = [1, 2, 3, 4];
|
|
29184
|
-
* const new = [2, 4, 5, 1];
|
|
29185
|
-
* const result = reconcileArrays(old, new);
|
|
29186
|
-
* // result.added = [5]
|
|
29187
|
-
* // result.removed = [3]
|
|
29188
|
-
* // result.kept = [2, 4, 1]
|
|
29189
|
-
* // result.moved = [{item: 1, from: 0, to: 3}]
|
|
29190
|
-
* ```
|
|
29191
|
-
*
|
|
29192
|
-
* @example
|
|
29193
|
-
* ```typescript
|
|
29194
|
-
* const old = [{id: 1, name: 'a'}, {id: 2, name: 'b'}];
|
|
29195
|
-
* const new = [{id: 2, name: 'b'}, {id: 3, name: 'c'}];
|
|
29196
|
-
* const result = reconcileArrays(old, new, item => item.id);
|
|
29197
|
-
* // result.added = [{id: 3, name: 'c'}]
|
|
29198
|
-
* // result.removed = [{id: 1, name: 'a'}]
|
|
29199
|
-
* ```
|
|
29200
|
-
*/
|
|
29201
|
-
function reconcileArrays(oldArray, newArray, keyFn) {
|
|
29202
|
-
const getKey = keyFn || ((item) => item);
|
|
29203
|
-
const oldMap = new Map();
|
|
29204
|
-
const newMap = new Map();
|
|
29205
|
-
oldArray.forEach((item, index) => {
|
|
29206
|
-
oldMap.set(getKey(item), { item, index });
|
|
29207
|
-
});
|
|
29208
|
-
newArray.forEach((item, index) => {
|
|
29209
|
-
newMap.set(getKey(item), { item, index });
|
|
29210
|
-
});
|
|
29211
|
-
const added = [];
|
|
29212
|
-
const removed = [];
|
|
29213
|
-
const kept = [];
|
|
29214
|
-
const moved = [];
|
|
29215
|
-
// Find removed items
|
|
29216
|
-
oldMap.forEach((value, key) => {
|
|
29217
|
-
if (!newMap.has(key)) {
|
|
29218
|
-
removed.push(value.item);
|
|
29219
|
-
}
|
|
29220
|
-
});
|
|
29221
|
-
// Find added items and track kept/moved items
|
|
29222
|
-
newMap.forEach((value, key) => {
|
|
29223
|
-
const oldItem = oldMap.get(key);
|
|
29224
|
-
if (!oldItem) {
|
|
29225
|
-
added.push(value.item);
|
|
29226
|
-
}
|
|
29227
|
-
else {
|
|
29228
|
-
kept.push(value.item);
|
|
29229
|
-
if (oldItem.index !== value.index) {
|
|
29230
|
-
moved.push({
|
|
29231
|
-
item: value.item,
|
|
29232
|
-
from: oldItem.index,
|
|
29233
|
-
to: value.index
|
|
29234
|
-
});
|
|
29235
|
-
}
|
|
29236
|
-
}
|
|
29237
|
-
});
|
|
29238
|
-
return {
|
|
29239
|
-
added,
|
|
29240
|
-
removed,
|
|
29241
|
-
kept,
|
|
29242
|
-
moved
|
|
29243
|
-
};
|
|
29244
|
-
}
|
|
29245
|
-
/**
|
|
29246
|
-
* Applies reconciliation patches to transform one array into another
|
|
29247
|
-
* @param oldArray - The original array to transform
|
|
29248
|
-
* @param newArray - The target array structure
|
|
29249
|
-
* @param keyFn - Optional function to generate unique keys for items
|
|
29250
|
-
* @returns New array matching the structure of newArray
|
|
29251
|
-
*/
|
|
29252
|
-
function applyArrayReconciliation(oldArray, newArray, keyFn) {
|
|
29253
|
-
const result = reconcileArrays(oldArray, newArray, keyFn);
|
|
29254
|
-
const output = [];
|
|
29255
|
-
// Build the new array based on newArray order
|
|
29256
|
-
newArray.forEach(item => {
|
|
29257
|
-
const key = keyFn ? keyFn(item) : item;
|
|
29258
|
-
const isNew = result.added.some(addedItem => (keyFn ? keyFn(addedItem) : addedItem) === key);
|
|
29259
|
-
if (isNew) {
|
|
29260
|
-
output.push(item);
|
|
29261
|
-
}
|
|
29262
|
-
else {
|
|
29263
|
-
// Use the old item reference if it exists
|
|
29264
|
-
const oldItem = oldArray.find(oldItem => (keyFn ? keyFn(oldItem) : oldItem) === key);
|
|
29265
|
-
if (oldItem !== undefined) {
|
|
29266
|
-
output.push(oldItem);
|
|
29267
|
-
}
|
|
29268
|
-
}
|
|
29269
|
-
});
|
|
29270
|
-
return output;
|
|
29271
|
-
}
|
|
29272
|
-
|
|
29273
|
-
|
|
29274
29166
|
/***/ }),
|
|
29275
29167
|
|
|
29276
29168
|
/***/ 63837:
|
|
@@ -29839,7 +29731,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
29839
29731
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
29840
29732
|
/* harmony export */ CamelCaseToKebabCase: function() { return /* reexport safe */ _string__WEBPACK_IMPORTED_MODULE_7__.N; },
|
|
29841
29733
|
/* harmony export */ NUMBER_FIELDS_REG: function() { return /* reexport safe */ _normalize__WEBPACK_IMPORTED_MODULE_5__.b$; },
|
|
29842
|
-
/* harmony export */ applyArrayReconciliation: function() { return /* reexport safe */ _array__WEBPACK_IMPORTED_MODULE_0__.ft; },
|
|
29843
29734
|
/* harmony export */ applyStyles: function() { return /* reexport safe */ _html__WEBPACK_IMPORTED_MODULE_4__.ZM; },
|
|
29844
29735
|
/* harmony export */ asArray: function() { return /* reexport safe */ _array__WEBPACK_IMPORTED_MODULE_0__._j; },
|
|
29845
29736
|
/* harmony export */ camelCase: function() { return /* reexport safe */ _string__WEBPACK_IMPORTED_MODULE_7__.xQ; },
|
|
@@ -29894,7 +29785,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
29894
29785
|
/* harmony export */ normalizeUrl: function() { return /* reexport safe */ _normalize__WEBPACK_IMPORTED_MODULE_5__.l2; },
|
|
29895
29786
|
/* harmony export */ offset: function() { return /* reexport safe */ _size__WEBPACK_IMPORTED_MODULE_6__.cY; },
|
|
29896
29787
|
/* harmony export */ position: function() { return /* reexport safe */ _size__WEBPACK_IMPORTED_MODULE_6__.G1; },
|
|
29897
|
-
/* harmony export */ reconcileArrays: function() { return /* reexport safe */ _array__WEBPACK_IMPORTED_MODULE_0__.j5; },
|
|
29898
29788
|
/* harmony export */ safeHTML: function() { return /* reexport safe */ _html__WEBPACK_IMPORTED_MODULE_4__.t_; },
|
|
29899
29789
|
/* harmony export */ sanitizeHTMLElement: function() { return /* reexport safe */ _html__WEBPACK_IMPORTED_MODULE_4__.vn; },
|
|
29900
29790
|
/* harmony export */ setTimeout: function() { return /* reexport safe */ _async__WEBPACK_IMPORTED_MODULE_1__.w; },
|
|
@@ -29919,7 +29809,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
29919
29809
|
/* harmony import */ var _string__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(6589);
|
|
29920
29810
|
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(97369);
|
|
29921
29811
|
/* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
29922
|
-
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _utils__WEBPACK_IMPORTED_MODULE_8__) if(["default","
|
|
29812
|
+
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _utils__WEBPACK_IMPORTED_MODULE_8__) if(["default","asArray","splitArray","toArray","clearTimeout","setTimeout","hasBrowserColorPicker","hasContainer","isAbortError","isArray","isBoolean","isDestructable","isEqual","isFastEqual","isFunction","isHTML","isHtmlFromWord","isInitable","isInt","isJoditObject","isLicense","isMarker","isNativeFunction","isNumber","isNumeric","isPlainObject","isPromise","isSet","isString","isStringArray","isURL","isValidName","isViewObject","isVoid","isWindow","colorToHex","applyStyles","cleanFromWord","htmlspecialchars","nl2br","safeHTML","sanitizeHTMLElement","stripTags","NUMBER_FIELDS_REG","normalizeColor","normalizeCssNumericValue","normalizeCssValue","normalizeKeyAliases","normalizeLicense","normalizePath","normalizeRelativePath","normalizeSize","normalizeUrl","getContentWidth","getScrollParent","innerWidth","offset","position","size","CamelCaseToKebabCase","camelCase","fuzzySearchIndex","i18n","kebabCase","sprintf","stringify","trim","trimChars","trimInv","ucfirst"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = function(key) { return _utils__WEBPACK_IMPORTED_MODULE_8__[key]; }.bind(0, __WEBPACK_IMPORT_KEY__)
|
|
29923
29813
|
/* harmony reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
29924
29814
|
/*!
|
|
29925
29815
|
* Jodit Editor (https://xdsoft.net/jodit/)
|