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/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.6.
|
|
4
|
+
* Version: v4.6.13
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -8379,7 +8379,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
8379
8379
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
8380
8380
|
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
8381
8381
|
*/
|
|
8382
|
-
const APP_VERSION = "4.6.
|
|
8382
|
+
const APP_VERSION = "4.6.13";
|
|
8383
8383
|
// prettier-ignore
|
|
8384
8384
|
const ES = "es2015";
|
|
8385
8385
|
const IS_ES_MODERN = true;
|
|
@@ -14014,16 +14014,13 @@ function observable(obj) {
|
|
|
14014
14014
|
|
|
14015
14015
|
"use strict";
|
|
14016
14016
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
14017
|
-
/* harmony export */ $r: function() { return /* reexport safe */
|
|
14017
|
+
/* harmony export */ $r: function() { return /* reexport safe */ _to_array__WEBPACK_IMPORTED_MODULE_2__.$; },
|
|
14018
14018
|
/* harmony export */ _j: function() { return /* reexport safe */ _as_array__WEBPACK_IMPORTED_MODULE_0__._; },
|
|
14019
|
-
/* harmony export */
|
|
14020
|
-
/* harmony export */ j5: function() { return /* reexport safe */ _reconcile_arrays__WEBPACK_IMPORTED_MODULE_1__.j; },
|
|
14021
|
-
/* harmony export */ uM: function() { return /* reexport safe */ _split_array__WEBPACK_IMPORTED_MODULE_2__.u; }
|
|
14019
|
+
/* harmony export */ uM: function() { return /* reexport safe */ _split_array__WEBPACK_IMPORTED_MODULE_1__.u; }
|
|
14022
14020
|
/* harmony export */ });
|
|
14023
14021
|
/* harmony import */ var _as_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82317);
|
|
14024
|
-
/* harmony import */ var
|
|
14025
|
-
/* harmony import */ var
|
|
14026
|
-
/* harmony import */ var _to_array__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(42448);
|
|
14022
|
+
/* harmony import */ var _split_array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(42589);
|
|
14023
|
+
/* harmony import */ var _to_array__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(42448);
|
|
14027
14024
|
/*!
|
|
14028
14025
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
14029
14026
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -14037,7 +14034,6 @@ function observable(obj) {
|
|
|
14037
14034
|
|
|
14038
14035
|
|
|
14039
14036
|
|
|
14040
|
-
|
|
14041
14037
|
/***/ }),
|
|
14042
14038
|
|
|
14043
14039
|
/***/ 32782:
|
|
@@ -17098,13 +17094,21 @@ const transactions = {
|
|
|
17098
17094
|
},
|
|
17099
17095
|
[states.EXTRACT]: {
|
|
17100
17096
|
exec(value) {
|
|
17097
|
+
var _a;
|
|
17101
17098
|
const { element, jodit, style } = value;
|
|
17102
17099
|
const suit = (0,jodit_core_selection_style_api__WEBPACK_IMPORTED_MODULE_4__/* .suitableClosest */ .$s)(style, element, jodit.editor);
|
|
17103
17100
|
void 0;
|
|
17104
|
-
|
|
17105
|
-
|
|
17101
|
+
// If we're applying inline styles to a block element, don't split the block
|
|
17102
|
+
const isApplyingInlineStyle = !style.elementIsBlock && ((_a = style.options.attributes) === null || _a === void 0 ? void 0 : _a.style);
|
|
17103
|
+
const shouldNotSplitBlock = isApplyingInlineStyle && jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isBlock(suit);
|
|
17104
|
+
if (!shouldNotSplitBlock) {
|
|
17105
|
+
if (!style.elementIsBlock) {
|
|
17106
|
+
(0,jodit_core_selection_style_api__WEBPACK_IMPORTED_MODULE_4__/* .extractSelectedPart */ .yP)(suit, element, jodit);
|
|
17107
|
+
}
|
|
17108
|
+
return Object.assign(Object.assign({}, value), { element: suit, next: states.ELEMENT });
|
|
17106
17109
|
}
|
|
17107
|
-
|
|
17110
|
+
// Create a new wrapper instead of splitting the block
|
|
17111
|
+
return Object.assign(Object.assign({}, value), { next: states.WRAP });
|
|
17108
17112
|
}
|
|
17109
17113
|
},
|
|
17110
17114
|
[states.UNWRAP_CHILDREN]: {
|
|
@@ -29105,121 +29109,6 @@ function moveCursorOutFromSpecialTags(jodit, fake, tags) {
|
|
|
29105
29109
|
}
|
|
29106
29110
|
|
|
29107
29111
|
|
|
29108
|
-
/***/ }),
|
|
29109
|
-
|
|
29110
|
-
/***/ 63784:
|
|
29111
|
-
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
29112
|
-
|
|
29113
|
-
"use strict";
|
|
29114
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
29115
|
-
/* harmony export */ f: function() { return /* binding */ applyArrayReconciliation; },
|
|
29116
|
-
/* harmony export */ j: function() { return /* binding */ reconcileArrays; }
|
|
29117
|
-
/* harmony export */ });
|
|
29118
|
-
/*!
|
|
29119
|
-
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
29120
|
-
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
29121
|
-
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
29122
|
-
*/
|
|
29123
|
-
/**
|
|
29124
|
-
* Reconciles two arrays and returns the differences
|
|
29125
|
-
* @param oldArray - The original array
|
|
29126
|
-
* @param newArray - The new array to compare against
|
|
29127
|
-
* @param keyFn - Optional function to generate unique keys for items (for object comparison)
|
|
29128
|
-
* @returns Object containing added, removed, kept and moved items
|
|
29129
|
-
*
|
|
29130
|
-
* @example
|
|
29131
|
-
* ```typescript
|
|
29132
|
-
* const old = [1, 2, 3, 4];
|
|
29133
|
-
* const new = [2, 4, 5, 1];
|
|
29134
|
-
* const result = reconcileArrays(old, new);
|
|
29135
|
-
* // result.added = [5]
|
|
29136
|
-
* // result.removed = [3]
|
|
29137
|
-
* // result.kept = [2, 4, 1]
|
|
29138
|
-
* // result.moved = [{item: 1, from: 0, to: 3}]
|
|
29139
|
-
* ```
|
|
29140
|
-
*
|
|
29141
|
-
* @example
|
|
29142
|
-
* ```typescript
|
|
29143
|
-
* const old = [{id: 1, name: 'a'}, {id: 2, name: 'b'}];
|
|
29144
|
-
* const new = [{id: 2, name: 'b'}, {id: 3, name: 'c'}];
|
|
29145
|
-
* const result = reconcileArrays(old, new, item => item.id);
|
|
29146
|
-
* // result.added = [{id: 3, name: 'c'}]
|
|
29147
|
-
* // result.removed = [{id: 1, name: 'a'}]
|
|
29148
|
-
* ```
|
|
29149
|
-
*/
|
|
29150
|
-
function reconcileArrays(oldArray, newArray, keyFn) {
|
|
29151
|
-
const getKey = keyFn || ((item) => item);
|
|
29152
|
-
const oldMap = new Map();
|
|
29153
|
-
const newMap = new Map();
|
|
29154
|
-
oldArray.forEach((item, index) => {
|
|
29155
|
-
oldMap.set(getKey(item), { item, index });
|
|
29156
|
-
});
|
|
29157
|
-
newArray.forEach((item, index) => {
|
|
29158
|
-
newMap.set(getKey(item), { item, index });
|
|
29159
|
-
});
|
|
29160
|
-
const added = [];
|
|
29161
|
-
const removed = [];
|
|
29162
|
-
const kept = [];
|
|
29163
|
-
const moved = [];
|
|
29164
|
-
// Find removed items
|
|
29165
|
-
oldMap.forEach((value, key) => {
|
|
29166
|
-
if (!newMap.has(key)) {
|
|
29167
|
-
removed.push(value.item);
|
|
29168
|
-
}
|
|
29169
|
-
});
|
|
29170
|
-
// Find added items and track kept/moved items
|
|
29171
|
-
newMap.forEach((value, key) => {
|
|
29172
|
-
const oldItem = oldMap.get(key);
|
|
29173
|
-
if (!oldItem) {
|
|
29174
|
-
added.push(value.item);
|
|
29175
|
-
}
|
|
29176
|
-
else {
|
|
29177
|
-
kept.push(value.item);
|
|
29178
|
-
if (oldItem.index !== value.index) {
|
|
29179
|
-
moved.push({
|
|
29180
|
-
item: value.item,
|
|
29181
|
-
from: oldItem.index,
|
|
29182
|
-
to: value.index
|
|
29183
|
-
});
|
|
29184
|
-
}
|
|
29185
|
-
}
|
|
29186
|
-
});
|
|
29187
|
-
return {
|
|
29188
|
-
added,
|
|
29189
|
-
removed,
|
|
29190
|
-
kept,
|
|
29191
|
-
moved
|
|
29192
|
-
};
|
|
29193
|
-
}
|
|
29194
|
-
/**
|
|
29195
|
-
* Applies reconciliation patches to transform one array into another
|
|
29196
|
-
* @param oldArray - The original array to transform
|
|
29197
|
-
* @param newArray - The target array structure
|
|
29198
|
-
* @param keyFn - Optional function to generate unique keys for items
|
|
29199
|
-
* @returns New array matching the structure of newArray
|
|
29200
|
-
*/
|
|
29201
|
-
function applyArrayReconciliation(oldArray, newArray, keyFn) {
|
|
29202
|
-
const result = reconcileArrays(oldArray, newArray, keyFn);
|
|
29203
|
-
const output = [];
|
|
29204
|
-
// Build the new array based on newArray order
|
|
29205
|
-
newArray.forEach(item => {
|
|
29206
|
-
const key = keyFn ? keyFn(item) : item;
|
|
29207
|
-
const isNew = result.added.some(addedItem => (keyFn ? keyFn(addedItem) : addedItem) === key);
|
|
29208
|
-
if (isNew) {
|
|
29209
|
-
output.push(item);
|
|
29210
|
-
}
|
|
29211
|
-
else {
|
|
29212
|
-
// Use the old item reference if it exists
|
|
29213
|
-
const oldItem = oldArray.find(oldItem => (keyFn ? keyFn(oldItem) : oldItem) === key);
|
|
29214
|
-
if (oldItem !== undefined) {
|
|
29215
|
-
output.push(oldItem);
|
|
29216
|
-
}
|
|
29217
|
-
}
|
|
29218
|
-
});
|
|
29219
|
-
return output;
|
|
29220
|
-
}
|
|
29221
|
-
|
|
29222
|
-
|
|
29223
29112
|
/***/ }),
|
|
29224
29113
|
|
|
29225
29114
|
/***/ 63837:
|
|
@@ -29788,7 +29677,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
29788
29677
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
29789
29678
|
/* harmony export */ CamelCaseToKebabCase: function() { return /* reexport safe */ _string__WEBPACK_IMPORTED_MODULE_7__.N; },
|
|
29790
29679
|
/* harmony export */ NUMBER_FIELDS_REG: function() { return /* reexport safe */ _normalize__WEBPACK_IMPORTED_MODULE_5__.b$; },
|
|
29791
|
-
/* harmony export */ applyArrayReconciliation: function() { return /* reexport safe */ _array__WEBPACK_IMPORTED_MODULE_0__.ft; },
|
|
29792
29680
|
/* harmony export */ applyStyles: function() { return /* reexport safe */ _html__WEBPACK_IMPORTED_MODULE_4__.ZM; },
|
|
29793
29681
|
/* harmony export */ asArray: function() { return /* reexport safe */ _array__WEBPACK_IMPORTED_MODULE_0__._j; },
|
|
29794
29682
|
/* harmony export */ camelCase: function() { return /* reexport safe */ _string__WEBPACK_IMPORTED_MODULE_7__.xQ; },
|
|
@@ -29843,7 +29731,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
29843
29731
|
/* harmony export */ normalizeUrl: function() { return /* reexport safe */ _normalize__WEBPACK_IMPORTED_MODULE_5__.l2; },
|
|
29844
29732
|
/* harmony export */ offset: function() { return /* reexport safe */ _size__WEBPACK_IMPORTED_MODULE_6__.cY; },
|
|
29845
29733
|
/* harmony export */ position: function() { return /* reexport safe */ _size__WEBPACK_IMPORTED_MODULE_6__.G1; },
|
|
29846
|
-
/* harmony export */ reconcileArrays: function() { return /* reexport safe */ _array__WEBPACK_IMPORTED_MODULE_0__.j5; },
|
|
29847
29734
|
/* harmony export */ safeHTML: function() { return /* reexport safe */ _html__WEBPACK_IMPORTED_MODULE_4__.t_; },
|
|
29848
29735
|
/* harmony export */ sanitizeHTMLElement: function() { return /* reexport safe */ _html__WEBPACK_IMPORTED_MODULE_4__.vn; },
|
|
29849
29736
|
/* harmony export */ setTimeout: function() { return /* reexport safe */ _async__WEBPACK_IMPORTED_MODULE_1__.w; },
|
|
@@ -29868,7 +29755,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
29868
29755
|
/* harmony import */ var _string__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(6589);
|
|
29869
29756
|
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(97369);
|
|
29870
29757
|
/* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
29871
|
-
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _utils__WEBPACK_IMPORTED_MODULE_8__) if(["default","
|
|
29758
|
+
/* 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__)
|
|
29872
29759
|
/* harmony reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
29873
29760
|
/*!
|
|
29874
29761
|
* Jodit Editor (https://xdsoft.net/jodit/)
|