jodit-pro-react 5.6.16 → 5.6.17
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.
|
@@ -193,7 +193,7 @@ var APP_VERSION, ES, IS_ES_MODERN, IS_ES_NEXT, IS_PROD, IS_TEST, FAT_MODE, HOMEP
|
|
|
193
193
|
var init_constants = __esm({
|
|
194
194
|
"node_modules/jodit/esm/core/constants.js"() {
|
|
195
195
|
"use strict";
|
|
196
|
-
APP_VERSION = "4.15.
|
|
196
|
+
APP_VERSION = "4.15.8";
|
|
197
197
|
ES = "es2020";
|
|
198
198
|
IS_ES_MODERN = true;
|
|
199
199
|
IS_ES_NEXT = true;
|
|
@@ -22268,7 +22268,10 @@ function isRemovableNode(jodit, node, current, allow, deny) {
|
|
|
22268
22268
|
return false;
|
|
22269
22269
|
}
|
|
22270
22270
|
const liveCaret = jodit.s.isCollapsed() ? jodit.s.range.startContainer : null;
|
|
22271
|
-
return Dom.isElement(node) && node.nodeName.match(IS_INLINE) != null && !Dom.isTemporary(node) && trimInv(node.innerHTML).length === 0 && (current == null || !Dom.isOrContains(node, current)) && (liveCaret == null || !Dom.isOrContains(node, liveCaret));
|
|
22271
|
+
return Dom.isElement(node) && node.nodeName.match(IS_INLINE) != null && !Dom.isTemporary(node) && !isFragmentTarget(node) && trimInv(node.innerHTML).length === 0 && (current == null || !Dom.isOrContains(node, current)) && (liveCaret == null || !Dom.isOrContains(node, liveCaret));
|
|
22272
|
+
}
|
|
22273
|
+
function isFragmentTarget(element) {
|
|
22274
|
+
return element.hasAttribute("id") || element.nodeName === "A" && element.hasAttribute("name");
|
|
22272
22275
|
}
|
|
22273
22276
|
|
|
22274
22277
|
// node_modules/jodit/esm/plugins/clean-html/helpers/visitor/visit-node-walker.js
|
|
@@ -27577,8 +27580,10 @@ function media(editor) {
|
|
|
27577
27580
|
pluginSystem.add("media", media);
|
|
27578
27581
|
|
|
27579
27582
|
// node_modules/jodit/esm/plugins/mobile/mobile.js
|
|
27583
|
+
init_dom();
|
|
27580
27584
|
init_global2();
|
|
27581
27585
|
init_helpers();
|
|
27586
|
+
init_is_string();
|
|
27582
27587
|
|
|
27583
27588
|
// node_modules/jodit/esm/plugins/mobile/config.js
|
|
27584
27589
|
init_constants();
|
|
@@ -27765,6 +27770,17 @@ function fitToButtons(list, editor) {
|
|
|
27765
27770
|
}
|
|
27766
27771
|
return cleaned;
|
|
27767
27772
|
}
|
|
27773
|
+
function adaptiveWidth(editor) {
|
|
27774
|
+
var _a2;
|
|
27775
|
+
const { toolbar } = editor.o;
|
|
27776
|
+
if (isString(toolbar) || Dom.isHTMLElement(toolbar)) {
|
|
27777
|
+
const width = editor.toolbarContainer.offsetWidth;
|
|
27778
|
+
if (width) {
|
|
27779
|
+
return width;
|
|
27780
|
+
}
|
|
27781
|
+
}
|
|
27782
|
+
return ((_a2 = editor.container.parentElement) !== null && _a2 !== void 0 ? _a2 : editor.container).offsetWidth;
|
|
27783
|
+
}
|
|
27768
27784
|
function mobile(editor) {
|
|
27769
27785
|
let timeout = 0, store2 = splitArray(editor.o.buttons);
|
|
27770
27786
|
if (editor.o.mobileTapTimeout) {
|
|
@@ -27793,13 +27809,16 @@ function mobile(editor) {
|
|
|
27793
27809
|
});
|
|
27794
27810
|
if (editor.o.toolbarAdaptive) {
|
|
27795
27811
|
editor.e.on("resize afterInit recalcAdaptive changePlace afterAddPlace", () => {
|
|
27796
|
-
var _a2
|
|
27812
|
+
var _a2;
|
|
27797
27813
|
if (!editor.o.toolbar) {
|
|
27798
27814
|
return;
|
|
27799
27815
|
}
|
|
27800
|
-
const width = ((_a2 = editor.container.parentElement) !== null && _a2 !== void 0 ? _a2 : editor.container).offsetWidth;
|
|
27801
27816
|
const newStore = (() => {
|
|
27802
|
-
if (editor.isFullSize
|
|
27817
|
+
if (editor.isFullSize) {
|
|
27818
|
+
return splitArray(editor.o.buttons);
|
|
27819
|
+
}
|
|
27820
|
+
const width = adaptiveWidth(editor);
|
|
27821
|
+
if (width >= editor.o.sizeLG) {
|
|
27803
27822
|
return splitArray(editor.o.buttons);
|
|
27804
27823
|
}
|
|
27805
27824
|
if (width >= editor.o.sizeMD) {
|
|
@@ -27813,7 +27832,7 @@ function mobile(editor) {
|
|
|
27813
27832
|
if (newStore.toString() !== store2.toString()) {
|
|
27814
27833
|
store2 = newStore;
|
|
27815
27834
|
editor.e.fire("closeAllPopups");
|
|
27816
|
-
(
|
|
27835
|
+
(_a2 = editor.toolbar) === null || _a2 === void 0 ? void 0 : _a2.setRemoveButtons(editor.o.removeButtons).build(store2.concat(editor.o.extraButtons));
|
|
27817
27836
|
}
|
|
27818
27837
|
}).on(editor.ow, "load resize", () => editor.e.fire("recalcAdaptive"));
|
|
27819
27838
|
}
|