jodit-pro-react 5.5.91 → 5.6.1
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.
|
|
196
|
+
APP_VERSION = "4.14.2";
|
|
197
197
|
ES = "es2020";
|
|
198
198
|
IS_ES_MODERN = true;
|
|
199
199
|
IS_ES_NEXT = true;
|
|
@@ -421,16 +421,6 @@ var init_kebab_case = __esm({
|
|
|
421
421
|
}
|
|
422
422
|
});
|
|
423
423
|
|
|
424
|
-
// node_modules/jodit/esm/core/helpers/checker/is-boolean.js
|
|
425
|
-
function isBoolean(elm) {
|
|
426
|
-
return typeof elm === "boolean";
|
|
427
|
-
}
|
|
428
|
-
var init_is_boolean = __esm({
|
|
429
|
-
"node_modules/jodit/esm/core/helpers/checker/is-boolean.js"() {
|
|
430
|
-
"use strict";
|
|
431
|
-
}
|
|
432
|
-
});
|
|
433
|
-
|
|
434
424
|
// node_modules/jodit/esm/core/helpers/checker/is-window.js
|
|
435
425
|
function isWindow(obj) {
|
|
436
426
|
return obj != null && obj === obj.window;
|
|
@@ -455,6 +445,16 @@ var init_is_plain_object = __esm({
|
|
|
455
445
|
}
|
|
456
446
|
});
|
|
457
447
|
|
|
448
|
+
// node_modules/jodit/esm/core/helpers/checker/is-boolean.js
|
|
449
|
+
function isBoolean(elm) {
|
|
450
|
+
return typeof elm === "boolean";
|
|
451
|
+
}
|
|
452
|
+
var init_is_boolean = __esm({
|
|
453
|
+
"node_modules/jodit/esm/core/helpers/checker/is-boolean.js"() {
|
|
454
|
+
"use strict";
|
|
455
|
+
}
|
|
456
|
+
});
|
|
457
|
+
|
|
458
458
|
// node_modules/jodit/esm/core/helpers/checker/is-numeric.js
|
|
459
459
|
function isNumeric(value) {
|
|
460
460
|
if (isString(value)) {
|
|
@@ -602,6 +602,9 @@ function css(element, key3, value, onlyStyleMode = false) {
|
|
|
602
602
|
}
|
|
603
603
|
return normalizeCssValue(key3, result);
|
|
604
604
|
}
|
|
605
|
+
function cssInline(element, key3) {
|
|
606
|
+
return element.style.getPropertyValue(kebabCase(key3));
|
|
607
|
+
}
|
|
605
608
|
var clearCenterAlign;
|
|
606
609
|
var init_css = __esm({
|
|
607
610
|
"node_modules/jodit/esm/core/helpers/utils/css.js"() {
|
|
@@ -624,6 +627,70 @@ var init_css = __esm({
|
|
|
624
627
|
}
|
|
625
628
|
});
|
|
626
629
|
|
|
630
|
+
// node_modules/jodit/esm/core/helpers/utils/attr.js
|
|
631
|
+
function attr(elm, keyOrAttributes, value) {
|
|
632
|
+
if (!elm || !isFunction(elm.getAttribute)) {
|
|
633
|
+
return null;
|
|
634
|
+
}
|
|
635
|
+
if (!isString(keyOrAttributes)) {
|
|
636
|
+
Object.keys(keyOrAttributes).forEach((key4) => {
|
|
637
|
+
const value2 = keyOrAttributes[key4];
|
|
638
|
+
if (isPlainObject(value2) && key4 === "style") {
|
|
639
|
+
css(elm, value2);
|
|
640
|
+
} else {
|
|
641
|
+
if (key4 === "className") {
|
|
642
|
+
key4 = "class";
|
|
643
|
+
}
|
|
644
|
+
attr(elm, key4, value2);
|
|
645
|
+
}
|
|
646
|
+
});
|
|
647
|
+
return null;
|
|
648
|
+
}
|
|
649
|
+
let key3 = CamelCaseToKebabCase(keyOrAttributes);
|
|
650
|
+
if (/^-/.test(key3)) {
|
|
651
|
+
const res = attr(elm, `data${key3}`);
|
|
652
|
+
if (res) {
|
|
653
|
+
return res;
|
|
654
|
+
}
|
|
655
|
+
key3 = key3.substr(1);
|
|
656
|
+
}
|
|
657
|
+
if (value !== void 0) {
|
|
658
|
+
if (value == null) {
|
|
659
|
+
elm.hasAttribute(key3) && elm.removeAttribute(key3);
|
|
660
|
+
} else {
|
|
661
|
+
let replaceValue = value.toString();
|
|
662
|
+
if (elm.nodeName === "IMG" && (key3 === "width" || key3 === "height")) {
|
|
663
|
+
replaceValue = replaceValue.replace("px", "");
|
|
664
|
+
}
|
|
665
|
+
elm.setAttribute(key3, replaceValue);
|
|
666
|
+
return replaceValue;
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
return elm.getAttribute(key3);
|
|
670
|
+
}
|
|
671
|
+
function attrRaw(elm, name, value) {
|
|
672
|
+
if (value === void 0) {
|
|
673
|
+
return elm.getAttribute(name);
|
|
674
|
+
}
|
|
675
|
+
if (value == null) {
|
|
676
|
+
if (elm.hasAttribute(name)) {
|
|
677
|
+
elm.removeAttribute(name);
|
|
678
|
+
}
|
|
679
|
+
return;
|
|
680
|
+
}
|
|
681
|
+
elm.setAttribute(name, value);
|
|
682
|
+
}
|
|
683
|
+
var init_attr = __esm({
|
|
684
|
+
"node_modules/jodit/esm/core/helpers/utils/attr.js"() {
|
|
685
|
+
"use strict";
|
|
686
|
+
init_is_function();
|
|
687
|
+
init_is_plain_object();
|
|
688
|
+
init_is_string();
|
|
689
|
+
init_kebab_case();
|
|
690
|
+
init_css();
|
|
691
|
+
}
|
|
692
|
+
});
|
|
693
|
+
|
|
627
694
|
// node_modules/jodit/esm/core/helpers/utils/get-class-name.js
|
|
628
695
|
var keepNames, getClassName;
|
|
629
696
|
var init_get_class_name = __esm({
|
|
@@ -1405,58 +1472,6 @@ var init_trim = __esm({
|
|
|
1405
1472
|
}
|
|
1406
1473
|
});
|
|
1407
1474
|
|
|
1408
|
-
// node_modules/jodit/esm/core/helpers/utils/attr.js
|
|
1409
|
-
function attr(elm, keyOrAttributes, value) {
|
|
1410
|
-
if (!elm || !isFunction(elm.getAttribute)) {
|
|
1411
|
-
return null;
|
|
1412
|
-
}
|
|
1413
|
-
if (!isString(keyOrAttributes)) {
|
|
1414
|
-
Object.keys(keyOrAttributes).forEach((key4) => {
|
|
1415
|
-
const value2 = keyOrAttributes[key4];
|
|
1416
|
-
if (isPlainObject(value2) && key4 === "style") {
|
|
1417
|
-
css(elm, value2);
|
|
1418
|
-
} else {
|
|
1419
|
-
if (key4 === "className") {
|
|
1420
|
-
key4 = "class";
|
|
1421
|
-
}
|
|
1422
|
-
attr(elm, key4, value2);
|
|
1423
|
-
}
|
|
1424
|
-
});
|
|
1425
|
-
return null;
|
|
1426
|
-
}
|
|
1427
|
-
let key3 = CamelCaseToKebabCase(keyOrAttributes);
|
|
1428
|
-
if (/^-/.test(key3)) {
|
|
1429
|
-
const res = attr(elm, `data${key3}`);
|
|
1430
|
-
if (res) {
|
|
1431
|
-
return res;
|
|
1432
|
-
}
|
|
1433
|
-
key3 = key3.substr(1);
|
|
1434
|
-
}
|
|
1435
|
-
if (value !== void 0) {
|
|
1436
|
-
if (value == null) {
|
|
1437
|
-
elm.hasAttribute(key3) && elm.removeAttribute(key3);
|
|
1438
|
-
} else {
|
|
1439
|
-
let replaceValue = value.toString();
|
|
1440
|
-
if (elm.nodeName === "IMG" && (key3 === "width" || key3 === "height")) {
|
|
1441
|
-
replaceValue = replaceValue.replace("px", "");
|
|
1442
|
-
}
|
|
1443
|
-
elm.setAttribute(key3, replaceValue);
|
|
1444
|
-
return replaceValue;
|
|
1445
|
-
}
|
|
1446
|
-
}
|
|
1447
|
-
return elm.getAttribute(key3);
|
|
1448
|
-
}
|
|
1449
|
-
var init_attr = __esm({
|
|
1450
|
-
"node_modules/jodit/esm/core/helpers/utils/attr.js"() {
|
|
1451
|
-
"use strict";
|
|
1452
|
-
init_is_function();
|
|
1453
|
-
init_is_plain_object();
|
|
1454
|
-
init_is_string();
|
|
1455
|
-
init_kebab_case();
|
|
1456
|
-
init_css();
|
|
1457
|
-
}
|
|
1458
|
-
});
|
|
1459
|
-
|
|
1460
1475
|
// node_modules/jodit/esm/core/helpers/utils/data-bind.js
|
|
1461
1476
|
var store, dataBind;
|
|
1462
1477
|
var init_data_bind = __esm({
|
|
@@ -1896,52 +1911,37 @@ var init_dom = __esm({
|
|
|
1896
1911
|
* Get first matched node inside root
|
|
1897
1912
|
*/
|
|
1898
1913
|
static first(root, condition) {
|
|
1899
|
-
|
|
1900
|
-
if (!first) {
|
|
1901
|
-
return null;
|
|
1902
|
-
}
|
|
1903
|
-
do {
|
|
1904
|
-
if (condition(first)) {
|
|
1905
|
-
return first;
|
|
1906
|
-
}
|
|
1907
|
-
let next = first.firstChild;
|
|
1908
|
-
if (!next) {
|
|
1909
|
-
next = first.nextSibling;
|
|
1910
|
-
}
|
|
1911
|
-
if (!next && first.parentNode !== root) {
|
|
1912
|
-
do {
|
|
1913
|
-
first = first.parentNode;
|
|
1914
|
-
} while (first && !(first === null || first === void 0 ? void 0 : first.nextSibling) && first.parentNode !== root);
|
|
1915
|
-
next = first === null || first === void 0 ? void 0 : first.nextSibling;
|
|
1916
|
-
}
|
|
1917
|
-
first = next;
|
|
1918
|
-
} while (first);
|
|
1919
|
-
return null;
|
|
1914
|
+
return _Dom.__deepMost(root, condition, false);
|
|
1920
1915
|
}
|
|
1921
1916
|
/**
|
|
1922
1917
|
* Get last matched node inside root
|
|
1923
1918
|
*/
|
|
1924
1919
|
static last(root, condition) {
|
|
1925
|
-
|
|
1926
|
-
|
|
1920
|
+
return _Dom.__deepMost(root, condition, true);
|
|
1921
|
+
}
|
|
1922
|
+
/**
|
|
1923
|
+
* Depth-first search for the first matched node inside root:
|
|
1924
|
+
* in document order (`reverse = false`) or in reverse order
|
|
1925
|
+
*/
|
|
1926
|
+
static __deepMost(root, condition, reverse) {
|
|
1927
|
+
const child = reverse ? "lastChild" : "firstChild", sibling = reverse ? "previousSibling" : "nextSibling";
|
|
1928
|
+
let current = root === null || root === void 0 ? void 0 : root[child];
|
|
1929
|
+
if (!current) {
|
|
1927
1930
|
return null;
|
|
1928
1931
|
}
|
|
1929
1932
|
do {
|
|
1930
|
-
if (condition(
|
|
1931
|
-
return
|
|
1932
|
-
}
|
|
1933
|
-
let next = last.lastChild;
|
|
1934
|
-
if (!next) {
|
|
1935
|
-
next = last.previousSibling;
|
|
1933
|
+
if (condition(current)) {
|
|
1934
|
+
return current;
|
|
1936
1935
|
}
|
|
1937
|
-
|
|
1936
|
+
let next = current[child] || current[sibling];
|
|
1937
|
+
if (!next && current.parentNode !== root) {
|
|
1938
1938
|
do {
|
|
1939
|
-
|
|
1940
|
-
} while (
|
|
1941
|
-
next =
|
|
1939
|
+
current = current.parentNode;
|
|
1940
|
+
} while (current && !current[sibling] && current.parentNode !== root);
|
|
1941
|
+
next = current === null || current === void 0 ? void 0 : current[sibling];
|
|
1942
1942
|
}
|
|
1943
|
-
|
|
1944
|
-
} while (
|
|
1943
|
+
current = next;
|
|
1944
|
+
} while (current);
|
|
1945
1945
|
return null;
|
|
1946
1946
|
}
|
|
1947
1947
|
/**
|
|
@@ -1957,12 +1957,15 @@ var init_dom = __esm({
|
|
|
1957
1957
|
return _Dom.find(node, condition, root, true, withChild);
|
|
1958
1958
|
}
|
|
1959
1959
|
static prevWithClass(node, className) {
|
|
1960
|
-
return _Dom.
|
|
1961
|
-
return _Dom.isElement(node2) && node2.classList.contains(className);
|
|
1962
|
-
}, node.parentNode);
|
|
1960
|
+
return _Dom.__siblingWithClass(node, className, true);
|
|
1963
1961
|
}
|
|
1964
1962
|
static nextWithClass(node, className) {
|
|
1965
|
-
return _Dom.
|
|
1963
|
+
return _Dom.__siblingWithClass(node, className, false);
|
|
1964
|
+
}
|
|
1965
|
+
static __siblingWithClass(node, className, left) {
|
|
1966
|
+
const condition = (elm) => _Dom.isElement(elm) && elm.classList.contains(className);
|
|
1967
|
+
const parent = node.parentNode;
|
|
1968
|
+
return left ? _Dom.prev(node, condition, parent) : _Dom.next(node, condition, parent);
|
|
1966
1969
|
}
|
|
1967
1970
|
/**
|
|
1968
1971
|
* Find next/prev node what `condition(next) === true`
|
|
@@ -2090,9 +2093,6 @@ var init_dom = __esm({
|
|
|
2090
2093
|
static findNotEmptyNeighbor(node, left, root) {
|
|
2091
2094
|
return call(left ? _Dom.prev : _Dom.next, node, (n57) => Boolean(n57 && (!(_Dom.isText(n57) || _Dom.isComment(n57)) || trim((n57 === null || n57 === void 0 ? void 0 : n57.nodeValue) || "").length)), root);
|
|
2092
2095
|
}
|
|
2093
|
-
/**
|
|
2094
|
-
* Returns the previous (`left = true`) or next sibling of the node
|
|
2095
|
-
*/
|
|
2096
2096
|
static sibling(node, left) {
|
|
2097
2097
|
return left ? node.previousSibling : node.nextSibling;
|
|
2098
2098
|
}
|
|
@@ -2152,38 +2152,23 @@ var init_dom = __esm({
|
|
|
2152
2152
|
* Append new element in the start of root
|
|
2153
2153
|
*/
|
|
2154
2154
|
static appendChildFirst(root, newElement) {
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
if (child !== newElement) {
|
|
2158
|
-
root.insertBefore(newElement, child);
|
|
2159
|
-
}
|
|
2160
|
-
} else {
|
|
2161
|
-
root.appendChild(newElement);
|
|
2155
|
+
if (root.firstChild !== newElement) {
|
|
2156
|
+
_Dom.prepend(root, newElement);
|
|
2162
2157
|
}
|
|
2163
2158
|
}
|
|
2164
2159
|
/**
|
|
2165
2160
|
* Insert newElement after element
|
|
2166
2161
|
*/
|
|
2167
2162
|
static after(elm, newElement) {
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
return;
|
|
2171
|
-
}
|
|
2172
|
-
if (parentNode.lastChild === elm) {
|
|
2173
|
-
parentNode.appendChild(newElement);
|
|
2174
|
-
} else {
|
|
2175
|
-
parentNode.insertBefore(newElement, elm.nextSibling);
|
|
2176
|
-
}
|
|
2163
|
+
var _a2;
|
|
2164
|
+
(_a2 = elm.parentNode) === null || _a2 === void 0 ? void 0 : _a2.insertBefore(newElement, elm.nextSibling);
|
|
2177
2165
|
}
|
|
2178
2166
|
/**
|
|
2179
2167
|
* Insert newElement before element
|
|
2180
2168
|
*/
|
|
2181
2169
|
static before(elm, newElement) {
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
return;
|
|
2185
|
-
}
|
|
2186
|
-
parentNode.insertBefore(newElement, elm);
|
|
2170
|
+
var _a2;
|
|
2171
|
+
(_a2 = elm.parentNode) === null || _a2 === void 0 ? void 0 : _a2.insertBefore(newElement, elm);
|
|
2187
2172
|
}
|
|
2188
2173
|
/**
|
|
2189
2174
|
* Insert newElement as first child inside element
|
|
@@ -2200,9 +2185,6 @@ var init_dom = __esm({
|
|
|
2200
2185
|
root.appendChild(newElement);
|
|
2201
2186
|
}
|
|
2202
2187
|
}
|
|
2203
|
-
/**
|
|
2204
|
-
* Move all content to another element
|
|
2205
|
-
*/
|
|
2206
2188
|
static moveContent(from, to, inStart = false, filter = () => true) {
|
|
2207
2189
|
const fragment = (from.ownerDocument || globalDocument).createDocumentFragment();
|
|
2208
2190
|
toArray(from.childNodes).filter((elm) => {
|
|
@@ -2214,11 +2196,7 @@ var init_dom = __esm({
|
|
|
2214
2196
|
}).forEach((node) => {
|
|
2215
2197
|
fragment.appendChild(node);
|
|
2216
2198
|
});
|
|
2217
|
-
|
|
2218
|
-
to.appendChild(fragment);
|
|
2219
|
-
} else {
|
|
2220
|
-
to.insertBefore(fragment, to.firstChild);
|
|
2221
|
-
}
|
|
2199
|
+
to.insertBefore(fragment, inStart ? to.firstChild : null);
|
|
2222
2200
|
}
|
|
2223
2201
|
/**
|
|
2224
2202
|
* Check root contains child or equal child
|
|
@@ -2260,8 +2238,8 @@ var init_dom = __esm({
|
|
|
2260
2238
|
if (!node) {
|
|
2261
2239
|
return;
|
|
2262
2240
|
}
|
|
2263
|
-
dataBind(node, "__old_display", node.style.display);
|
|
2264
|
-
node.style.display
|
|
2241
|
+
dataBind(node, "__old_display", node.style.getPropertyValue("display"));
|
|
2242
|
+
node.style.setProperty("display", "none");
|
|
2265
2243
|
}
|
|
2266
2244
|
/**
|
|
2267
2245
|
* Show element
|
|
@@ -2271,8 +2249,8 @@ var init_dom = __esm({
|
|
|
2271
2249
|
return;
|
|
2272
2250
|
}
|
|
2273
2251
|
const display = dataBind(node, "__old_display");
|
|
2274
|
-
if (node.style.display === "none") {
|
|
2275
|
-
node.style.display
|
|
2252
|
+
if (node.style.getPropertyValue("display") === "none") {
|
|
2253
|
+
node.style.setProperty("display", display || null);
|
|
2276
2254
|
}
|
|
2277
2255
|
}
|
|
2278
2256
|
static isTag(node, tagNames) {
|
|
@@ -2318,11 +2296,17 @@ var init_dom = __esm({
|
|
|
2318
2296
|
return value.replace(TEMP_ELEMENT_REG_EXP, "$2");
|
|
2319
2297
|
}
|
|
2320
2298
|
/**
|
|
2321
|
-
*
|
|
2322
|
-
*
|
|
2299
|
+
* Collect the temporary elements (`data-jodit-temp`) inside the root.
|
|
2300
|
+
* A plain tree walk on purpose: no selector engine, works on VNode.
|
|
2323
2301
|
*/
|
|
2324
2302
|
static temporaryList(root) {
|
|
2325
|
-
|
|
2303
|
+
const result = [];
|
|
2304
|
+
_Dom.each(root, (node) => {
|
|
2305
|
+
if (_Dom.isHTMLElement(node) && node.hasAttribute(TEMP_ATTR)) {
|
|
2306
|
+
result.push(node);
|
|
2307
|
+
}
|
|
2308
|
+
});
|
|
2309
|
+
return result;
|
|
2326
2310
|
}
|
|
2327
2311
|
};
|
|
2328
2312
|
}
|
|
@@ -2379,7 +2363,9 @@ var alreadyLoadedList, cacheLoaders, appendScriptAsync, appendStyleAsync;
|
|
|
2379
2363
|
var init_append_script = __esm({
|
|
2380
2364
|
"node_modules/jodit/esm/core/helpers/utils/append-script.js"() {
|
|
2381
2365
|
"use strict";
|
|
2366
|
+
init_dom();
|
|
2382
2367
|
init_is_string();
|
|
2368
|
+
init_attr();
|
|
2383
2369
|
init_complete_url();
|
|
2384
2370
|
alreadyLoadedList = /* @__PURE__ */ new Map();
|
|
2385
2371
|
cacheLoaders = (loader) => {
|
|
@@ -2405,10 +2391,10 @@ var init_append_script = __esm({
|
|
|
2405
2391
|
src: completeUrl(url2)
|
|
2406
2392
|
});
|
|
2407
2393
|
if (jodit.o.nonce) {
|
|
2408
|
-
script
|
|
2394
|
+
attr(script, "nonce", jodit.o.nonce);
|
|
2409
2395
|
}
|
|
2410
2396
|
jodit.e.one(script, "error", reject).one(script, "load", resolve);
|
|
2411
|
-
jodit.od.body
|
|
2397
|
+
Dom.append(jodit.od.body, script);
|
|
2412
2398
|
});
|
|
2413
2399
|
});
|
|
2414
2400
|
appendStyleAsync = cacheLoaders((jodit, url2) => {
|
|
@@ -2416,20 +2402,21 @@ var init_append_script = __esm({
|
|
|
2416
2402
|
if (jodit.isInDestruct) {
|
|
2417
2403
|
return reject();
|
|
2418
2404
|
}
|
|
2419
|
-
const link2 = jodit.c.element("link"
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2405
|
+
const link2 = jodit.c.element("link", {
|
|
2406
|
+
rel: "stylesheet",
|
|
2407
|
+
media: "all",
|
|
2408
|
+
crossorigin: "anonymous"
|
|
2409
|
+
});
|
|
2423
2410
|
if (jodit.o.nonce) {
|
|
2424
|
-
link2
|
|
2411
|
+
attr(link2, "nonce", jodit.o.nonce);
|
|
2425
2412
|
}
|
|
2426
2413
|
const callback = () => resolve(link2);
|
|
2427
2414
|
!jodit.isInDestruct && jodit.e.on(link2, "load", callback).on(link2, "error", reject);
|
|
2428
|
-
link2
|
|
2415
|
+
attr(link2, "href", completeUrl(url2));
|
|
2429
2416
|
if (jodit.o.shadowRoot) {
|
|
2430
|
-
jodit.o.shadowRoot
|
|
2417
|
+
Dom.append(jodit.o.shadowRoot, link2);
|
|
2431
2418
|
} else {
|
|
2432
|
-
jodit.od.body
|
|
2419
|
+
Dom.append(jodit.od.body, link2);
|
|
2433
2420
|
}
|
|
2434
2421
|
});
|
|
2435
2422
|
});
|
|
@@ -2913,10 +2900,10 @@ function getContainer(jodit, classFunc, tag = "div", createInsideEditor = false)
|
|
|
2913
2900
|
className: `jodit jodit-${kebabCase(name)}-container jodit-box`
|
|
2914
2901
|
});
|
|
2915
2902
|
if (view.o.nonce && (tag === "style" || tag === "script")) {
|
|
2916
|
-
box
|
|
2903
|
+
attr(box, "nonce", view.o.nonce);
|
|
2917
2904
|
}
|
|
2918
2905
|
box.classList.add(`jodit_theme_${view.o.theme || "default"}`);
|
|
2919
|
-
|
|
2906
|
+
Dom.append(body, box);
|
|
2920
2907
|
data[key3] = box;
|
|
2921
2908
|
jodit.hookStatus("beforeDestruct", () => {
|
|
2922
2909
|
view.events.off(box);
|
|
@@ -2945,6 +2932,7 @@ var init_global2 = __esm({
|
|
|
2945
2932
|
init_is_string();
|
|
2946
2933
|
init_is_view_object();
|
|
2947
2934
|
init_kebab_case();
|
|
2935
|
+
init_attr();
|
|
2948
2936
|
init_css();
|
|
2949
2937
|
init_get_class_name();
|
|
2950
2938
|
init_plugin_system();
|
|
@@ -3292,14 +3280,17 @@ var init_selector = __esm({
|
|
|
3292
3280
|
if ("container" in root) {
|
|
3293
3281
|
root = root.container;
|
|
3294
3282
|
}
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
if (
|
|
3298
|
-
|
|
3299
|
-
|
|
3283
|
+
const def = {};
|
|
3284
|
+
Dom.each(root, (child) => {
|
|
3285
|
+
if (Dom.isElement(child) && (child.hasAttribute("ref") || child.hasAttribute("data-ref"))) {
|
|
3286
|
+
const key3 = attr(child, "-ref");
|
|
3287
|
+
if (key3 && isString(key3)) {
|
|
3288
|
+
def[camelCase(key3)] = child;
|
|
3289
|
+
def[key3] = child;
|
|
3290
|
+
}
|
|
3300
3291
|
}
|
|
3301
|
-
|
|
3302
|
-
|
|
3292
|
+
});
|
|
3293
|
+
return def;
|
|
3303
3294
|
};
|
|
3304
3295
|
cssPath = (el) => {
|
|
3305
3296
|
if (!Dom.isElement(el)) {
|
|
@@ -3354,8 +3345,8 @@ function applyStyles(html) {
|
|
|
3354
3345
|
html = html.substring(0, closeIndex + "</html>".length);
|
|
3355
3346
|
}
|
|
3356
3347
|
const iframe2 = globalDocument.createElement("iframe");
|
|
3357
|
-
iframe2
|
|
3358
|
-
globalDocument.body
|
|
3348
|
+
css(iframe2, "display", "none");
|
|
3349
|
+
Dom.append(globalDocument.body, iframe2);
|
|
3359
3350
|
let convertedString = "", collection = [];
|
|
3360
3351
|
try {
|
|
3361
3352
|
const iframeDoc = iframe2.contentDocument || (iframe2.contentWindow ? iframe2.contentWindow.document : null);
|
|
@@ -3364,7 +3355,7 @@ function applyStyles(html) {
|
|
|
3364
3355
|
iframeDoc.write(html);
|
|
3365
3356
|
iframeDoc.close();
|
|
3366
3357
|
Dom.each(iframeDoc.body, (node) => {
|
|
3367
|
-
if (Dom.isElement(node) && /mso-list:\s*ignore/i.test(node
|
|
3358
|
+
if (Dom.isElement(node) && /mso-list:\s*ignore/i.test(attr(node, "style") || "")) {
|
|
3368
3359
|
Dom.safeRemove(node);
|
|
3369
3360
|
}
|
|
3370
3361
|
});
|
|
@@ -3388,13 +3379,12 @@ function applyStyles(html) {
|
|
|
3388
3379
|
}
|
|
3389
3380
|
Dom.each(iframeDoc.body, (node) => {
|
|
3390
3381
|
if (Dom.isElement(node)) {
|
|
3391
|
-
const
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
elm.style.cssText = normalizeCSS(css2);
|
|
3382
|
+
const cssText = attr(node, "style");
|
|
3383
|
+
if (cssText) {
|
|
3384
|
+
node.style.cssText = normalizeCSS(cssText);
|
|
3395
3385
|
}
|
|
3396
|
-
if (
|
|
3397
|
-
|
|
3386
|
+
if (!attr(node, "style")) {
|
|
3387
|
+
attr(node, "style", null);
|
|
3398
3388
|
}
|
|
3399
3389
|
}
|
|
3400
3390
|
});
|
|
@@ -3415,6 +3405,8 @@ var init_apply_styles = __esm({
|
|
|
3415
3405
|
init_constants();
|
|
3416
3406
|
init_dom();
|
|
3417
3407
|
init_trim();
|
|
3408
|
+
init_attr();
|
|
3409
|
+
init_css();
|
|
3418
3410
|
init_selector();
|
|
3419
3411
|
}
|
|
3420
3412
|
});
|
|
@@ -3449,18 +3441,18 @@ function cleanFromWord(html) {
|
|
|
3449
3441
|
Dom.unwrap(node);
|
|
3450
3442
|
break;
|
|
3451
3443
|
default:
|
|
3452
|
-
if (/mso-list:\s*ignore/i.test(node
|
|
3444
|
+
if (/mso-list:\s*ignore/i.test(attr(node, "style") || "")) {
|
|
3453
3445
|
marks.push(node);
|
|
3454
3446
|
break;
|
|
3455
3447
|
}
|
|
3456
|
-
toArray(node.attributes).forEach((
|
|
3448
|
+
toArray(node.attributes).forEach((attribute) => {
|
|
3457
3449
|
if ([
|
|
3458
3450
|
"src",
|
|
3459
3451
|
"href",
|
|
3460
3452
|
"rel",
|
|
3461
3453
|
"content"
|
|
3462
|
-
].indexOf(
|
|
3463
|
-
node.
|
|
3454
|
+
].indexOf(attribute.name.toLowerCase()) === -1) {
|
|
3455
|
+
attrRaw(node, attribute.name, null);
|
|
3464
3456
|
}
|
|
3465
3457
|
});
|
|
3466
3458
|
}
|
|
@@ -3489,6 +3481,7 @@ var init_clean_from_word = __esm({
|
|
|
3489
3481
|
init_dom();
|
|
3490
3482
|
init_to_array();
|
|
3491
3483
|
init_trim();
|
|
3484
|
+
init_attr();
|
|
3492
3485
|
}
|
|
3493
3486
|
});
|
|
3494
3487
|
|
|
@@ -3539,10 +3532,10 @@ function hAlignElement(image2, align2) {
|
|
|
3539
3532
|
function clearAlign(node) {
|
|
3540
3533
|
Dom.each(node, (elm) => {
|
|
3541
3534
|
if (Dom.isHTMLElement(elm)) {
|
|
3542
|
-
if (elm
|
|
3543
|
-
elm
|
|
3544
|
-
if (!elm
|
|
3545
|
-
elm
|
|
3535
|
+
if (cssInline(elm, "textAlign")) {
|
|
3536
|
+
css(elm, "textAlign", "");
|
|
3537
|
+
if (!(attr(elm, "style") || "").trim().length) {
|
|
3538
|
+
attr(elm, "style", null);
|
|
3546
3539
|
}
|
|
3547
3540
|
}
|
|
3548
3541
|
}
|
|
@@ -3551,27 +3544,25 @@ function clearAlign(node) {
|
|
|
3551
3544
|
function alignElement(command, box) {
|
|
3552
3545
|
if (Dom.isNode(box) && Dom.isElement(box)) {
|
|
3553
3546
|
clearAlign(box);
|
|
3554
|
-
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
break;
|
|
3558
|
-
case "justifyright":
|
|
3559
|
-
box.style.textAlign = "right";
|
|
3560
|
-
break;
|
|
3561
|
-
case "justifyleft":
|
|
3562
|
-
box.style.textAlign = "left";
|
|
3563
|
-
break;
|
|
3564
|
-
case "justifycenter":
|
|
3565
|
-
box.style.textAlign = "center";
|
|
3566
|
-
break;
|
|
3547
|
+
const align2 = ALIGN_BY_COMMAND.get(command.toLowerCase());
|
|
3548
|
+
if (align2) {
|
|
3549
|
+
css(box, "textAlign", align2);
|
|
3567
3550
|
}
|
|
3568
3551
|
}
|
|
3569
3552
|
}
|
|
3553
|
+
var ALIGN_BY_COMMAND;
|
|
3570
3554
|
var init_align = __esm({
|
|
3571
3555
|
"node_modules/jodit/esm/core/helpers/utils/align.js"() {
|
|
3572
3556
|
"use strict";
|
|
3573
3557
|
init_dom2();
|
|
3558
|
+
init_attr();
|
|
3574
3559
|
init_css();
|
|
3560
|
+
ALIGN_BY_COMMAND = /* @__PURE__ */ new Map([
|
|
3561
|
+
["justifyfull", "justify"],
|
|
3562
|
+
["justifyright", "right"],
|
|
3563
|
+
["justifyleft", "left"],
|
|
3564
|
+
["justifycenter", "center"]
|
|
3565
|
+
]);
|
|
3575
3566
|
}
|
|
3576
3567
|
});
|
|
3577
3568
|
|
|
@@ -4145,26 +4136,29 @@ var init_mark_deprecated = __esm({
|
|
|
4145
4136
|
// node_modules/jodit/esm/core/helpers/utils/print.js
|
|
4146
4137
|
function fixedAssetsSizeAndAbsoluteLinks(editor, points) {
|
|
4147
4138
|
const restoreAttributes = [];
|
|
4139
|
+
const images = [];
|
|
4140
|
+
Dom.each(editor.editor, (node) => {
|
|
4141
|
+
Dom.isTag(node, "img") && images.push(node);
|
|
4142
|
+
});
|
|
4148
4143
|
try {
|
|
4149
|
-
|
|
4144
|
+
images.forEach((item) => {
|
|
4150
4145
|
const previousAttrs = [
|
|
4151
4146
|
attr(item, "width"),
|
|
4152
4147
|
attr(item, "height"),
|
|
4153
|
-
item
|
|
4148
|
+
attr(item, "src")
|
|
4154
4149
|
];
|
|
4155
4150
|
attr(item, {
|
|
4156
4151
|
width: item.offsetWidth + points,
|
|
4157
4152
|
height: item.offsetHeight + points
|
|
4158
4153
|
});
|
|
4159
4154
|
const a79 = editor.createInside.a();
|
|
4160
|
-
editor.ed.body
|
|
4161
|
-
a79
|
|
4162
|
-
item
|
|
4155
|
+
Dom.append(editor.ed.body, a79);
|
|
4156
|
+
attr(a79, "href", attr(item, "src") || "");
|
|
4157
|
+
attr(item, "src", a79.href);
|
|
4163
4158
|
Dom.safeRemove(a79);
|
|
4164
4159
|
restoreAttributes.push(() => {
|
|
4165
|
-
var _a2;
|
|
4166
|
-
item.src = (_a2 = previousAttrs[2]) !== null && _a2 !== void 0 ? _a2 : "";
|
|
4167
4160
|
attr(item, {
|
|
4161
|
+
src: previousAttrs[2],
|
|
4168
4162
|
width: previousAttrs[0] || null,
|
|
4169
4163
|
height: previousAttrs[1] || null
|
|
4170
4164
|
});
|
|
@@ -4187,7 +4181,7 @@ function previewBox(editor, defaultValue, points = "px", container = null) {
|
|
|
4187
4181
|
}
|
|
4188
4182
|
let div = editor.c.div("jodit__preview-box jodit-context");
|
|
4189
4183
|
if (container) {
|
|
4190
|
-
|
|
4184
|
+
Dom.append(container, div);
|
|
4191
4185
|
}
|
|
4192
4186
|
css(div, {
|
|
4193
4187
|
position: "relative",
|
|
@@ -4201,7 +4195,7 @@ function previewBox(editor, defaultValue, points = "px", container = null) {
|
|
|
4201
4195
|
minHeight: 600,
|
|
4202
4196
|
border: 0
|
|
4203
4197
|
});
|
|
4204
|
-
|
|
4198
|
+
Dom.append(div, iframe2);
|
|
4205
4199
|
const myWindow = iframe2.contentWindow;
|
|
4206
4200
|
if (myWindow) {
|
|
4207
4201
|
editor.e.fire("generateDocumentStructure.iframe", myWindow.document, editor);
|
|
@@ -4211,7 +4205,7 @@ function previewBox(editor, defaultValue, points = "px", container = null) {
|
|
|
4211
4205
|
const elm = myWindow.document.body;
|
|
4212
4206
|
const resizeObserver = new ResizeObserver(editor.async.debounce(() => {
|
|
4213
4207
|
resizeObserver.unobserve(elm);
|
|
4214
|
-
iframe2
|
|
4208
|
+
css(iframe2, "height", elm.offsetHeight + 20);
|
|
4215
4209
|
editor.async.requestAnimationFrame(() => {
|
|
4216
4210
|
!destructed && resizeObserver.observe(elm);
|
|
4217
4211
|
});
|
|
@@ -4243,7 +4237,7 @@ function previewBox(editor, defaultValue, points = "px", container = null) {
|
|
|
4243
4237
|
if (Dom.isElement(c74)) {
|
|
4244
4238
|
const newNode = box.ownerDocument.createElement(c74.nodeName);
|
|
4245
4239
|
for (let j10 = 0; j10 < c74.attributes.length; j10 += 1) {
|
|
4246
|
-
attr(newNode, c74.attributes[j10].
|
|
4240
|
+
attr(newNode, c74.attributes[j10].name, c74.attributes[j10].value);
|
|
4247
4241
|
}
|
|
4248
4242
|
if (c74.childNodes.length === 0 || Dom.isTag(c74, "table")) {
|
|
4249
4243
|
switch (c74.nodeName) {
|
|
@@ -4262,12 +4256,12 @@ function previewBox(editor, defaultValue, points = "px", container = null) {
|
|
|
4262
4256
|
setHTML(newNode, c74);
|
|
4263
4257
|
}
|
|
4264
4258
|
try {
|
|
4265
|
-
|
|
4259
|
+
Dom.append(box, newNode);
|
|
4266
4260
|
} catch (_a2) {
|
|
4267
4261
|
}
|
|
4268
4262
|
} else {
|
|
4269
4263
|
try {
|
|
4270
|
-
|
|
4264
|
+
Dom.append(box, c74.cloneNode(true));
|
|
4271
4265
|
} catch (_b) {
|
|
4272
4266
|
}
|
|
4273
4267
|
}
|
|
@@ -4292,7 +4286,6 @@ var init_print = __esm({
|
|
|
4292
4286
|
init_is_string();
|
|
4293
4287
|
init_attr();
|
|
4294
4288
|
init_css();
|
|
4295
|
-
init_selector();
|
|
4296
4289
|
}
|
|
4297
4290
|
});
|
|
4298
4291
|
|
|
@@ -4429,7 +4422,7 @@ var init_utils3 = __esm({
|
|
|
4429
4422
|
|
|
4430
4423
|
// node_modules/jodit/esm/core/helpers/html/safe-html.js
|
|
4431
4424
|
function isSmuggledForeignHtml(elm) {
|
|
4432
|
-
if (elm.namespaceURI !== HTML_NAMESPACE ||
|
|
4425
|
+
if (elm.namespaceURI !== HTML_NAMESPACE || Dom.up(elm, isMathOrSvg) == null) {
|
|
4433
4426
|
return false;
|
|
4434
4427
|
}
|
|
4435
4428
|
for (let parent = elm.parentElement; parent; parent = parent.parentElement) {
|
|
@@ -4448,10 +4441,15 @@ function safeHTML(box, options2) {
|
|
|
4448
4441
|
if (!Dom.isElement(box) && !Dom.isFragment(box)) {
|
|
4449
4442
|
return;
|
|
4450
4443
|
}
|
|
4451
|
-
const foreign =
|
|
4452
|
-
|
|
4453
|
-
if (
|
|
4454
|
-
|
|
4444
|
+
const foreign = [];
|
|
4445
|
+
Dom.each(box, (node) => {
|
|
4446
|
+
if (Dom.isElement(node) && Dom.up(node.parentNode, isMathOrSvg)) {
|
|
4447
|
+
foreign.push(node);
|
|
4448
|
+
}
|
|
4449
|
+
});
|
|
4450
|
+
for (const elm of foreign) {
|
|
4451
|
+
if (Dom.isOrContains(box, elm) && isSmuggledForeignHtml(elm)) {
|
|
4452
|
+
Dom.safeRemove(elm);
|
|
4455
4453
|
}
|
|
4456
4454
|
}
|
|
4457
4455
|
const removeEvents = (_a2 = options2.removeEventAttributes) !== null && _a2 !== void 0 ? _a2 : options2.removeOnError;
|
|
@@ -4463,8 +4461,8 @@ function safeHTML(box, options2) {
|
|
|
4463
4461
|
removeAllEventAttributes(node);
|
|
4464
4462
|
}
|
|
4465
4463
|
sanitizeHTMLElement(node, options2);
|
|
4466
|
-
if (options2.safeLinksTarget && node.nodeName === "A" && node
|
|
4467
|
-
const rel = node
|
|
4464
|
+
if (options2.safeLinksTarget && node.nodeName === "A" && attr(node, "target") === "_blank") {
|
|
4465
|
+
const rel = attr(node, "rel") || "";
|
|
4468
4466
|
const parts = rel.split(/\s+/).filter(Boolean);
|
|
4469
4467
|
if (!parts.includes("noopener")) {
|
|
4470
4468
|
parts.push("noopener");
|
|
@@ -4490,7 +4488,7 @@ function removeAllEventAttributes(elm) {
|
|
|
4490
4488
|
}
|
|
4491
4489
|
}
|
|
4492
4490
|
for (const name of toRemove) {
|
|
4493
|
-
elm
|
|
4491
|
+
attrRaw(elm, name, null);
|
|
4494
4492
|
effected = true;
|
|
4495
4493
|
}
|
|
4496
4494
|
return effected;
|
|
@@ -4518,7 +4516,7 @@ function sanitizeHTMLElement(elm, { safeJavaScriptLink, removeOnError } = {
|
|
|
4518
4516
|
effected = true;
|
|
4519
4517
|
}
|
|
4520
4518
|
const tagName = elm.nodeName.toLowerCase();
|
|
4521
|
-
const href = elm
|
|
4519
|
+
const href = attr(elm, "href");
|
|
4522
4520
|
if (safeJavaScriptLink && href && isDangerousUrl(href, tagName)) {
|
|
4523
4521
|
const protocol = typeof location !== "undefined" ? location.protocol : "http:";
|
|
4524
4522
|
attr(elm, "href", protocol + "//" + href);
|
|
@@ -4530,7 +4528,7 @@ function sanitizeHTMLElement(elm, { safeJavaScriptLink, removeOnError } = {
|
|
|
4530
4528
|
effected = true;
|
|
4531
4529
|
}
|
|
4532
4530
|
for (const name of URL_ATTRIBUTES) {
|
|
4533
|
-
const value = elm
|
|
4531
|
+
const value = attrRaw(elm, name);
|
|
4534
4532
|
if (value && isDangerousUrl(value, tagName)) {
|
|
4535
4533
|
attr(elm, name, null);
|
|
4536
4534
|
effected = true;
|
|
@@ -4539,12 +4537,13 @@ function sanitizeHTMLElement(elm, { safeJavaScriptLink, removeOnError } = {
|
|
|
4539
4537
|
}
|
|
4540
4538
|
return effected;
|
|
4541
4539
|
}
|
|
4542
|
-
var HTML_NAMESPACE, HTML_INTEGRATION_POINTS, URL_ATTRIBUTES, DOCUMENT_EMBED_TAGS;
|
|
4540
|
+
var HTML_NAMESPACE, HTML_INTEGRATION_POINTS, isMathOrSvg, URL_ATTRIBUTES, DOCUMENT_EMBED_TAGS;
|
|
4543
4541
|
var init_safe_html = __esm({
|
|
4544
4542
|
"node_modules/jodit/esm/core/helpers/html/safe-html.js"() {
|
|
4545
4543
|
"use strict";
|
|
4546
4544
|
init_dom();
|
|
4547
4545
|
init_utils3();
|
|
4546
|
+
init_attr();
|
|
4548
4547
|
HTML_NAMESPACE = "http://www.w3.org/1999/xhtml";
|
|
4549
4548
|
HTML_INTEGRATION_POINTS = /* @__PURE__ */ new Set([
|
|
4550
4549
|
"foreignobject",
|
|
@@ -4552,6 +4551,7 @@ var init_safe_html = __esm({
|
|
|
4552
4551
|
"desc",
|
|
4553
4552
|
"title"
|
|
4554
4553
|
]);
|
|
4554
|
+
isMathOrSvg = (node) => Boolean(node && /^(math|svg)$/i.test(node.nodeName));
|
|
4555
4555
|
URL_ATTRIBUTES = [
|
|
4556
4556
|
"src",
|
|
4557
4557
|
"data",
|
|
@@ -4571,9 +4571,13 @@ function stripTags(html, doc = document, exclude = null, blockBr = false) {
|
|
|
4571
4571
|
if (isString(html)) {
|
|
4572
4572
|
tmp.innerHTML = html;
|
|
4573
4573
|
} else {
|
|
4574
|
-
|
|
4574
|
+
Dom.append(tmp, html);
|
|
4575
4575
|
}
|
|
4576
|
-
|
|
4576
|
+
const all = [];
|
|
4577
|
+
Dom.each(tmp, (node) => {
|
|
4578
|
+
Dom.isElement(node) && all.push(node);
|
|
4579
|
+
});
|
|
4580
|
+
all.forEach((p63) => {
|
|
4577
4581
|
const pr = p63.parentNode;
|
|
4578
4582
|
if (!pr) {
|
|
4579
4583
|
return;
|
|
@@ -4597,7 +4601,7 @@ function stripTags(html, doc = document, exclude = null, blockBr = false) {
|
|
|
4597
4601
|
return;
|
|
4598
4602
|
}
|
|
4599
4603
|
if (nx) {
|
|
4600
|
-
|
|
4604
|
+
Dom.before(nx, doc.createTextNode(blockBr ? "%%%jodit-single-br%%%" : " "));
|
|
4601
4605
|
}
|
|
4602
4606
|
});
|
|
4603
4607
|
return restoreTags(trim(tmp.innerText));
|
|
@@ -4612,7 +4616,6 @@ var init_strip_tags = __esm({
|
|
|
4612
4616
|
init_dom();
|
|
4613
4617
|
init_is_string();
|
|
4614
4618
|
init_trim();
|
|
4615
|
-
init_utils3();
|
|
4616
4619
|
NEW_LINE_TAGS = /* @__PURE__ */ new Set([
|
|
4617
4620
|
"div",
|
|
4618
4621
|
"p",
|
|
@@ -5153,6 +5156,7 @@ __export(helpers_exports, {
|
|
|
5153
5156
|
asArray: () => asArray,
|
|
5154
5157
|
assert: () => assert,
|
|
5155
5158
|
attr: () => attr,
|
|
5159
|
+
attrRaw: () => attrRaw,
|
|
5156
5160
|
browser: () => browser,
|
|
5157
5161
|
buildQuery: () => buildQuery,
|
|
5158
5162
|
call: () => call,
|
|
@@ -5169,6 +5173,7 @@ __export(helpers_exports, {
|
|
|
5169
5173
|
connection: () => connection,
|
|
5170
5174
|
convertMediaUrlToVideoEmbed: () => convertMediaUrlToVideoEmbed,
|
|
5171
5175
|
css: () => css,
|
|
5176
|
+
cssInline: () => cssInline,
|
|
5172
5177
|
cssPath: () => cssPath,
|
|
5173
5178
|
ctrlKey: () => ctrlKey,
|
|
5174
5179
|
dataBind: () => dataBind,
|
|
@@ -6896,8 +6901,8 @@ function appendNestedList(jodit, list, li) {
|
|
|
6896
6901
|
acc[attr2.name] = attr2.value;
|
|
6897
6902
|
return acc;
|
|
6898
6903
|
}, {}));
|
|
6899
|
-
|
|
6900
|
-
lastElm !== newList &&
|
|
6904
|
+
Dom.append(newList, li);
|
|
6905
|
+
lastElm !== newList && Dom.append(previousLi, newList);
|
|
6901
6906
|
}
|
|
6902
6907
|
function removeNestedList(jodit, list, li) {
|
|
6903
6908
|
const parentLi = Dom.closest(list, "li", jodit.editor);
|
|
@@ -7061,7 +7066,7 @@ var require_wrap_nodes = __commonJS({
|
|
|
7061
7066
|
Dom.before(child, box);
|
|
7062
7067
|
while (child && this.isSuitable(child)) {
|
|
7063
7068
|
const next = child.nextSibling;
|
|
7064
|
-
|
|
7069
|
+
Dom.append(box, child);
|
|
7065
7070
|
child = next;
|
|
7066
7071
|
}
|
|
7067
7072
|
box.normalize();
|
|
@@ -7107,7 +7112,7 @@ var require_wrap_nodes = __commonJS({
|
|
|
7107
7112
|
if (Dom.isElement(next) && Dom.isLeaf(next) && !Dom.isList(next.parentElement)) {
|
|
7108
7113
|
const nextChild = Dom.findNotEmptySibling(next, false);
|
|
7109
7114
|
if (Dom.isTag(result, "ul")) {
|
|
7110
|
-
|
|
7115
|
+
Dom.append(result, next);
|
|
7111
7116
|
} else {
|
|
7112
7117
|
result = Dom.wrap(next, "ul", jodit.createInside);
|
|
7113
7118
|
}
|
|
@@ -8136,9 +8141,9 @@ var Icon = class _Icon {
|
|
|
8136
8141
|
}
|
|
8137
8142
|
if (iconElement) {
|
|
8138
8143
|
iconElement.classList.add("jodit-icon");
|
|
8139
|
-
iconElement
|
|
8144
|
+
css(iconElement, "fill", fill);
|
|
8140
8145
|
if (scale != null) {
|
|
8141
|
-
iconElement
|
|
8146
|
+
css(iconElement, "transform", `scale(${scale})`);
|
|
8142
8147
|
}
|
|
8143
8148
|
jodit.o.cache && this.__cache.set(cacheKey, iconElement.cloneNode(true));
|
|
8144
8149
|
}
|
|
@@ -8205,6 +8210,7 @@ Icon.set("about", about_svg_default);
|
|
|
8205
8210
|
init_decorators();
|
|
8206
8211
|
init_global2();
|
|
8207
8212
|
init_helpers();
|
|
8213
|
+
init_css();
|
|
8208
8214
|
|
|
8209
8215
|
// node_modules/jodit/esm/modules/index.js
|
|
8210
8216
|
var modules_exports = {};
|
|
@@ -8304,19 +8310,27 @@ init_is_string();
|
|
|
8304
8310
|
init_attr();
|
|
8305
8311
|
|
|
8306
8312
|
// node_modules/jodit/esm/core/traits/elms.js
|
|
8307
|
-
|
|
8313
|
+
init_dom();
|
|
8308
8314
|
var Elms = class {
|
|
8309
8315
|
/**
|
|
8310
8316
|
* Return element with BEM class name
|
|
8311
8317
|
*/
|
|
8312
8318
|
getElm(elementName) {
|
|
8313
|
-
|
|
8319
|
+
const className = this.getFullElName(elementName);
|
|
8320
|
+
return Dom.first(this.container, (node) => Dom.isHTMLElement(node) && node.classList.contains(className));
|
|
8314
8321
|
}
|
|
8315
8322
|
/**
|
|
8316
8323
|
* Return elements with BEM class name
|
|
8317
8324
|
*/
|
|
8318
8325
|
getElms(elementName) {
|
|
8319
|
-
|
|
8326
|
+
const className = this.getFullElName(elementName);
|
|
8327
|
+
const result = [];
|
|
8328
|
+
Dom.each(this.container, (node) => {
|
|
8329
|
+
if (Dom.isHTMLElement(node) && node.classList.contains(className)) {
|
|
8330
|
+
result.push(node);
|
|
8331
|
+
}
|
|
8332
|
+
});
|
|
8333
|
+
return result;
|
|
8320
8334
|
}
|
|
8321
8335
|
};
|
|
8322
8336
|
|
|
@@ -8438,7 +8452,7 @@ var UIElement = UIElement_1 = class UIElement2 extends ViewComponent {
|
|
|
8438
8452
|
* Append container to element
|
|
8439
8453
|
*/
|
|
8440
8454
|
appendTo(element) {
|
|
8441
|
-
|
|
8455
|
+
Dom.append(element, this.container);
|
|
8442
8456
|
return this;
|
|
8443
8457
|
}
|
|
8444
8458
|
/**
|
|
@@ -8617,7 +8631,7 @@ var UIButton = class UIButton2 extends UIElement {
|
|
|
8617
8631
|
}
|
|
8618
8632
|
Dom.detach(this.icon);
|
|
8619
8633
|
const iconElement = Icon.makeIcon(this.j, this.state.icon);
|
|
8620
|
-
iconElement && this.icon
|
|
8634
|
+
iconElement && Dom.append(this.icon, iconElement);
|
|
8621
8635
|
}
|
|
8622
8636
|
/**
|
|
8623
8637
|
* Set focus on an element
|
|
@@ -8643,8 +8657,8 @@ var UIButton = class UIButton2 extends UIElement {
|
|
|
8643
8657
|
});
|
|
8644
8658
|
const icon2 = this.j.c.span(cn + "__icon");
|
|
8645
8659
|
const text2 = this.j.c.span(cn + "__text");
|
|
8646
|
-
|
|
8647
|
-
|
|
8660
|
+
Dom.append(button2, icon2);
|
|
8661
|
+
Dom.append(button2, text2);
|
|
8648
8662
|
return button2;
|
|
8649
8663
|
}
|
|
8650
8664
|
constructor(jodit, state) {
|
|
@@ -8764,6 +8778,7 @@ init_dom();
|
|
|
8764
8778
|
init_global2();
|
|
8765
8779
|
init_helpers();
|
|
8766
8780
|
init_assert();
|
|
8781
|
+
init_css();
|
|
8767
8782
|
|
|
8768
8783
|
// node_modules/jodit/esm/core/ui/group/group.js
|
|
8769
8784
|
init_component2();
|
|
@@ -8840,7 +8855,7 @@ var UIGroup = UIGroup_1 = class UIGroup2 extends UIElement {
|
|
|
8840
8855
|
if (distElm == null) {
|
|
8841
8856
|
throw new Error("Element does not exist");
|
|
8842
8857
|
}
|
|
8843
|
-
|
|
8858
|
+
Dom.append(distElm, elm.container);
|
|
8844
8859
|
} else {
|
|
8845
8860
|
this.appendChildToContainer(elm.container, index);
|
|
8846
8861
|
}
|
|
@@ -8857,10 +8872,11 @@ var UIGroup = UIGroup_1 = class UIGroup2 extends UIElement {
|
|
|
8857
8872
|
* Allow set another container for the box of all children
|
|
8858
8873
|
*/
|
|
8859
8874
|
appendChildToContainer(childContainer, index) {
|
|
8860
|
-
|
|
8861
|
-
|
|
8875
|
+
const ref = index === void 0 || index < 0 || index > this.elements.length - 1 ? null : this.container.children[index];
|
|
8876
|
+
if (ref == null) {
|
|
8877
|
+
Dom.append(this.container, childContainer);
|
|
8862
8878
|
} else {
|
|
8863
|
-
|
|
8879
|
+
Dom.before(ref, childContainer);
|
|
8864
8880
|
}
|
|
8865
8881
|
}
|
|
8866
8882
|
/**
|
|
@@ -8940,7 +8956,7 @@ var Popup = class _Popup extends UIGroup {
|
|
|
8940
8956
|
appendChildToContainer(childContainer) {
|
|
8941
8957
|
const content = this.getElm("content");
|
|
8942
8958
|
assert(content, "Content element should exist");
|
|
8943
|
-
|
|
8959
|
+
Dom.append(content, childContainer);
|
|
8944
8960
|
}
|
|
8945
8961
|
updateParentElement(target) {
|
|
8946
8962
|
if (target !== this && Component.isInstanceOf(target, _Popup)) {
|
|
@@ -8985,11 +9001,11 @@ var Popup = class _Popup extends UIGroup {
|
|
|
8985
9001
|
this.__addGlobalListeners();
|
|
8986
9002
|
this.__targetBound = !keepPosition ? getBound : this.getKeepBound(getBound);
|
|
8987
9003
|
if (parentContainer) {
|
|
8988
|
-
|
|
9004
|
+
Dom.append(parentContainer, this.container);
|
|
8989
9005
|
} else {
|
|
8990
9006
|
const popupContainer = getContainer(this.jodit, _Popup);
|
|
8991
9007
|
if (parentContainer !== this.container.parentElement) {
|
|
8992
|
-
|
|
9008
|
+
Dom.append(popupContainer, this.container);
|
|
8993
9009
|
}
|
|
8994
9010
|
}
|
|
8995
9011
|
this.updatePosition();
|
|
@@ -8998,11 +9014,11 @@ var Popup = class _Popup extends UIGroup {
|
|
|
8998
9014
|
return this;
|
|
8999
9015
|
}
|
|
9000
9016
|
__calculateZIndex() {
|
|
9001
|
-
if (this.container
|
|
9017
|
+
if (cssInline(this.container, "zIndex")) {
|
|
9002
9018
|
return;
|
|
9003
9019
|
}
|
|
9004
9020
|
const checkView = (view) => {
|
|
9005
|
-
const zIndex = view.container
|
|
9021
|
+
const zIndex = cssInline(view.container, "zIndex") || view.o.zIndex;
|
|
9006
9022
|
if (zIndex) {
|
|
9007
9023
|
this.setZIndex(1 + parseInt(zIndex.toString(), 10));
|
|
9008
9024
|
return true;
|
|
@@ -9018,8 +9034,9 @@ var Popup = class _Popup extends UIGroup {
|
|
|
9018
9034
|
if (checkView(pe2.j)) {
|
|
9019
9035
|
return;
|
|
9020
9036
|
}
|
|
9021
|
-
|
|
9022
|
-
|
|
9037
|
+
const parentZIndex = cssInline(pe2.container, "zIndex");
|
|
9038
|
+
if (parentZIndex) {
|
|
9039
|
+
this.setZIndex(1 + parseInt(parentZIndex.toString(), 10));
|
|
9023
9040
|
return;
|
|
9024
9041
|
}
|
|
9025
9042
|
if (!pe2.parentElement && pe2.container.parentElement) {
|
|
@@ -9184,7 +9201,7 @@ var Popup = class _Popup extends UIGroup {
|
|
|
9184
9201
|
* Set ZIndex
|
|
9185
9202
|
*/
|
|
9186
9203
|
setZIndex(index) {
|
|
9187
|
-
this.container
|
|
9204
|
+
css(this.container, "zIndex", index.toString());
|
|
9188
9205
|
}
|
|
9189
9206
|
constructor(jodit, smart = true) {
|
|
9190
9207
|
super(jodit);
|
|
@@ -9299,6 +9316,7 @@ init_assert();
|
|
|
9299
9316
|
|
|
9300
9317
|
// node_modules/jodit/esm/core/ui/button/group/group.js
|
|
9301
9318
|
init_component();
|
|
9319
|
+
init_dom();
|
|
9302
9320
|
init_assert();
|
|
9303
9321
|
var __decorate7 = function(decorators, target, key3, desc) {
|
|
9304
9322
|
var c74 = arguments.length, r60 = c74 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key3) : desc, d55;
|
|
@@ -9326,7 +9344,7 @@ var UIButtonGroup = class UIButtonGroup2 extends UIGroup {
|
|
|
9326
9344
|
appendChildToContainer(childContainer) {
|
|
9327
9345
|
const options2 = this.getElm("options");
|
|
9328
9346
|
assert(options2 != null, "Options does not exist");
|
|
9329
|
-
|
|
9347
|
+
Dom.append(options2, childContainer);
|
|
9330
9348
|
}
|
|
9331
9349
|
constructor(jodit, options2 = {
|
|
9332
9350
|
radio: true
|
|
@@ -9425,7 +9443,7 @@ var UITooltip = UITooltip_1 = class UITooltip2 extends UIElement {
|
|
|
9425
9443
|
}
|
|
9426
9444
|
}
|
|
9427
9445
|
__onAttach(container) {
|
|
9428
|
-
getContainer(this.j, UITooltip_1)
|
|
9446
|
+
Dom.append(getContainer(this.j, UITooltip_1), this.container);
|
|
9429
9447
|
this.__attachedContainers.add(container);
|
|
9430
9448
|
this.__attachedContainers.add(this.j.container);
|
|
9431
9449
|
this.j.e.on(container, "mouseenter.tooltip", this.__onMouseEnter, {
|
|
@@ -9523,7 +9541,7 @@ var UITooltip = UITooltip_1 = class UITooltip2 extends UIElement {
|
|
|
9523
9541
|
if (this.__isOpened) {
|
|
9524
9542
|
this.__isOpened = false;
|
|
9525
9543
|
this.setMod("visible", false);
|
|
9526
|
-
this.getElm("content")
|
|
9544
|
+
Dom.detach(this.getElm("content"));
|
|
9527
9545
|
css(this.container, {
|
|
9528
9546
|
left: -5e3
|
|
9529
9547
|
});
|
|
@@ -9713,7 +9731,7 @@ var UIInput = UIInput_1 = class UIInput2 extends UIElement {
|
|
|
9713
9731
|
Dom.safeRemove(this.__errorBox);
|
|
9714
9732
|
} else {
|
|
9715
9733
|
this.__errorBox.innerText = this.j.i18n(value, this.j.i18n(this.state.label || ""));
|
|
9716
|
-
this.container
|
|
9734
|
+
Dom.append(this.container, this.__errorBox);
|
|
9717
9735
|
}
|
|
9718
9736
|
}
|
|
9719
9737
|
get value() {
|
|
@@ -9755,10 +9773,10 @@ var UIInput = UIInput_1 = class UIInput2 extends UIElement {
|
|
|
9755
9773
|
__markInputInvalid() {
|
|
9756
9774
|
var _a2, _b, _c, _d;
|
|
9757
9775
|
if (this.error) {
|
|
9758
|
-
this.nativeInput
|
|
9776
|
+
attr(this.nativeInput, "aria-invalid", "true");
|
|
9759
9777
|
(_b = (_a2 = this.nativeInput).setCustomValidity) === null || _b === void 0 ? void 0 : _b.call(_a2, this.error);
|
|
9760
9778
|
} else {
|
|
9761
|
-
this.nativeInput
|
|
9779
|
+
attr(this.nativeInput, "aria-invalid", null);
|
|
9762
9780
|
(_d = (_c = this.nativeInput).setCustomValidity) === null || _d === void 0 ? void 0 : _d.call(_c, "");
|
|
9763
9781
|
}
|
|
9764
9782
|
}
|
|
@@ -9771,8 +9789,8 @@ var UIInput = UIInput_1 = class UIInput2 extends UIElement {
|
|
|
9771
9789
|
}
|
|
9772
9790
|
const { nativeInput } = this;
|
|
9773
9791
|
nativeInput.classList.add(this.getFullElName("input"));
|
|
9774
|
-
this.wrapper
|
|
9775
|
-
|
|
9792
|
+
Dom.append(this.wrapper, nativeInput);
|
|
9793
|
+
Dom.append(container, this.wrapper);
|
|
9776
9794
|
attr(nativeInput, "dir", this.j.o.direction || "auto");
|
|
9777
9795
|
return container;
|
|
9778
9796
|
}
|
|
@@ -10009,6 +10027,7 @@ UIForm = __decorate12([
|
|
|
10009
10027
|
// node_modules/jodit/esm/core/ui/form/inputs/area/area.js
|
|
10010
10028
|
init_decorators();
|
|
10011
10029
|
init_component();
|
|
10030
|
+
init_css();
|
|
10012
10031
|
var __decorate13 = function(decorators, target, key3, desc) {
|
|
10013
10032
|
var c74 = arguments.length, r60 = c74 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key3) : desc, d55;
|
|
10014
10033
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
@@ -10033,12 +10052,12 @@ var UITextArea = UITextArea_1 = class UITextArea2 extends UIInput {
|
|
|
10033
10052
|
this.state = __spreadValues({}, UITextArea_1.defaultState);
|
|
10034
10053
|
Object.assign(this.state, state);
|
|
10035
10054
|
if (this.state.resizable === false) {
|
|
10036
|
-
this.nativeInput
|
|
10055
|
+
css(this.nativeInput, "resize", "none");
|
|
10037
10056
|
}
|
|
10038
10057
|
}
|
|
10039
10058
|
onChangeStateSize() {
|
|
10040
10059
|
const { size: size3, resizable } = this.state;
|
|
10041
|
-
this.nativeInput
|
|
10060
|
+
css(this.nativeInput, "resize", resizable ? "auto" : "none");
|
|
10042
10061
|
this.nativeInput.rows = size3 !== null && size3 !== void 0 ? size3 : 5;
|
|
10043
10062
|
}
|
|
10044
10063
|
};
|
|
@@ -10126,6 +10145,7 @@ UICheckbox = UICheckbox_1 = __decorate14([
|
|
|
10126
10145
|
|
|
10127
10146
|
// node_modules/jodit/esm/core/ui/form/inputs/file/file.js
|
|
10128
10147
|
init_component();
|
|
10148
|
+
init_dom();
|
|
10129
10149
|
var __decorate15 = function(decorators, target, key3, desc) {
|
|
10130
10150
|
var c74 = arguments.length, r60 = c74 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key3) : desc, d55;
|
|
10131
10151
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
@@ -10155,7 +10175,7 @@ var UIFileInput = class UIFileInput2 extends UIInput {
|
|
|
10155
10175
|
const { nativeInput } = this;
|
|
10156
10176
|
nativeInput.classList.add(this.getFullElName("input"));
|
|
10157
10177
|
container.classList.add(this.componentName);
|
|
10158
|
-
|
|
10178
|
+
Dom.append(container, nativeInput);
|
|
10159
10179
|
return container;
|
|
10160
10180
|
}
|
|
10161
10181
|
createNativeInput(options2) {
|
|
@@ -10468,7 +10488,7 @@ var ProgressBar = class _ProgressBar extends UIElement {
|
|
|
10468
10488
|
*/
|
|
10469
10489
|
show() {
|
|
10470
10490
|
const container = this.j.workplace || this.j.container;
|
|
10471
|
-
|
|
10491
|
+
Dom.append(container, this.container);
|
|
10472
10492
|
return this;
|
|
10473
10493
|
}
|
|
10474
10494
|
hide() {
|
|
@@ -10476,7 +10496,7 @@ var ProgressBar = class _ProgressBar extends UIElement {
|
|
|
10476
10496
|
return this;
|
|
10477
10497
|
}
|
|
10478
10498
|
progress(percentage) {
|
|
10479
|
-
this.container
|
|
10499
|
+
css(this.container, "width", percentage.toFixed(2) + "%");
|
|
10480
10500
|
return this;
|
|
10481
10501
|
}
|
|
10482
10502
|
showFileUploadAnimation(from, to) {
|
|
@@ -10500,7 +10520,7 @@ var ProgressBar = class _ProgressBar extends UIElement {
|
|
|
10500
10520
|
left: pos.left + start.x,
|
|
10501
10521
|
top: pos.top + start.y
|
|
10502
10522
|
});
|
|
10503
|
-
|
|
10523
|
+
Dom.append(box, el);
|
|
10504
10524
|
this.__animationElement = el;
|
|
10505
10525
|
el.offsetWidth;
|
|
10506
10526
|
css(el, {
|
|
@@ -10558,7 +10578,7 @@ var Create = class {
|
|
|
10558
10578
|
}
|
|
10559
10579
|
}
|
|
10560
10580
|
if (children) {
|
|
10561
|
-
asArray(children).forEach((child) =>
|
|
10581
|
+
asArray(children).forEach((child) => Dom.append(elm, isString(child) ? this.fromHTML(child) : child));
|
|
10562
10582
|
}
|
|
10563
10583
|
return elm;
|
|
10564
10584
|
}
|
|
@@ -10572,7 +10592,7 @@ var Create = class {
|
|
|
10572
10592
|
sandbox() {
|
|
10573
10593
|
var _a2;
|
|
10574
10594
|
const iframe2 = this.element("iframe", { sandbox: "allow-same-origin" });
|
|
10575
|
-
this.doc.body
|
|
10595
|
+
Dom.append(this.doc.body, iframe2);
|
|
10576
10596
|
const doc = (_a2 = iframe2.contentWindow) === null || _a2 === void 0 ? void 0 : _a2.document;
|
|
10577
10597
|
assert(doc, "iframe.contentWindow.document");
|
|
10578
10598
|
if (!doc) {
|
|
@@ -11110,6 +11130,7 @@ var AsyncStorage = class _AsyncStorage {
|
|
|
11110
11130
|
|
|
11111
11131
|
// node_modules/jodit/esm/modules/messages/messages.js
|
|
11112
11132
|
init_component();
|
|
11133
|
+
init_dom();
|
|
11113
11134
|
init_css();
|
|
11114
11135
|
|
|
11115
11136
|
// node_modules/jodit/esm/modules/messages/message.js
|
|
@@ -11212,7 +11233,7 @@ var UIMessages = class UIMessages2 extends UIGroup {
|
|
|
11212
11233
|
if (!this.__box) {
|
|
11213
11234
|
throw new Error("Container is not defined: " + key3);
|
|
11214
11235
|
}
|
|
11215
|
-
this.__box
|
|
11236
|
+
Dom.append(this.__box, this.container);
|
|
11216
11237
|
const msg = new UIMessage(this.j, { text: text2, variant });
|
|
11217
11238
|
this.append(msg);
|
|
11218
11239
|
this.__calcOffsets();
|
|
@@ -11471,7 +11492,7 @@ var View = View_1 = class View2 extends Component {
|
|
|
11471
11492
|
}
|
|
11472
11493
|
/** Add some element to box */
|
|
11473
11494
|
addDisclaimer(elm) {
|
|
11474
|
-
this.container
|
|
11495
|
+
Dom.append(this.container, elm);
|
|
11475
11496
|
}
|
|
11476
11497
|
/**
|
|
11477
11498
|
* Call before destruct
|
|
@@ -11627,7 +11648,7 @@ var ViewWithToolbar = class extends View {
|
|
|
11627
11648
|
anchor = anchor.nextElementSibling;
|
|
11628
11649
|
}
|
|
11629
11650
|
if (anchor !== box) {
|
|
11630
|
-
this.container
|
|
11651
|
+
anchor ? Dom.before(anchor, box) : Dom.append(this.container, box);
|
|
11631
11652
|
}
|
|
11632
11653
|
}
|
|
11633
11654
|
/**
|
|
@@ -11794,7 +11815,7 @@ var Dialog = Dialog_1 = class Dialog2 extends ViewWithToolbar {
|
|
|
11794
11815
|
if (isArray(elm)) {
|
|
11795
11816
|
const div = this.c.div(this.getFullElName("column"));
|
|
11796
11817
|
elements_list.push(div);
|
|
11797
|
-
|
|
11818
|
+
Dom.append(root, div);
|
|
11798
11819
|
return this.setElements(div, elm);
|
|
11799
11820
|
}
|
|
11800
11821
|
let element;
|
|
@@ -11805,12 +11826,12 @@ var Dialog = Dialog_1 = class Dialog2 extends ViewWithToolbar {
|
|
|
11805
11826
|
}
|
|
11806
11827
|
elements_list.push(element);
|
|
11807
11828
|
if (element.parentNode !== root) {
|
|
11808
|
-
|
|
11829
|
+
Dom.append(root, element);
|
|
11809
11830
|
}
|
|
11810
11831
|
});
|
|
11811
11832
|
toArray(root.childNodes).forEach((elm) => {
|
|
11812
11833
|
if (elements_list.indexOf(elm) === -1) {
|
|
11813
|
-
|
|
11834
|
+
Dom.safeRemove(elm);
|
|
11814
11835
|
}
|
|
11815
11836
|
});
|
|
11816
11837
|
}
|
|
@@ -11954,8 +11975,10 @@ var Dialog = Dialog_1 = class Dialog2 extends ViewWithToolbar {
|
|
|
11954
11975
|
this.offsetY = y10;
|
|
11955
11976
|
this.moved = Math.abs(x11 - left) > 100 || Math.abs(y10 - top) > 100;
|
|
11956
11977
|
}
|
|
11957
|
-
this.dialog
|
|
11958
|
-
|
|
11978
|
+
css(this.dialog, {
|
|
11979
|
+
left: (x11 || left) + "px",
|
|
11980
|
+
top: (y10 || top) + "px"
|
|
11981
|
+
});
|
|
11959
11982
|
return this;
|
|
11960
11983
|
}
|
|
11961
11984
|
/**
|
|
@@ -12016,6 +12039,15 @@ var Dialog = Dialog_1 = class Dialog2 extends ViewWithToolbar {
|
|
|
12016
12039
|
this.setMod("footer", Boolean(content));
|
|
12017
12040
|
return this;
|
|
12018
12041
|
}
|
|
12042
|
+
__openedSiblings() {
|
|
12043
|
+
const result = [];
|
|
12044
|
+
Dialog_1.__opened.forEach((dialog) => {
|
|
12045
|
+
if (dialog.destination === this.destination) {
|
|
12046
|
+
result.push(dialog);
|
|
12047
|
+
}
|
|
12048
|
+
});
|
|
12049
|
+
return result;
|
|
12050
|
+
}
|
|
12019
12051
|
/**
|
|
12020
12052
|
* Get zIndex from dialog
|
|
12021
12053
|
*/
|
|
@@ -12026,12 +12058,11 @@ var Dialog = Dialog_1 = class Dialog2 extends ViewWithToolbar {
|
|
|
12026
12058
|
* Get dialog instance with maximum z-index displaying it on top of all the dialog boxes
|
|
12027
12059
|
*/
|
|
12028
12060
|
getMaxZIndexDialog() {
|
|
12029
|
-
let maxZi = 0,
|
|
12030
|
-
|
|
12031
|
-
|
|
12032
|
-
zIndex
|
|
12033
|
-
|
|
12034
|
-
res = dlg;
|
|
12061
|
+
let maxZi = 0, res = this;
|
|
12062
|
+
this.__openedSiblings().forEach((dialog) => {
|
|
12063
|
+
const zIndex = dialog.getZIndex();
|
|
12064
|
+
if (zIndex > maxZi) {
|
|
12065
|
+
res = dialog;
|
|
12035
12066
|
maxZi = zIndex;
|
|
12036
12067
|
}
|
|
12037
12068
|
});
|
|
@@ -12043,12 +12074,11 @@ var Dialog = Dialog_1 = class Dialog2 extends ViewWithToolbar {
|
|
|
12043
12074
|
setMaxZIndex() {
|
|
12044
12075
|
if (this.getMod("static"))
|
|
12045
12076
|
return;
|
|
12046
|
-
let maxZIndex = 20000004
|
|
12047
|
-
|
|
12048
|
-
|
|
12049
|
-
maxZIndex = Math.max(isNaN(zIndex) ? 0 : zIndex, maxZIndex);
|
|
12077
|
+
let maxZIndex = 20000004;
|
|
12078
|
+
this.__openedSiblings().forEach((dialog) => {
|
|
12079
|
+
maxZIndex = Math.max(dialog.getZIndex(), maxZIndex);
|
|
12050
12080
|
});
|
|
12051
|
-
this.container
|
|
12081
|
+
css(this.container, "zIndex", (maxZIndex + 1).toString());
|
|
12052
12082
|
}
|
|
12053
12083
|
/**
|
|
12054
12084
|
* Expands the dialog on full browser window
|
|
@@ -12091,13 +12121,14 @@ var Dialog = Dialog_1 = class Dialog2 extends ViewWithToolbar {
|
|
|
12091
12121
|
}
|
|
12092
12122
|
this.setMod("active", true);
|
|
12093
12123
|
this.isOpened = true;
|
|
12124
|
+
Dialog_1.__opened.add(this);
|
|
12094
12125
|
this.setModal(modal);
|
|
12095
|
-
this.destination
|
|
12126
|
+
Dom.append(this.destination, this.container);
|
|
12096
12127
|
if (this.getMod("static") !== true) {
|
|
12097
12128
|
this.setPosition(this.offsetX, this.offsetY);
|
|
12098
12129
|
this.setMaxZIndex();
|
|
12099
12130
|
} else {
|
|
12100
|
-
this.container
|
|
12131
|
+
css(this.container, "zIndex", null);
|
|
12101
12132
|
}
|
|
12102
12133
|
if (this.o.fullsize) {
|
|
12103
12134
|
this.toggleFullSize(true);
|
|
@@ -12143,6 +12174,7 @@ var Dialog = Dialog_1 = class Dialog2 extends ViewWithToolbar {
|
|
|
12143
12174
|
}
|
|
12144
12175
|
this.setMod("active", false);
|
|
12145
12176
|
this.isOpened = false;
|
|
12177
|
+
Dialog_1.__opened.delete(this);
|
|
12146
12178
|
if (this.isFullSize) {
|
|
12147
12179
|
this.toggleFullSize(false);
|
|
12148
12180
|
}
|
|
@@ -12198,11 +12230,11 @@ var Dialog = Dialog_1 = class Dialog2 extends ViewWithToolbar {
|
|
|
12198
12230
|
</div>
|
|
12199
12231
|
</div>`);
|
|
12200
12232
|
if (self2.options.direction === "rtl") {
|
|
12201
|
-
self2.container
|
|
12202
|
-
self2.container
|
|
12233
|
+
css(self2.container, "direction", "rtl");
|
|
12234
|
+
attr(self2.container, "dir", "rtl");
|
|
12203
12235
|
}
|
|
12204
12236
|
if (this.o.zIndex) {
|
|
12205
|
-
this.container
|
|
12237
|
+
css(this.container, "zIndex", this.o.zIndex.toString());
|
|
12206
12238
|
}
|
|
12207
12239
|
attr(self2.container, "role", "dialog");
|
|
12208
12240
|
Object.defineProperty(self2.container, "component", {
|
|
@@ -12261,6 +12293,7 @@ var Dialog = Dialog_1 = class Dialog2 extends ViewWithToolbar {
|
|
|
12261
12293
|
if (this.isOpened) {
|
|
12262
12294
|
this.close();
|
|
12263
12295
|
}
|
|
12296
|
+
Dialog_1.__opened.delete(this);
|
|
12264
12297
|
if (this.events) {
|
|
12265
12298
|
this.__removeGlobalResizeListeners();
|
|
12266
12299
|
this.events.off(this.container, "close_dialog", self.close).off(this.ow, "keydown", this.__onEsc).off(this.ow, "resize", this.__onResize);
|
|
@@ -12268,6 +12301,7 @@ var Dialog = Dialog_1 = class Dialog2 extends ViewWithToolbar {
|
|
|
12268
12301
|
super.destruct();
|
|
12269
12302
|
}
|
|
12270
12303
|
};
|
|
12304
|
+
Dialog.__opened = /* @__PURE__ */ new Set();
|
|
12271
12305
|
Dialog.defaultOptions = __spreadProps(__spreadValues({}, View.defaultOptions), {
|
|
12272
12306
|
closeOnClickOverlay: false,
|
|
12273
12307
|
closeOnEsc: true
|
|
@@ -12305,7 +12339,7 @@ function Alert(msg, title, callback, className = "jodit-dialog_alert") {
|
|
|
12305
12339
|
}
|
|
12306
12340
|
const dialog = this instanceof Dialog ? this : new Dialog({ closeOnClickOverlay: true }), container = dialog.c.div(className), okButton = Button(dialog, "ok", "Ok");
|
|
12307
12341
|
asArray(msg).forEach((oneMessage) => {
|
|
12308
|
-
|
|
12342
|
+
Dom.append(container, Dom.isNode(oneMessage) ? oneMessage : dialog.c.fromHTML(oneMessage));
|
|
12309
12343
|
});
|
|
12310
12344
|
okButton.onAction(() => {
|
|
12311
12345
|
if (!callback || !isFunction(callback) || callback(dialog) !== false) {
|
|
@@ -12319,6 +12353,7 @@ function Alert(msg, title, callback, className = "jodit-dialog_alert") {
|
|
|
12319
12353
|
}
|
|
12320
12354
|
|
|
12321
12355
|
// node_modules/jodit/esm/modules/dialog/confirm.js
|
|
12356
|
+
init_dom();
|
|
12322
12357
|
init_is_function();
|
|
12323
12358
|
function Confirm(msg, title, callback) {
|
|
12324
12359
|
const dialog = this instanceof Dialog ? this : new Dialog({ closeOnClickOverlay: true }), $div = dialog.c.fromHTML('<form class="jodit-dialog_prompt"></form>'), $label = dialog.c.element("label");
|
|
@@ -12326,8 +12361,8 @@ function Confirm(msg, title, callback) {
|
|
|
12326
12361
|
callback = title;
|
|
12327
12362
|
title = void 0;
|
|
12328
12363
|
}
|
|
12329
|
-
$label
|
|
12330
|
-
|
|
12364
|
+
Dom.append($label, dialog.c.fromHTML(msg));
|
|
12365
|
+
Dom.append($div, $label);
|
|
12331
12366
|
const action = (yes) => () => {
|
|
12332
12367
|
if (!callback || callback(yes) !== false) {
|
|
12333
12368
|
dialog.close();
|
|
@@ -12348,6 +12383,7 @@ function Confirm(msg, title, callback) {
|
|
|
12348
12383
|
}
|
|
12349
12384
|
|
|
12350
12385
|
// node_modules/jodit/esm/modules/dialog/prompt.js
|
|
12386
|
+
init_dom();
|
|
12351
12387
|
init_is_function();
|
|
12352
12388
|
init_attr();
|
|
12353
12389
|
function Prompt(msg, title, callback, placeholder2, defaultValue) {
|
|
@@ -12364,9 +12400,9 @@ function Prompt(msg, title, callback, placeholder2, defaultValue) {
|
|
|
12364
12400
|
if (placeholder2) {
|
|
12365
12401
|
attr(inputElement, "placeholder", placeholder2);
|
|
12366
12402
|
}
|
|
12367
|
-
|
|
12368
|
-
|
|
12369
|
-
|
|
12403
|
+
Dom.append(labelElement, dialog.c.text(msg));
|
|
12404
|
+
Dom.append(form2, labelElement);
|
|
12405
|
+
Dom.append(form2, inputElement);
|
|
12370
12406
|
cancelButton.onAction(dialog.close);
|
|
12371
12407
|
const onclick = () => {
|
|
12372
12408
|
if (!callback || !isFunction(callback) || callback(inputElement.value) !== false) {
|
|
@@ -12394,7 +12430,9 @@ init_constants();
|
|
|
12394
12430
|
init_constants();
|
|
12395
12431
|
init_decorators();
|
|
12396
12432
|
init_watch();
|
|
12433
|
+
init_dom();
|
|
12397
12434
|
init_helpers();
|
|
12435
|
+
init_css();
|
|
12398
12436
|
|
|
12399
12437
|
// node_modules/jodit/esm/core/traits/dlgs.js
|
|
12400
12438
|
init_global2();
|
|
@@ -12446,6 +12484,7 @@ init_config();
|
|
|
12446
12484
|
|
|
12447
12485
|
// node_modules/jodit/esm/modules/file-browser/config.js
|
|
12448
12486
|
init_config2();
|
|
12487
|
+
init_dom();
|
|
12449
12488
|
init_checker();
|
|
12450
12489
|
init_human_size_to_bytes();
|
|
12451
12490
|
init_config();
|
|
@@ -12720,7 +12759,7 @@ Config.prototype.controls.filebrowser = {
|
|
|
12720
12759
|
filter: {
|
|
12721
12760
|
isInput: true,
|
|
12722
12761
|
getContent: (filebrowser, b15) => {
|
|
12723
|
-
const oldInput = b15.container.
|
|
12762
|
+
const oldInput = Dom.first(b15.container, (node) => Dom.isHTMLElement(node) && node.classList.contains("jodit-input"));
|
|
12724
12763
|
if (oldInput) {
|
|
12725
12764
|
return oldInput;
|
|
12726
12765
|
}
|
|
@@ -13329,7 +13368,6 @@ function deleteFile(fb, name, source2) {
|
|
|
13329
13368
|
init_component3();
|
|
13330
13369
|
init_decorators();
|
|
13331
13370
|
init_dom2();
|
|
13332
|
-
init_to_array();
|
|
13333
13371
|
init_trim();
|
|
13334
13372
|
init_attr();
|
|
13335
13373
|
init_css();
|
|
@@ -13446,6 +13484,17 @@ var __decorate26 = function(decorators, target, key3, desc) {
|
|
|
13446
13484
|
};
|
|
13447
13485
|
var ImageEditor_1;
|
|
13448
13486
|
var jie2 = "jodit-image-editor";
|
|
13487
|
+
var hasClass = (className) => (elm) => elm.classList.contains(className);
|
|
13488
|
+
function findFirst(root, cond) {
|
|
13489
|
+
return Dom.first(root, (n57) => Dom.isHTMLElement(n57) && cond(n57));
|
|
13490
|
+
}
|
|
13491
|
+
function findAll(root, cond) {
|
|
13492
|
+
const result = [];
|
|
13493
|
+
Dom.each(root, (n57) => {
|
|
13494
|
+
Dom.isHTMLElement(n57) && cond(n57) && result.push(n57);
|
|
13495
|
+
});
|
|
13496
|
+
return result;
|
|
13497
|
+
}
|
|
13449
13498
|
var TABS = {
|
|
13450
13499
|
resize: "resize",
|
|
13451
13500
|
crop: "crop"
|
|
@@ -13492,18 +13541,19 @@ var ImageEditor = ImageEditor_1 = class ImageEditor2 extends ViewComponent {
|
|
|
13492
13541
|
return this.j.async.promise((resolve) => {
|
|
13493
13542
|
const timestamp = (/* @__PURE__ */ new Date()).getTime();
|
|
13494
13543
|
this.image = this.j.c.element("img");
|
|
13495
|
-
|
|
13496
|
-
|
|
13544
|
+
const isTrash = (elm) => Dom.isTag(elm, "img") || hasClass("jodit-icon_loader")(elm);
|
|
13545
|
+
findAll(this.resize_box, isTrash).forEach(Dom.safeRemove);
|
|
13546
|
+
findAll(this.crop_box, isTrash).forEach(Dom.safeRemove);
|
|
13497
13547
|
css(this.cropHandler, "background", "transparent");
|
|
13498
13548
|
this.onSave = save;
|
|
13499
|
-
this.resize_box
|
|
13500
|
-
this.crop_box
|
|
13549
|
+
Dom.append(this.resize_box, this.j.c.element("i", { class: "jodit-icon_loader" }));
|
|
13550
|
+
Dom.append(this.crop_box, this.j.c.element("i", { class: "jodit-icon_loader" }));
|
|
13501
13551
|
if (/\?/.test(url2)) {
|
|
13502
13552
|
url2 += "&_tst=" + timestamp;
|
|
13503
13553
|
} else {
|
|
13504
13554
|
url2 += "?_tst=" + timestamp;
|
|
13505
13555
|
}
|
|
13506
|
-
this.image
|
|
13556
|
+
attr(this.image, "src", url2);
|
|
13507
13557
|
this._dialog.open();
|
|
13508
13558
|
const { widthInput, heightInput } = refs(this.editor);
|
|
13509
13559
|
const onload = () => {
|
|
@@ -13516,10 +13566,10 @@ var ImageEditor = ImageEditor_1 = class ImageEditor2 extends ViewComponent {
|
|
|
13516
13566
|
widthInput.value = this.naturalWidth.toString();
|
|
13517
13567
|
heightInput.value = this.naturalHeight.toString();
|
|
13518
13568
|
this.ratio = this.naturalWidth / this.naturalHeight;
|
|
13519
|
-
this.resize_box
|
|
13569
|
+
Dom.append(this.resize_box, this.image);
|
|
13520
13570
|
this.cropImage = this.image.cloneNode(true);
|
|
13521
|
-
this.crop_box
|
|
13522
|
-
Dom.safeRemove.apply(null,
|
|
13571
|
+
Dom.append(this.crop_box, this.cropImage);
|
|
13572
|
+
Dom.safeRemove.apply(null, findAll(this.editor, hasClass("jodit-icon_loader")));
|
|
13523
13573
|
if (this.activeTab === TABS.crop) {
|
|
13524
13574
|
this.showCrop();
|
|
13525
13575
|
}
|
|
@@ -13541,10 +13591,10 @@ var ImageEditor = ImageEditor_1 = class ImageEditor2 extends ViewComponent {
|
|
|
13541
13591
|
if (!slide) {
|
|
13542
13592
|
return;
|
|
13543
13593
|
}
|
|
13544
|
-
|
|
13594
|
+
findAll(self2.editor, (elm) => hasClass(`${jie2}__slider`)(elm) || hasClass(`${jie2}__area`)(elm)).forEach((elm) => elm.classList.remove(`${jie2}_active`));
|
|
13545
13595
|
slide.classList.add(`${jie2}_active`);
|
|
13546
13596
|
this.activeTab = attr(slide, "-area") || TABS.resize;
|
|
13547
|
-
const tab = self2.editor
|
|
13597
|
+
const tab = findFirst(self2.editor, (elm) => hasClass(`${jie2}__area`)(elm) && hasClass(`${jie2}__area_` + self2.activeTab)(elm));
|
|
13548
13598
|
if (tab) {
|
|
13549
13599
|
tab.classList.add(`${jie2}_active`);
|
|
13550
13600
|
}
|
|
@@ -13741,14 +13791,14 @@ var ImageEditor = ImageEditor_1 = class ImageEditor2 extends ViewComponent {
|
|
|
13741
13791
|
const self2 = this;
|
|
13742
13792
|
const { widthInput, heightInput } = refs(this.editor);
|
|
13743
13793
|
self2.j.e.on([
|
|
13744
|
-
self2.editor
|
|
13794
|
+
findFirst(self2.editor, hasClass("jodit_bottomright")),
|
|
13745
13795
|
self2.cropHandler
|
|
13746
13796
|
], `mousedown.${jie2}`, this.onResizeHandleMouseDown).on(this.j.ow, `resize.${jie2}`, () => {
|
|
13747
13797
|
this.j.e.fire(self2.resizeHandler, "updatesize");
|
|
13748
13798
|
self2.showCrop();
|
|
13749
13799
|
this.j.e.fire(self2.cropHandler, "updatesize");
|
|
13750
13800
|
});
|
|
13751
|
-
self2.j.e.on(
|
|
13801
|
+
self2.j.e.on(findAll(this.editor, hasClass(`${jie2}__slider-title`)), "click", this.onTitleModeClick).on([widthInput, heightInput], "input", this.onChangeSizeInput);
|
|
13752
13802
|
const { keepAspectRatioResize, keepAspectRatioCrop } = refs(this.editor);
|
|
13753
13803
|
if (keepAspectRatioResize) {
|
|
13754
13804
|
keepAspectRatioResize.addEventListener("change", () => {
|
|
@@ -13863,9 +13913,9 @@ var ImageEditor = ImageEditor_1 = class ImageEditor2 extends ViewComponent {
|
|
|
13863
13913
|
const { resizeBox, cropBox } = refs(this.editor);
|
|
13864
13914
|
this.resize_box = resizeBox;
|
|
13865
13915
|
this.crop_box = cropBox;
|
|
13866
|
-
this.sizes = this.editor
|
|
13867
|
-
this.resizeHandler = this.editor
|
|
13868
|
-
this.cropHandler = this.editor
|
|
13916
|
+
this.sizes = findFirst(this.editor, (elm) => hasClass(`${jie2}__sizes`)(elm) && Boolean(Dom.closest(elm, (p63) => Dom.isHTMLElement(p63) && hasClass(`${jie2}__area_crop`)(p63), this.editor)));
|
|
13917
|
+
this.resizeHandler = findFirst(this.editor, hasClass(`${jie2}__resizer`));
|
|
13918
|
+
this.cropHandler = findFirst(this.editor, hasClass(`${jie2}__croper`));
|
|
13869
13919
|
this._dialog = this.j.dlg({
|
|
13870
13920
|
buttons: ["fullsize", "dialog.close"]
|
|
13871
13921
|
});
|
|
@@ -14013,7 +14063,7 @@ var context_menu_default = (self2) => {
|
|
|
14013
14063
|
buttons: ["fullsize", "dialog.close"]
|
|
14014
14064
|
}), temp_content = self2.c.div(CLASS_PREVIEW, '<div class="jodit-icon_loader"></div>'), preview_box = self2.c.div(CLASS_PREVIEW + "__box"), next = self2.c.fromHTML(preview_tpl_next()), prev = self2.c.fromHTML(preview_tpl_next("prev", "left")), addLoadHandler = (src) => {
|
|
14015
14065
|
const image2 = self2.c.element("img");
|
|
14016
|
-
image2
|
|
14066
|
+
attr(image2, "src", src);
|
|
14017
14067
|
const onload = () => {
|
|
14018
14068
|
var _a2;
|
|
14019
14069
|
if (self2.isInDestruct) {
|
|
@@ -14023,14 +14073,14 @@ var context_menu_default = (self2) => {
|
|
|
14023
14073
|
Dom.detach(temp_content);
|
|
14024
14074
|
if (opt.showPreviewNavigation) {
|
|
14025
14075
|
if (Dom.prevWithClass(item, self2.files.getFullElName("item"))) {
|
|
14026
|
-
|
|
14076
|
+
Dom.append(temp_content, prev);
|
|
14027
14077
|
}
|
|
14028
14078
|
if (Dom.nextWithClass(item, self2.files.getFullElName("item"))) {
|
|
14029
|
-
|
|
14079
|
+
Dom.append(temp_content, next);
|
|
14030
14080
|
}
|
|
14031
14081
|
}
|
|
14032
|
-
|
|
14033
|
-
|
|
14082
|
+
Dom.append(temp_content, preview_box);
|
|
14083
|
+
Dom.append(preview_box, image2);
|
|
14034
14084
|
preview2.setPosition();
|
|
14035
14085
|
(_a2 = self2 === null || self2 === void 0 ? void 0 : self2.events) === null || _a2 === void 0 ? void 0 : _a2.fire("previewOpenedAndLoaded");
|
|
14036
14086
|
};
|
|
@@ -14293,17 +14343,17 @@ function stateListeners() {
|
|
|
14293
14343
|
Dom.detach(files.container);
|
|
14294
14344
|
if (state.elements.length) {
|
|
14295
14345
|
state.elements.forEach((item) => {
|
|
14296
|
-
this.files.container
|
|
14346
|
+
Dom.append(this.files.container, getDomElement(item));
|
|
14297
14347
|
});
|
|
14298
14348
|
} else {
|
|
14299
|
-
files.container
|
|
14349
|
+
Dom.append(files.container, create.div(this.componentName + "_no-files_true", this.i18n("There are no files")));
|
|
14300
14350
|
}
|
|
14301
14351
|
}, this.defaultTimeout)).on("change.sources", this.async.debounce(() => {
|
|
14302
14352
|
Dom.detach(this.tree.container);
|
|
14303
14353
|
state.sources.forEach((source2) => {
|
|
14304
14354
|
const sourceName = source2.name;
|
|
14305
14355
|
if (sourceName && sourceName !== DEFAULT_SOURCE_NAME2) {
|
|
14306
|
-
this.tree.container
|
|
14356
|
+
Dom.append(this.tree.container, create.div(this.tree.getFullElName("source-title"), sourceName));
|
|
14307
14357
|
}
|
|
14308
14358
|
source2.folders.forEach((name) => {
|
|
14309
14359
|
const folderElm = create.a(this.tree.getFullElName("item"), {
|
|
@@ -14324,7 +14374,7 @@ function stateListeners() {
|
|
|
14324
14374
|
e42.preventDefault();
|
|
14325
14375
|
};
|
|
14326
14376
|
this.e.on(folderElm, "click", action("openFolder"));
|
|
14327
|
-
this.tree.container
|
|
14377
|
+
Dom.append(this.tree.container, folderElm);
|
|
14328
14378
|
if (name === ".." || name === ".") {
|
|
14329
14379
|
return;
|
|
14330
14380
|
}
|
|
@@ -14336,7 +14386,7 @@ function stateListeners() {
|
|
|
14336
14386
|
size: "tiny"
|
|
14337
14387
|
});
|
|
14338
14388
|
btn.onAction(action("renameFolder"));
|
|
14339
|
-
|
|
14389
|
+
Dom.append(folderElm, btn.container);
|
|
14340
14390
|
}
|
|
14341
14391
|
if (options2.deleteFolder && this.dataProvider.canI("FolderRemove")) {
|
|
14342
14392
|
const btn = Button(this, {
|
|
@@ -14346,7 +14396,7 @@ function stateListeners() {
|
|
|
14346
14396
|
size: "tiny"
|
|
14347
14397
|
});
|
|
14348
14398
|
btn.onAction(action("removeFolder"));
|
|
14349
|
-
|
|
14399
|
+
Dom.append(folderElm, btn.container);
|
|
14350
14400
|
}
|
|
14351
14401
|
});
|
|
14352
14402
|
if (options2.createNewFolder && this.dataProvider.canI("FolderCreate")) {
|
|
@@ -14440,7 +14490,7 @@ var FileBrowser = class FileBrowser2 extends ViewWithToolbar {
|
|
|
14440
14490
|
return Storage.makeStorage(Boolean(this.o.saveStateInStorage), this.componentName);
|
|
14441
14491
|
}
|
|
14442
14492
|
get isOpened() {
|
|
14443
|
-
return this._dialog.isOpened && this.browser
|
|
14493
|
+
return this._dialog.isOpened && cssInline(this.browser, "display") !== "none";
|
|
14444
14494
|
}
|
|
14445
14495
|
/**
|
|
14446
14496
|
* It displays a message in the status bar of filebrowser
|
|
@@ -14583,10 +14633,10 @@ var FileBrowser = class FileBrowser2 extends ViewWithToolbar {
|
|
|
14583
14633
|
self2.browser.component = this;
|
|
14584
14634
|
self2.container = self2.browser;
|
|
14585
14635
|
if (self2.o.showFoldersPanel) {
|
|
14586
|
-
self2.browser
|
|
14636
|
+
Dom.append(self2.browser, self2.tree.container);
|
|
14587
14637
|
}
|
|
14588
|
-
self2.browser
|
|
14589
|
-
self2.browser
|
|
14638
|
+
Dom.append(self2.browser, self2.files.container);
|
|
14639
|
+
Dom.append(self2.browser, self2.status_line);
|
|
14590
14640
|
selfListeners.call(self2);
|
|
14591
14641
|
nativeListeners.call(self2);
|
|
14592
14642
|
stateListeners.call(self2);
|
|
@@ -15182,13 +15232,12 @@ var StatusBar = class StatusBar2 extends ViewComponent {
|
|
|
15182
15232
|
* Add element in statusbar
|
|
15183
15233
|
*/
|
|
15184
15234
|
append(child, inTheRight = false) {
|
|
15185
|
-
var _a2;
|
|
15186
15235
|
const wrapper = this.findEmpty(inTheRight) || this.j.c.div(this.getFullElName("item"));
|
|
15187
15236
|
if (inTheRight) {
|
|
15188
15237
|
wrapper.classList.add(this.getFullElName("item-right"));
|
|
15189
15238
|
}
|
|
15190
|
-
|
|
15191
|
-
|
|
15239
|
+
Dom.append(wrapper, child);
|
|
15240
|
+
this.container && Dom.append(this.container, wrapper);
|
|
15192
15241
|
if (this.j.o.statusbar) {
|
|
15193
15242
|
this.show();
|
|
15194
15243
|
}
|
|
@@ -15199,7 +15248,7 @@ var StatusBar = class StatusBar2 extends ViewComponent {
|
|
|
15199
15248
|
this.target = target;
|
|
15200
15249
|
this.mods = {};
|
|
15201
15250
|
this.container = jodit.c.div("jodit-status-bar");
|
|
15202
|
-
|
|
15251
|
+
Dom.append(target, this.container);
|
|
15203
15252
|
this.hide();
|
|
15204
15253
|
}
|
|
15205
15254
|
destruct() {
|
|
@@ -15223,6 +15272,7 @@ init_decorators();
|
|
|
15223
15272
|
init_dom2();
|
|
15224
15273
|
init_global2();
|
|
15225
15274
|
init_helpers();
|
|
15275
|
+
init_css();
|
|
15226
15276
|
var __decorate31 = function(decorators, target, key3, desc) {
|
|
15227
15277
|
var c74 = arguments.length, r60 = c74 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key3) : desc, d55;
|
|
15228
15278
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
@@ -15376,33 +15426,37 @@ var Table = class _Table extends ViewComponent {
|
|
|
15376
15426
|
return _Table.__formalCoordinate(table2, cell, max);
|
|
15377
15427
|
}
|
|
15378
15428
|
static __appendRow(table2, line, after, create) {
|
|
15379
|
-
var _a2;
|
|
15380
15429
|
let row;
|
|
15381
15430
|
if (!line) {
|
|
15382
15431
|
const columnsCount = _Table.__getColumnsCount(table2);
|
|
15383
15432
|
row = create.element("tr");
|
|
15384
15433
|
for (let j10 = 0; j10 < columnsCount; j10 += 1) {
|
|
15385
|
-
|
|
15434
|
+
Dom.append(row, create.element("td"));
|
|
15386
15435
|
}
|
|
15387
15436
|
} else {
|
|
15388
15437
|
row = line.cloneNode(true);
|
|
15389
|
-
|
|
15438
|
+
Dom.each(line, (cell) => {
|
|
15439
|
+
if (!Dom.isCell(cell)) {
|
|
15440
|
+
return;
|
|
15441
|
+
}
|
|
15390
15442
|
const rowspan = attr(cell, "rowspan");
|
|
15391
15443
|
if (rowspan && parseInt(rowspan, 10) > 1) {
|
|
15392
15444
|
const newRowSpan = parseInt(rowspan, 10) - 1;
|
|
15393
15445
|
attr(cell, "rowspan", newRowSpan > 1 ? newRowSpan : null);
|
|
15394
15446
|
}
|
|
15395
15447
|
});
|
|
15396
|
-
|
|
15397
|
-
cell
|
|
15448
|
+
Dom.each(row, (cell) => {
|
|
15449
|
+
if (Dom.isCell(cell)) {
|
|
15450
|
+
Dom.detach(cell);
|
|
15451
|
+
}
|
|
15398
15452
|
});
|
|
15399
15453
|
}
|
|
15400
15454
|
if (after && line && line.nextSibling) {
|
|
15401
|
-
|
|
15455
|
+
Dom.after(line, row);
|
|
15402
15456
|
} else if (!after && line) {
|
|
15403
|
-
|
|
15457
|
+
Dom.before(line, row);
|
|
15404
15458
|
} else {
|
|
15405
|
-
(((
|
|
15459
|
+
Dom.append(Dom.first(table2, (node) => Dom.isTag(node, "tbody")) || table2, row);
|
|
15406
15460
|
}
|
|
15407
15461
|
}
|
|
15408
15462
|
/**
|
|
@@ -15442,9 +15496,9 @@ var Table = class _Table extends ViewComponent {
|
|
|
15442
15496
|
}
|
|
15443
15497
|
}
|
|
15444
15498
|
if (referenceCell) {
|
|
15445
|
-
|
|
15499
|
+
Dom.before(referenceCell, cell);
|
|
15446
15500
|
} else {
|
|
15447
|
-
|
|
15501
|
+
Dom.append(nextRow, cell);
|
|
15448
15502
|
}
|
|
15449
15503
|
}
|
|
15450
15504
|
}
|
|
@@ -15661,7 +15715,7 @@ var Table = class _Table extends ViewComponent {
|
|
|
15661
15715
|
return;
|
|
15662
15716
|
}
|
|
15663
15717
|
alreadyMerged.add(td);
|
|
15664
|
-
if (i56 === bound[0][0] && td
|
|
15718
|
+
if (i56 === bound[0][0] && cssInline(td, "width")) {
|
|
15665
15719
|
w9 += td.offsetWidth;
|
|
15666
15720
|
}
|
|
15667
15721
|
if (trim(cell.innerHTML.replace(/<br(\/)?>/g, "")) !== "") {
|
|
@@ -15722,7 +15776,7 @@ var Table = class _Table extends ViewComponent {
|
|
|
15722
15776
|
const __marked = [];
|
|
15723
15777
|
_Table.__getSelectedCellsByTable(table2).forEach((cell) => {
|
|
15724
15778
|
td = jodit.createInside.element("td");
|
|
15725
|
-
|
|
15779
|
+
Dom.append(td, jodit.createInside.element("br"));
|
|
15726
15780
|
tr = jodit.createInside.element("tr");
|
|
15727
15781
|
coord = _Table.__formalCoordinate(table2, cell);
|
|
15728
15782
|
if (cell.rowSpan < 2) {
|
|
@@ -15732,7 +15786,7 @@ var Table = class _Table extends ViewComponent {
|
|
|
15732
15786
|
}
|
|
15733
15787
|
});
|
|
15734
15788
|
Dom.after(Dom.closest(cell, "tr", table2), tr);
|
|
15735
|
-
|
|
15789
|
+
Dom.append(tr, td);
|
|
15736
15790
|
} else {
|
|
15737
15791
|
_Table.__mark(cell, "rowspan", cell.rowSpan - 1, __marked);
|
|
15738
15792
|
_Table.__formalMatrix(table2, (tdElm, i56, j10) => {
|
|
@@ -15746,7 +15800,7 @@ var Table = class _Table extends ViewComponent {
|
|
|
15746
15800
|
if (after) {
|
|
15747
15801
|
Dom.after(after, td);
|
|
15748
15802
|
} else {
|
|
15749
|
-
|
|
15803
|
+
Dom.prepend(parent, td);
|
|
15750
15804
|
}
|
|
15751
15805
|
}
|
|
15752
15806
|
if (cell.colSpan > 1) {
|
|
@@ -15778,7 +15832,7 @@ var Table = class _Table extends ViewComponent {
|
|
|
15778
15832
|
_Table.__mark(cell, "colspan", cell.colSpan - 1, __marked);
|
|
15779
15833
|
}
|
|
15780
15834
|
td = jodit.createInside.element("td");
|
|
15781
|
-
|
|
15835
|
+
Dom.append(td, jodit.createInside.element("br"));
|
|
15782
15836
|
if (cell.rowSpan > 1) {
|
|
15783
15837
|
_Table.__mark(td, "rowspan", cell.rowSpan, __marked);
|
|
15784
15838
|
}
|
|
@@ -15856,7 +15910,7 @@ var Table = class _Table extends ViewComponent {
|
|
|
15856
15910
|
attr(cell, "style", null);
|
|
15857
15911
|
}
|
|
15858
15912
|
} else {
|
|
15859
|
-
cell
|
|
15913
|
+
css(cell, "width", value.toString());
|
|
15860
15914
|
}
|
|
15861
15915
|
break;
|
|
15862
15916
|
}
|
|
@@ -15992,19 +16046,19 @@ var ToolbarButton = class ToolbarButton2 extends UIButton {
|
|
|
15992
16046
|
value: this,
|
|
15993
16047
|
configurable: true
|
|
15994
16048
|
});
|
|
15995
|
-
|
|
16049
|
+
Dom.append(container, button2);
|
|
15996
16050
|
const trigger = this.j.c.fromHTML(`<span role="button" aria-haspopup="true" aria-expanded="false" class="${cn}__trigger">${Icon.get("chevron")}</span>`);
|
|
15997
|
-
|
|
16051
|
+
Dom.append(button2, trigger);
|
|
15998
16052
|
return container;
|
|
15999
16053
|
}
|
|
16000
16054
|
/** @override */
|
|
16001
16055
|
focus() {
|
|
16002
16056
|
var _a2;
|
|
16003
|
-
(_a2 = this.container.
|
|
16057
|
+
(_a2 = Dom.first(this.container, (node) => Dom.isTag(node, "button"))) === null || _a2 === void 0 ? void 0 : _a2.focus();
|
|
16004
16058
|
}
|
|
16005
16059
|
onChangeHasTrigger() {
|
|
16006
16060
|
if (this.state.hasTrigger) {
|
|
16007
|
-
this.container
|
|
16061
|
+
Dom.append(this.container, this.trigger);
|
|
16008
16062
|
} else {
|
|
16009
16063
|
Dom.safeRemove(this.trigger);
|
|
16010
16064
|
}
|
|
@@ -16294,6 +16348,12 @@ var __decorate33 = function(decorators, target, key3, desc) {
|
|
|
16294
16348
|
r60 = (c74 < 3 ? d55(r60) : c74 > 3 ? d55(target, key3, r60) : d55(target, key3)) || r60;
|
|
16295
16349
|
return c74 > 3 && r60 && Object.defineProperty(target, key3, r60), r60;
|
|
16296
16350
|
};
|
|
16351
|
+
var FORM_CONTROL_TAGS = /* @__PURE__ */ new Set([
|
|
16352
|
+
"input",
|
|
16353
|
+
"button",
|
|
16354
|
+
"select",
|
|
16355
|
+
"textarea"
|
|
16356
|
+
]);
|
|
16297
16357
|
var ToolbarContent = class ToolbarContent2 extends UIButton {
|
|
16298
16358
|
/** @override */
|
|
16299
16359
|
className() {
|
|
@@ -16306,7 +16366,7 @@ var ToolbarContent = class ToolbarContent2 extends UIButton {
|
|
|
16306
16366
|
const content = control.getContent(this.j, this);
|
|
16307
16367
|
if (isString(content) || content.parentNode !== this.container) {
|
|
16308
16368
|
Dom.detach(this.container);
|
|
16309
|
-
this.container
|
|
16369
|
+
Dom.append(this.container, isString(content) ? this.j.create.fromHTML(content) : content);
|
|
16310
16370
|
}
|
|
16311
16371
|
this.state.disabled = Boolean((_a2 = control.isDisabled) === null || _a2 === void 0 ? void 0 : _a2.call(control, this.j, this));
|
|
16312
16372
|
this.state.activated = Boolean((_b = control.isActive) === null || _b === void 0 ? void 0 : _b.call(control, this.j, this));
|
|
@@ -16322,7 +16382,11 @@ var ToolbarContent = class ToolbarContent2 extends UIButton {
|
|
|
16322
16382
|
*/
|
|
16323
16383
|
onChangeDisabled() {
|
|
16324
16384
|
super.onChangeDisabled();
|
|
16325
|
-
this.container
|
|
16385
|
+
Dom.each(this.container, (elm) => {
|
|
16386
|
+
if (Dom.isTag(elm, FORM_CONTROL_TAGS)) {
|
|
16387
|
+
attr(elm, "disabled", this.state.disabled || null);
|
|
16388
|
+
}
|
|
16389
|
+
});
|
|
16326
16390
|
}
|
|
16327
16391
|
/** @override */
|
|
16328
16392
|
createContainer() {
|
|
@@ -16384,6 +16448,8 @@ init_autobind();
|
|
|
16384
16448
|
init_component();
|
|
16385
16449
|
init_hook();
|
|
16386
16450
|
init_watch();
|
|
16451
|
+
init_attr();
|
|
16452
|
+
init_css();
|
|
16387
16453
|
init_error();
|
|
16388
16454
|
var __decorate35 = function(decorators, target, key3, desc) {
|
|
16389
16455
|
var c74 = arguments.length, r60 = c74 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key3) : desc, d55;
|
|
@@ -16447,8 +16513,8 @@ var ToolbarCollection = class ToolbarCollection2 extends UIList {
|
|
|
16447
16513
|
* Set direction
|
|
16448
16514
|
*/
|
|
16449
16515
|
setDirection(direction) {
|
|
16450
|
-
this.container
|
|
16451
|
-
this.container
|
|
16516
|
+
css(this.container, "direction", direction);
|
|
16517
|
+
attr(this.container, "dir", direction);
|
|
16452
16518
|
}
|
|
16453
16519
|
constructor(jodit) {
|
|
16454
16520
|
super(jodit);
|
|
@@ -16629,6 +16695,7 @@ ToolbarEditorCollection = __decorate36([
|
|
|
16629
16695
|
// node_modules/jodit/esm/modules/uploader/uploader.js
|
|
16630
16696
|
init_component3();
|
|
16631
16697
|
init_constants();
|
|
16698
|
+
init_dom();
|
|
16632
16699
|
init_helpers();
|
|
16633
16700
|
init_config();
|
|
16634
16701
|
|
|
@@ -16861,7 +16928,7 @@ function processOldBrowserDrag(self2, cData, handlerSuccess, handlerError, onFin
|
|
|
16861
16928
|
style: "left: -9999px; top: 0; width: 0; height: 100%;line-height: 140%; overflow: hidden; position: fixed; z-index: 2147483647; word-break: break-all;",
|
|
16862
16929
|
contenteditable: true
|
|
16863
16930
|
});
|
|
16864
|
-
getContainer(self2.j, self2.constructor)
|
|
16931
|
+
Dom.append(getContainer(self2.j, self2.constructor), div);
|
|
16865
16932
|
const selection = isJoditObject(self2.j) ? self2.j.s.save() : null, restore = () => selection && isJoditObject(self2.j) && self2.j.s.restore();
|
|
16866
16933
|
div.focus();
|
|
16867
16934
|
self2.j.async.setTimeout(() => {
|
|
@@ -16887,6 +16954,7 @@ function hasItems(data) {
|
|
|
16887
16954
|
// node_modules/jodit/esm/modules/uploader/config.js
|
|
16888
16955
|
init_is_array();
|
|
16889
16956
|
init_is_jodit_object();
|
|
16957
|
+
init_attr();
|
|
16890
16958
|
init_config();
|
|
16891
16959
|
Config.prototype.enableDragAndDropFileToEditor = true;
|
|
16892
16960
|
Config.prototype.uploader = {
|
|
@@ -16944,9 +17012,9 @@ Config.prototype.uploader = {
|
|
|
16944
17012
|
}
|
|
16945
17013
|
if (resp.files && resp.files.length) {
|
|
16946
17014
|
resp.files.forEach((filename, index) => {
|
|
16947
|
-
const [tagName,
|
|
17015
|
+
const [tagName, attrName] = resp.isImages && resp.isImages[index] ? ["img", "src"] : ["a", "href"];
|
|
16948
17016
|
const elm = j10.createInside.element(tagName);
|
|
16949
|
-
elm
|
|
17017
|
+
attr(elm, attrName, resp.baseurl + filename);
|
|
16950
17018
|
if (tagName === "a") {
|
|
16951
17019
|
elm.textContent = j10.o.uploader.getDisplayName.call(this, resp.baseurl, filename);
|
|
16952
17020
|
}
|
|
@@ -17077,7 +17145,10 @@ var Uploader = class extends ViewComponent {
|
|
|
17077
17145
|
sendFiles(self2, event.dataTransfer.files, handlerSuccess, handlerError).finally(onFinally);
|
|
17078
17146
|
}
|
|
17079
17147
|
});
|
|
17080
|
-
const inputFile =
|
|
17148
|
+
const inputFile = Dom.first(form2, (node) => {
|
|
17149
|
+
var _a2;
|
|
17150
|
+
return Dom.isTag(node, "input") && ((_a2 = attr(node, "type")) === null || _a2 === void 0 ? void 0 : _a2.toLowerCase()) === "file";
|
|
17151
|
+
});
|
|
17081
17152
|
if (inputFile) {
|
|
17082
17153
|
self2.j.e.on(inputFile, "change", () => {
|
|
17083
17154
|
sendFiles(self2, inputFile.files, handlerSuccess, handlerError).then(() => {
|
|
@@ -17377,6 +17448,7 @@ function isInsideInvisibleElement(font2, root) {
|
|
|
17377
17448
|
init_object_size();
|
|
17378
17449
|
init_utils3();
|
|
17379
17450
|
init_assert();
|
|
17451
|
+
init_attr();
|
|
17380
17452
|
function isSameAttributes(elm, attrs) {
|
|
17381
17453
|
if (!size(attrs)) {
|
|
17382
17454
|
return true;
|
|
@@ -17393,7 +17465,11 @@ function isSameAttributes(elm, attrs) {
|
|
|
17393
17465
|
});
|
|
17394
17466
|
}
|
|
17395
17467
|
function elementsEqualAttributes(elm1, elm2) {
|
|
17396
|
-
return elm1.attributes.length === elm2.attributes.length && Array.from(elm1.attributes).every(
|
|
17468
|
+
return elm1.attributes.length === elm2.attributes.length && Array.from(elm1.attributes).every(
|
|
17469
|
+
// `attrRaw` on purpose: the comparison must use the exact
|
|
17470
|
+
// attribute name from the live list, without `attr()` name mangling
|
|
17471
|
+
(attr2) => attrRaw(elm2, attr2.name) === attr2.value
|
|
17472
|
+
);
|
|
17397
17473
|
}
|
|
17398
17474
|
|
|
17399
17475
|
// node_modules/jodit/esm/core/selection/style/api/list/toggle-ordered-list.js
|
|
@@ -17407,7 +17483,6 @@ init_global2();
|
|
|
17407
17483
|
init_checker();
|
|
17408
17484
|
init_normalize_css_value();
|
|
17409
17485
|
init_object_size();
|
|
17410
|
-
init_kebab_case();
|
|
17411
17486
|
init_utils3();
|
|
17412
17487
|
init_css();
|
|
17413
17488
|
init_data_bind();
|
|
@@ -17440,7 +17515,7 @@ function toggleAttributes(commitStyle, elm, jodit, mode, dry = false) {
|
|
|
17440
17515
|
function toggleStyle(commitStyle, jodit, style, elm, dry, mode) {
|
|
17441
17516
|
assert(isPlainObject(style) && size(style), "Style must be an object");
|
|
17442
17517
|
Object.keys(style).forEach((rule) => {
|
|
17443
|
-
const inlineValue = elm
|
|
17518
|
+
const inlineValue = cssInline(elm, rule);
|
|
17444
17519
|
const newValue = style[rule];
|
|
17445
17520
|
if (inlineValue === "" && newValue == null) {
|
|
17446
17521
|
return;
|
|
@@ -17522,8 +17597,8 @@ function getShadowRoot(jodit) {
|
|
|
17522
17597
|
position: "absolute",
|
|
17523
17598
|
border: 0
|
|
17524
17599
|
});
|
|
17525
|
-
iframe2
|
|
17526
|
-
|
|
17600
|
+
attr(iframe2, "src", "about:blank");
|
|
17601
|
+
Dom.append(container, iframe2);
|
|
17527
17602
|
const doc = (_a2 = iframe2.contentWindow) === null || _a2 === void 0 ? void 0 : _a2.document;
|
|
17528
17603
|
const shadowRoot = !doc ? jodit.od.body : doc.body;
|
|
17529
17604
|
dataBind(jodit, "shadowRoot", shadowRoot);
|
|
@@ -17532,11 +17607,11 @@ function getShadowRoot(jodit) {
|
|
|
17532
17607
|
function getNativeCSSValue(jodit, elm, key3) {
|
|
17533
17608
|
const root = getShadowRoot(jodit);
|
|
17534
17609
|
const wrapper = jodit.create.element("div");
|
|
17535
|
-
wrapper
|
|
17610
|
+
css(wrapper, "color", css(jodit.editor, "color"));
|
|
17536
17611
|
const newElm = jodit.create.element(elm.tagName.toLowerCase());
|
|
17537
|
-
newElm
|
|
17538
|
-
|
|
17539
|
-
|
|
17612
|
+
attr(newElm, "style", attr(elm, "style"));
|
|
17613
|
+
Dom.append(wrapper, newElm);
|
|
17614
|
+
Dom.append(root, wrapper);
|
|
17540
17615
|
const result = css(newElm, key3);
|
|
17541
17616
|
Dom.safeRemove(wrapper);
|
|
17542
17617
|
return result;
|
|
@@ -17692,11 +17767,11 @@ function wrapUnwrappedText(style, elm, jodit) {
|
|
|
17692
17767
|
range.setEndAfter(end);
|
|
17693
17768
|
const fragment = range.extractContents();
|
|
17694
17769
|
const wrapper = ci.element(style.element);
|
|
17695
|
-
|
|
17770
|
+
Dom.append(wrapper, fragment);
|
|
17696
17771
|
Dom.safeInsertNode(range, wrapper);
|
|
17697
17772
|
if (style.elementIsBlock) {
|
|
17698
17773
|
if (Dom.isEmpty(wrapper) && !Dom.isTag(wrapper.firstElementChild, "br")) {
|
|
17699
|
-
|
|
17774
|
+
Dom.append(wrapper, ci.element("br"));
|
|
17700
17775
|
}
|
|
17701
17776
|
}
|
|
17702
17777
|
return wrapper;
|
|
@@ -18014,7 +18089,7 @@ function moveNodeInsideStart(j10, node, start) {
|
|
|
18014
18089
|
let sibling = Dom.findSibling(node, start), anotherSibling = Dom.findSibling(node, !start);
|
|
18015
18090
|
while (Dom.isElement(sibling) && !Dom.isTag(sibling, INSEPARABLE_TAGS) && Dom.isContentEditable(sibling, j10.editor) && (!anotherSibling || !Dom.closest(node, Dom.isElement, j10.editor))) {
|
|
18016
18091
|
if (start || !sibling.firstChild) {
|
|
18017
|
-
|
|
18092
|
+
Dom.append(sibling, node);
|
|
18018
18093
|
} else {
|
|
18019
18094
|
Dom.before(sibling.firstChild, node);
|
|
18020
18095
|
}
|
|
@@ -18243,11 +18318,13 @@ var Selection = class {
|
|
|
18243
18318
|
}
|
|
18244
18319
|
const marker = this.j.createInside.span();
|
|
18245
18320
|
marker.id = MARKER_CLASS + "_" + Number(/* @__PURE__ */ new Date()) + "_" + String(Math.random()).slice(2);
|
|
18246
|
-
marker
|
|
18247
|
-
|
|
18321
|
+
css(marker, {
|
|
18322
|
+
lineHeight: "0",
|
|
18323
|
+
display: "none"
|
|
18324
|
+
});
|
|
18248
18325
|
Dom.markTemporary(marker);
|
|
18249
18326
|
attr(marker, "data-" + MARKER_CLASS, atStart ? "start" : "end");
|
|
18250
|
-
|
|
18327
|
+
Dom.append(marker, this.j.createInside.text(INVISIBLE_SPACE));
|
|
18251
18328
|
if (newRange) {
|
|
18252
18329
|
if (Dom.isOrContains(this.area, atStart ? newRange.startContainer : newRange.endContainer)) {
|
|
18253
18330
|
newRange.insertNode(marker);
|
|
@@ -18260,9 +18337,9 @@ var Selection = class {
|
|
|
18260
18337
|
*/
|
|
18261
18338
|
restore() {
|
|
18262
18339
|
let range = false;
|
|
18263
|
-
const
|
|
18264
|
-
const start = this.area
|
|
18265
|
-
const end = this.area
|
|
18340
|
+
const markerFilter = (start2) => (node) => Dom.isMarker(node) && attr(node, "data-" + MARKER_CLASS) === (start2 ? "start" : "end");
|
|
18341
|
+
const start = Dom.first(this.area, markerFilter(true));
|
|
18342
|
+
const end = Dom.first(this.area, markerFilter(false));
|
|
18266
18343
|
if (!start) {
|
|
18267
18344
|
return;
|
|
18268
18345
|
}
|
|
@@ -18507,7 +18584,7 @@ var Selection = class {
|
|
|
18507
18584
|
if (Dom.isOrContains(this.area, range.commonAncestorContainer)) {
|
|
18508
18585
|
Dom.safeInsertNode(range, node);
|
|
18509
18586
|
} else {
|
|
18510
|
-
this.area
|
|
18587
|
+
Dom.append(this.area, node);
|
|
18511
18588
|
}
|
|
18512
18589
|
[
|
|
18513
18590
|
() => firstChild === null || firstChild === void 0 ? void 0 : firstChild.previousSibling,
|
|
@@ -18523,7 +18600,7 @@ var Selection = class {
|
|
|
18523
18600
|
}
|
|
18524
18601
|
});
|
|
18525
18602
|
} else {
|
|
18526
|
-
this.area
|
|
18603
|
+
Dom.append(this.area, node);
|
|
18527
18604
|
}
|
|
18528
18605
|
const setCursor = (node2) => {
|
|
18529
18606
|
if (Dom.isBlock(node2)) {
|
|
@@ -18575,7 +18652,7 @@ var Selection = class {
|
|
|
18575
18652
|
if (!Dom.isNode(html)) {
|
|
18576
18653
|
node.innerHTML = html.toString();
|
|
18577
18654
|
} else {
|
|
18578
|
-
|
|
18655
|
+
Dom.append(node, html);
|
|
18579
18656
|
}
|
|
18580
18657
|
if (!this.j.isEditorMode() && this.j.e.fire("insertHTML", node.innerHTML) === false) {
|
|
18581
18658
|
return;
|
|
@@ -18583,9 +18660,7 @@ var Selection = class {
|
|
|
18583
18660
|
if (!node.lastChild) {
|
|
18584
18661
|
return;
|
|
18585
18662
|
}
|
|
18586
|
-
|
|
18587
|
-
fragment.appendChild(node.firstChild);
|
|
18588
|
-
}
|
|
18663
|
+
Dom.moveContent(node, fragment);
|
|
18589
18664
|
this.insertNode(fragment, insertCursorAfter, false);
|
|
18590
18665
|
this.j.__imdSynchronizeValues();
|
|
18591
18666
|
}
|
|
@@ -18599,7 +18674,7 @@ var Selection = class {
|
|
|
18599
18674
|
insertImage(url2, styles3 = null, defaultWidth = null) {
|
|
18600
18675
|
const image2 = isString(url2) ? this.j.createInside.element("img") : url2;
|
|
18601
18676
|
if (isString(url2)) {
|
|
18602
|
-
image2
|
|
18677
|
+
attr(image2, "src", url2);
|
|
18603
18678
|
}
|
|
18604
18679
|
if (defaultWidth != null) {
|
|
18605
18680
|
let dw = defaultWidth.toString();
|
|
@@ -18613,8 +18688,10 @@ var Selection = class {
|
|
|
18613
18688
|
}
|
|
18614
18689
|
const onload = () => {
|
|
18615
18690
|
if (image2.naturalHeight < image2.offsetHeight || image2.naturalWidth < image2.offsetWidth) {
|
|
18616
|
-
image2
|
|
18617
|
-
|
|
18691
|
+
css(image2, {
|
|
18692
|
+
width: "",
|
|
18693
|
+
height: ""
|
|
18694
|
+
});
|
|
18618
18695
|
}
|
|
18619
18696
|
image2.removeEventListener("load", onload);
|
|
18620
18697
|
};
|
|
@@ -18676,7 +18753,7 @@ var Selection = class {
|
|
|
18676
18753
|
current = current.firstChild;
|
|
18677
18754
|
} else {
|
|
18678
18755
|
const currentB = this.j.createInside.text(INVISIBLE_SPACE);
|
|
18679
|
-
|
|
18756
|
+
Dom.append(current, currentB);
|
|
18680
18757
|
current = currentB;
|
|
18681
18758
|
}
|
|
18682
18759
|
}
|
|
@@ -18816,7 +18893,7 @@ var Selection = class {
|
|
|
18816
18893
|
if (!start) {
|
|
18817
18894
|
const fakeNode = this.j.createInside.text(INVISIBLE_SPACE);
|
|
18818
18895
|
if (!Dom.isTag(last, INSEPARABLE_TAGS)) {
|
|
18819
|
-
|
|
18896
|
+
Dom.append(last, fakeNode);
|
|
18820
18897
|
last = fakeNode;
|
|
18821
18898
|
} else {
|
|
18822
18899
|
start = last;
|
|
@@ -18877,7 +18954,7 @@ var Selection = class {
|
|
|
18877
18954
|
const range = sel.getRangeAt(0);
|
|
18878
18955
|
const clonedSelection = range.cloneContents();
|
|
18879
18956
|
const div = this.j.createInside.div();
|
|
18880
|
-
|
|
18957
|
+
Dom.append(div, clonedSelection);
|
|
18881
18958
|
return div.innerHTML;
|
|
18882
18959
|
}
|
|
18883
18960
|
return "";
|
|
@@ -18999,11 +19076,10 @@ var Selection = class {
|
|
|
18999
19076
|
return toArray(node.childNodes).some((child) => this.__isOrContainsBlock(child));
|
|
19000
19077
|
}
|
|
19001
19078
|
__wrapRunInFont(run) {
|
|
19002
|
-
var _a2;
|
|
19003
19079
|
const font2 = this.j.createInside.element("font");
|
|
19004
19080
|
const [first] = run;
|
|
19005
|
-
(
|
|
19006
|
-
run.forEach((node) =>
|
|
19081
|
+
Dom.before(first, font2);
|
|
19082
|
+
run.forEach((node) => Dom.append(font2, node));
|
|
19007
19083
|
return font2;
|
|
19008
19084
|
}
|
|
19009
19085
|
/**
|
|
@@ -19014,7 +19090,7 @@ var Selection = class {
|
|
|
19014
19090
|
const font2 = this.jodit.createInside.element("font", INVISIBLE_SPACE);
|
|
19015
19091
|
this.insertNode(font2, false, false);
|
|
19016
19092
|
if (fakes && fakes[0]) {
|
|
19017
|
-
|
|
19093
|
+
Dom.append(font2, fakes[0]);
|
|
19018
19094
|
}
|
|
19019
19095
|
yield font2;
|
|
19020
19096
|
Dom.unwrap(font2);
|
|
@@ -19138,7 +19214,7 @@ var Selection = class {
|
|
|
19138
19214
|
try {
|
|
19139
19215
|
clearEmpties(fragment);
|
|
19140
19216
|
clearEmpties(currentBox);
|
|
19141
|
-
|
|
19217
|
+
Dom.before(currentBox, fragment);
|
|
19142
19218
|
if (!edge && cursorOnTheRight && (br === null || br === void 0 ? void 0 : br.parentNode)) {
|
|
19143
19219
|
const range2 = this.createRange();
|
|
19144
19220
|
range2.setStartBefore(br);
|
|
@@ -19150,9 +19226,9 @@ var Selection = class {
|
|
|
19150
19226
|
}
|
|
19151
19227
|
}
|
|
19152
19228
|
const fillFakeParent = (fake) => {
|
|
19153
|
-
|
|
19154
|
-
if (
|
|
19155
|
-
(
|
|
19229
|
+
const parent = fake === null || fake === void 0 ? void 0 : fake.parentNode;
|
|
19230
|
+
if (parent && parent.firstChild === parent.lastChild) {
|
|
19231
|
+
Dom.append(parent, br.cloneNode());
|
|
19156
19232
|
}
|
|
19157
19233
|
};
|
|
19158
19234
|
fillFakeParent(prevFake);
|
|
@@ -19296,10 +19372,10 @@ var addNewLine = class extends Plugin {
|
|
|
19296
19372
|
if (this.__current === editor.editor) {
|
|
19297
19373
|
Dom.prepend(editor.editor, p63);
|
|
19298
19374
|
} else {
|
|
19299
|
-
this.__current
|
|
19375
|
+
Dom.before(this.__current, p63);
|
|
19300
19376
|
}
|
|
19301
19377
|
} else {
|
|
19302
|
-
editor.editor
|
|
19378
|
+
Dom.append(editor.editor, p63);
|
|
19303
19379
|
}
|
|
19304
19380
|
editor.s.setCursorIn(p63);
|
|
19305
19381
|
scrollIntoViewIfNeeded(p63, editor.editor, editor.ed);
|
|
@@ -19317,8 +19393,8 @@ var addNewLine = class extends Plugin {
|
|
|
19317
19393
|
return;
|
|
19318
19394
|
}
|
|
19319
19395
|
this.__isShown = true;
|
|
19320
|
-
this.j.container
|
|
19321
|
-
this.__line
|
|
19396
|
+
Dom.append(this.j.container, this.__line);
|
|
19397
|
+
css(this.__line, "width", this.j.container.clientWidth);
|
|
19322
19398
|
}
|
|
19323
19399
|
onLock(isLocked) {
|
|
19324
19400
|
if (isLocked && this.__isShown) {
|
|
@@ -19359,9 +19435,9 @@ var addNewLine = class extends Plugin {
|
|
|
19359
19435
|
const top = e42.pageY - editor.ew.scrollX;
|
|
19360
19436
|
const p63 = editor.createInside.element(editor.o.enter);
|
|
19361
19437
|
if (Math.abs(top - editorBound.top) < Math.abs(top - (editorBound.height + editorBound.top)) && editor.editor.firstChild) {
|
|
19362
|
-
editor.editor
|
|
19438
|
+
Dom.prepend(editor.editor, p63);
|
|
19363
19439
|
} else {
|
|
19364
|
-
editor.editor
|
|
19440
|
+
Dom.append(editor.editor, p63);
|
|
19365
19441
|
}
|
|
19366
19442
|
editor.s.setCursorIn(p63);
|
|
19367
19443
|
editor.synchronizeValues();
|
|
@@ -19407,7 +19483,7 @@ var addNewLine = class extends Plugin {
|
|
|
19407
19483
|
}
|
|
19408
19484
|
const isEditor = editor.editor === currentElement;
|
|
19409
19485
|
if (top !== false && (isEditor && !this.__isBeforeContent || !isEditor && !call(this.__isBeforeContent ? Dom.prev : Dom.next, currentElement, this.__canGetFocus, editor.editor))) {
|
|
19410
|
-
this.__line
|
|
19486
|
+
css(this.__line, "top", top);
|
|
19411
19487
|
this.__current = currentElement;
|
|
19412
19488
|
this.__show();
|
|
19413
19489
|
this.__line.style.setProperty("--jd-anl-handle-offset", clientX - pos.left - 10 + "px");
|
|
@@ -19519,7 +19595,10 @@ function resolveTableSibling(sibling, backspace2) {
|
|
|
19519
19595
|
if (!Dom.isTag(sibling, "table")) {
|
|
19520
19596
|
return sibling;
|
|
19521
19597
|
}
|
|
19522
|
-
const cells =
|
|
19598
|
+
const cells = [];
|
|
19599
|
+
Dom.each(sibling, (node) => {
|
|
19600
|
+
Dom.isCell(node) && cells.push(node);
|
|
19601
|
+
});
|
|
19523
19602
|
return cells.length ? cells[backspace2 ? cells.length - 1 : 0] : null;
|
|
19524
19603
|
}
|
|
19525
19604
|
function checkMoveListContent(jodit, mainClosestBox, sibling, backspace2) {
|
|
@@ -19942,6 +20021,13 @@ init_global2();
|
|
|
19942
20021
|
init_helpers();
|
|
19943
20022
|
init_trim();
|
|
19944
20023
|
init_plugin2();
|
|
20024
|
+
var NOT_EMPTY_CONTENT_TAGS = /* @__PURE__ */ new Set([
|
|
20025
|
+
"img",
|
|
20026
|
+
"table",
|
|
20027
|
+
"jodit",
|
|
20028
|
+
"iframe",
|
|
20029
|
+
"hr"
|
|
20030
|
+
]);
|
|
19945
20031
|
var deleteCommand = class extends Plugin {
|
|
19946
20032
|
afterInit(jodit) {
|
|
19947
20033
|
jodit.e.on("afterCommand.delete", (command) => {
|
|
@@ -19967,8 +20053,8 @@ var deleteCommand = class extends Plugin {
|
|
|
19967
20053
|
if (current && Dom.isTag(current.firstChild, "br")) {
|
|
19968
20054
|
jodit.s.removeNode(current.firstChild);
|
|
19969
20055
|
}
|
|
19970
|
-
if (!trim(jodit.editor.textContent || "") && !jodit.editor.
|
|
19971
|
-
jodit.editor
|
|
20056
|
+
if (!trim(jodit.editor.textContent || "") && !Dom.first(jodit.editor, (node) => Dom.isTag(node, NOT_EMPTY_CONTENT_TAGS)) && (!current || !Dom.closest(current, "table", jodit.editor))) {
|
|
20057
|
+
Dom.detach(jodit.editor);
|
|
19972
20058
|
const node = jodit.s.setCursorIn(jodit.editor);
|
|
19973
20059
|
jodit.s.removeNode(node);
|
|
19974
20060
|
}
|
|
@@ -20434,6 +20520,7 @@ __export(filters_exports, {
|
|
|
20434
20520
|
|
|
20435
20521
|
// node_modules/jodit/esm/plugins/clean-html/helpers/visitor/filters/allow-attributes.js
|
|
20436
20522
|
init_dom();
|
|
20523
|
+
init_attr();
|
|
20437
20524
|
function allowAttributes(jodit, nodeElm, hadEffect, allow) {
|
|
20438
20525
|
const allowedForTag = allow && Dom.isElement(nodeElm) && allow[nodeElm.nodeName];
|
|
20439
20526
|
if (allow && Dom.isElement(nodeElm) && allowedForTag !== true) {
|
|
@@ -20453,7 +20540,7 @@ function allowAttributes(jodit, nodeElm, hadEffect, allow) {
|
|
|
20453
20540
|
hadEffect = true;
|
|
20454
20541
|
}
|
|
20455
20542
|
removeAttrs.forEach((attr2) => {
|
|
20456
|
-
nodeElm
|
|
20543
|
+
attrRaw(nodeElm, attr2, null);
|
|
20457
20544
|
});
|
|
20458
20545
|
}
|
|
20459
20546
|
}
|
|
@@ -20503,7 +20590,7 @@ var TABLE_CONTAINER_TAGS = /* @__PURE__ */ new Set([
|
|
|
20503
20590
|
function fillEmptyParagraph(jodit, nodeElm, hadEffect) {
|
|
20504
20591
|
if (jodit.o.cleanHTML.fillEmptyParagraph && Dom.isBlock(nodeElm) && Dom.isEmpty(nodeElm, INSEPARABLE_TAGS) && !Dom.isTag(nodeElm, TABLE_CONTAINER_TAGS)) {
|
|
20505
20592
|
const br = jodit.createInside.element("br");
|
|
20506
|
-
|
|
20593
|
+
Dom.append(nodeElm, br);
|
|
20507
20594
|
return true;
|
|
20508
20595
|
}
|
|
20509
20596
|
return hadEffect;
|
|
@@ -21012,10 +21099,10 @@ var ColorPickerWidget = (editor, callback, coldColor) => {
|
|
|
21012
21099
|
}
|
|
21013
21100
|
return stack.join("");
|
|
21014
21101
|
};
|
|
21015
|
-
|
|
21016
|
-
|
|
21102
|
+
Dom.append(form2, editor.c.fromHTML(`<div class="${cn}__groups">${eachColor(editor.o.colors)}</div>`));
|
|
21103
|
+
Dom.append(form2, editor.c.fromHTML(`<div data-ref="extra" class="${cn}__extra"></div>`));
|
|
21017
21104
|
const { extra } = refs(form2);
|
|
21018
|
-
|
|
21105
|
+
Dom.append(extra, editor.c.fromHTML(`<div class="${cn}__hex"><input data-ref="hexInput" type="text" spellcheck="false" aria-label="HEX" placeholder="#FF0000" value="${valueHex || ""}"/></div>`));
|
|
21019
21106
|
const { hexInput } = refs(form2);
|
|
21020
21107
|
let appliedHexValue = null;
|
|
21021
21108
|
const applyHexInput = () => {
|
|
@@ -21045,7 +21132,7 @@ var ColorPickerWidget = (editor, callback, coldColor) => {
|
|
|
21045
21132
|
applyHexInput();
|
|
21046
21133
|
});
|
|
21047
21134
|
if (editor.o.showBrowserColorPicker && hasBrowserColorPicker()) {
|
|
21048
|
-
|
|
21135
|
+
Dom.append(extra, editor.c.fromHTML(`<div class="${cn}__native">${iconPalette}<input type="color" value="#ffffff"/></div>`));
|
|
21049
21136
|
editor.e.on(form2, "change", (e42) => {
|
|
21050
21137
|
e42.stopPropagation();
|
|
21051
21138
|
const target = e42.target;
|
|
@@ -21102,8 +21189,8 @@ var TabsWidget = (jodit, tabs, state) => {
|
|
|
21102
21189
|
const nameToTab = {};
|
|
21103
21190
|
const buttonList = [];
|
|
21104
21191
|
let firstTab = "";
|
|
21105
|
-
|
|
21106
|
-
|
|
21192
|
+
Dom.append(box, buttons);
|
|
21193
|
+
Dom.append(box, tabBox);
|
|
21107
21194
|
const setActive = (tab2) => {
|
|
21108
21195
|
if (!nameToTab[tab2]) {
|
|
21109
21196
|
return;
|
|
@@ -21126,15 +21213,15 @@ var TabsWidget = (jodit, tabs, state) => {
|
|
|
21126
21213
|
if (!firstTab) {
|
|
21127
21214
|
firstTab = name;
|
|
21128
21215
|
}
|
|
21129
|
-
|
|
21216
|
+
Dom.append(buttons, button2.container);
|
|
21130
21217
|
buttonList.push(button2);
|
|
21131
21218
|
button2.container.classList.add("jodit-tabs__button", "jodit-tabs__button_columns_" + tabs.length);
|
|
21132
21219
|
if (!isFunction(content)) {
|
|
21133
|
-
|
|
21220
|
+
Dom.append(tab2, Component.isInstanceOf(content, UIElement) ? content.container : content);
|
|
21134
21221
|
} else {
|
|
21135
21222
|
tab2.classList.add("jodit-tab_empty");
|
|
21136
21223
|
}
|
|
21137
|
-
|
|
21224
|
+
Dom.append(tabBox, tab2);
|
|
21138
21225
|
button2.onAction(() => {
|
|
21139
21226
|
setActive(name);
|
|
21140
21227
|
if (isFunction(content) && !Dom.isElement(content)) {
|
|
@@ -21229,13 +21316,13 @@ var FileSelectorWidget = (editor, callbacks, elm, close, isImage = true) => {
|
|
|
21229
21316
|
currentImage = null;
|
|
21230
21317
|
if (elm && !Dom.isText(elm) && !Dom.isComment(elm) && (Dom.isTag(elm, "img") || $$("img", elm).length)) {
|
|
21231
21318
|
currentImage = elm.tagName === "IMG" ? elm : $$("img", elm)[0];
|
|
21232
|
-
val(form2.container, "
|
|
21233
|
-
val(form2.container, "
|
|
21319
|
+
val(form2.container, "url", attr(currentImage, "src"));
|
|
21320
|
+
val(form2.container, "text", attr(currentImage, "alt"));
|
|
21234
21321
|
button2.state.text = "Update";
|
|
21235
21322
|
}
|
|
21236
21323
|
if (elm && Dom.isTag(elm, "a")) {
|
|
21237
|
-
val(form2.container, "
|
|
21238
|
-
val(form2.container, "
|
|
21324
|
+
val(form2.container, "url", attr(elm, "href"));
|
|
21325
|
+
val(form2.container, "text", attr(elm, "title"));
|
|
21239
21326
|
button2.state.text = "Update";
|
|
21240
21327
|
}
|
|
21241
21328
|
form2.onSubmit((data) => {
|
|
@@ -21253,8 +21340,8 @@ var FileSelectorWidget = (editor, callbacks, elm, close, isImage = true) => {
|
|
|
21253
21340
|
box.classList.add("jodit-file-selector");
|
|
21254
21341
|
return box;
|
|
21255
21342
|
};
|
|
21256
|
-
function val(elm,
|
|
21257
|
-
const child = elm.
|
|
21343
|
+
function val(elm, name, value) {
|
|
21344
|
+
const child = Dom.first(elm, (node) => Dom.isTag(node, "input") && attr(node, "name") === name);
|
|
21258
21345
|
if (!child) {
|
|
21259
21346
|
return "";
|
|
21260
21347
|
}
|
|
@@ -21356,7 +21443,7 @@ Config.prototype.controls.brush = {
|
|
|
21356
21443
|
if (!currentElement) {
|
|
21357
21444
|
editor.execCommand("background", false, value);
|
|
21358
21445
|
} else {
|
|
21359
|
-
currentElement
|
|
21446
|
+
css(currentElement, "backgroundColor", value);
|
|
21360
21447
|
}
|
|
21361
21448
|
dataBind(button2, "color", value);
|
|
21362
21449
|
dataBind(button2, "color-mode", "background");
|
|
@@ -21366,7 +21453,7 @@ Config.prototype.controls.brush = {
|
|
|
21366
21453
|
if (!currentElement) {
|
|
21367
21454
|
editor.execCommand("forecolor", false, value);
|
|
21368
21455
|
} else {
|
|
21369
|
-
currentElement
|
|
21456
|
+
css(currentElement, "color", value);
|
|
21370
21457
|
}
|
|
21371
21458
|
dataBind(button2, "color", value);
|
|
21372
21459
|
dataBind(button2, "color-mode", "color");
|
|
@@ -21395,10 +21482,10 @@ Config.prototype.controls.brush = {
|
|
|
21395
21482
|
if (current && current !== jodit.editor && Dom.isNode(current) && Dom.isElement(current)) {
|
|
21396
21483
|
switch (mode) {
|
|
21397
21484
|
case "color":
|
|
21398
|
-
current
|
|
21485
|
+
css(current, "color", color2);
|
|
21399
21486
|
break;
|
|
21400
21487
|
case "background":
|
|
21401
|
-
current
|
|
21488
|
+
css(current, "backgroundColor", color2);
|
|
21402
21489
|
break;
|
|
21403
21490
|
}
|
|
21404
21491
|
} else {
|
|
@@ -21628,7 +21715,7 @@ Config.prototype.controls.copyformat = {
|
|
|
21628
21715
|
} else {
|
|
21629
21716
|
const defaultStyles = {}, box = Dom.up(current, (elm) => elm && !Dom.isText(elm), editor.editor) || editor.editor;
|
|
21630
21717
|
const ideal = editor.createInside.span();
|
|
21631
|
-
editor.editor
|
|
21718
|
+
Dom.append(editor.editor, ideal);
|
|
21632
21719
|
copyStyles.forEach((key3) => {
|
|
21633
21720
|
defaultStyles[key3] = css(ideal, key3);
|
|
21634
21721
|
});
|
|
@@ -21721,7 +21808,7 @@ var dragAndDrop = class extends Plugin {
|
|
|
21721
21808
|
this.startDragPoint.x = event.clientX;
|
|
21722
21809
|
this.startDragPoint.y = event.clientY;
|
|
21723
21810
|
if (isFileBrowserFilesItem(target)) {
|
|
21724
|
-
target = target.
|
|
21811
|
+
target = Dom.first(target, (node) => Dom.isTag(node, "img"));
|
|
21725
21812
|
}
|
|
21726
21813
|
if (Dom.isTag(target, "img")) {
|
|
21727
21814
|
this.draggable = target.cloneNode(true);
|
|
@@ -21965,7 +22052,7 @@ var dragAndDropElement = class _dragAndDropElement extends Plugin {
|
|
|
21965
22052
|
width: (_a2 = target === null || target === void 0 ? void 0 : target.offsetWidth) !== null && _a2 !== void 0 ? _a2 : 100,
|
|
21966
22053
|
height: (_b = target === null || target === void 0 ? void 0 : target.offsetHeight) !== null && _b !== void 0 ? _b : 100
|
|
21967
22054
|
});
|
|
21968
|
-
getContainer(this.j, _dragAndDropElement)
|
|
22055
|
+
Dom.append(getContainer(this.j, _dragAndDropElement), this.draggable);
|
|
21969
22056
|
}
|
|
21970
22057
|
css(this.draggable, {
|
|
21971
22058
|
left: event.clientX,
|
|
@@ -22148,7 +22235,7 @@ init_scroll_into_view();
|
|
|
22148
22235
|
function insertParagraph(fake, editor, wrapperTag, style) {
|
|
22149
22236
|
const isBR = wrapperTag.toLowerCase() === "br", { createInside } = editor, p63 = createInside.element(wrapperTag), br = createInside.element("br");
|
|
22150
22237
|
if (!isBR) {
|
|
22151
|
-
|
|
22238
|
+
Dom.append(p63, br);
|
|
22152
22239
|
}
|
|
22153
22240
|
if (style && style.cssText) {
|
|
22154
22241
|
attr(p63, "style", style.cssText);
|
|
@@ -22193,11 +22280,11 @@ function processEmptyLILeaf(fake, jodit, li) {
|
|
|
22193
22280
|
Dom.safeRemove(list);
|
|
22194
22281
|
}
|
|
22195
22282
|
const newLi = insertParagraph(fake, jodit, listInsideLeaf ? "li" : jodit.o.enter);
|
|
22196
|
-
if (!rightPart.
|
|
22283
|
+
if (!Dom.first(rightPart, (node) => Dom.isTag(node, "li"))) {
|
|
22197
22284
|
return;
|
|
22198
22285
|
}
|
|
22199
22286
|
if (listInsideLeaf) {
|
|
22200
|
-
|
|
22287
|
+
Dom.append(newLi, rightPart);
|
|
22201
22288
|
} else {
|
|
22202
22289
|
Dom.after(newLi, rightPart);
|
|
22203
22290
|
}
|
|
@@ -22245,7 +22332,7 @@ function wrapText(fake, jodit) {
|
|
|
22245
22332
|
const currentBox = Dom.wrapInline(needWrap, jodit.o.enter, jodit);
|
|
22246
22333
|
if (Dom.isEmpty(currentBox)) {
|
|
22247
22334
|
const br = jodit.createInside.element("br");
|
|
22248
|
-
|
|
22335
|
+
Dom.append(currentBox, br);
|
|
22249
22336
|
Dom.before(br, fake);
|
|
22250
22337
|
}
|
|
22251
22338
|
return currentBox;
|
|
@@ -22680,6 +22767,7 @@ function formatBlock(editor) {
|
|
|
22680
22767
|
pluginSystem.add("formatBlock", formatBlock);
|
|
22681
22768
|
|
|
22682
22769
|
// node_modules/jodit/esm/plugins/fullsize/fullsize.js
|
|
22770
|
+
init_dom();
|
|
22683
22771
|
init_global2();
|
|
22684
22772
|
init_is_jodit_object();
|
|
22685
22773
|
init_css();
|
|
@@ -22745,7 +22833,6 @@ function fullsize(editor) {
|
|
|
22745
22833
|
wasToggled = false;
|
|
22746
22834
|
}
|
|
22747
22835
|
}, toggle = (enable) => {
|
|
22748
|
-
var _a2;
|
|
22749
22836
|
const { container, events } = editor;
|
|
22750
22837
|
if (!container) {
|
|
22751
22838
|
return;
|
|
@@ -22758,7 +22845,7 @@ function fullsize(editor) {
|
|
|
22758
22845
|
isEnabled = enable;
|
|
22759
22846
|
container.classList.toggle("jodit_fullsize", enable);
|
|
22760
22847
|
if (editor.toolbar) {
|
|
22761
|
-
isJoditObject(editor) &&
|
|
22848
|
+
isJoditObject(editor) && editor.toolbarContainer && Dom.append(editor.toolbarContainer, editor.toolbar.container);
|
|
22762
22849
|
css(editor.toolbar.container, "width", "auto");
|
|
22763
22850
|
}
|
|
22764
22851
|
enable ? fullsizeStack.add(container) : fullsizeStack.delete(container);
|
|
@@ -22978,6 +23065,7 @@ pluginSystem.add("hr", hr);
|
|
|
22978
23065
|
|
|
22979
23066
|
// node_modules/jodit/esm/plugins/iframe/iframe.js
|
|
22980
23067
|
init_constants();
|
|
23068
|
+
init_dom();
|
|
22981
23069
|
init_global2();
|
|
22982
23070
|
init_helpers();
|
|
22983
23071
|
init_helpers();
|
|
@@ -23009,20 +23097,20 @@ function iframe(editor) {
|
|
|
23009
23097
|
const link2 = doc.createElement("link");
|
|
23010
23098
|
attr(link2, "rel", "stylesheet");
|
|
23011
23099
|
attr(link2, "href", href);
|
|
23012
|
-
doc.head && doc.head
|
|
23100
|
+
doc.head && Dom.append(doc.head, link2);
|
|
23013
23101
|
});
|
|
23014
23102
|
}
|
|
23015
23103
|
if (opt.iframeStyle) {
|
|
23016
23104
|
const style = doc.createElement("style");
|
|
23017
23105
|
style.innerHTML = opt.iframeStyle;
|
|
23018
|
-
doc.head && doc.head
|
|
23106
|
+
doc.head && Dom.append(doc.head, style);
|
|
23019
23107
|
}
|
|
23020
23108
|
}).on("createEditor", () => {
|
|
23021
23109
|
if (!opt.iframe) {
|
|
23022
23110
|
return;
|
|
23023
23111
|
}
|
|
23024
23112
|
const iframe2 = editor.c.element("iframe");
|
|
23025
|
-
iframe2
|
|
23113
|
+
css(iframe2, "display", "block");
|
|
23026
23114
|
iframe2.src = "about:blank";
|
|
23027
23115
|
iframe2.className = "jodit-wysiwyg_iframe";
|
|
23028
23116
|
attr(iframe2, {
|
|
@@ -23033,7 +23121,7 @@ function iframe(editor) {
|
|
|
23033
23121
|
if (opt.iframeSandbox != null) {
|
|
23034
23122
|
attr(iframe2, "sandbox", opt.iframeSandbox);
|
|
23035
23123
|
}
|
|
23036
|
-
editor.workplace
|
|
23124
|
+
Dom.append(editor.workplace, iframe2);
|
|
23037
23125
|
editor.iframe = iframe2;
|
|
23038
23126
|
const result = editor.e.fire("generateDocumentStructure.iframe", null, editor);
|
|
23039
23127
|
const init2 = () => {
|
|
@@ -23083,7 +23171,7 @@ function iframe(editor) {
|
|
|
23083
23171
|
editor.editor = doc.body;
|
|
23084
23172
|
editor.e.on("afterSetMode afterInit afterAddPlace", toggleEditable);
|
|
23085
23173
|
if (opt.height === "auto") {
|
|
23086
|
-
doc.documentElement && (doc.documentElement
|
|
23174
|
+
doc.documentElement && css(doc.documentElement, "overflowY", "hidden");
|
|
23087
23175
|
const resizeIframe = editor.async.throttle((...args) => {
|
|
23088
23176
|
editor.async.requestAnimationFrame(() => {
|
|
23089
23177
|
if (editor.editor && editor.iframe && opt.height === "auto") {
|
|
@@ -23325,6 +23413,7 @@ Config.prototype.image = {
|
|
|
23325
23413
|
// node_modules/jodit/esm/plugins/image-properties/ui/ui-image-form.js
|
|
23326
23414
|
init_decorators();
|
|
23327
23415
|
init_component();
|
|
23416
|
+
init_dom();
|
|
23328
23417
|
init_helpers();
|
|
23329
23418
|
|
|
23330
23419
|
// node_modules/jodit/esm/plugins/image-properties/ui/ui-image-main-tab.js
|
|
@@ -23803,7 +23892,7 @@ var UIImagePropertiesForm = class UIImagePropertiesForm2 extends UIGroup {
|
|
|
23803
23892
|
this.handlers = handlers;
|
|
23804
23893
|
this.__mainTab = new UIImageMainTab(this.jodit, this.state, this.handlers);
|
|
23805
23894
|
this.__positionTab = new UIImagePositionTab(this.jodit, this.state, this.handlers);
|
|
23806
|
-
this.getElm("tabsBox")
|
|
23895
|
+
Dom.append(this.getElm("tabsBox"), TabsWidget(jodit, [
|
|
23807
23896
|
{ name: "Image", content: this.__mainTab },
|
|
23808
23897
|
{ name: "Advanced", content: this.__positionTab }
|
|
23809
23898
|
], activeTabState));
|
|
@@ -23986,14 +24075,15 @@ function openImagePopup(j10, dialog, state, button2) {
|
|
|
23986
24075
|
|
|
23987
24076
|
// node_modules/jodit/esm/plugins/image-properties/readers/index.js
|
|
23988
24077
|
init_attr();
|
|
24078
|
+
init_css();
|
|
23989
24079
|
|
|
23990
24080
|
// node_modules/jodit/esm/plugins/image-properties/readers/align.js
|
|
23991
24081
|
init_css();
|
|
23992
24082
|
function readAlign(image2, values) {
|
|
23993
|
-
if (image2
|
|
24083
|
+
if (cssInline(image2, "float") && ["left", "right"].indexOf(cssInline(image2, "float").toLowerCase()) !== -1) {
|
|
23994
24084
|
values.align = css(image2, "float");
|
|
23995
24085
|
} else {
|
|
23996
|
-
if (css(image2, "display") === "block" && image2
|
|
24086
|
+
if (css(image2, "display") === "block" && cssInline(image2, "margin-left") === "auto" && cssInline(image2, "margin-right") === "auto") {
|
|
23997
24087
|
values.align = "center";
|
|
23998
24088
|
} else {
|
|
23999
24089
|
values.align = "";
|
|
@@ -24077,7 +24167,7 @@ function readValuesFromImage(j10, state) {
|
|
|
24077
24167
|
return __async(this, null, function* () {
|
|
24078
24168
|
const { sourceImage: image2, values } = state;
|
|
24079
24169
|
readAlign(image2, values);
|
|
24080
|
-
values.borderRadius = parseInt(image2
|
|
24170
|
+
values.borderRadius = parseInt(cssInline(image2, "border-radius") || "0", 10) || 0;
|
|
24081
24171
|
values.id = attr(image2, "id") || "";
|
|
24082
24172
|
values.imageTitle = attr(image2, "title") || "";
|
|
24083
24173
|
values.imageAlt = attr(image2, "alt") || "";
|
|
@@ -24093,6 +24183,7 @@ function readValuesFromImage(j10, state) {
|
|
|
24093
24183
|
// node_modules/jodit/esm/plugins/image-properties/writers/index.js
|
|
24094
24184
|
init_dom();
|
|
24095
24185
|
init_utils3();
|
|
24186
|
+
init_css();
|
|
24096
24187
|
|
|
24097
24188
|
// node_modules/jodit/esm/plugins/image-properties/writers/link.js
|
|
24098
24189
|
init_dom();
|
|
@@ -24111,7 +24202,7 @@ function applyLink(j10, image2, imageLink, imageLinkOpenInNewTab) {
|
|
|
24111
24202
|
}
|
|
24112
24203
|
} else {
|
|
24113
24204
|
if (link2 && link2.parentNode) {
|
|
24114
|
-
|
|
24205
|
+
Dom.replace(link2, image2, void 0, false, true);
|
|
24115
24206
|
}
|
|
24116
24207
|
}
|
|
24117
24208
|
}
|
|
@@ -24176,7 +24267,7 @@ function applyValuesToImage(j10, state, image2) {
|
|
|
24176
24267
|
Dom.safeRemove(image2);
|
|
24177
24268
|
return;
|
|
24178
24269
|
}
|
|
24179
|
-
image2
|
|
24270
|
+
css(image2, "borderRadius", borderRadius ? borderRadius + "px" : "");
|
|
24180
24271
|
attr(image2, "title", imageTitle || null);
|
|
24181
24272
|
attr(image2, "alt", imageAlt || null);
|
|
24182
24273
|
applyLink(j10, image2, imageLink, imageLinkOpenInNewTab);
|
|
@@ -24409,9 +24500,11 @@ init_constants();
|
|
|
24409
24500
|
init_dom2();
|
|
24410
24501
|
init_global2();
|
|
24411
24502
|
init_utils3();
|
|
24503
|
+
init_css();
|
|
24412
24504
|
|
|
24413
24505
|
// node_modules/jodit/esm/plugins/indent/config.js
|
|
24414
24506
|
init_dom2();
|
|
24507
|
+
init_css();
|
|
24415
24508
|
init_config();
|
|
24416
24509
|
|
|
24417
24510
|
// node_modules/jodit/esm/plugins/indent/icons/indent.svg.js
|
|
@@ -24448,7 +24541,8 @@ Config.prototype.controls.outdent = {
|
|
|
24448
24541
|
const currentBox = Dom.closest(current, Dom.isBlock, editor.editor);
|
|
24449
24542
|
if (currentBox) {
|
|
24450
24543
|
const arrow = getKey(editor.o.direction, currentBox);
|
|
24451
|
-
|
|
24544
|
+
const value = cssInline(currentBox, arrow);
|
|
24545
|
+
return !value || parseInt(value, 10) <= 0;
|
|
24452
24546
|
}
|
|
24453
24547
|
return true;
|
|
24454
24548
|
},
|
|
@@ -24466,9 +24560,10 @@ var applyIndentToBox = (processedElements, currentBox, editor, command) => {
|
|
|
24466
24560
|
}
|
|
24467
24561
|
const key3 = getKey(editor.o.direction, currentBox);
|
|
24468
24562
|
processedElements.add(currentBox);
|
|
24469
|
-
|
|
24563
|
+
const current = cssInline(currentBox, key3);
|
|
24564
|
+
let value = current ? parseInt(current, 10) : 0;
|
|
24470
24565
|
value += editor.o.indentMargin * (command === "outdent" ? -1 : 1);
|
|
24471
|
-
currentBox
|
|
24566
|
+
css(currentBox, key3, value > 0 ? value : "");
|
|
24472
24567
|
if (!attr(currentBox, "style")) {
|
|
24473
24568
|
attr(currentBox, "style", null);
|
|
24474
24569
|
}
|
|
@@ -26150,8 +26245,10 @@ function writeImage(a79, content_input, textWasChanged, url_input) {
|
|
|
26150
26245
|
|
|
26151
26246
|
// node_modules/jodit/esm/plugins/media/media.js
|
|
26152
26247
|
init_constants();
|
|
26248
|
+
init_dom();
|
|
26153
26249
|
init_global2();
|
|
26154
26250
|
init_utils3();
|
|
26251
|
+
init_css();
|
|
26155
26252
|
|
|
26156
26253
|
// node_modules/jodit/esm/plugins/media/config.js
|
|
26157
26254
|
init_config();
|
|
@@ -26174,13 +26271,15 @@ function media(editor) {
|
|
|
26174
26271
|
[`data-${keyFake}`]: 1
|
|
26175
26272
|
});
|
|
26176
26273
|
attr(wrapper, "style", attr(element, "style"));
|
|
26177
|
-
wrapper
|
|
26178
|
-
|
|
26179
|
-
|
|
26274
|
+
css(wrapper, {
|
|
26275
|
+
display: cssInline(element, "display") === "inline-block" ? "inline-block" : "block",
|
|
26276
|
+
width: element.offsetWidth,
|
|
26277
|
+
height: element.offsetHeight
|
|
26278
|
+
});
|
|
26180
26279
|
if (element.parentNode) {
|
|
26181
|
-
|
|
26280
|
+
Dom.before(element, wrapper);
|
|
26182
26281
|
}
|
|
26183
|
-
|
|
26282
|
+
Dom.append(wrapper, element);
|
|
26184
26283
|
element = wrapper;
|
|
26185
26284
|
}
|
|
26186
26285
|
editor.e.off(element, "mousedown.select touchstart.select").on(element, "mousedown.select touchstart.select", () => {
|
|
@@ -26214,6 +26313,7 @@ init_helpers();
|
|
|
26214
26313
|
// node_modules/jodit/esm/plugins/mobile/config.js
|
|
26215
26314
|
init_constants();
|
|
26216
26315
|
init_helpers();
|
|
26316
|
+
init_css();
|
|
26217
26317
|
init_config();
|
|
26218
26318
|
Config.prototype.mobileTapTimeout = 300;
|
|
26219
26319
|
Config.prototype.toolbarAdaptive = true;
|
|
@@ -26334,7 +26434,7 @@ Config.prototype.controls.dots = {
|
|
|
26334
26434
|
if (buttons && store2) {
|
|
26335
26435
|
store2.toolbar.build(splitArray(buttons));
|
|
26336
26436
|
const w9 = ((_b = (_a2 = editor.toolbar) === null || _a2 === void 0 ? void 0 : _a2.firstButton) === null || _b === void 0 ? void 0 : _b.container.offsetWidth) || 36;
|
|
26337
|
-
store2.toolbar.container
|
|
26437
|
+
css(store2.toolbar.container, "width", (w9 + 4) * 3);
|
|
26338
26438
|
}
|
|
26339
26439
|
}
|
|
26340
26440
|
}
|
|
@@ -27032,10 +27132,10 @@ var pasteStorage = class extends Plugin {
|
|
|
27032
27132
|
}
|
|
27033
27133
|
this.dialog || this.createDialog();
|
|
27034
27134
|
if (this.listBox) {
|
|
27035
|
-
this.listBox
|
|
27135
|
+
Dom.detach(this.listBox);
|
|
27036
27136
|
}
|
|
27037
27137
|
if (this.previewBox) {
|
|
27038
|
-
this.previewBox
|
|
27138
|
+
Dom.detach(this.previewBox);
|
|
27039
27139
|
}
|
|
27040
27140
|
this.list.forEach((html, index) => {
|
|
27041
27141
|
const a79 = this.j.c.element("a");
|
|
@@ -27044,7 +27144,7 @@ var pasteStorage = class extends Plugin {
|
|
|
27044
27144
|
attr(a79, "href", "#");
|
|
27045
27145
|
attr(a79, "data-index", index.toString());
|
|
27046
27146
|
attr(a79, "tab-index", "-1");
|
|
27047
|
-
this.listBox && this.listBox
|
|
27147
|
+
this.listBox && Dom.append(this.listBox, a79);
|
|
27048
27148
|
});
|
|
27049
27149
|
this.dialog && this.dialog.open();
|
|
27050
27150
|
this.j.async.setTimeout(() => {
|
|
@@ -27062,8 +27162,8 @@ var pasteStorage = class extends Plugin {
|
|
|
27062
27162
|
this.container.classList.add("jodit-paste-storage");
|
|
27063
27163
|
this.listBox = this.j.c.div();
|
|
27064
27164
|
this.previewBox = this.j.c.div();
|
|
27065
|
-
this.container
|
|
27066
|
-
this.container
|
|
27165
|
+
Dom.append(this.container, this.listBox);
|
|
27166
|
+
Dom.append(this.container, this.previewBox);
|
|
27067
27167
|
this.dialog.setHeader(this.j.i18n("Choose Content to Paste"));
|
|
27068
27168
|
this.dialog.setContent(this.container);
|
|
27069
27169
|
this.dialog.setFooter([pasteButton, cancelButton]);
|
|
@@ -27174,8 +27274,10 @@ var placeholder = class extends Plugin {
|
|
|
27174
27274
|
}
|
|
27175
27275
|
this.placeholderElm = editor.c.fromHTML(`<span data-ref="placeholder" style="display: none;" class="jodit-placeholder">${editor.i18n(editor.o.placeholder)}</span>`);
|
|
27176
27276
|
if (editor.o.direction === "rtl") {
|
|
27177
|
-
this.placeholderElm
|
|
27178
|
-
|
|
27277
|
+
css(this.placeholderElm, {
|
|
27278
|
+
right: 0,
|
|
27279
|
+
direction: "rtl"
|
|
27280
|
+
});
|
|
27179
27281
|
}
|
|
27180
27282
|
editor.e.on("readonly", (isReadOnly) => {
|
|
27181
27283
|
if (isReadOnly) {
|
|
@@ -27195,17 +27297,21 @@ var placeholder = class extends Plugin {
|
|
|
27195
27297
|
const current = editor.s.current(), wrapper = current && Dom.closest(current, Dom.isBlock, editor.editor) || editor.editor;
|
|
27196
27298
|
const style = editor.ew.getComputedStyle(wrapper);
|
|
27197
27299
|
const styleEditor = editor.ew.getComputedStyle(editor.editor);
|
|
27198
|
-
editor.workplace
|
|
27300
|
+
Dom.append(editor.workplace, this.placeholderElm);
|
|
27199
27301
|
const { firstChild } = editor.editor;
|
|
27200
27302
|
if (Dom.isElement(firstChild) && !isMarker(firstChild)) {
|
|
27201
27303
|
const style2 = editor.ew.getComputedStyle(firstChild);
|
|
27202
27304
|
marginTop = parseInt(style2.getPropertyValue("margin-top"), 10);
|
|
27203
27305
|
marginLeft = parseInt(style2.getPropertyValue("margin-left"), 10);
|
|
27204
|
-
this.placeholderElm
|
|
27205
|
-
|
|
27306
|
+
css(this.placeholderElm, {
|
|
27307
|
+
fontSize: parseInt(style2.getPropertyValue("font-size"), 10),
|
|
27308
|
+
lineHeight: style2.getPropertyValue("line-height")
|
|
27309
|
+
});
|
|
27206
27310
|
} else {
|
|
27207
|
-
this.placeholderElm
|
|
27208
|
-
|
|
27311
|
+
css(this.placeholderElm, {
|
|
27312
|
+
fontSize: parseInt(style.getPropertyValue("font-size"), 10),
|
|
27313
|
+
lineHeight: style.getPropertyValue("line-height")
|
|
27314
|
+
});
|
|
27209
27315
|
}
|
|
27210
27316
|
css(this.placeholderElm, {
|
|
27211
27317
|
display: "block",
|
|
@@ -27397,7 +27503,7 @@ Config.prototype.controls.print = {
|
|
|
27397
27503
|
height: 0,
|
|
27398
27504
|
border: 0
|
|
27399
27505
|
});
|
|
27400
|
-
getContainer(editor, Config)
|
|
27506
|
+
Dom.append(getContainer(editor, Config), iframe2);
|
|
27401
27507
|
const afterFinishPrint = () => {
|
|
27402
27508
|
editor.e.off(editor.ow, "mousemove", afterFinishPrint);
|
|
27403
27509
|
Dom.safeRemove(iframe2);
|
|
@@ -27419,7 +27525,7 @@ Config.prototype.controls.print = {
|
|
|
27419
27525
|
-webkit-print-color-adjust: exact;
|
|
27420
27526
|
}
|
|
27421
27527
|
}`;
|
|
27422
|
-
myWindow.document.head
|
|
27528
|
+
Dom.append(myWindow.document.head, style);
|
|
27423
27529
|
myWindow.focus();
|
|
27424
27530
|
myWindow.print();
|
|
27425
27531
|
}
|
|
@@ -27497,6 +27603,7 @@ init_decorators();
|
|
|
27497
27603
|
init_dom();
|
|
27498
27604
|
init_global2();
|
|
27499
27605
|
init_helpers();
|
|
27606
|
+
init_css();
|
|
27500
27607
|
|
|
27501
27608
|
// node_modules/jodit/esm/plugins/resize-cells/config.js
|
|
27502
27609
|
init_config();
|
|
@@ -27547,7 +27654,7 @@ var resizeCells = class extends Plugin {
|
|
|
27547
27654
|
}
|
|
27548
27655
|
showResizeHandle() {
|
|
27549
27656
|
this.j.async.clearTimeout(this.hideTimeout);
|
|
27550
|
-
this.j.workplace
|
|
27657
|
+
Dom.append(this.j.workplace, this.resizeHandler);
|
|
27551
27658
|
}
|
|
27552
27659
|
hideResizeHandle() {
|
|
27553
27660
|
this.hideTimeout = this.j.async.setTimeout(() => {
|
|
@@ -27608,7 +27715,7 @@ var resizeCells = class extends Plugin {
|
|
|
27608
27715
|
x11 = this.maxX;
|
|
27609
27716
|
}
|
|
27610
27717
|
this.resizeDelta = x11 - this.startX + (!this.j.o.iframe ? 0 : workplacePosition.left);
|
|
27611
|
-
this.resizeHandler
|
|
27718
|
+
css(this.resizeHandler, "left", x11 - (this.j.o.iframe ? 0 : workplacePosition.left) + "px");
|
|
27612
27719
|
const sel = this.j.s.sel;
|
|
27613
27720
|
sel && sel.removeAllRanges();
|
|
27614
27721
|
}
|
|
@@ -27656,12 +27763,14 @@ var resizeCells = class extends Plugin {
|
|
|
27656
27763
|
const rightSide = !this.wholeTable;
|
|
27657
27764
|
const needChangeWidth = this.isRTL ? !rightSide : rightSide;
|
|
27658
27765
|
if (needChangeWidth) {
|
|
27659
|
-
this.workTable
|
|
27766
|
+
css(this.workTable, "width", (width + delta) / parentWidth * 100 + "%");
|
|
27660
27767
|
} else {
|
|
27661
27768
|
const side = this.isRTL ? "marginRight" : "marginLeft";
|
|
27662
27769
|
const margin = parseInt(this.j.ew.getComputedStyle(this.workTable)[side] || "0", 10);
|
|
27663
|
-
this.workTable
|
|
27664
|
-
|
|
27770
|
+
css(this.workTable, {
|
|
27771
|
+
width: (width - delta) / parentWidth * 100 + "%",
|
|
27772
|
+
[side]: (margin + delta) / parentWidth * 100 + "%"
|
|
27773
|
+
});
|
|
27665
27774
|
}
|
|
27666
27775
|
}
|
|
27667
27776
|
/**
|
|
@@ -27685,7 +27794,7 @@ var resizeCells = class extends Plugin {
|
|
|
27685
27794
|
return;
|
|
27686
27795
|
}
|
|
27687
27796
|
const workplacePosition = offset(this.j.workplace, this.j, this.j.od, true), parentBox = offset(table2, this.j, this.j.ed);
|
|
27688
|
-
this.resizeHandler
|
|
27797
|
+
css(this.resizeHandler, "left", (offsetX <= NEARBY ? box.left : box.left + box.width) - workplacePosition.left + delta + "px");
|
|
27689
27798
|
Object.assign(this.resizeHandler.style, {
|
|
27690
27799
|
height: parentBox.height + "px",
|
|
27691
27800
|
top: parentBox.top - workplacePosition.top + "px"
|
|
@@ -27713,7 +27822,7 @@ var resizeCells = class extends Plugin {
|
|
|
27713
27822
|
const parent = Dom.up(this.workCell, (elm) => Dom.isTag(elm, "table"), editor.editor);
|
|
27714
27823
|
if (parent) {
|
|
27715
27824
|
const parentBox = parent.getBoundingClientRect();
|
|
27716
|
-
this.resizeHandler
|
|
27825
|
+
css(this.resizeHandler, "top", parentBox.top + "px");
|
|
27717
27826
|
}
|
|
27718
27827
|
}).on("beforeSetMode.resize-cells", () => {
|
|
27719
27828
|
const tableModule = this.module;
|
|
@@ -27775,6 +27884,7 @@ init_decorators();
|
|
|
27775
27884
|
init_dom2();
|
|
27776
27885
|
init_global2();
|
|
27777
27886
|
init_helpers();
|
|
27887
|
+
init_css();
|
|
27778
27888
|
init_plugin2();
|
|
27779
27889
|
|
|
27780
27890
|
// node_modules/jodit/esm/plugins/resize-handler/config.js
|
|
@@ -27816,9 +27926,9 @@ var resizeHandler = class extends Plugin {
|
|
|
27816
27926
|
editor.statusbar.setMod("resize-handle", true);
|
|
27817
27927
|
editor.statusbar.show();
|
|
27818
27928
|
editor.e.on("toggleFullSize.resizeHandler", () => {
|
|
27819
|
-
this.handle
|
|
27929
|
+
css(this.handle, "display", editor.isFullSize ? "none" : "block");
|
|
27820
27930
|
}).on(this.handle, "mousedown touchstart", this.onHandleResizeStart).on(editor.ow, "mouseup touchend", this.onHandleResizeEnd);
|
|
27821
|
-
editor.container
|
|
27931
|
+
Dom.append(editor.container, this.handle);
|
|
27822
27932
|
}
|
|
27823
27933
|
}
|
|
27824
27934
|
/**
|
|
@@ -27890,6 +28000,7 @@ init_decorators();
|
|
|
27890
28000
|
init_dom();
|
|
27891
28001
|
init_global2();
|
|
27892
28002
|
init_helpers();
|
|
28003
|
+
init_css();
|
|
27893
28004
|
init_plugin();
|
|
27894
28005
|
|
|
27895
28006
|
// node_modules/jodit/esm/plugins/resizer/config.js
|
|
@@ -27957,7 +28068,7 @@ var resizer = class extends Plugin {
|
|
|
27957
28068
|
}
|
|
27958
28069
|
if (this.element && this.rect) {
|
|
27959
28070
|
const workplacePosition = this.getWorkplacePosition();
|
|
27960
|
-
const pos = offset(this.element, this.j, this.j.ed), left = parseInt(this.rect
|
|
28071
|
+
const pos = offset(this.element, this.j, this.j.ed), left = parseInt(cssInline(this.rect, "left") || "0", 10), top = parseInt(cssInline(this.rect, "top") || "0", 10), w9 = this.rect.offsetWidth, h61 = this.rect.offsetHeight;
|
|
27961
28072
|
const newTop = pos.top - workplacePosition.top, newLeft = pos.left - workplacePosition.left;
|
|
27962
28073
|
if (top !== newTop || left !== newLeft || w9 !== this.element.offsetWidth || h61 !== this.element.offsetHeight) {
|
|
27963
28074
|
css(this.rect, {
|
|
@@ -27976,7 +28087,7 @@ var resizer = class extends Plugin {
|
|
|
27976
28087
|
}
|
|
27977
28088
|
};
|
|
27978
28089
|
this.hideSizeViewer = () => {
|
|
27979
|
-
this.sizeViewer
|
|
28090
|
+
css(this.sizeViewer, "opacity", "0");
|
|
27980
28091
|
};
|
|
27981
28092
|
}
|
|
27982
28093
|
/** @override */
|
|
@@ -28018,7 +28129,7 @@ var resizer = class extends Plugin {
|
|
|
28018
28129
|
return;
|
|
28019
28130
|
}
|
|
28020
28131
|
const width = attr(image2, "width");
|
|
28021
|
-
if (width && !
|
|
28132
|
+
if (width && !cssInline(image2, "width")) {
|
|
28022
28133
|
css(image2, "width", width);
|
|
28023
28134
|
attr(image2, "width", null);
|
|
28024
28135
|
}
|
|
@@ -28150,7 +28261,7 @@ var resizer = class extends Plugin {
|
|
|
28150
28261
|
if (changeAttrs) {
|
|
28151
28262
|
attr(element, key3, value);
|
|
28152
28263
|
}
|
|
28153
|
-
if (!changeAttrs || element
|
|
28264
|
+
if (!changeAttrs || cssInline(element, key3)) {
|
|
28154
28265
|
css(element, key3, value);
|
|
28155
28266
|
}
|
|
28156
28267
|
}
|
|
@@ -28199,14 +28310,14 @@ var resizer = class extends Plugin {
|
|
|
28199
28310
|
});
|
|
28200
28311
|
attr(wrapper, "style", attr(element, "style"));
|
|
28201
28312
|
css(wrapper, {
|
|
28202
|
-
display: element
|
|
28313
|
+
display: cssInline(element, "display") === "inline-block" ? "inline-block" : "block",
|
|
28203
28314
|
width: element.offsetWidth,
|
|
28204
28315
|
height: element.offsetHeight
|
|
28205
28316
|
});
|
|
28206
28317
|
if (element.parentNode) {
|
|
28207
|
-
|
|
28318
|
+
Dom.before(element, wrapper);
|
|
28208
28319
|
}
|
|
28209
|
-
|
|
28320
|
+
Dom.append(wrapper, element);
|
|
28210
28321
|
this.j.e.on(wrapper, "click", () => {
|
|
28211
28322
|
attr(wrapper, "data-jodit-wrapper_active", true);
|
|
28212
28323
|
});
|
|
@@ -28236,7 +28347,7 @@ var resizer = class extends Plugin {
|
|
|
28236
28347
|
this.hideSizeViewer();
|
|
28237
28348
|
return;
|
|
28238
28349
|
}
|
|
28239
|
-
this.sizeViewer
|
|
28350
|
+
css(this.sizeViewer, "opacity", "1");
|
|
28240
28351
|
this.sizeViewer.textContent = `${w9} x ${h61}`;
|
|
28241
28352
|
this.j.async.setTimeout(this.hideSizeViewer, {
|
|
28242
28353
|
timeout: this.j.o.resizer.hideSizeTimeout,
|
|
@@ -28253,10 +28364,10 @@ var resizer = class extends Plugin {
|
|
|
28253
28364
|
this.isShown = true;
|
|
28254
28365
|
if (!this.rect.parentNode) {
|
|
28255
28366
|
markOwner(this.j, this.rect);
|
|
28256
|
-
this.j.workplace
|
|
28367
|
+
Dom.append(this.j.workplace, this.rect);
|
|
28257
28368
|
}
|
|
28258
28369
|
if (this.j.isFullSize) {
|
|
28259
|
-
this.rect
|
|
28370
|
+
css(this.rect, "zIndex", css(this.j.container, "zIndex").toString());
|
|
28260
28371
|
}
|
|
28261
28372
|
this.updateSize();
|
|
28262
28373
|
}
|
|
@@ -28384,7 +28495,7 @@ function ensureHighlightStyle(doc, useHighlightAPI) {
|
|
|
28384
28495
|
} catch (_a2) {
|
|
28385
28496
|
const style = doc.createElement("style");
|
|
28386
28497
|
style.textContent = rule;
|
|
28387
|
-
doc.head
|
|
28498
|
+
Dom.append(doc.head, style);
|
|
28388
28499
|
}
|
|
28389
28500
|
}
|
|
28390
28501
|
function highlightTextRanges(jodit, rng, restRanges, ci, root) {
|
|
@@ -28692,7 +28803,7 @@ var UISearch = class UISearch2 extends UIElement {
|
|
|
28692
28803
|
}
|
|
28693
28804
|
open(query, replace, searchAndReplace = false) {
|
|
28694
28805
|
if (!this.isOpened) {
|
|
28695
|
-
this.j.workplace
|
|
28806
|
+
Dom.append(this.j.workplace, this.container);
|
|
28696
28807
|
this.isOpened = true;
|
|
28697
28808
|
}
|
|
28698
28809
|
this.calcSticky(this.j.e.fire("getStickyState.sticky") || false);
|
|
@@ -29167,7 +29278,7 @@ var select = class extends Plugin {
|
|
|
29167
29278
|
}
|
|
29168
29279
|
const text2 = range.startContainer;
|
|
29169
29280
|
const li = text2.parentNode;
|
|
29170
|
-
if (!Dom.isTag(li, "li") || !(li
|
|
29281
|
+
if (!Dom.isTag(li, "li") || !Dom.first(li, (node) => Dom.isTag(node, LIST_TAGS))) {
|
|
29171
29282
|
return;
|
|
29172
29283
|
}
|
|
29173
29284
|
const measure = this.j.ed.createRange();
|
|
@@ -29331,7 +29442,7 @@ var selectCells = class extends Plugin {
|
|
|
29331
29442
|
this.__tableModule.removeSelection(cell);
|
|
29332
29443
|
} else {
|
|
29333
29444
|
if (!cell.firstChild) {
|
|
29334
|
-
|
|
29445
|
+
Dom.append(cell, this.j.createInside.element("br"));
|
|
29335
29446
|
}
|
|
29336
29447
|
this.__tableModule.addSelection(cell);
|
|
29337
29448
|
}
|
|
@@ -29352,7 +29463,7 @@ var selectCells = class extends Plugin {
|
|
|
29352
29463
|
return;
|
|
29353
29464
|
}
|
|
29354
29465
|
if (!cell.firstChild) {
|
|
29355
|
-
|
|
29466
|
+
Dom.append(cell, this.j.createInside.element("br"));
|
|
29356
29467
|
}
|
|
29357
29468
|
this.__isSelectionMode = true;
|
|
29358
29469
|
this.__selectedCell = cell;
|
|
@@ -29417,10 +29528,9 @@ var selectCells = class extends Plugin {
|
|
|
29417
29528
|
e42.stopPropagation();
|
|
29418
29529
|
(() => {
|
|
29419
29530
|
const n57 = this.j.createInside.fromHTML('<div style="color:rgba(0,0,0,0.01);width:0;height:0"> </div>');
|
|
29420
|
-
|
|
29531
|
+
Dom.append(cell, n57);
|
|
29421
29532
|
this.j.async.setTimeout(() => {
|
|
29422
|
-
|
|
29423
|
-
(_a3 = n57.parentNode) === null || _a3 === void 0 ? void 0 : _a3.removeChild(n57);
|
|
29533
|
+
Dom.safeRemove(n57);
|
|
29424
29534
|
}, this.j.defaultTimeout / 5);
|
|
29425
29535
|
})();
|
|
29426
29536
|
}
|
|
@@ -29504,7 +29614,7 @@ var selectCells = class extends Plugin {
|
|
|
29504
29614
|
const cells = this.__tableModule.getAllSelectedCells();
|
|
29505
29615
|
cells.forEach((td) => {
|
|
29506
29616
|
Dom.detach(td);
|
|
29507
|
-
|
|
29617
|
+
Dom.append(td, this.j.createInside.element("br"));
|
|
29508
29618
|
});
|
|
29509
29619
|
this.unselectCells();
|
|
29510
29620
|
this.j.s.setCursorIn(cells[0]);
|
|
@@ -29854,6 +29964,7 @@ init_helpers();
|
|
|
29854
29964
|
|
|
29855
29965
|
// node_modules/jodit/esm/plugins/source/editor/engines/ace.js
|
|
29856
29966
|
init_constants();
|
|
29967
|
+
init_dom();
|
|
29857
29968
|
init_helpers();
|
|
29858
29969
|
|
|
29859
29970
|
// node_modules/jodit/esm/plugins/source/editor/sourceEditor.js
|
|
@@ -29953,7 +30064,7 @@ var AceEditor = class extends SourceEditor {
|
|
|
29953
30064
|
return;
|
|
29954
30065
|
}
|
|
29955
30066
|
const fakeMirror = this.j.c.div("jodit-source__mirror-fake");
|
|
29956
|
-
this.container
|
|
30067
|
+
Dom.append(this.container, fakeMirror);
|
|
29957
30068
|
const ace = editor.ow.ace;
|
|
29958
30069
|
this.instance = ace.edit(fakeMirror);
|
|
29959
30070
|
if (editor.o.direction === "rtl") {
|
|
@@ -30091,8 +30202,8 @@ var TextAreaEditor = class extends SourceEditor {
|
|
|
30091
30202
|
constructor() {
|
|
30092
30203
|
super(...arguments);
|
|
30093
30204
|
this.autosize = this.j.async.debounce(() => {
|
|
30094
|
-
this.instance
|
|
30095
|
-
this.instance
|
|
30205
|
+
css(this.instance, "height", "auto");
|
|
30206
|
+
css(this.instance, "height", this.instance.scrollHeight);
|
|
30096
30207
|
}, this.j.defaultTimeout, true);
|
|
30097
30208
|
}
|
|
30098
30209
|
init(editor) {
|
|
@@ -30100,7 +30211,7 @@ var TextAreaEditor = class extends SourceEditor {
|
|
|
30100
30211
|
class: "jodit-source__mirror",
|
|
30101
30212
|
dir: editor.o.direction === "rtl" ? "rtl" : void 0
|
|
30102
30213
|
});
|
|
30103
|
-
this.container
|
|
30214
|
+
Dom.append(this.container, this.instance);
|
|
30104
30215
|
editor.e.on(this.instance, "mousedown keydown touchstart input", editor.async.debounce(this.toWYSIWYG, editor.defaultTimeout)).on("setMinHeight.source", (minHeightD) => {
|
|
30105
30216
|
css(this.instance, "minHeight", minHeightD);
|
|
30106
30217
|
}).on(this.instance, "change keydown mousedown touchstart input", this.autosize).on("afterSetMode.source", this.autosize).on(this.instance, "mousedown focus blur", (e42) => {
|
|
@@ -30384,9 +30495,9 @@ var source = class extends Plugin {
|
|
|
30384
30495
|
/** @override */
|
|
30385
30496
|
afterInit(editor) {
|
|
30386
30497
|
this.mirrorContainer = editor.c.div("jodit-source");
|
|
30387
|
-
editor.workplace
|
|
30498
|
+
Dom.append(editor.workplace, this.mirrorContainer);
|
|
30388
30499
|
editor.e.on("afterAddPlace changePlace afterInit", () => {
|
|
30389
|
-
editor.workplace
|
|
30500
|
+
Dom.append(editor.workplace, this.mirrorContainer);
|
|
30390
30501
|
});
|
|
30391
30502
|
this.sourceEditor = createSourceEditor("area", editor, this.mirrorContainer, this.toWYSIWYG, this.fromWYSIWYG);
|
|
30392
30503
|
editor.e.on(editor.ow, "keydown", (e42) => {
|
|
@@ -30898,7 +31009,7 @@ var sticky = class extends Plugin {
|
|
|
30898
31009
|
this.__createDummy = (toolbar) => {
|
|
30899
31010
|
this.__dummyBox = this.j.c.div();
|
|
30900
31011
|
this.__dummyBox.classList.add("jodit_sticky-dummy_toolbar");
|
|
30901
|
-
|
|
31012
|
+
Dom.before(toolbar, this.__dummyBox);
|
|
30902
31013
|
};
|
|
30903
31014
|
this.addSticky = (toolbar) => {
|
|
30904
31015
|
if (!this.__isToolbarStuck) {
|
|
@@ -30976,6 +31087,7 @@ init_utils3();
|
|
|
30976
31087
|
init_plugin();
|
|
30977
31088
|
|
|
30978
31089
|
// node_modules/jodit/esm/plugins/symbols/config.js
|
|
31090
|
+
init_dom();
|
|
30979
31091
|
init_config();
|
|
30980
31092
|
|
|
30981
31093
|
// node_modules/jodit/esm/plugins/symbols/symbols.svg.js
|
|
@@ -31205,12 +31317,12 @@ Config.prototype.controls.symbols = {
|
|
|
31205
31317
|
if (editor.o.usePopupForSpecialCharacters) {
|
|
31206
31318
|
const box = editor.c.div();
|
|
31207
31319
|
box.classList.add("jodit-symbols");
|
|
31208
|
-
|
|
31320
|
+
Dom.append(box, container);
|
|
31209
31321
|
editor.e.on(container, "close_dialog", close);
|
|
31210
31322
|
return box;
|
|
31211
31323
|
}
|
|
31212
31324
|
editor.alert(container, "Select Special Character", void 0, "jodit-symbols").bindDestruct(editor);
|
|
31213
|
-
const a79 = container.
|
|
31325
|
+
const a79 = Dom.first(container, (node) => Dom.isTag(node, "a"));
|
|
31214
31326
|
a79 && a79.focus();
|
|
31215
31327
|
}
|
|
31216
31328
|
return;
|
|
@@ -31465,8 +31577,8 @@ var symbols = class extends Plugin {
|
|
|
31465
31577
|
<div class="jodit-symbols__preview"></div>
|
|
31466
31578
|
</div>
|
|
31467
31579
|
</div>`);
|
|
31468
|
-
const preview2 = container.
|
|
31469
|
-
const table2 = container.
|
|
31580
|
+
const preview2 = Dom.first(container, (node) => Dom.isHTMLElement(node) && node.classList.contains("jodit-symbols__preview"));
|
|
31581
|
+
const table2 = Dom.first(container, (node) => Dom.isTag(node, "table"));
|
|
31470
31582
|
const body = table2.tBodies[0];
|
|
31471
31583
|
const chars = [];
|
|
31472
31584
|
for (let i56 = 0; i56 < jodit.o.specialCharacters.length; ) {
|
|
@@ -31479,10 +31591,10 @@ var symbols = class extends Plugin {
|
|
|
31479
31591
|
tabindex="-1"
|
|
31480
31592
|
>${jodit.o.specialCharacters[i56]}</a>`);
|
|
31481
31593
|
chars.push(a79);
|
|
31482
|
-
|
|
31483
|
-
|
|
31594
|
+
Dom.append(td, a79);
|
|
31595
|
+
Dom.append(tr, td);
|
|
31484
31596
|
}
|
|
31485
|
-
|
|
31597
|
+
Dom.append(body, tr);
|
|
31486
31598
|
}
|
|
31487
31599
|
const self2 = this;
|
|
31488
31600
|
jodit.e.on(chars, "focus", function() {
|
|
@@ -31709,11 +31821,11 @@ var UiAiAssistant = class UiAiAssistant2 extends UIElement {
|
|
|
31709
31821
|
this.__results.classList.remove(hideMod);
|
|
31710
31822
|
this.__buttons.classList.remove(hideMod);
|
|
31711
31823
|
Dom.detach(this.__results);
|
|
31712
|
-
this.__results
|
|
31824
|
+
Dom.append(this.__results, this.__spinner);
|
|
31713
31825
|
this.__insertButton.focus();
|
|
31714
31826
|
});
|
|
31715
|
-
this.__buttons
|
|
31716
|
-
this.__body
|
|
31827
|
+
Dom.append(this.__buttons, buttonsBLock.container);
|
|
31828
|
+
Dom.append(this.__body, this.__formAiAssistant.container);
|
|
31717
31829
|
this.onChangePromptValue();
|
|
31718
31830
|
}
|
|
31719
31831
|
render() {
|
|
@@ -31750,7 +31862,7 @@ var UiAiAssistant = class UiAiAssistant2 extends UIElement {
|
|
|
31750
31862
|
this.setMod("loading", false);
|
|
31751
31863
|
Dom.detach(this.__results);
|
|
31752
31864
|
this.__aiResult = result;
|
|
31753
|
-
this.__results
|
|
31865
|
+
Dom.append(this.__results, this.jodit.c.fromHTML(result));
|
|
31754
31866
|
this.__toggleSubmitButton(false);
|
|
31755
31867
|
this.__toggleInsertButton(false);
|
|
31756
31868
|
}
|
|
@@ -32009,7 +32121,13 @@ Config.prototype.controls.table = {
|
|
|
32009
32121
|
}
|
|
32010
32122
|
return out.join("");
|
|
32011
32123
|
};
|
|
32012
|
-
const form2 = editor.c.fromHTML('<form class="jodit-form jodit-form__inserter"><div class="jodit-form__table-creator-box"><div class="jodit-form__container"></div><div class="jodit-form__options">' + generateExtraClasses() + '</div></div><label class="jodit-form__center"><span>1</span> × <span>1</span></label></form>'),
|
|
32124
|
+
const form2 = editor.c.fromHTML('<form class="jodit-form jodit-form__inserter"><div class="jodit-form__table-creator-box"><div class="jodit-form__container"></div><div class="jodit-form__options">' + generateExtraClasses() + '</div></div><label class="jodit-form__center"><span>1</span> × <span>1</span></label></form>'), spans = (() => {
|
|
32125
|
+
const list = [];
|
|
32126
|
+
Dom.each(form2, (node) => {
|
|
32127
|
+
Dom.isTag(node, "span") && list.push(node);
|
|
32128
|
+
});
|
|
32129
|
+
return list;
|
|
32130
|
+
})(), [rows, cols] = spans, blocksContainer = Dom.first(form2, (node) => Dom.isHTMLElement(node) && node.classList.contains("jodit-form__container")), options2 = Dom.first(form2, (node) => Dom.isHTMLElement(node) && node.classList.contains("jodit-form__options")), cells = [];
|
|
32013
32131
|
const cnt = default_rows_count * default_cols_count;
|
|
32014
32132
|
attr(blocksContainer, {
|
|
32015
32133
|
role: "grid",
|
|
@@ -32045,7 +32163,7 @@ Config.prototype.controls.table = {
|
|
|
32045
32163
|
const k7 = parseInt(attr(cell, "-index") || "0", 10);
|
|
32046
32164
|
const rows_count = Math.ceil((k7 + 1) / default_cols_count), cols_count = k7 % default_cols_count + 1;
|
|
32047
32165
|
const crt = editor.createInside, tbody = crt.element("tbody"), table2 = crt.element("table");
|
|
32048
|
-
|
|
32166
|
+
Dom.append(table2, tbody);
|
|
32049
32167
|
let first_td = null, tr, td;
|
|
32050
32168
|
for (let i56 = 1; i56 <= rows_count; i56 += 1) {
|
|
32051
32169
|
tr = crt.element("tr");
|
|
@@ -32055,13 +32173,13 @@ Config.prototype.controls.table = {
|
|
|
32055
32173
|
first_td = td;
|
|
32056
32174
|
}
|
|
32057
32175
|
css(td, "width", (100 / cols_count).toFixed(4) + "%");
|
|
32058
|
-
|
|
32059
|
-
|
|
32060
|
-
|
|
32061
|
-
|
|
32176
|
+
Dom.append(td, crt.element("br"));
|
|
32177
|
+
Dom.append(tr, crt.text("\n"));
|
|
32178
|
+
Dom.append(tr, crt.text(" "));
|
|
32179
|
+
Dom.append(tr, td);
|
|
32062
32180
|
}
|
|
32063
|
-
|
|
32064
|
-
|
|
32181
|
+
Dom.append(tbody, crt.text("\n"));
|
|
32182
|
+
Dom.append(tbody, tr);
|
|
32065
32183
|
}
|
|
32066
32184
|
$$("input[type=checkbox]:checked", options2).forEach((input) => {
|
|
32067
32185
|
input.value.split(/[\s]+/).forEach((className) => {
|
|
@@ -32163,9 +32281,9 @@ Config.prototype.controls.table = {
|
|
|
32163
32281
|
const row = editor.c.div();
|
|
32164
32282
|
attr(row, "role", "row");
|
|
32165
32283
|
for (let j10 = 0; j10 < default_cols_count; j10 += 1) {
|
|
32166
|
-
|
|
32284
|
+
Dom.append(row, cells[i56 * default_cols_count + j10]);
|
|
32167
32285
|
}
|
|
32168
|
-
|
|
32286
|
+
Dom.append(blocksContainer, row);
|
|
32169
32287
|
}
|
|
32170
32288
|
if (cells[0]) {
|
|
32171
32289
|
cells[0].className = "hovered";
|
|
@@ -32214,7 +32332,7 @@ function tableKeyboardNavigation(editor) {
|
|
|
32214
32332
|
case KEY_LEFT: {
|
|
32215
32333
|
next = getNextCell();
|
|
32216
32334
|
if (!next) {
|
|
32217
|
-
tableModule.appendRow(table2, !isPrev ? false : table2.
|
|
32335
|
+
tableModule.appendRow(table2, !isPrev ? false : Dom.first(table2, (node) => Dom.isTag(node, "tr")), !isPrev);
|
|
32218
32336
|
next = getNextCell();
|
|
32219
32337
|
}
|
|
32220
32338
|
break;
|
|
@@ -32242,7 +32360,7 @@ function tableKeyboardNavigation(editor) {
|
|
|
32242
32360
|
editor.e.fire("hidePopup hideResizer");
|
|
32243
32361
|
if (!next.firstChild) {
|
|
32244
32362
|
const first = editor.createInside.element("br");
|
|
32245
|
-
|
|
32363
|
+
Dom.append(next, first);
|
|
32246
32364
|
editor.s.setCursorBefore(first);
|
|
32247
32365
|
} else {
|
|
32248
32366
|
if (key3 === KEY_TAB) {
|
|
@@ -32446,7 +32564,7 @@ var xpath = class extends Plugin {
|
|
|
32446
32564
|
name: "selectall"
|
|
32447
32565
|
}, this.j.o.controls.selectall));
|
|
32448
32566
|
this.selectAllButton.state.size = "tiny";
|
|
32449
|
-
this.container &&
|
|
32567
|
+
this.container && Dom.prepend(this.container, this.selectAllButton.container);
|
|
32450
32568
|
};
|
|
32451
32569
|
this.calcPathImd = () => {
|
|
32452
32570
|
if (this.isDestructed) {
|
|
@@ -32463,7 +32581,7 @@ var xpath = class extends Plugin {
|
|
|
32463
32581
|
name = elm.nodeName.toLowerCase();
|
|
32464
32582
|
xpth = getXPathByElement(elm, this.j.editor).replace(/^\//, "");
|
|
32465
32583
|
li = this.tpl(elm, xpth, name, this.j.i18n("Select %s", name));
|
|
32466
|
-
this.container && this.container
|
|
32584
|
+
this.container && Dom.prepend(this.container, li);
|
|
32467
32585
|
}
|
|
32468
32586
|
}, this.j.editor);
|
|
32469
32587
|
}
|
|
@@ -32853,6 +32971,7 @@ init_constants();
|
|
|
32853
32971
|
init_decorators();
|
|
32854
32972
|
init_global2();
|
|
32855
32973
|
init_helpers();
|
|
32974
|
+
init_css();
|
|
32856
32975
|
init_config();
|
|
32857
32976
|
var __decorate71 = function(decorators, target, key3, desc) {
|
|
32858
32977
|
var c74 = arguments.length, r60 = c74 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key3) : desc, d55;
|
|
@@ -33534,7 +33653,7 @@ var Jodit2 = Jodit_1 = class Jodit3 extends ViewWithToolbar {
|
|
|
33534
33653
|
this.setReadOnly(isDisabled || readOnly);
|
|
33535
33654
|
this.__wasReadOnly = readOnly;
|
|
33536
33655
|
if (this.editor) {
|
|
33537
|
-
this.editor
|
|
33656
|
+
attr(this.editor, "aria-disabled", isDisabled);
|
|
33538
33657
|
this.container.classList.toggle("jodit_disabled", isDisabled);
|
|
33539
33658
|
this.e.fire("disabled", isDisabled);
|
|
33540
33659
|
}
|
|
@@ -33558,9 +33677,9 @@ var Jodit2 = Jodit_1 = class Jodit3 extends ViewWithToolbar {
|
|
|
33558
33677
|
this.__wasReadOnly = isReadOnly;
|
|
33559
33678
|
this.o.readonly = isReadOnly;
|
|
33560
33679
|
if (isReadOnly) {
|
|
33561
|
-
this.editor && this.editor
|
|
33680
|
+
this.editor && attr(this.editor, "contenteditable", null);
|
|
33562
33681
|
} else {
|
|
33563
|
-
this.editor && this.editor
|
|
33682
|
+
this.editor && attr(this.editor, "contenteditable", true);
|
|
33564
33683
|
}
|
|
33565
33684
|
this.e && this.e.fire("readonly", isReadOnly);
|
|
33566
33685
|
}
|
|
@@ -33705,42 +33824,43 @@ var Jodit2 = Jodit_1 = class Jodit3 extends ViewWithToolbar {
|
|
|
33705
33824
|
const property = kebabCase(key3);
|
|
33706
33825
|
container.style.setProperty(`--jd-${property}`, styleValues[key3]);
|
|
33707
33826
|
});
|
|
33708
|
-
container
|
|
33827
|
+
attr(container, "contenteditable", false);
|
|
33709
33828
|
let buffer = null;
|
|
33710
33829
|
if (this.o.inline) {
|
|
33711
33830
|
if (["TEXTAREA", "INPUT"].indexOf(element.nodeName) === -1) {
|
|
33712
33831
|
container = element;
|
|
33713
|
-
element
|
|
33832
|
+
attr(element, __defaultClassesKey, element.className.toString());
|
|
33714
33833
|
buffer = container.innerHTML;
|
|
33715
|
-
container
|
|
33834
|
+
Dom.detach(container);
|
|
33716
33835
|
}
|
|
33717
33836
|
container.classList.add("jodit_inline");
|
|
33718
33837
|
container.classList.add("jodit-container");
|
|
33719
33838
|
}
|
|
33720
33839
|
if (element !== container) {
|
|
33721
|
-
|
|
33722
|
-
|
|
33840
|
+
const display = cssInline(element, "display");
|
|
33841
|
+
if (display) {
|
|
33842
|
+
attr(element, __defaultStyleDisplayKey, display);
|
|
33723
33843
|
}
|
|
33724
|
-
element
|
|
33844
|
+
css(element, "display", "none");
|
|
33725
33845
|
}
|
|
33726
33846
|
const SLOT = "workplace-slot";
|
|
33727
33847
|
const aboveSlot = this.c.div(this.getFullElName(SLOT, "above"), NOEDIT);
|
|
33728
|
-
aboveSlot
|
|
33848
|
+
attr(aboveSlot, "data-jodit-above-toolbar", "");
|
|
33729
33849
|
Dom.appendChildFirst(container, aboveSlot);
|
|
33730
33850
|
const topSlot = this.c.div(this.getFullElName(SLOT, "top"), NOEDIT);
|
|
33731
|
-
|
|
33851
|
+
Dom.append(container, topSlot);
|
|
33732
33852
|
const centerSlot = this.c.div(this.getFullElName(SLOT, "center"), NOEDIT);
|
|
33733
33853
|
const workplace = this.c.div("jodit-workplace", NOEDIT);
|
|
33734
33854
|
const leftSlot = this.c.div(this.getFullElName(SLOT, "left"), NOEDIT);
|
|
33735
33855
|
const rightSlot = this.c.div(this.getFullElName(SLOT, "right"), NOEDIT);
|
|
33736
|
-
|
|
33737
|
-
|
|
33738
|
-
|
|
33739
|
-
|
|
33856
|
+
Dom.append(centerSlot, leftSlot);
|
|
33857
|
+
Dom.append(centerSlot, workplace);
|
|
33858
|
+
Dom.append(centerSlot, rightSlot);
|
|
33859
|
+
Dom.append(container, centerSlot);
|
|
33740
33860
|
const bottomPanel = this.c.div(this.getFullElName(SLOT, "bottom"), NOEDIT);
|
|
33741
|
-
|
|
33861
|
+
Dom.append(container, bottomPanel);
|
|
33742
33862
|
if (element.parentNode && element !== container) {
|
|
33743
|
-
|
|
33863
|
+
Dom.before(element, container);
|
|
33744
33864
|
}
|
|
33745
33865
|
Object.defineProperty(element, "component", {
|
|
33746
33866
|
enumerable: false,
|
|
@@ -33752,7 +33872,7 @@ var Jodit2 = Jodit_1 = class Jodit3 extends ViewWithToolbar {
|
|
|
33752
33872
|
"aria-disabled": false,
|
|
33753
33873
|
tabindex: this.o.tabIndex
|
|
33754
33874
|
});
|
|
33755
|
-
|
|
33875
|
+
Dom.append(workplace, editor);
|
|
33756
33876
|
const currentPlace = {
|
|
33757
33877
|
editor,
|
|
33758
33878
|
element,
|
|
@@ -33796,7 +33916,7 @@ var Jodit2 = Jodit_1 = class Jodit3 extends ViewWithToolbar {
|
|
|
33796
33916
|
return callPromise(initResult, init2);
|
|
33797
33917
|
}
|
|
33798
33918
|
addDisclaimer(elm) {
|
|
33799
|
-
this.workplace
|
|
33919
|
+
Dom.append(this.workplace, elm);
|
|
33800
33920
|
}
|
|
33801
33921
|
/**
|
|
33802
33922
|
* Set current place object
|
|
@@ -33886,10 +34006,10 @@ var Jodit2 = Jodit_1 = class Jodit3 extends ViewWithToolbar {
|
|
|
33886
34006
|
const { editor } = this;
|
|
33887
34007
|
if (this.o.direction) {
|
|
33888
34008
|
const direction = this.o.direction.toLowerCase() === "rtl" ? "rtl" : "ltr";
|
|
33889
|
-
this.editor
|
|
33890
|
-
this.editor
|
|
33891
|
-
this.container
|
|
33892
|
-
this.container
|
|
34009
|
+
css(this.editor, "direction", direction);
|
|
34010
|
+
attr(this.editor, "dir", direction);
|
|
34011
|
+
css(this.container, "direction", direction);
|
|
34012
|
+
attr(this.container, "dir", direction);
|
|
33893
34013
|
this.toolbar.setDirection(direction);
|
|
33894
34014
|
}
|
|
33895
34015
|
this.e.on(editor, "mousedown touchstart focus", () => {
|
|
@@ -33966,20 +34086,20 @@ var Jodit2 = Jodit_1 = class Jodit3 extends ViewWithToolbar {
|
|
|
33966
34086
|
if (element.hasAttribute(__defaultStyleDisplayKey)) {
|
|
33967
34087
|
const display = attr(element, __defaultStyleDisplayKey);
|
|
33968
34088
|
if (display) {
|
|
33969
|
-
element
|
|
33970
|
-
element
|
|
34089
|
+
css(element, "display", display);
|
|
34090
|
+
attr(element, __defaultStyleDisplayKey, null);
|
|
33971
34091
|
}
|
|
33972
34092
|
} else {
|
|
33973
|
-
element
|
|
34093
|
+
css(element, "display", "");
|
|
33974
34094
|
}
|
|
33975
34095
|
} else {
|
|
33976
34096
|
if (element.hasAttribute(__defaultClassesKey)) {
|
|
33977
34097
|
element.className = attr(element, __defaultClassesKey) || "";
|
|
33978
|
-
element
|
|
34098
|
+
attr(element, __defaultClassesKey, null);
|
|
33979
34099
|
}
|
|
33980
34100
|
}
|
|
33981
34101
|
if (element.hasAttribute("style") && !attr(element, "style")) {
|
|
33982
|
-
element
|
|
34102
|
+
attr(element, "style", null);
|
|
33983
34103
|
}
|
|
33984
34104
|
statusbar.destruct();
|
|
33985
34105
|
this.e.off(container);
|
|
@@ -34473,7 +34593,7 @@ var SpeechRecognizeNative = class extends Plugin {
|
|
|
34473
34593
|
if (!this.messagePopup) {
|
|
34474
34594
|
this.messagePopup = this.j.create.div("jodit-speech-recognize__popup");
|
|
34475
34595
|
}
|
|
34476
|
-
this.j.workplace
|
|
34596
|
+
Dom.append(this.j.workplace, this.messagePopup);
|
|
34477
34597
|
this.j.async.clearTimeout(this.__hidePopupTimeout);
|
|
34478
34598
|
this.__hidePopupTimeout = this.j.async.setTimeout(() => {
|
|
34479
34599
|
Dom.safeRemove(this.messagePopup);
|
|
@@ -54240,15 +54360,16 @@ jodit/esm/core/helpers/checker/is-array.js:
|
|
|
54240
54360
|
jodit/esm/core/helpers/checker/is-string.js:
|
|
54241
54361
|
jodit/esm/core/helpers/checker/is-view-object.js:
|
|
54242
54362
|
jodit/esm/core/helpers/string/kebab-case.js:
|
|
54243
|
-
jodit/esm/core/helpers/checker/is-boolean.js:
|
|
54244
54363
|
jodit/esm/core/helpers/checker/is-window.js:
|
|
54245
54364
|
jodit/esm/core/helpers/checker/is-plain-object.js:
|
|
54365
|
+
jodit/esm/core/helpers/checker/is-boolean.js:
|
|
54246
54366
|
jodit/esm/core/helpers/checker/is-numeric.js:
|
|
54247
54367
|
jodit/esm/core/helpers/checker/is-void.js:
|
|
54248
54368
|
jodit/esm/core/helpers/color/color-to-hex.js:
|
|
54249
54369
|
jodit/esm/core/helpers/normalize/normalize-css-value.js:
|
|
54250
54370
|
jodit/esm/core/helpers/string/camel-case.js:
|
|
54251
54371
|
jodit/esm/core/helpers/utils/css.js:
|
|
54372
|
+
jodit/esm/core/helpers/utils/attr.js:
|
|
54252
54373
|
jodit/esm/core/helpers/utils/get-class-name.js:
|
|
54253
54374
|
jodit/esm/core/helpers/array/split-array.js:
|
|
54254
54375
|
jodit/esm/core/helpers/utils/error/errors/abort-error.js:
|
|
@@ -54268,7 +54389,6 @@ jodit/esm/core/event-emitter/global.js:
|
|
|
54268
54389
|
jodit/esm/core/helpers/checker/is-html.js:
|
|
54269
54390
|
jodit/esm/core/helpers/checker/is-set.js:
|
|
54270
54391
|
jodit/esm/core/helpers/string/trim.js:
|
|
54271
|
-
jodit/esm/core/helpers/utils/attr.js:
|
|
54272
54392
|
jodit/esm/core/helpers/utils/data-bind.js:
|
|
54273
54393
|
jodit/esm/core/helpers/checker/is-promise.js:
|
|
54274
54394
|
jodit/esm/core/helpers/utils/utils.js:
|