jodit-pro-react 5.5.90 → 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(() => {
|
|
@@ -17347,6 +17418,7 @@ function getSuitChild(style, font2) {
|
|
|
17347
17418
|
// node_modules/jodit/esm/core/selection/style/api/get-suit-parent.js
|
|
17348
17419
|
init_dom();
|
|
17349
17420
|
function getSuitParent(style, node, root) {
|
|
17421
|
+
var _a2;
|
|
17350
17422
|
const { parentNode } = node;
|
|
17351
17423
|
if (parentNode === root || !Dom.isHTMLElement(parentNode) || Dom.next(node, isNormalNode, parentNode) || Dom.prev(node, isNormalNode, parentNode)) {
|
|
17352
17424
|
return null;
|
|
@@ -17354,6 +17426,9 @@ function getSuitParent(style, node, root) {
|
|
|
17354
17426
|
if (style.isElementCommit && style.elementIsBlock && !Dom.isBlock(parentNode)) {
|
|
17355
17427
|
return getSuitParent(style, parentNode, root);
|
|
17356
17428
|
}
|
|
17429
|
+
if (Dom.isTag(parentNode, "li") && !style.isElementCommit && ((_a2 = style.options.attributes) === null || _a2 === void 0 ? void 0 : _a2.style)) {
|
|
17430
|
+
return parentNode;
|
|
17431
|
+
}
|
|
17357
17432
|
if (isSuitElement(style, parentNode, false) && (!Dom.isBlock(parentNode) || style.elementIsBlock)) {
|
|
17358
17433
|
return parentNode;
|
|
17359
17434
|
}
|
|
@@ -17373,6 +17448,7 @@ function isInsideInvisibleElement(font2, root) {
|
|
|
17373
17448
|
init_object_size();
|
|
17374
17449
|
init_utils3();
|
|
17375
17450
|
init_assert();
|
|
17451
|
+
init_attr();
|
|
17376
17452
|
function isSameAttributes(elm, attrs) {
|
|
17377
17453
|
if (!size(attrs)) {
|
|
17378
17454
|
return true;
|
|
@@ -17389,7 +17465,11 @@ function isSameAttributes(elm, attrs) {
|
|
|
17389
17465
|
});
|
|
17390
17466
|
}
|
|
17391
17467
|
function elementsEqualAttributes(elm1, elm2) {
|
|
17392
|
-
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
|
+
);
|
|
17393
17473
|
}
|
|
17394
17474
|
|
|
17395
17475
|
// node_modules/jodit/esm/core/selection/style/api/list/toggle-ordered-list.js
|
|
@@ -17403,7 +17483,6 @@ init_global2();
|
|
|
17403
17483
|
init_checker();
|
|
17404
17484
|
init_normalize_css_value();
|
|
17405
17485
|
init_object_size();
|
|
17406
|
-
init_kebab_case();
|
|
17407
17486
|
init_utils3();
|
|
17408
17487
|
init_css();
|
|
17409
17488
|
init_data_bind();
|
|
@@ -17436,7 +17515,7 @@ function toggleAttributes(commitStyle, elm, jodit, mode, dry = false) {
|
|
|
17436
17515
|
function toggleStyle(commitStyle, jodit, style, elm, dry, mode) {
|
|
17437
17516
|
assert(isPlainObject(style) && size(style), "Style must be an object");
|
|
17438
17517
|
Object.keys(style).forEach((rule) => {
|
|
17439
|
-
const inlineValue = elm
|
|
17518
|
+
const inlineValue = cssInline(elm, rule);
|
|
17440
17519
|
const newValue = style[rule];
|
|
17441
17520
|
if (inlineValue === "" && newValue == null) {
|
|
17442
17521
|
return;
|
|
@@ -17518,8 +17597,8 @@ function getShadowRoot(jodit) {
|
|
|
17518
17597
|
position: "absolute",
|
|
17519
17598
|
border: 0
|
|
17520
17599
|
});
|
|
17521
|
-
iframe2
|
|
17522
|
-
|
|
17600
|
+
attr(iframe2, "src", "about:blank");
|
|
17601
|
+
Dom.append(container, iframe2);
|
|
17523
17602
|
const doc = (_a2 = iframe2.contentWindow) === null || _a2 === void 0 ? void 0 : _a2.document;
|
|
17524
17603
|
const shadowRoot = !doc ? jodit.od.body : doc.body;
|
|
17525
17604
|
dataBind(jodit, "shadowRoot", shadowRoot);
|
|
@@ -17528,11 +17607,11 @@ function getShadowRoot(jodit) {
|
|
|
17528
17607
|
function getNativeCSSValue(jodit, elm, key3) {
|
|
17529
17608
|
const root = getShadowRoot(jodit);
|
|
17530
17609
|
const wrapper = jodit.create.element("div");
|
|
17531
|
-
wrapper
|
|
17610
|
+
css(wrapper, "color", css(jodit.editor, "color"));
|
|
17532
17611
|
const newElm = jodit.create.element(elm.tagName.toLowerCase());
|
|
17533
|
-
newElm
|
|
17534
|
-
|
|
17535
|
-
|
|
17612
|
+
attr(newElm, "style", attr(elm, "style"));
|
|
17613
|
+
Dom.append(wrapper, newElm);
|
|
17614
|
+
Dom.append(root, wrapper);
|
|
17536
17615
|
const result = css(newElm, key3);
|
|
17537
17616
|
Dom.safeRemove(wrapper);
|
|
17538
17617
|
return result;
|
|
@@ -17688,11 +17767,11 @@ function wrapUnwrappedText(style, elm, jodit) {
|
|
|
17688
17767
|
range.setEndAfter(end);
|
|
17689
17768
|
const fragment = range.extractContents();
|
|
17690
17769
|
const wrapper = ci.element(style.element);
|
|
17691
|
-
|
|
17770
|
+
Dom.append(wrapper, fragment);
|
|
17692
17771
|
Dom.safeInsertNode(range, wrapper);
|
|
17693
17772
|
if (style.elementIsBlock) {
|
|
17694
17773
|
if (Dom.isEmpty(wrapper) && !Dom.isTag(wrapper.firstElementChild, "br")) {
|
|
17695
|
-
|
|
17774
|
+
Dom.append(wrapper, ci.element("br"));
|
|
17696
17775
|
}
|
|
17697
17776
|
}
|
|
17698
17777
|
return wrapper;
|
|
@@ -18010,7 +18089,7 @@ function moveNodeInsideStart(j10, node, start) {
|
|
|
18010
18089
|
let sibling = Dom.findSibling(node, start), anotherSibling = Dom.findSibling(node, !start);
|
|
18011
18090
|
while (Dom.isElement(sibling) && !Dom.isTag(sibling, INSEPARABLE_TAGS) && Dom.isContentEditable(sibling, j10.editor) && (!anotherSibling || !Dom.closest(node, Dom.isElement, j10.editor))) {
|
|
18012
18091
|
if (start || !sibling.firstChild) {
|
|
18013
|
-
|
|
18092
|
+
Dom.append(sibling, node);
|
|
18014
18093
|
} else {
|
|
18015
18094
|
Dom.before(sibling.firstChild, node);
|
|
18016
18095
|
}
|
|
@@ -18239,11 +18318,13 @@ var Selection = class {
|
|
|
18239
18318
|
}
|
|
18240
18319
|
const marker = this.j.createInside.span();
|
|
18241
18320
|
marker.id = MARKER_CLASS + "_" + Number(/* @__PURE__ */ new Date()) + "_" + String(Math.random()).slice(2);
|
|
18242
|
-
marker
|
|
18243
|
-
|
|
18321
|
+
css(marker, {
|
|
18322
|
+
lineHeight: "0",
|
|
18323
|
+
display: "none"
|
|
18324
|
+
});
|
|
18244
18325
|
Dom.markTemporary(marker);
|
|
18245
18326
|
attr(marker, "data-" + MARKER_CLASS, atStart ? "start" : "end");
|
|
18246
|
-
|
|
18327
|
+
Dom.append(marker, this.j.createInside.text(INVISIBLE_SPACE));
|
|
18247
18328
|
if (newRange) {
|
|
18248
18329
|
if (Dom.isOrContains(this.area, atStart ? newRange.startContainer : newRange.endContainer)) {
|
|
18249
18330
|
newRange.insertNode(marker);
|
|
@@ -18256,9 +18337,9 @@ var Selection = class {
|
|
|
18256
18337
|
*/
|
|
18257
18338
|
restore() {
|
|
18258
18339
|
let range = false;
|
|
18259
|
-
const
|
|
18260
|
-
const start = this.area
|
|
18261
|
-
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));
|
|
18262
18343
|
if (!start) {
|
|
18263
18344
|
return;
|
|
18264
18345
|
}
|
|
@@ -18503,7 +18584,7 @@ var Selection = class {
|
|
|
18503
18584
|
if (Dom.isOrContains(this.area, range.commonAncestorContainer)) {
|
|
18504
18585
|
Dom.safeInsertNode(range, node);
|
|
18505
18586
|
} else {
|
|
18506
|
-
this.area
|
|
18587
|
+
Dom.append(this.area, node);
|
|
18507
18588
|
}
|
|
18508
18589
|
[
|
|
18509
18590
|
() => firstChild === null || firstChild === void 0 ? void 0 : firstChild.previousSibling,
|
|
@@ -18519,7 +18600,7 @@ var Selection = class {
|
|
|
18519
18600
|
}
|
|
18520
18601
|
});
|
|
18521
18602
|
} else {
|
|
18522
|
-
this.area
|
|
18603
|
+
Dom.append(this.area, node);
|
|
18523
18604
|
}
|
|
18524
18605
|
const setCursor = (node2) => {
|
|
18525
18606
|
if (Dom.isBlock(node2)) {
|
|
@@ -18571,7 +18652,7 @@ var Selection = class {
|
|
|
18571
18652
|
if (!Dom.isNode(html)) {
|
|
18572
18653
|
node.innerHTML = html.toString();
|
|
18573
18654
|
} else {
|
|
18574
|
-
|
|
18655
|
+
Dom.append(node, html);
|
|
18575
18656
|
}
|
|
18576
18657
|
if (!this.j.isEditorMode() && this.j.e.fire("insertHTML", node.innerHTML) === false) {
|
|
18577
18658
|
return;
|
|
@@ -18579,9 +18660,7 @@ var Selection = class {
|
|
|
18579
18660
|
if (!node.lastChild) {
|
|
18580
18661
|
return;
|
|
18581
18662
|
}
|
|
18582
|
-
|
|
18583
|
-
fragment.appendChild(node.firstChild);
|
|
18584
|
-
}
|
|
18663
|
+
Dom.moveContent(node, fragment);
|
|
18585
18664
|
this.insertNode(fragment, insertCursorAfter, false);
|
|
18586
18665
|
this.j.__imdSynchronizeValues();
|
|
18587
18666
|
}
|
|
@@ -18595,7 +18674,7 @@ var Selection = class {
|
|
|
18595
18674
|
insertImage(url2, styles3 = null, defaultWidth = null) {
|
|
18596
18675
|
const image2 = isString(url2) ? this.j.createInside.element("img") : url2;
|
|
18597
18676
|
if (isString(url2)) {
|
|
18598
|
-
image2
|
|
18677
|
+
attr(image2, "src", url2);
|
|
18599
18678
|
}
|
|
18600
18679
|
if (defaultWidth != null) {
|
|
18601
18680
|
let dw = defaultWidth.toString();
|
|
@@ -18609,8 +18688,10 @@ var Selection = class {
|
|
|
18609
18688
|
}
|
|
18610
18689
|
const onload = () => {
|
|
18611
18690
|
if (image2.naturalHeight < image2.offsetHeight || image2.naturalWidth < image2.offsetWidth) {
|
|
18612
|
-
image2
|
|
18613
|
-
|
|
18691
|
+
css(image2, {
|
|
18692
|
+
width: "",
|
|
18693
|
+
height: ""
|
|
18694
|
+
});
|
|
18614
18695
|
}
|
|
18615
18696
|
image2.removeEventListener("load", onload);
|
|
18616
18697
|
};
|
|
@@ -18672,7 +18753,7 @@ var Selection = class {
|
|
|
18672
18753
|
current = current.firstChild;
|
|
18673
18754
|
} else {
|
|
18674
18755
|
const currentB = this.j.createInside.text(INVISIBLE_SPACE);
|
|
18675
|
-
|
|
18756
|
+
Dom.append(current, currentB);
|
|
18676
18757
|
current = currentB;
|
|
18677
18758
|
}
|
|
18678
18759
|
}
|
|
@@ -18812,7 +18893,7 @@ var Selection = class {
|
|
|
18812
18893
|
if (!start) {
|
|
18813
18894
|
const fakeNode = this.j.createInside.text(INVISIBLE_SPACE);
|
|
18814
18895
|
if (!Dom.isTag(last, INSEPARABLE_TAGS)) {
|
|
18815
|
-
|
|
18896
|
+
Dom.append(last, fakeNode);
|
|
18816
18897
|
last = fakeNode;
|
|
18817
18898
|
} else {
|
|
18818
18899
|
start = last;
|
|
@@ -18873,7 +18954,7 @@ var Selection = class {
|
|
|
18873
18954
|
const range = sel.getRangeAt(0);
|
|
18874
18955
|
const clonedSelection = range.cloneContents();
|
|
18875
18956
|
const div = this.j.createInside.div();
|
|
18876
|
-
|
|
18957
|
+
Dom.append(div, clonedSelection);
|
|
18877
18958
|
return div.innerHTML;
|
|
18878
18959
|
}
|
|
18879
18960
|
return "";
|
|
@@ -18995,11 +19076,10 @@ var Selection = class {
|
|
|
18995
19076
|
return toArray(node.childNodes).some((child) => this.__isOrContainsBlock(child));
|
|
18996
19077
|
}
|
|
18997
19078
|
__wrapRunInFont(run) {
|
|
18998
|
-
var _a2;
|
|
18999
19079
|
const font2 = this.j.createInside.element("font");
|
|
19000
19080
|
const [first] = run;
|
|
19001
|
-
(
|
|
19002
|
-
run.forEach((node) =>
|
|
19081
|
+
Dom.before(first, font2);
|
|
19082
|
+
run.forEach((node) => Dom.append(font2, node));
|
|
19003
19083
|
return font2;
|
|
19004
19084
|
}
|
|
19005
19085
|
/**
|
|
@@ -19010,7 +19090,7 @@ var Selection = class {
|
|
|
19010
19090
|
const font2 = this.jodit.createInside.element("font", INVISIBLE_SPACE);
|
|
19011
19091
|
this.insertNode(font2, false, false);
|
|
19012
19092
|
if (fakes && fakes[0]) {
|
|
19013
|
-
|
|
19093
|
+
Dom.append(font2, fakes[0]);
|
|
19014
19094
|
}
|
|
19015
19095
|
yield font2;
|
|
19016
19096
|
Dom.unwrap(font2);
|
|
@@ -19134,7 +19214,7 @@ var Selection = class {
|
|
|
19134
19214
|
try {
|
|
19135
19215
|
clearEmpties(fragment);
|
|
19136
19216
|
clearEmpties(currentBox);
|
|
19137
|
-
|
|
19217
|
+
Dom.before(currentBox, fragment);
|
|
19138
19218
|
if (!edge && cursorOnTheRight && (br === null || br === void 0 ? void 0 : br.parentNode)) {
|
|
19139
19219
|
const range2 = this.createRange();
|
|
19140
19220
|
range2.setStartBefore(br);
|
|
@@ -19146,9 +19226,9 @@ var Selection = class {
|
|
|
19146
19226
|
}
|
|
19147
19227
|
}
|
|
19148
19228
|
const fillFakeParent = (fake) => {
|
|
19149
|
-
|
|
19150
|
-
if (
|
|
19151
|
-
(
|
|
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());
|
|
19152
19232
|
}
|
|
19153
19233
|
};
|
|
19154
19234
|
fillFakeParent(prevFake);
|
|
@@ -19292,10 +19372,10 @@ var addNewLine = class extends Plugin {
|
|
|
19292
19372
|
if (this.__current === editor.editor) {
|
|
19293
19373
|
Dom.prepend(editor.editor, p63);
|
|
19294
19374
|
} else {
|
|
19295
|
-
this.__current
|
|
19375
|
+
Dom.before(this.__current, p63);
|
|
19296
19376
|
}
|
|
19297
19377
|
} else {
|
|
19298
|
-
editor.editor
|
|
19378
|
+
Dom.append(editor.editor, p63);
|
|
19299
19379
|
}
|
|
19300
19380
|
editor.s.setCursorIn(p63);
|
|
19301
19381
|
scrollIntoViewIfNeeded(p63, editor.editor, editor.ed);
|
|
@@ -19313,8 +19393,8 @@ var addNewLine = class extends Plugin {
|
|
|
19313
19393
|
return;
|
|
19314
19394
|
}
|
|
19315
19395
|
this.__isShown = true;
|
|
19316
|
-
this.j.container
|
|
19317
|
-
this.__line
|
|
19396
|
+
Dom.append(this.j.container, this.__line);
|
|
19397
|
+
css(this.__line, "width", this.j.container.clientWidth);
|
|
19318
19398
|
}
|
|
19319
19399
|
onLock(isLocked) {
|
|
19320
19400
|
if (isLocked && this.__isShown) {
|
|
@@ -19355,9 +19435,9 @@ var addNewLine = class extends Plugin {
|
|
|
19355
19435
|
const top = e42.pageY - editor.ew.scrollX;
|
|
19356
19436
|
const p63 = editor.createInside.element(editor.o.enter);
|
|
19357
19437
|
if (Math.abs(top - editorBound.top) < Math.abs(top - (editorBound.height + editorBound.top)) && editor.editor.firstChild) {
|
|
19358
|
-
editor.editor
|
|
19438
|
+
Dom.prepend(editor.editor, p63);
|
|
19359
19439
|
} else {
|
|
19360
|
-
editor.editor
|
|
19440
|
+
Dom.append(editor.editor, p63);
|
|
19361
19441
|
}
|
|
19362
19442
|
editor.s.setCursorIn(p63);
|
|
19363
19443
|
editor.synchronizeValues();
|
|
@@ -19403,7 +19483,7 @@ var addNewLine = class extends Plugin {
|
|
|
19403
19483
|
}
|
|
19404
19484
|
const isEditor = editor.editor === currentElement;
|
|
19405
19485
|
if (top !== false && (isEditor && !this.__isBeforeContent || !isEditor && !call(this.__isBeforeContent ? Dom.prev : Dom.next, currentElement, this.__canGetFocus, editor.editor))) {
|
|
19406
|
-
this.__line
|
|
19486
|
+
css(this.__line, "top", top);
|
|
19407
19487
|
this.__current = currentElement;
|
|
19408
19488
|
this.__show();
|
|
19409
19489
|
this.__line.style.setProperty("--jd-anl-handle-offset", clientX - pos.left - 10 + "px");
|
|
@@ -19515,7 +19595,10 @@ function resolveTableSibling(sibling, backspace2) {
|
|
|
19515
19595
|
if (!Dom.isTag(sibling, "table")) {
|
|
19516
19596
|
return sibling;
|
|
19517
19597
|
}
|
|
19518
|
-
const cells =
|
|
19598
|
+
const cells = [];
|
|
19599
|
+
Dom.each(sibling, (node) => {
|
|
19600
|
+
Dom.isCell(node) && cells.push(node);
|
|
19601
|
+
});
|
|
19519
19602
|
return cells.length ? cells[backspace2 ? cells.length - 1 : 0] : null;
|
|
19520
19603
|
}
|
|
19521
19604
|
function checkMoveListContent(jodit, mainClosestBox, sibling, backspace2) {
|
|
@@ -19938,6 +20021,13 @@ init_global2();
|
|
|
19938
20021
|
init_helpers();
|
|
19939
20022
|
init_trim();
|
|
19940
20023
|
init_plugin2();
|
|
20024
|
+
var NOT_EMPTY_CONTENT_TAGS = /* @__PURE__ */ new Set([
|
|
20025
|
+
"img",
|
|
20026
|
+
"table",
|
|
20027
|
+
"jodit",
|
|
20028
|
+
"iframe",
|
|
20029
|
+
"hr"
|
|
20030
|
+
]);
|
|
19941
20031
|
var deleteCommand = class extends Plugin {
|
|
19942
20032
|
afterInit(jodit) {
|
|
19943
20033
|
jodit.e.on("afterCommand.delete", (command) => {
|
|
@@ -19963,8 +20053,8 @@ var deleteCommand = class extends Plugin {
|
|
|
19963
20053
|
if (current && Dom.isTag(current.firstChild, "br")) {
|
|
19964
20054
|
jodit.s.removeNode(current.firstChild);
|
|
19965
20055
|
}
|
|
19966
|
-
if (!trim(jodit.editor.textContent || "") && !jodit.editor.
|
|
19967
|
-
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);
|
|
19968
20058
|
const node = jodit.s.setCursorIn(jodit.editor);
|
|
19969
20059
|
jodit.s.removeNode(node);
|
|
19970
20060
|
}
|
|
@@ -20430,6 +20520,7 @@ __export(filters_exports, {
|
|
|
20430
20520
|
|
|
20431
20521
|
// node_modules/jodit/esm/plugins/clean-html/helpers/visitor/filters/allow-attributes.js
|
|
20432
20522
|
init_dom();
|
|
20523
|
+
init_attr();
|
|
20433
20524
|
function allowAttributes(jodit, nodeElm, hadEffect, allow) {
|
|
20434
20525
|
const allowedForTag = allow && Dom.isElement(nodeElm) && allow[nodeElm.nodeName];
|
|
20435
20526
|
if (allow && Dom.isElement(nodeElm) && allowedForTag !== true) {
|
|
@@ -20449,7 +20540,7 @@ function allowAttributes(jodit, nodeElm, hadEffect, allow) {
|
|
|
20449
20540
|
hadEffect = true;
|
|
20450
20541
|
}
|
|
20451
20542
|
removeAttrs.forEach((attr2) => {
|
|
20452
|
-
nodeElm
|
|
20543
|
+
attrRaw(nodeElm, attr2, null);
|
|
20453
20544
|
});
|
|
20454
20545
|
}
|
|
20455
20546
|
}
|
|
@@ -20499,7 +20590,7 @@ var TABLE_CONTAINER_TAGS = /* @__PURE__ */ new Set([
|
|
|
20499
20590
|
function fillEmptyParagraph(jodit, nodeElm, hadEffect) {
|
|
20500
20591
|
if (jodit.o.cleanHTML.fillEmptyParagraph && Dom.isBlock(nodeElm) && Dom.isEmpty(nodeElm, INSEPARABLE_TAGS) && !Dom.isTag(nodeElm, TABLE_CONTAINER_TAGS)) {
|
|
20501
20592
|
const br = jodit.createInside.element("br");
|
|
20502
|
-
|
|
20593
|
+
Dom.append(nodeElm, br);
|
|
20503
20594
|
return true;
|
|
20504
20595
|
}
|
|
20505
20596
|
return hadEffect;
|
|
@@ -21008,10 +21099,10 @@ var ColorPickerWidget = (editor, callback, coldColor) => {
|
|
|
21008
21099
|
}
|
|
21009
21100
|
return stack.join("");
|
|
21010
21101
|
};
|
|
21011
|
-
|
|
21012
|
-
|
|
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>`));
|
|
21013
21104
|
const { extra } = refs(form2);
|
|
21014
|
-
|
|
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>`));
|
|
21015
21106
|
const { hexInput } = refs(form2);
|
|
21016
21107
|
let appliedHexValue = null;
|
|
21017
21108
|
const applyHexInput = () => {
|
|
@@ -21041,7 +21132,7 @@ var ColorPickerWidget = (editor, callback, coldColor) => {
|
|
|
21041
21132
|
applyHexInput();
|
|
21042
21133
|
});
|
|
21043
21134
|
if (editor.o.showBrowserColorPicker && hasBrowserColorPicker()) {
|
|
21044
|
-
|
|
21135
|
+
Dom.append(extra, editor.c.fromHTML(`<div class="${cn}__native">${iconPalette}<input type="color" value="#ffffff"/></div>`));
|
|
21045
21136
|
editor.e.on(form2, "change", (e42) => {
|
|
21046
21137
|
e42.stopPropagation();
|
|
21047
21138
|
const target = e42.target;
|
|
@@ -21098,8 +21189,8 @@ var TabsWidget = (jodit, tabs, state) => {
|
|
|
21098
21189
|
const nameToTab = {};
|
|
21099
21190
|
const buttonList = [];
|
|
21100
21191
|
let firstTab = "";
|
|
21101
|
-
|
|
21102
|
-
|
|
21192
|
+
Dom.append(box, buttons);
|
|
21193
|
+
Dom.append(box, tabBox);
|
|
21103
21194
|
const setActive = (tab2) => {
|
|
21104
21195
|
if (!nameToTab[tab2]) {
|
|
21105
21196
|
return;
|
|
@@ -21122,15 +21213,15 @@ var TabsWidget = (jodit, tabs, state) => {
|
|
|
21122
21213
|
if (!firstTab) {
|
|
21123
21214
|
firstTab = name;
|
|
21124
21215
|
}
|
|
21125
|
-
|
|
21216
|
+
Dom.append(buttons, button2.container);
|
|
21126
21217
|
buttonList.push(button2);
|
|
21127
21218
|
button2.container.classList.add("jodit-tabs__button", "jodit-tabs__button_columns_" + tabs.length);
|
|
21128
21219
|
if (!isFunction(content)) {
|
|
21129
|
-
|
|
21220
|
+
Dom.append(tab2, Component.isInstanceOf(content, UIElement) ? content.container : content);
|
|
21130
21221
|
} else {
|
|
21131
21222
|
tab2.classList.add("jodit-tab_empty");
|
|
21132
21223
|
}
|
|
21133
|
-
|
|
21224
|
+
Dom.append(tabBox, tab2);
|
|
21134
21225
|
button2.onAction(() => {
|
|
21135
21226
|
setActive(name);
|
|
21136
21227
|
if (isFunction(content) && !Dom.isElement(content)) {
|
|
@@ -21225,13 +21316,13 @@ var FileSelectorWidget = (editor, callbacks, elm, close, isImage = true) => {
|
|
|
21225
21316
|
currentImage = null;
|
|
21226
21317
|
if (elm && !Dom.isText(elm) && !Dom.isComment(elm) && (Dom.isTag(elm, "img") || $$("img", elm).length)) {
|
|
21227
21318
|
currentImage = elm.tagName === "IMG" ? elm : $$("img", elm)[0];
|
|
21228
|
-
val(form2.container, "
|
|
21229
|
-
val(form2.container, "
|
|
21319
|
+
val(form2.container, "url", attr(currentImage, "src"));
|
|
21320
|
+
val(form2.container, "text", attr(currentImage, "alt"));
|
|
21230
21321
|
button2.state.text = "Update";
|
|
21231
21322
|
}
|
|
21232
21323
|
if (elm && Dom.isTag(elm, "a")) {
|
|
21233
|
-
val(form2.container, "
|
|
21234
|
-
val(form2.container, "
|
|
21324
|
+
val(form2.container, "url", attr(elm, "href"));
|
|
21325
|
+
val(form2.container, "text", attr(elm, "title"));
|
|
21235
21326
|
button2.state.text = "Update";
|
|
21236
21327
|
}
|
|
21237
21328
|
form2.onSubmit((data) => {
|
|
@@ -21249,8 +21340,8 @@ var FileSelectorWidget = (editor, callbacks, elm, close, isImage = true) => {
|
|
|
21249
21340
|
box.classList.add("jodit-file-selector");
|
|
21250
21341
|
return box;
|
|
21251
21342
|
};
|
|
21252
|
-
function val(elm,
|
|
21253
|
-
const child = elm.
|
|
21343
|
+
function val(elm, name, value) {
|
|
21344
|
+
const child = Dom.first(elm, (node) => Dom.isTag(node, "input") && attr(node, "name") === name);
|
|
21254
21345
|
if (!child) {
|
|
21255
21346
|
return "";
|
|
21256
21347
|
}
|
|
@@ -21352,7 +21443,7 @@ Config.prototype.controls.brush = {
|
|
|
21352
21443
|
if (!currentElement) {
|
|
21353
21444
|
editor.execCommand("background", false, value);
|
|
21354
21445
|
} else {
|
|
21355
|
-
currentElement
|
|
21446
|
+
css(currentElement, "backgroundColor", value);
|
|
21356
21447
|
}
|
|
21357
21448
|
dataBind(button2, "color", value);
|
|
21358
21449
|
dataBind(button2, "color-mode", "background");
|
|
@@ -21362,7 +21453,7 @@ Config.prototype.controls.brush = {
|
|
|
21362
21453
|
if (!currentElement) {
|
|
21363
21454
|
editor.execCommand("forecolor", false, value);
|
|
21364
21455
|
} else {
|
|
21365
|
-
currentElement
|
|
21456
|
+
css(currentElement, "color", value);
|
|
21366
21457
|
}
|
|
21367
21458
|
dataBind(button2, "color", value);
|
|
21368
21459
|
dataBind(button2, "color-mode", "color");
|
|
@@ -21391,10 +21482,10 @@ Config.prototype.controls.brush = {
|
|
|
21391
21482
|
if (current && current !== jodit.editor && Dom.isNode(current) && Dom.isElement(current)) {
|
|
21392
21483
|
switch (mode) {
|
|
21393
21484
|
case "color":
|
|
21394
|
-
current
|
|
21485
|
+
css(current, "color", color2);
|
|
21395
21486
|
break;
|
|
21396
21487
|
case "background":
|
|
21397
|
-
current
|
|
21488
|
+
css(current, "backgroundColor", color2);
|
|
21398
21489
|
break;
|
|
21399
21490
|
}
|
|
21400
21491
|
} else {
|
|
@@ -21624,7 +21715,7 @@ Config.prototype.controls.copyformat = {
|
|
|
21624
21715
|
} else {
|
|
21625
21716
|
const defaultStyles = {}, box = Dom.up(current, (elm) => elm && !Dom.isText(elm), editor.editor) || editor.editor;
|
|
21626
21717
|
const ideal = editor.createInside.span();
|
|
21627
|
-
editor.editor
|
|
21718
|
+
Dom.append(editor.editor, ideal);
|
|
21628
21719
|
copyStyles.forEach((key3) => {
|
|
21629
21720
|
defaultStyles[key3] = css(ideal, key3);
|
|
21630
21721
|
});
|
|
@@ -21717,7 +21808,7 @@ var dragAndDrop = class extends Plugin {
|
|
|
21717
21808
|
this.startDragPoint.x = event.clientX;
|
|
21718
21809
|
this.startDragPoint.y = event.clientY;
|
|
21719
21810
|
if (isFileBrowserFilesItem(target)) {
|
|
21720
|
-
target = target.
|
|
21811
|
+
target = Dom.first(target, (node) => Dom.isTag(node, "img"));
|
|
21721
21812
|
}
|
|
21722
21813
|
if (Dom.isTag(target, "img")) {
|
|
21723
21814
|
this.draggable = target.cloneNode(true);
|
|
@@ -21961,7 +22052,7 @@ var dragAndDropElement = class _dragAndDropElement extends Plugin {
|
|
|
21961
22052
|
width: (_a2 = target === null || target === void 0 ? void 0 : target.offsetWidth) !== null && _a2 !== void 0 ? _a2 : 100,
|
|
21962
22053
|
height: (_b = target === null || target === void 0 ? void 0 : target.offsetHeight) !== null && _b !== void 0 ? _b : 100
|
|
21963
22054
|
});
|
|
21964
|
-
getContainer(this.j, _dragAndDropElement)
|
|
22055
|
+
Dom.append(getContainer(this.j, _dragAndDropElement), this.draggable);
|
|
21965
22056
|
}
|
|
21966
22057
|
css(this.draggable, {
|
|
21967
22058
|
left: event.clientX,
|
|
@@ -22144,7 +22235,7 @@ init_scroll_into_view();
|
|
|
22144
22235
|
function insertParagraph(fake, editor, wrapperTag, style) {
|
|
22145
22236
|
const isBR = wrapperTag.toLowerCase() === "br", { createInside } = editor, p63 = createInside.element(wrapperTag), br = createInside.element("br");
|
|
22146
22237
|
if (!isBR) {
|
|
22147
|
-
|
|
22238
|
+
Dom.append(p63, br);
|
|
22148
22239
|
}
|
|
22149
22240
|
if (style && style.cssText) {
|
|
22150
22241
|
attr(p63, "style", style.cssText);
|
|
@@ -22189,11 +22280,11 @@ function processEmptyLILeaf(fake, jodit, li) {
|
|
|
22189
22280
|
Dom.safeRemove(list);
|
|
22190
22281
|
}
|
|
22191
22282
|
const newLi = insertParagraph(fake, jodit, listInsideLeaf ? "li" : jodit.o.enter);
|
|
22192
|
-
if (!rightPart.
|
|
22283
|
+
if (!Dom.first(rightPart, (node) => Dom.isTag(node, "li"))) {
|
|
22193
22284
|
return;
|
|
22194
22285
|
}
|
|
22195
22286
|
if (listInsideLeaf) {
|
|
22196
|
-
|
|
22287
|
+
Dom.append(newLi, rightPart);
|
|
22197
22288
|
} else {
|
|
22198
22289
|
Dom.after(newLi, rightPart);
|
|
22199
22290
|
}
|
|
@@ -22241,7 +22332,7 @@ function wrapText(fake, jodit) {
|
|
|
22241
22332
|
const currentBox = Dom.wrapInline(needWrap, jodit.o.enter, jodit);
|
|
22242
22333
|
if (Dom.isEmpty(currentBox)) {
|
|
22243
22334
|
const br = jodit.createInside.element("br");
|
|
22244
|
-
|
|
22335
|
+
Dom.append(currentBox, br);
|
|
22245
22336
|
Dom.before(br, fake);
|
|
22246
22337
|
}
|
|
22247
22338
|
return currentBox;
|
|
@@ -22676,6 +22767,7 @@ function formatBlock(editor) {
|
|
|
22676
22767
|
pluginSystem.add("formatBlock", formatBlock);
|
|
22677
22768
|
|
|
22678
22769
|
// node_modules/jodit/esm/plugins/fullsize/fullsize.js
|
|
22770
|
+
init_dom();
|
|
22679
22771
|
init_global2();
|
|
22680
22772
|
init_is_jodit_object();
|
|
22681
22773
|
init_css();
|
|
@@ -22741,7 +22833,6 @@ function fullsize(editor) {
|
|
|
22741
22833
|
wasToggled = false;
|
|
22742
22834
|
}
|
|
22743
22835
|
}, toggle = (enable) => {
|
|
22744
|
-
var _a2;
|
|
22745
22836
|
const { container, events } = editor;
|
|
22746
22837
|
if (!container) {
|
|
22747
22838
|
return;
|
|
@@ -22754,7 +22845,7 @@ function fullsize(editor) {
|
|
|
22754
22845
|
isEnabled = enable;
|
|
22755
22846
|
container.classList.toggle("jodit_fullsize", enable);
|
|
22756
22847
|
if (editor.toolbar) {
|
|
22757
|
-
isJoditObject(editor) &&
|
|
22848
|
+
isJoditObject(editor) && editor.toolbarContainer && Dom.append(editor.toolbarContainer, editor.toolbar.container);
|
|
22758
22849
|
css(editor.toolbar.container, "width", "auto");
|
|
22759
22850
|
}
|
|
22760
22851
|
enable ? fullsizeStack.add(container) : fullsizeStack.delete(container);
|
|
@@ -22974,6 +23065,7 @@ pluginSystem.add("hr", hr);
|
|
|
22974
23065
|
|
|
22975
23066
|
// node_modules/jodit/esm/plugins/iframe/iframe.js
|
|
22976
23067
|
init_constants();
|
|
23068
|
+
init_dom();
|
|
22977
23069
|
init_global2();
|
|
22978
23070
|
init_helpers();
|
|
22979
23071
|
init_helpers();
|
|
@@ -23005,20 +23097,20 @@ function iframe(editor) {
|
|
|
23005
23097
|
const link2 = doc.createElement("link");
|
|
23006
23098
|
attr(link2, "rel", "stylesheet");
|
|
23007
23099
|
attr(link2, "href", href);
|
|
23008
|
-
doc.head && doc.head
|
|
23100
|
+
doc.head && Dom.append(doc.head, link2);
|
|
23009
23101
|
});
|
|
23010
23102
|
}
|
|
23011
23103
|
if (opt.iframeStyle) {
|
|
23012
23104
|
const style = doc.createElement("style");
|
|
23013
23105
|
style.innerHTML = opt.iframeStyle;
|
|
23014
|
-
doc.head && doc.head
|
|
23106
|
+
doc.head && Dom.append(doc.head, style);
|
|
23015
23107
|
}
|
|
23016
23108
|
}).on("createEditor", () => {
|
|
23017
23109
|
if (!opt.iframe) {
|
|
23018
23110
|
return;
|
|
23019
23111
|
}
|
|
23020
23112
|
const iframe2 = editor.c.element("iframe");
|
|
23021
|
-
iframe2
|
|
23113
|
+
css(iframe2, "display", "block");
|
|
23022
23114
|
iframe2.src = "about:blank";
|
|
23023
23115
|
iframe2.className = "jodit-wysiwyg_iframe";
|
|
23024
23116
|
attr(iframe2, {
|
|
@@ -23029,7 +23121,7 @@ function iframe(editor) {
|
|
|
23029
23121
|
if (opt.iframeSandbox != null) {
|
|
23030
23122
|
attr(iframe2, "sandbox", opt.iframeSandbox);
|
|
23031
23123
|
}
|
|
23032
|
-
editor.workplace
|
|
23124
|
+
Dom.append(editor.workplace, iframe2);
|
|
23033
23125
|
editor.iframe = iframe2;
|
|
23034
23126
|
const result = editor.e.fire("generateDocumentStructure.iframe", null, editor);
|
|
23035
23127
|
const init2 = () => {
|
|
@@ -23079,7 +23171,7 @@ function iframe(editor) {
|
|
|
23079
23171
|
editor.editor = doc.body;
|
|
23080
23172
|
editor.e.on("afterSetMode afterInit afterAddPlace", toggleEditable);
|
|
23081
23173
|
if (opt.height === "auto") {
|
|
23082
|
-
doc.documentElement && (doc.documentElement
|
|
23174
|
+
doc.documentElement && css(doc.documentElement, "overflowY", "hidden");
|
|
23083
23175
|
const resizeIframe = editor.async.throttle((...args) => {
|
|
23084
23176
|
editor.async.requestAnimationFrame(() => {
|
|
23085
23177
|
if (editor.editor && editor.iframe && opt.height === "auto") {
|
|
@@ -23321,6 +23413,7 @@ Config.prototype.image = {
|
|
|
23321
23413
|
// node_modules/jodit/esm/plugins/image-properties/ui/ui-image-form.js
|
|
23322
23414
|
init_decorators();
|
|
23323
23415
|
init_component();
|
|
23416
|
+
init_dom();
|
|
23324
23417
|
init_helpers();
|
|
23325
23418
|
|
|
23326
23419
|
// node_modules/jodit/esm/plugins/image-properties/ui/ui-image-main-tab.js
|
|
@@ -23799,7 +23892,7 @@ var UIImagePropertiesForm = class UIImagePropertiesForm2 extends UIGroup {
|
|
|
23799
23892
|
this.handlers = handlers;
|
|
23800
23893
|
this.__mainTab = new UIImageMainTab(this.jodit, this.state, this.handlers);
|
|
23801
23894
|
this.__positionTab = new UIImagePositionTab(this.jodit, this.state, this.handlers);
|
|
23802
|
-
this.getElm("tabsBox")
|
|
23895
|
+
Dom.append(this.getElm("tabsBox"), TabsWidget(jodit, [
|
|
23803
23896
|
{ name: "Image", content: this.__mainTab },
|
|
23804
23897
|
{ name: "Advanced", content: this.__positionTab }
|
|
23805
23898
|
], activeTabState));
|
|
@@ -23982,14 +24075,15 @@ function openImagePopup(j10, dialog, state, button2) {
|
|
|
23982
24075
|
|
|
23983
24076
|
// node_modules/jodit/esm/plugins/image-properties/readers/index.js
|
|
23984
24077
|
init_attr();
|
|
24078
|
+
init_css();
|
|
23985
24079
|
|
|
23986
24080
|
// node_modules/jodit/esm/plugins/image-properties/readers/align.js
|
|
23987
24081
|
init_css();
|
|
23988
24082
|
function readAlign(image2, values) {
|
|
23989
|
-
if (image2
|
|
24083
|
+
if (cssInline(image2, "float") && ["left", "right"].indexOf(cssInline(image2, "float").toLowerCase()) !== -1) {
|
|
23990
24084
|
values.align = css(image2, "float");
|
|
23991
24085
|
} else {
|
|
23992
|
-
if (css(image2, "display") === "block" && image2
|
|
24086
|
+
if (css(image2, "display") === "block" && cssInline(image2, "margin-left") === "auto" && cssInline(image2, "margin-right") === "auto") {
|
|
23993
24087
|
values.align = "center";
|
|
23994
24088
|
} else {
|
|
23995
24089
|
values.align = "";
|
|
@@ -24073,7 +24167,7 @@ function readValuesFromImage(j10, state) {
|
|
|
24073
24167
|
return __async(this, null, function* () {
|
|
24074
24168
|
const { sourceImage: image2, values } = state;
|
|
24075
24169
|
readAlign(image2, values);
|
|
24076
|
-
values.borderRadius = parseInt(image2
|
|
24170
|
+
values.borderRadius = parseInt(cssInline(image2, "border-radius") || "0", 10) || 0;
|
|
24077
24171
|
values.id = attr(image2, "id") || "";
|
|
24078
24172
|
values.imageTitle = attr(image2, "title") || "";
|
|
24079
24173
|
values.imageAlt = attr(image2, "alt") || "";
|
|
@@ -24089,6 +24183,7 @@ function readValuesFromImage(j10, state) {
|
|
|
24089
24183
|
// node_modules/jodit/esm/plugins/image-properties/writers/index.js
|
|
24090
24184
|
init_dom();
|
|
24091
24185
|
init_utils3();
|
|
24186
|
+
init_css();
|
|
24092
24187
|
|
|
24093
24188
|
// node_modules/jodit/esm/plugins/image-properties/writers/link.js
|
|
24094
24189
|
init_dom();
|
|
@@ -24107,7 +24202,7 @@ function applyLink(j10, image2, imageLink, imageLinkOpenInNewTab) {
|
|
|
24107
24202
|
}
|
|
24108
24203
|
} else {
|
|
24109
24204
|
if (link2 && link2.parentNode) {
|
|
24110
|
-
|
|
24205
|
+
Dom.replace(link2, image2, void 0, false, true);
|
|
24111
24206
|
}
|
|
24112
24207
|
}
|
|
24113
24208
|
}
|
|
@@ -24172,7 +24267,7 @@ function applyValuesToImage(j10, state, image2) {
|
|
|
24172
24267
|
Dom.safeRemove(image2);
|
|
24173
24268
|
return;
|
|
24174
24269
|
}
|
|
24175
|
-
image2
|
|
24270
|
+
css(image2, "borderRadius", borderRadius ? borderRadius + "px" : "");
|
|
24176
24271
|
attr(image2, "title", imageTitle || null);
|
|
24177
24272
|
attr(image2, "alt", imageAlt || null);
|
|
24178
24273
|
applyLink(j10, image2, imageLink, imageLinkOpenInNewTab);
|
|
@@ -24405,9 +24500,11 @@ init_constants();
|
|
|
24405
24500
|
init_dom2();
|
|
24406
24501
|
init_global2();
|
|
24407
24502
|
init_utils3();
|
|
24503
|
+
init_css();
|
|
24408
24504
|
|
|
24409
24505
|
// node_modules/jodit/esm/plugins/indent/config.js
|
|
24410
24506
|
init_dom2();
|
|
24507
|
+
init_css();
|
|
24411
24508
|
init_config();
|
|
24412
24509
|
|
|
24413
24510
|
// node_modules/jodit/esm/plugins/indent/icons/indent.svg.js
|
|
@@ -24444,7 +24541,8 @@ Config.prototype.controls.outdent = {
|
|
|
24444
24541
|
const currentBox = Dom.closest(current, Dom.isBlock, editor.editor);
|
|
24445
24542
|
if (currentBox) {
|
|
24446
24543
|
const arrow = getKey(editor.o.direction, currentBox);
|
|
24447
|
-
|
|
24544
|
+
const value = cssInline(currentBox, arrow);
|
|
24545
|
+
return !value || parseInt(value, 10) <= 0;
|
|
24448
24546
|
}
|
|
24449
24547
|
return true;
|
|
24450
24548
|
},
|
|
@@ -24462,9 +24560,10 @@ var applyIndentToBox = (processedElements, currentBox, editor, command) => {
|
|
|
24462
24560
|
}
|
|
24463
24561
|
const key3 = getKey(editor.o.direction, currentBox);
|
|
24464
24562
|
processedElements.add(currentBox);
|
|
24465
|
-
|
|
24563
|
+
const current = cssInline(currentBox, key3);
|
|
24564
|
+
let value = current ? parseInt(current, 10) : 0;
|
|
24466
24565
|
value += editor.o.indentMargin * (command === "outdent" ? -1 : 1);
|
|
24467
|
-
currentBox
|
|
24566
|
+
css(currentBox, key3, value > 0 ? value : "");
|
|
24468
24567
|
if (!attr(currentBox, "style")) {
|
|
24469
24568
|
attr(currentBox, "style", null);
|
|
24470
24569
|
}
|
|
@@ -26146,8 +26245,10 @@ function writeImage(a79, content_input, textWasChanged, url_input) {
|
|
|
26146
26245
|
|
|
26147
26246
|
// node_modules/jodit/esm/plugins/media/media.js
|
|
26148
26247
|
init_constants();
|
|
26248
|
+
init_dom();
|
|
26149
26249
|
init_global2();
|
|
26150
26250
|
init_utils3();
|
|
26251
|
+
init_css();
|
|
26151
26252
|
|
|
26152
26253
|
// node_modules/jodit/esm/plugins/media/config.js
|
|
26153
26254
|
init_config();
|
|
@@ -26170,13 +26271,15 @@ function media(editor) {
|
|
|
26170
26271
|
[`data-${keyFake}`]: 1
|
|
26171
26272
|
});
|
|
26172
26273
|
attr(wrapper, "style", attr(element, "style"));
|
|
26173
|
-
wrapper
|
|
26174
|
-
|
|
26175
|
-
|
|
26274
|
+
css(wrapper, {
|
|
26275
|
+
display: cssInline(element, "display") === "inline-block" ? "inline-block" : "block",
|
|
26276
|
+
width: element.offsetWidth,
|
|
26277
|
+
height: element.offsetHeight
|
|
26278
|
+
});
|
|
26176
26279
|
if (element.parentNode) {
|
|
26177
|
-
|
|
26280
|
+
Dom.before(element, wrapper);
|
|
26178
26281
|
}
|
|
26179
|
-
|
|
26282
|
+
Dom.append(wrapper, element);
|
|
26180
26283
|
element = wrapper;
|
|
26181
26284
|
}
|
|
26182
26285
|
editor.e.off(element, "mousedown.select touchstart.select").on(element, "mousedown.select touchstart.select", () => {
|
|
@@ -26210,6 +26313,7 @@ init_helpers();
|
|
|
26210
26313
|
// node_modules/jodit/esm/plugins/mobile/config.js
|
|
26211
26314
|
init_constants();
|
|
26212
26315
|
init_helpers();
|
|
26316
|
+
init_css();
|
|
26213
26317
|
init_config();
|
|
26214
26318
|
Config.prototype.mobileTapTimeout = 300;
|
|
26215
26319
|
Config.prototype.toolbarAdaptive = true;
|
|
@@ -26330,7 +26434,7 @@ Config.prototype.controls.dots = {
|
|
|
26330
26434
|
if (buttons && store2) {
|
|
26331
26435
|
store2.toolbar.build(splitArray(buttons));
|
|
26332
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;
|
|
26333
|
-
store2.toolbar.container
|
|
26437
|
+
css(store2.toolbar.container, "width", (w9 + 4) * 3);
|
|
26334
26438
|
}
|
|
26335
26439
|
}
|
|
26336
26440
|
}
|
|
@@ -27028,10 +27132,10 @@ var pasteStorage = class extends Plugin {
|
|
|
27028
27132
|
}
|
|
27029
27133
|
this.dialog || this.createDialog();
|
|
27030
27134
|
if (this.listBox) {
|
|
27031
|
-
this.listBox
|
|
27135
|
+
Dom.detach(this.listBox);
|
|
27032
27136
|
}
|
|
27033
27137
|
if (this.previewBox) {
|
|
27034
|
-
this.previewBox
|
|
27138
|
+
Dom.detach(this.previewBox);
|
|
27035
27139
|
}
|
|
27036
27140
|
this.list.forEach((html, index) => {
|
|
27037
27141
|
const a79 = this.j.c.element("a");
|
|
@@ -27040,7 +27144,7 @@ var pasteStorage = class extends Plugin {
|
|
|
27040
27144
|
attr(a79, "href", "#");
|
|
27041
27145
|
attr(a79, "data-index", index.toString());
|
|
27042
27146
|
attr(a79, "tab-index", "-1");
|
|
27043
|
-
this.listBox && this.listBox
|
|
27147
|
+
this.listBox && Dom.append(this.listBox, a79);
|
|
27044
27148
|
});
|
|
27045
27149
|
this.dialog && this.dialog.open();
|
|
27046
27150
|
this.j.async.setTimeout(() => {
|
|
@@ -27058,8 +27162,8 @@ var pasteStorage = class extends Plugin {
|
|
|
27058
27162
|
this.container.classList.add("jodit-paste-storage");
|
|
27059
27163
|
this.listBox = this.j.c.div();
|
|
27060
27164
|
this.previewBox = this.j.c.div();
|
|
27061
|
-
this.container
|
|
27062
|
-
this.container
|
|
27165
|
+
Dom.append(this.container, this.listBox);
|
|
27166
|
+
Dom.append(this.container, this.previewBox);
|
|
27063
27167
|
this.dialog.setHeader(this.j.i18n("Choose Content to Paste"));
|
|
27064
27168
|
this.dialog.setContent(this.container);
|
|
27065
27169
|
this.dialog.setFooter([pasteButton, cancelButton]);
|
|
@@ -27170,8 +27274,10 @@ var placeholder = class extends Plugin {
|
|
|
27170
27274
|
}
|
|
27171
27275
|
this.placeholderElm = editor.c.fromHTML(`<span data-ref="placeholder" style="display: none;" class="jodit-placeholder">${editor.i18n(editor.o.placeholder)}</span>`);
|
|
27172
27276
|
if (editor.o.direction === "rtl") {
|
|
27173
|
-
this.placeholderElm
|
|
27174
|
-
|
|
27277
|
+
css(this.placeholderElm, {
|
|
27278
|
+
right: 0,
|
|
27279
|
+
direction: "rtl"
|
|
27280
|
+
});
|
|
27175
27281
|
}
|
|
27176
27282
|
editor.e.on("readonly", (isReadOnly) => {
|
|
27177
27283
|
if (isReadOnly) {
|
|
@@ -27191,17 +27297,21 @@ var placeholder = class extends Plugin {
|
|
|
27191
27297
|
const current = editor.s.current(), wrapper = current && Dom.closest(current, Dom.isBlock, editor.editor) || editor.editor;
|
|
27192
27298
|
const style = editor.ew.getComputedStyle(wrapper);
|
|
27193
27299
|
const styleEditor = editor.ew.getComputedStyle(editor.editor);
|
|
27194
|
-
editor.workplace
|
|
27300
|
+
Dom.append(editor.workplace, this.placeholderElm);
|
|
27195
27301
|
const { firstChild } = editor.editor;
|
|
27196
27302
|
if (Dom.isElement(firstChild) && !isMarker(firstChild)) {
|
|
27197
27303
|
const style2 = editor.ew.getComputedStyle(firstChild);
|
|
27198
27304
|
marginTop = parseInt(style2.getPropertyValue("margin-top"), 10);
|
|
27199
27305
|
marginLeft = parseInt(style2.getPropertyValue("margin-left"), 10);
|
|
27200
|
-
this.placeholderElm
|
|
27201
|
-
|
|
27306
|
+
css(this.placeholderElm, {
|
|
27307
|
+
fontSize: parseInt(style2.getPropertyValue("font-size"), 10),
|
|
27308
|
+
lineHeight: style2.getPropertyValue("line-height")
|
|
27309
|
+
});
|
|
27202
27310
|
} else {
|
|
27203
|
-
this.placeholderElm
|
|
27204
|
-
|
|
27311
|
+
css(this.placeholderElm, {
|
|
27312
|
+
fontSize: parseInt(style.getPropertyValue("font-size"), 10),
|
|
27313
|
+
lineHeight: style.getPropertyValue("line-height")
|
|
27314
|
+
});
|
|
27205
27315
|
}
|
|
27206
27316
|
css(this.placeholderElm, {
|
|
27207
27317
|
display: "block",
|
|
@@ -27393,7 +27503,7 @@ Config.prototype.controls.print = {
|
|
|
27393
27503
|
height: 0,
|
|
27394
27504
|
border: 0
|
|
27395
27505
|
});
|
|
27396
|
-
getContainer(editor, Config)
|
|
27506
|
+
Dom.append(getContainer(editor, Config), iframe2);
|
|
27397
27507
|
const afterFinishPrint = () => {
|
|
27398
27508
|
editor.e.off(editor.ow, "mousemove", afterFinishPrint);
|
|
27399
27509
|
Dom.safeRemove(iframe2);
|
|
@@ -27415,7 +27525,7 @@ Config.prototype.controls.print = {
|
|
|
27415
27525
|
-webkit-print-color-adjust: exact;
|
|
27416
27526
|
}
|
|
27417
27527
|
}`;
|
|
27418
|
-
myWindow.document.head
|
|
27528
|
+
Dom.append(myWindow.document.head, style);
|
|
27419
27529
|
myWindow.focus();
|
|
27420
27530
|
myWindow.print();
|
|
27421
27531
|
}
|
|
@@ -27493,6 +27603,7 @@ init_decorators();
|
|
|
27493
27603
|
init_dom();
|
|
27494
27604
|
init_global2();
|
|
27495
27605
|
init_helpers();
|
|
27606
|
+
init_css();
|
|
27496
27607
|
|
|
27497
27608
|
// node_modules/jodit/esm/plugins/resize-cells/config.js
|
|
27498
27609
|
init_config();
|
|
@@ -27543,7 +27654,7 @@ var resizeCells = class extends Plugin {
|
|
|
27543
27654
|
}
|
|
27544
27655
|
showResizeHandle() {
|
|
27545
27656
|
this.j.async.clearTimeout(this.hideTimeout);
|
|
27546
|
-
this.j.workplace
|
|
27657
|
+
Dom.append(this.j.workplace, this.resizeHandler);
|
|
27547
27658
|
}
|
|
27548
27659
|
hideResizeHandle() {
|
|
27549
27660
|
this.hideTimeout = this.j.async.setTimeout(() => {
|
|
@@ -27604,7 +27715,7 @@ var resizeCells = class extends Plugin {
|
|
|
27604
27715
|
x11 = this.maxX;
|
|
27605
27716
|
}
|
|
27606
27717
|
this.resizeDelta = x11 - this.startX + (!this.j.o.iframe ? 0 : workplacePosition.left);
|
|
27607
|
-
this.resizeHandler
|
|
27718
|
+
css(this.resizeHandler, "left", x11 - (this.j.o.iframe ? 0 : workplacePosition.left) + "px");
|
|
27608
27719
|
const sel = this.j.s.sel;
|
|
27609
27720
|
sel && sel.removeAllRanges();
|
|
27610
27721
|
}
|
|
@@ -27652,12 +27763,14 @@ var resizeCells = class extends Plugin {
|
|
|
27652
27763
|
const rightSide = !this.wholeTable;
|
|
27653
27764
|
const needChangeWidth = this.isRTL ? !rightSide : rightSide;
|
|
27654
27765
|
if (needChangeWidth) {
|
|
27655
|
-
this.workTable
|
|
27766
|
+
css(this.workTable, "width", (width + delta) / parentWidth * 100 + "%");
|
|
27656
27767
|
} else {
|
|
27657
27768
|
const side = this.isRTL ? "marginRight" : "marginLeft";
|
|
27658
27769
|
const margin = parseInt(this.j.ew.getComputedStyle(this.workTable)[side] || "0", 10);
|
|
27659
|
-
this.workTable
|
|
27660
|
-
|
|
27770
|
+
css(this.workTable, {
|
|
27771
|
+
width: (width - delta) / parentWidth * 100 + "%",
|
|
27772
|
+
[side]: (margin + delta) / parentWidth * 100 + "%"
|
|
27773
|
+
});
|
|
27661
27774
|
}
|
|
27662
27775
|
}
|
|
27663
27776
|
/**
|
|
@@ -27681,7 +27794,7 @@ var resizeCells = class extends Plugin {
|
|
|
27681
27794
|
return;
|
|
27682
27795
|
}
|
|
27683
27796
|
const workplacePosition = offset(this.j.workplace, this.j, this.j.od, true), parentBox = offset(table2, this.j, this.j.ed);
|
|
27684
|
-
this.resizeHandler
|
|
27797
|
+
css(this.resizeHandler, "left", (offsetX <= NEARBY ? box.left : box.left + box.width) - workplacePosition.left + delta + "px");
|
|
27685
27798
|
Object.assign(this.resizeHandler.style, {
|
|
27686
27799
|
height: parentBox.height + "px",
|
|
27687
27800
|
top: parentBox.top - workplacePosition.top + "px"
|
|
@@ -27709,7 +27822,7 @@ var resizeCells = class extends Plugin {
|
|
|
27709
27822
|
const parent = Dom.up(this.workCell, (elm) => Dom.isTag(elm, "table"), editor.editor);
|
|
27710
27823
|
if (parent) {
|
|
27711
27824
|
const parentBox = parent.getBoundingClientRect();
|
|
27712
|
-
this.resizeHandler
|
|
27825
|
+
css(this.resizeHandler, "top", parentBox.top + "px");
|
|
27713
27826
|
}
|
|
27714
27827
|
}).on("beforeSetMode.resize-cells", () => {
|
|
27715
27828
|
const tableModule = this.module;
|
|
@@ -27771,6 +27884,7 @@ init_decorators();
|
|
|
27771
27884
|
init_dom2();
|
|
27772
27885
|
init_global2();
|
|
27773
27886
|
init_helpers();
|
|
27887
|
+
init_css();
|
|
27774
27888
|
init_plugin2();
|
|
27775
27889
|
|
|
27776
27890
|
// node_modules/jodit/esm/plugins/resize-handler/config.js
|
|
@@ -27812,9 +27926,9 @@ var resizeHandler = class extends Plugin {
|
|
|
27812
27926
|
editor.statusbar.setMod("resize-handle", true);
|
|
27813
27927
|
editor.statusbar.show();
|
|
27814
27928
|
editor.e.on("toggleFullSize.resizeHandler", () => {
|
|
27815
|
-
this.handle
|
|
27929
|
+
css(this.handle, "display", editor.isFullSize ? "none" : "block");
|
|
27816
27930
|
}).on(this.handle, "mousedown touchstart", this.onHandleResizeStart).on(editor.ow, "mouseup touchend", this.onHandleResizeEnd);
|
|
27817
|
-
editor.container
|
|
27931
|
+
Dom.append(editor.container, this.handle);
|
|
27818
27932
|
}
|
|
27819
27933
|
}
|
|
27820
27934
|
/**
|
|
@@ -27886,6 +28000,7 @@ init_decorators();
|
|
|
27886
28000
|
init_dom();
|
|
27887
28001
|
init_global2();
|
|
27888
28002
|
init_helpers();
|
|
28003
|
+
init_css();
|
|
27889
28004
|
init_plugin();
|
|
27890
28005
|
|
|
27891
28006
|
// node_modules/jodit/esm/plugins/resizer/config.js
|
|
@@ -27953,7 +28068,7 @@ var resizer = class extends Plugin {
|
|
|
27953
28068
|
}
|
|
27954
28069
|
if (this.element && this.rect) {
|
|
27955
28070
|
const workplacePosition = this.getWorkplacePosition();
|
|
27956
|
-
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;
|
|
27957
28072
|
const newTop = pos.top - workplacePosition.top, newLeft = pos.left - workplacePosition.left;
|
|
27958
28073
|
if (top !== newTop || left !== newLeft || w9 !== this.element.offsetWidth || h61 !== this.element.offsetHeight) {
|
|
27959
28074
|
css(this.rect, {
|
|
@@ -27972,7 +28087,7 @@ var resizer = class extends Plugin {
|
|
|
27972
28087
|
}
|
|
27973
28088
|
};
|
|
27974
28089
|
this.hideSizeViewer = () => {
|
|
27975
|
-
this.sizeViewer
|
|
28090
|
+
css(this.sizeViewer, "opacity", "0");
|
|
27976
28091
|
};
|
|
27977
28092
|
}
|
|
27978
28093
|
/** @override */
|
|
@@ -28014,7 +28129,7 @@ var resizer = class extends Plugin {
|
|
|
28014
28129
|
return;
|
|
28015
28130
|
}
|
|
28016
28131
|
const width = attr(image2, "width");
|
|
28017
|
-
if (width && !
|
|
28132
|
+
if (width && !cssInline(image2, "width")) {
|
|
28018
28133
|
css(image2, "width", width);
|
|
28019
28134
|
attr(image2, "width", null);
|
|
28020
28135
|
}
|
|
@@ -28146,7 +28261,7 @@ var resizer = class extends Plugin {
|
|
|
28146
28261
|
if (changeAttrs) {
|
|
28147
28262
|
attr(element, key3, value);
|
|
28148
28263
|
}
|
|
28149
|
-
if (!changeAttrs || element
|
|
28264
|
+
if (!changeAttrs || cssInline(element, key3)) {
|
|
28150
28265
|
css(element, key3, value);
|
|
28151
28266
|
}
|
|
28152
28267
|
}
|
|
@@ -28195,14 +28310,14 @@ var resizer = class extends Plugin {
|
|
|
28195
28310
|
});
|
|
28196
28311
|
attr(wrapper, "style", attr(element, "style"));
|
|
28197
28312
|
css(wrapper, {
|
|
28198
|
-
display: element
|
|
28313
|
+
display: cssInline(element, "display") === "inline-block" ? "inline-block" : "block",
|
|
28199
28314
|
width: element.offsetWidth,
|
|
28200
28315
|
height: element.offsetHeight
|
|
28201
28316
|
});
|
|
28202
28317
|
if (element.parentNode) {
|
|
28203
|
-
|
|
28318
|
+
Dom.before(element, wrapper);
|
|
28204
28319
|
}
|
|
28205
|
-
|
|
28320
|
+
Dom.append(wrapper, element);
|
|
28206
28321
|
this.j.e.on(wrapper, "click", () => {
|
|
28207
28322
|
attr(wrapper, "data-jodit-wrapper_active", true);
|
|
28208
28323
|
});
|
|
@@ -28232,7 +28347,7 @@ var resizer = class extends Plugin {
|
|
|
28232
28347
|
this.hideSizeViewer();
|
|
28233
28348
|
return;
|
|
28234
28349
|
}
|
|
28235
|
-
this.sizeViewer
|
|
28350
|
+
css(this.sizeViewer, "opacity", "1");
|
|
28236
28351
|
this.sizeViewer.textContent = `${w9} x ${h61}`;
|
|
28237
28352
|
this.j.async.setTimeout(this.hideSizeViewer, {
|
|
28238
28353
|
timeout: this.j.o.resizer.hideSizeTimeout,
|
|
@@ -28249,10 +28364,10 @@ var resizer = class extends Plugin {
|
|
|
28249
28364
|
this.isShown = true;
|
|
28250
28365
|
if (!this.rect.parentNode) {
|
|
28251
28366
|
markOwner(this.j, this.rect);
|
|
28252
|
-
this.j.workplace
|
|
28367
|
+
Dom.append(this.j.workplace, this.rect);
|
|
28253
28368
|
}
|
|
28254
28369
|
if (this.j.isFullSize) {
|
|
28255
|
-
this.rect
|
|
28370
|
+
css(this.rect, "zIndex", css(this.j.container, "zIndex").toString());
|
|
28256
28371
|
}
|
|
28257
28372
|
this.updateSize();
|
|
28258
28373
|
}
|
|
@@ -28380,7 +28495,7 @@ function ensureHighlightStyle(doc, useHighlightAPI) {
|
|
|
28380
28495
|
} catch (_a2) {
|
|
28381
28496
|
const style = doc.createElement("style");
|
|
28382
28497
|
style.textContent = rule;
|
|
28383
|
-
doc.head
|
|
28498
|
+
Dom.append(doc.head, style);
|
|
28384
28499
|
}
|
|
28385
28500
|
}
|
|
28386
28501
|
function highlightTextRanges(jodit, rng, restRanges, ci, root) {
|
|
@@ -28688,7 +28803,7 @@ var UISearch = class UISearch2 extends UIElement {
|
|
|
28688
28803
|
}
|
|
28689
28804
|
open(query, replace, searchAndReplace = false) {
|
|
28690
28805
|
if (!this.isOpened) {
|
|
28691
|
-
this.j.workplace
|
|
28806
|
+
Dom.append(this.j.workplace, this.container);
|
|
28692
28807
|
this.isOpened = true;
|
|
28693
28808
|
}
|
|
28694
28809
|
this.calcSticky(this.j.e.fire("getStickyState.sticky") || false);
|
|
@@ -29163,7 +29278,7 @@ var select = class extends Plugin {
|
|
|
29163
29278
|
}
|
|
29164
29279
|
const text2 = range.startContainer;
|
|
29165
29280
|
const li = text2.parentNode;
|
|
29166
|
-
if (!Dom.isTag(li, "li") || !(li
|
|
29281
|
+
if (!Dom.isTag(li, "li") || !Dom.first(li, (node) => Dom.isTag(node, LIST_TAGS))) {
|
|
29167
29282
|
return;
|
|
29168
29283
|
}
|
|
29169
29284
|
const measure = this.j.ed.createRange();
|
|
@@ -29327,7 +29442,7 @@ var selectCells = class extends Plugin {
|
|
|
29327
29442
|
this.__tableModule.removeSelection(cell);
|
|
29328
29443
|
} else {
|
|
29329
29444
|
if (!cell.firstChild) {
|
|
29330
|
-
|
|
29445
|
+
Dom.append(cell, this.j.createInside.element("br"));
|
|
29331
29446
|
}
|
|
29332
29447
|
this.__tableModule.addSelection(cell);
|
|
29333
29448
|
}
|
|
@@ -29348,7 +29463,7 @@ var selectCells = class extends Plugin {
|
|
|
29348
29463
|
return;
|
|
29349
29464
|
}
|
|
29350
29465
|
if (!cell.firstChild) {
|
|
29351
|
-
|
|
29466
|
+
Dom.append(cell, this.j.createInside.element("br"));
|
|
29352
29467
|
}
|
|
29353
29468
|
this.__isSelectionMode = true;
|
|
29354
29469
|
this.__selectedCell = cell;
|
|
@@ -29413,10 +29528,9 @@ var selectCells = class extends Plugin {
|
|
|
29413
29528
|
e42.stopPropagation();
|
|
29414
29529
|
(() => {
|
|
29415
29530
|
const n57 = this.j.createInside.fromHTML('<div style="color:rgba(0,0,0,0.01);width:0;height:0"> </div>');
|
|
29416
|
-
|
|
29531
|
+
Dom.append(cell, n57);
|
|
29417
29532
|
this.j.async.setTimeout(() => {
|
|
29418
|
-
|
|
29419
|
-
(_a3 = n57.parentNode) === null || _a3 === void 0 ? void 0 : _a3.removeChild(n57);
|
|
29533
|
+
Dom.safeRemove(n57);
|
|
29420
29534
|
}, this.j.defaultTimeout / 5);
|
|
29421
29535
|
})();
|
|
29422
29536
|
}
|
|
@@ -29500,7 +29614,7 @@ var selectCells = class extends Plugin {
|
|
|
29500
29614
|
const cells = this.__tableModule.getAllSelectedCells();
|
|
29501
29615
|
cells.forEach((td) => {
|
|
29502
29616
|
Dom.detach(td);
|
|
29503
|
-
|
|
29617
|
+
Dom.append(td, this.j.createInside.element("br"));
|
|
29504
29618
|
});
|
|
29505
29619
|
this.unselectCells();
|
|
29506
29620
|
this.j.s.setCursorIn(cells[0]);
|
|
@@ -29850,6 +29964,7 @@ init_helpers();
|
|
|
29850
29964
|
|
|
29851
29965
|
// node_modules/jodit/esm/plugins/source/editor/engines/ace.js
|
|
29852
29966
|
init_constants();
|
|
29967
|
+
init_dom();
|
|
29853
29968
|
init_helpers();
|
|
29854
29969
|
|
|
29855
29970
|
// node_modules/jodit/esm/plugins/source/editor/sourceEditor.js
|
|
@@ -29949,7 +30064,7 @@ var AceEditor = class extends SourceEditor {
|
|
|
29949
30064
|
return;
|
|
29950
30065
|
}
|
|
29951
30066
|
const fakeMirror = this.j.c.div("jodit-source__mirror-fake");
|
|
29952
|
-
this.container
|
|
30067
|
+
Dom.append(this.container, fakeMirror);
|
|
29953
30068
|
const ace = editor.ow.ace;
|
|
29954
30069
|
this.instance = ace.edit(fakeMirror);
|
|
29955
30070
|
if (editor.o.direction === "rtl") {
|
|
@@ -30087,8 +30202,8 @@ var TextAreaEditor = class extends SourceEditor {
|
|
|
30087
30202
|
constructor() {
|
|
30088
30203
|
super(...arguments);
|
|
30089
30204
|
this.autosize = this.j.async.debounce(() => {
|
|
30090
|
-
this.instance
|
|
30091
|
-
this.instance
|
|
30205
|
+
css(this.instance, "height", "auto");
|
|
30206
|
+
css(this.instance, "height", this.instance.scrollHeight);
|
|
30092
30207
|
}, this.j.defaultTimeout, true);
|
|
30093
30208
|
}
|
|
30094
30209
|
init(editor) {
|
|
@@ -30096,7 +30211,7 @@ var TextAreaEditor = class extends SourceEditor {
|
|
|
30096
30211
|
class: "jodit-source__mirror",
|
|
30097
30212
|
dir: editor.o.direction === "rtl" ? "rtl" : void 0
|
|
30098
30213
|
});
|
|
30099
|
-
this.container
|
|
30214
|
+
Dom.append(this.container, this.instance);
|
|
30100
30215
|
editor.e.on(this.instance, "mousedown keydown touchstart input", editor.async.debounce(this.toWYSIWYG, editor.defaultTimeout)).on("setMinHeight.source", (minHeightD) => {
|
|
30101
30216
|
css(this.instance, "minHeight", minHeightD);
|
|
30102
30217
|
}).on(this.instance, "change keydown mousedown touchstart input", this.autosize).on("afterSetMode.source", this.autosize).on(this.instance, "mousedown focus blur", (e42) => {
|
|
@@ -30380,9 +30495,9 @@ var source = class extends Plugin {
|
|
|
30380
30495
|
/** @override */
|
|
30381
30496
|
afterInit(editor) {
|
|
30382
30497
|
this.mirrorContainer = editor.c.div("jodit-source");
|
|
30383
|
-
editor.workplace
|
|
30498
|
+
Dom.append(editor.workplace, this.mirrorContainer);
|
|
30384
30499
|
editor.e.on("afterAddPlace changePlace afterInit", () => {
|
|
30385
|
-
editor.workplace
|
|
30500
|
+
Dom.append(editor.workplace, this.mirrorContainer);
|
|
30386
30501
|
});
|
|
30387
30502
|
this.sourceEditor = createSourceEditor("area", editor, this.mirrorContainer, this.toWYSIWYG, this.fromWYSIWYG);
|
|
30388
30503
|
editor.e.on(editor.ow, "keydown", (e42) => {
|
|
@@ -30894,7 +31009,7 @@ var sticky = class extends Plugin {
|
|
|
30894
31009
|
this.__createDummy = (toolbar) => {
|
|
30895
31010
|
this.__dummyBox = this.j.c.div();
|
|
30896
31011
|
this.__dummyBox.classList.add("jodit_sticky-dummy_toolbar");
|
|
30897
|
-
|
|
31012
|
+
Dom.before(toolbar, this.__dummyBox);
|
|
30898
31013
|
};
|
|
30899
31014
|
this.addSticky = (toolbar) => {
|
|
30900
31015
|
if (!this.__isToolbarStuck) {
|
|
@@ -30972,6 +31087,7 @@ init_utils3();
|
|
|
30972
31087
|
init_plugin();
|
|
30973
31088
|
|
|
30974
31089
|
// node_modules/jodit/esm/plugins/symbols/config.js
|
|
31090
|
+
init_dom();
|
|
30975
31091
|
init_config();
|
|
30976
31092
|
|
|
30977
31093
|
// node_modules/jodit/esm/plugins/symbols/symbols.svg.js
|
|
@@ -31201,12 +31317,12 @@ Config.prototype.controls.symbols = {
|
|
|
31201
31317
|
if (editor.o.usePopupForSpecialCharacters) {
|
|
31202
31318
|
const box = editor.c.div();
|
|
31203
31319
|
box.classList.add("jodit-symbols");
|
|
31204
|
-
|
|
31320
|
+
Dom.append(box, container);
|
|
31205
31321
|
editor.e.on(container, "close_dialog", close);
|
|
31206
31322
|
return box;
|
|
31207
31323
|
}
|
|
31208
31324
|
editor.alert(container, "Select Special Character", void 0, "jodit-symbols").bindDestruct(editor);
|
|
31209
|
-
const a79 = container.
|
|
31325
|
+
const a79 = Dom.first(container, (node) => Dom.isTag(node, "a"));
|
|
31210
31326
|
a79 && a79.focus();
|
|
31211
31327
|
}
|
|
31212
31328
|
return;
|
|
@@ -31461,8 +31577,8 @@ var symbols = class extends Plugin {
|
|
|
31461
31577
|
<div class="jodit-symbols__preview"></div>
|
|
31462
31578
|
</div>
|
|
31463
31579
|
</div>`);
|
|
31464
|
-
const preview2 = container.
|
|
31465
|
-
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"));
|
|
31466
31582
|
const body = table2.tBodies[0];
|
|
31467
31583
|
const chars = [];
|
|
31468
31584
|
for (let i56 = 0; i56 < jodit.o.specialCharacters.length; ) {
|
|
@@ -31475,10 +31591,10 @@ var symbols = class extends Plugin {
|
|
|
31475
31591
|
tabindex="-1"
|
|
31476
31592
|
>${jodit.o.specialCharacters[i56]}</a>`);
|
|
31477
31593
|
chars.push(a79);
|
|
31478
|
-
|
|
31479
|
-
|
|
31594
|
+
Dom.append(td, a79);
|
|
31595
|
+
Dom.append(tr, td);
|
|
31480
31596
|
}
|
|
31481
|
-
|
|
31597
|
+
Dom.append(body, tr);
|
|
31482
31598
|
}
|
|
31483
31599
|
const self2 = this;
|
|
31484
31600
|
jodit.e.on(chars, "focus", function() {
|
|
@@ -31705,11 +31821,11 @@ var UiAiAssistant = class UiAiAssistant2 extends UIElement {
|
|
|
31705
31821
|
this.__results.classList.remove(hideMod);
|
|
31706
31822
|
this.__buttons.classList.remove(hideMod);
|
|
31707
31823
|
Dom.detach(this.__results);
|
|
31708
|
-
this.__results
|
|
31824
|
+
Dom.append(this.__results, this.__spinner);
|
|
31709
31825
|
this.__insertButton.focus();
|
|
31710
31826
|
});
|
|
31711
|
-
this.__buttons
|
|
31712
|
-
this.__body
|
|
31827
|
+
Dom.append(this.__buttons, buttonsBLock.container);
|
|
31828
|
+
Dom.append(this.__body, this.__formAiAssistant.container);
|
|
31713
31829
|
this.onChangePromptValue();
|
|
31714
31830
|
}
|
|
31715
31831
|
render() {
|
|
@@ -31746,7 +31862,7 @@ var UiAiAssistant = class UiAiAssistant2 extends UIElement {
|
|
|
31746
31862
|
this.setMod("loading", false);
|
|
31747
31863
|
Dom.detach(this.__results);
|
|
31748
31864
|
this.__aiResult = result;
|
|
31749
|
-
this.__results
|
|
31865
|
+
Dom.append(this.__results, this.jodit.c.fromHTML(result));
|
|
31750
31866
|
this.__toggleSubmitButton(false);
|
|
31751
31867
|
this.__toggleInsertButton(false);
|
|
31752
31868
|
}
|
|
@@ -32005,7 +32121,13 @@ Config.prototype.controls.table = {
|
|
|
32005
32121
|
}
|
|
32006
32122
|
return out.join("");
|
|
32007
32123
|
};
|
|
32008
|
-
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 = [];
|
|
32009
32131
|
const cnt = default_rows_count * default_cols_count;
|
|
32010
32132
|
attr(blocksContainer, {
|
|
32011
32133
|
role: "grid",
|
|
@@ -32041,7 +32163,7 @@ Config.prototype.controls.table = {
|
|
|
32041
32163
|
const k7 = parseInt(attr(cell, "-index") || "0", 10);
|
|
32042
32164
|
const rows_count = Math.ceil((k7 + 1) / default_cols_count), cols_count = k7 % default_cols_count + 1;
|
|
32043
32165
|
const crt = editor.createInside, tbody = crt.element("tbody"), table2 = crt.element("table");
|
|
32044
|
-
|
|
32166
|
+
Dom.append(table2, tbody);
|
|
32045
32167
|
let first_td = null, tr, td;
|
|
32046
32168
|
for (let i56 = 1; i56 <= rows_count; i56 += 1) {
|
|
32047
32169
|
tr = crt.element("tr");
|
|
@@ -32051,13 +32173,13 @@ Config.prototype.controls.table = {
|
|
|
32051
32173
|
first_td = td;
|
|
32052
32174
|
}
|
|
32053
32175
|
css(td, "width", (100 / cols_count).toFixed(4) + "%");
|
|
32054
|
-
|
|
32055
|
-
|
|
32056
|
-
|
|
32057
|
-
|
|
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);
|
|
32058
32180
|
}
|
|
32059
|
-
|
|
32060
|
-
|
|
32181
|
+
Dom.append(tbody, crt.text("\n"));
|
|
32182
|
+
Dom.append(tbody, tr);
|
|
32061
32183
|
}
|
|
32062
32184
|
$$("input[type=checkbox]:checked", options2).forEach((input) => {
|
|
32063
32185
|
input.value.split(/[\s]+/).forEach((className) => {
|
|
@@ -32159,9 +32281,9 @@ Config.prototype.controls.table = {
|
|
|
32159
32281
|
const row = editor.c.div();
|
|
32160
32282
|
attr(row, "role", "row");
|
|
32161
32283
|
for (let j10 = 0; j10 < default_cols_count; j10 += 1) {
|
|
32162
|
-
|
|
32284
|
+
Dom.append(row, cells[i56 * default_cols_count + j10]);
|
|
32163
32285
|
}
|
|
32164
|
-
|
|
32286
|
+
Dom.append(blocksContainer, row);
|
|
32165
32287
|
}
|
|
32166
32288
|
if (cells[0]) {
|
|
32167
32289
|
cells[0].className = "hovered";
|
|
@@ -32210,7 +32332,7 @@ function tableKeyboardNavigation(editor) {
|
|
|
32210
32332
|
case KEY_LEFT: {
|
|
32211
32333
|
next = getNextCell();
|
|
32212
32334
|
if (!next) {
|
|
32213
|
-
tableModule.appendRow(table2, !isPrev ? false : table2.
|
|
32335
|
+
tableModule.appendRow(table2, !isPrev ? false : Dom.first(table2, (node) => Dom.isTag(node, "tr")), !isPrev);
|
|
32214
32336
|
next = getNextCell();
|
|
32215
32337
|
}
|
|
32216
32338
|
break;
|
|
@@ -32238,7 +32360,7 @@ function tableKeyboardNavigation(editor) {
|
|
|
32238
32360
|
editor.e.fire("hidePopup hideResizer");
|
|
32239
32361
|
if (!next.firstChild) {
|
|
32240
32362
|
const first = editor.createInside.element("br");
|
|
32241
|
-
|
|
32363
|
+
Dom.append(next, first);
|
|
32242
32364
|
editor.s.setCursorBefore(first);
|
|
32243
32365
|
} else {
|
|
32244
32366
|
if (key3 === KEY_TAB) {
|
|
@@ -32442,7 +32564,7 @@ var xpath = class extends Plugin {
|
|
|
32442
32564
|
name: "selectall"
|
|
32443
32565
|
}, this.j.o.controls.selectall));
|
|
32444
32566
|
this.selectAllButton.state.size = "tiny";
|
|
32445
|
-
this.container &&
|
|
32567
|
+
this.container && Dom.prepend(this.container, this.selectAllButton.container);
|
|
32446
32568
|
};
|
|
32447
32569
|
this.calcPathImd = () => {
|
|
32448
32570
|
if (this.isDestructed) {
|
|
@@ -32459,7 +32581,7 @@ var xpath = class extends Plugin {
|
|
|
32459
32581
|
name = elm.nodeName.toLowerCase();
|
|
32460
32582
|
xpth = getXPathByElement(elm, this.j.editor).replace(/^\//, "");
|
|
32461
32583
|
li = this.tpl(elm, xpth, name, this.j.i18n("Select %s", name));
|
|
32462
|
-
this.container && this.container
|
|
32584
|
+
this.container && Dom.prepend(this.container, li);
|
|
32463
32585
|
}
|
|
32464
32586
|
}, this.j.editor);
|
|
32465
32587
|
}
|
|
@@ -32849,6 +32971,7 @@ init_constants();
|
|
|
32849
32971
|
init_decorators();
|
|
32850
32972
|
init_global2();
|
|
32851
32973
|
init_helpers();
|
|
32974
|
+
init_css();
|
|
32852
32975
|
init_config();
|
|
32853
32976
|
var __decorate71 = function(decorators, target, key3, desc) {
|
|
32854
32977
|
var c74 = arguments.length, r60 = c74 < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key3) : desc, d55;
|
|
@@ -33530,7 +33653,7 @@ var Jodit2 = Jodit_1 = class Jodit3 extends ViewWithToolbar {
|
|
|
33530
33653
|
this.setReadOnly(isDisabled || readOnly);
|
|
33531
33654
|
this.__wasReadOnly = readOnly;
|
|
33532
33655
|
if (this.editor) {
|
|
33533
|
-
this.editor
|
|
33656
|
+
attr(this.editor, "aria-disabled", isDisabled);
|
|
33534
33657
|
this.container.classList.toggle("jodit_disabled", isDisabled);
|
|
33535
33658
|
this.e.fire("disabled", isDisabled);
|
|
33536
33659
|
}
|
|
@@ -33554,9 +33677,9 @@ var Jodit2 = Jodit_1 = class Jodit3 extends ViewWithToolbar {
|
|
|
33554
33677
|
this.__wasReadOnly = isReadOnly;
|
|
33555
33678
|
this.o.readonly = isReadOnly;
|
|
33556
33679
|
if (isReadOnly) {
|
|
33557
|
-
this.editor && this.editor
|
|
33680
|
+
this.editor && attr(this.editor, "contenteditable", null);
|
|
33558
33681
|
} else {
|
|
33559
|
-
this.editor && this.editor
|
|
33682
|
+
this.editor && attr(this.editor, "contenteditable", true);
|
|
33560
33683
|
}
|
|
33561
33684
|
this.e && this.e.fire("readonly", isReadOnly);
|
|
33562
33685
|
}
|
|
@@ -33701,42 +33824,43 @@ var Jodit2 = Jodit_1 = class Jodit3 extends ViewWithToolbar {
|
|
|
33701
33824
|
const property = kebabCase(key3);
|
|
33702
33825
|
container.style.setProperty(`--jd-${property}`, styleValues[key3]);
|
|
33703
33826
|
});
|
|
33704
|
-
container
|
|
33827
|
+
attr(container, "contenteditable", false);
|
|
33705
33828
|
let buffer = null;
|
|
33706
33829
|
if (this.o.inline) {
|
|
33707
33830
|
if (["TEXTAREA", "INPUT"].indexOf(element.nodeName) === -1) {
|
|
33708
33831
|
container = element;
|
|
33709
|
-
element
|
|
33832
|
+
attr(element, __defaultClassesKey, element.className.toString());
|
|
33710
33833
|
buffer = container.innerHTML;
|
|
33711
|
-
container
|
|
33834
|
+
Dom.detach(container);
|
|
33712
33835
|
}
|
|
33713
33836
|
container.classList.add("jodit_inline");
|
|
33714
33837
|
container.classList.add("jodit-container");
|
|
33715
33838
|
}
|
|
33716
33839
|
if (element !== container) {
|
|
33717
|
-
|
|
33718
|
-
|
|
33840
|
+
const display = cssInline(element, "display");
|
|
33841
|
+
if (display) {
|
|
33842
|
+
attr(element, __defaultStyleDisplayKey, display);
|
|
33719
33843
|
}
|
|
33720
|
-
element
|
|
33844
|
+
css(element, "display", "none");
|
|
33721
33845
|
}
|
|
33722
33846
|
const SLOT = "workplace-slot";
|
|
33723
33847
|
const aboveSlot = this.c.div(this.getFullElName(SLOT, "above"), NOEDIT);
|
|
33724
|
-
aboveSlot
|
|
33848
|
+
attr(aboveSlot, "data-jodit-above-toolbar", "");
|
|
33725
33849
|
Dom.appendChildFirst(container, aboveSlot);
|
|
33726
33850
|
const topSlot = this.c.div(this.getFullElName(SLOT, "top"), NOEDIT);
|
|
33727
|
-
|
|
33851
|
+
Dom.append(container, topSlot);
|
|
33728
33852
|
const centerSlot = this.c.div(this.getFullElName(SLOT, "center"), NOEDIT);
|
|
33729
33853
|
const workplace = this.c.div("jodit-workplace", NOEDIT);
|
|
33730
33854
|
const leftSlot = this.c.div(this.getFullElName(SLOT, "left"), NOEDIT);
|
|
33731
33855
|
const rightSlot = this.c.div(this.getFullElName(SLOT, "right"), NOEDIT);
|
|
33732
|
-
|
|
33733
|
-
|
|
33734
|
-
|
|
33735
|
-
|
|
33856
|
+
Dom.append(centerSlot, leftSlot);
|
|
33857
|
+
Dom.append(centerSlot, workplace);
|
|
33858
|
+
Dom.append(centerSlot, rightSlot);
|
|
33859
|
+
Dom.append(container, centerSlot);
|
|
33736
33860
|
const bottomPanel = this.c.div(this.getFullElName(SLOT, "bottom"), NOEDIT);
|
|
33737
|
-
|
|
33861
|
+
Dom.append(container, bottomPanel);
|
|
33738
33862
|
if (element.parentNode && element !== container) {
|
|
33739
|
-
|
|
33863
|
+
Dom.before(element, container);
|
|
33740
33864
|
}
|
|
33741
33865
|
Object.defineProperty(element, "component", {
|
|
33742
33866
|
enumerable: false,
|
|
@@ -33748,7 +33872,7 @@ var Jodit2 = Jodit_1 = class Jodit3 extends ViewWithToolbar {
|
|
|
33748
33872
|
"aria-disabled": false,
|
|
33749
33873
|
tabindex: this.o.tabIndex
|
|
33750
33874
|
});
|
|
33751
|
-
|
|
33875
|
+
Dom.append(workplace, editor);
|
|
33752
33876
|
const currentPlace = {
|
|
33753
33877
|
editor,
|
|
33754
33878
|
element,
|
|
@@ -33792,7 +33916,7 @@ var Jodit2 = Jodit_1 = class Jodit3 extends ViewWithToolbar {
|
|
|
33792
33916
|
return callPromise(initResult, init2);
|
|
33793
33917
|
}
|
|
33794
33918
|
addDisclaimer(elm) {
|
|
33795
|
-
this.workplace
|
|
33919
|
+
Dom.append(this.workplace, elm);
|
|
33796
33920
|
}
|
|
33797
33921
|
/**
|
|
33798
33922
|
* Set current place object
|
|
@@ -33882,10 +34006,10 @@ var Jodit2 = Jodit_1 = class Jodit3 extends ViewWithToolbar {
|
|
|
33882
34006
|
const { editor } = this;
|
|
33883
34007
|
if (this.o.direction) {
|
|
33884
34008
|
const direction = this.o.direction.toLowerCase() === "rtl" ? "rtl" : "ltr";
|
|
33885
|
-
this.editor
|
|
33886
|
-
this.editor
|
|
33887
|
-
this.container
|
|
33888
|
-
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);
|
|
33889
34013
|
this.toolbar.setDirection(direction);
|
|
33890
34014
|
}
|
|
33891
34015
|
this.e.on(editor, "mousedown touchstart focus", () => {
|
|
@@ -33962,20 +34086,20 @@ var Jodit2 = Jodit_1 = class Jodit3 extends ViewWithToolbar {
|
|
|
33962
34086
|
if (element.hasAttribute(__defaultStyleDisplayKey)) {
|
|
33963
34087
|
const display = attr(element, __defaultStyleDisplayKey);
|
|
33964
34088
|
if (display) {
|
|
33965
|
-
element
|
|
33966
|
-
element
|
|
34089
|
+
css(element, "display", display);
|
|
34090
|
+
attr(element, __defaultStyleDisplayKey, null);
|
|
33967
34091
|
}
|
|
33968
34092
|
} else {
|
|
33969
|
-
element
|
|
34093
|
+
css(element, "display", "");
|
|
33970
34094
|
}
|
|
33971
34095
|
} else {
|
|
33972
34096
|
if (element.hasAttribute(__defaultClassesKey)) {
|
|
33973
34097
|
element.className = attr(element, __defaultClassesKey) || "";
|
|
33974
|
-
element
|
|
34098
|
+
attr(element, __defaultClassesKey, null);
|
|
33975
34099
|
}
|
|
33976
34100
|
}
|
|
33977
34101
|
if (element.hasAttribute("style") && !attr(element, "style")) {
|
|
33978
|
-
element
|
|
34102
|
+
attr(element, "style", null);
|
|
33979
34103
|
}
|
|
33980
34104
|
statusbar.destruct();
|
|
33981
34105
|
this.e.off(container);
|
|
@@ -34469,7 +34593,7 @@ var SpeechRecognizeNative = class extends Plugin {
|
|
|
34469
34593
|
if (!this.messagePopup) {
|
|
34470
34594
|
this.messagePopup = this.j.create.div("jodit-speech-recognize__popup");
|
|
34471
34595
|
}
|
|
34472
|
-
this.j.workplace
|
|
34596
|
+
Dom.append(this.j.workplace, this.messagePopup);
|
|
34473
34597
|
this.j.async.clearTimeout(this.__hidePopupTimeout);
|
|
34474
34598
|
this.__hidePopupTimeout = this.j.async.setTimeout(() => {
|
|
34475
34599
|
Dom.safeRemove(this.messagePopup);
|
|
@@ -54236,15 +54360,16 @@ jodit/esm/core/helpers/checker/is-array.js:
|
|
|
54236
54360
|
jodit/esm/core/helpers/checker/is-string.js:
|
|
54237
54361
|
jodit/esm/core/helpers/checker/is-view-object.js:
|
|
54238
54362
|
jodit/esm/core/helpers/string/kebab-case.js:
|
|
54239
|
-
jodit/esm/core/helpers/checker/is-boolean.js:
|
|
54240
54363
|
jodit/esm/core/helpers/checker/is-window.js:
|
|
54241
54364
|
jodit/esm/core/helpers/checker/is-plain-object.js:
|
|
54365
|
+
jodit/esm/core/helpers/checker/is-boolean.js:
|
|
54242
54366
|
jodit/esm/core/helpers/checker/is-numeric.js:
|
|
54243
54367
|
jodit/esm/core/helpers/checker/is-void.js:
|
|
54244
54368
|
jodit/esm/core/helpers/color/color-to-hex.js:
|
|
54245
54369
|
jodit/esm/core/helpers/normalize/normalize-css-value.js:
|
|
54246
54370
|
jodit/esm/core/helpers/string/camel-case.js:
|
|
54247
54371
|
jodit/esm/core/helpers/utils/css.js:
|
|
54372
|
+
jodit/esm/core/helpers/utils/attr.js:
|
|
54248
54373
|
jodit/esm/core/helpers/utils/get-class-name.js:
|
|
54249
54374
|
jodit/esm/core/helpers/array/split-array.js:
|
|
54250
54375
|
jodit/esm/core/helpers/utils/error/errors/abort-error.js:
|
|
@@ -54264,7 +54389,6 @@ jodit/esm/core/event-emitter/global.js:
|
|
|
54264
54389
|
jodit/esm/core/helpers/checker/is-html.js:
|
|
54265
54390
|
jodit/esm/core/helpers/checker/is-set.js:
|
|
54266
54391
|
jodit/esm/core/helpers/string/trim.js:
|
|
54267
|
-
jodit/esm/core/helpers/utils/attr.js:
|
|
54268
54392
|
jodit/esm/core/helpers/utils/data-bind.js:
|
|
54269
54393
|
jodit/esm/core/helpers/checker/is-promise.js:
|
|
54270
54394
|
jodit/esm/core/helpers/utils/utils.js:
|