tinymce.d.ts 106 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820
interface StringPathBookmark {
    start: string;
    end?: string;
}
interface RangeBookmark {
    rng: Range;
}
interface IdBookmark {
    id: string;
    keep?: boolean;
}
interface IndexBookmark {
    name: string;
    index: number;
}
interface PathBookmark {
    start: number[];
    end?: number[];
}
declare type Bookmark = StringPathBookmark | RangeBookmark | IdBookmark | IndexBookmark | PathBookmark;
declare type MappedEvent<T, K extends string> = K extends keyof T ? T[K] : any;
interface NativeEventMap {
    'beforepaste': Event;
    'blur': FocusEvent;
    'beforeinput': InputEvent;
    'click': MouseEvent;
    'compositionend': Event;
    'compositionstart': Event;
    'compositionupdate': Event;
    'contextmenu': PointerEvent;
    'copy': ClipboardEvent;
    'cut': ClipboardEvent;
    'dblclick': MouseEvent;
    'drag': DragEvent;
    'dragdrop': DragEvent;
    'dragend': DragEvent;
    'draggesture': DragEvent;
    'dragover': DragEvent;
    'dragstart': DragEvent;
    'drop': DragEvent;
    'focus': FocusEvent;
    'focusin': FocusEvent;
    'focusout': FocusEvent;
    'input': InputEvent;
    'keydown': KeyboardEvent;
    'keypress': KeyboardEvent;
    'keyup': KeyboardEvent;
    'mousedown': MouseEvent;
    'mouseenter': MouseEvent;
    'mouseleave': MouseEvent;
    'mousemove': MouseEvent;
    'mouseout': MouseEvent;
    'mouseover': MouseEvent;
    'mouseup': MouseEvent;
    'paste': ClipboardEvent;
    'selectionchange': Event;
    'submit': Event;
    'touchend': TouchEvent;
    'touchmove': TouchEvent;
    'touchstart': TouchEvent;
    'touchcancel': TouchEvent;
    'wheel': WheelEvent;
}
declare type EditorEvent<T> = T & {
    target: any;
    type: string;
    preventDefault(): void;
    isDefaultPrevented(): boolean;
    stopPropagation(): void;
    isPropagationStopped(): boolean;
    stopImmediatePropagation(): void;
    isImmediatePropagationStopped(): boolean;
};
interface EventDispatcherSettings {
    scope?: any;
    toggleEvent?: (name: string, state: boolean) => void | boolean;
    beforeFire?: <T>(args: EditorEvent<T>) => void;
}
interface EventDispatcherConstructor<T extends NativeEventMap> {
    readonly prototype: EventDispatcher<T>;
    new (settings?: EventDispatcherSettings): EventDispatcher<T>;
    isNative(name: string): boolean;
}
declare class EventDispatcher<T> {
    static isNative(name: string): boolean;
    private readonly settings;
    private readonly scope;
    private readonly toggleEvent;
    private bindings;
    constructor(settings?: Record<string, any>);
    fire<K extends string, U extends MappedEvent<T, K>>(nameIn: K, argsIn?: U): EditorEvent<U>;
    on<K extends string>(name: K, callback: false | ((event: EditorEvent<MappedEvent<T, K>>) => void), prepend?: boolean, extra?: {}): this;
    off<K extends string>(name?: K, callback?: (event: EditorEvent<MappedEvent<T, K>>) => void): this;
    once<K extends string>(name: K, callback: (event: EditorEvent<MappedEvent<T, K>>) => void, prepend?: boolean): this;
    has(name: string): boolean;
}
declare const enum UndoLevelType {
    Fragmented = "fragmented",
    Complete = "complete"
}
interface UndoLevel {
    type: UndoLevelType;
    fragments: string[];
    content: string;
    bookmark: Bookmark;
    beforeBookmark: Bookmark;
}
interface UndoManager {
    data: UndoLevel[];
    typing: boolean;
    add: (level?: UndoLevel, event?: EditorEvent<any>) => UndoLevel;
    beforeChange: () => void;
    undo: () => UndoLevel;
    redo: () => UndoLevel;
    clear: () => void;
    reset: () => void;
    hasUndo: () => boolean;
    hasRedo: () => boolean;
    transact: (callback: () => void) => UndoLevel;
    ignore: (callback: () => void) => void;
    extra: (callback1: () => void, callback2: () => void) => void;
}
declare type ArrayCallback<T, R> = (x: T, i: number, xs: ReadonlyArray<T>) => R;
declare type ObjCallback<T, R> = (value: T, key: string, obj: Record<string, T>) => R;
declare type ArrayCallback$1<T, R> = ArrayCallback<T, R>;
declare type ObjCallback$1<T, R> = ObjCallback<T, R>;
interface Tools {
    is(obj: any, type: string): boolean;
    isArray<T>(arr: any): arr is Array<T>;
    inArray<T>(arr: ArrayLike<T>, value: T): number;
    grep<T>(arr: ArrayLike<T> | null | undefined, pred?: ArrayCallback$1<T, boolean>): T[];
    grep<T>(arr: Record<string, T> | null | undefined, pred?: ObjCallback$1<T, boolean>): T[];
    trim(str: string): string;
    toArray<T>(obj: ArrayLike<T>): T[];
    hasOwn(obj: any, name: string): boolean;
    makeMap<T>(items: ArrayLike<T> | string, delim?: string | RegExp, map?: Record<string, T | string>): Record<string, T | string>;
    each<T>(arr: ArrayLike<T> | null | undefined, cb: ArrayCallback$1<T, void | boolean>, scope?: any): boolean;
    each<T>(obj: Record<string, T> | null | undefined, cb: ObjCallback$1<T, void | boolean>, scope?: any): boolean;
    map<T, R>(arr: ArrayLike<T> | null | undefined, cb: ArrayCallback$1<T, R>): R[];
    map<T, R>(obj: Record<string, T> | null | undefined, cb: ObjCallback$1<T, R>): R[];
    extend(obj: Object, ext: Object, ...objs: Object[]): any;
    create(name: string, p: Object, root?: Object): any;
    walk<T = any>(obj: T, f: Function, n?: keyof T, scope?: any): void;
    createNS(name: string, o?: Object): any;
    resolve(path: string, o?: Object): any;
    explode(s: string, d?: string | RegExp): string[];
    _addCacheSuffix(url: string): string;
}
declare type EventUtilsCallback<T> = (event: EventUtilsEvent<T>) => void;
declare type EventUtilsEvent<T> = T & {
    type: string;
    target: any;
    isDefaultPrevented: () => boolean;
    preventDefault: () => void;
    isPropagationStopped: () => boolean;
    stopPropagation: () => void;
    isImmediatePropagationStopped: () => boolean;
    stopImmediatePropagation: () => void;
};
interface EventUtilsConstructor {
    readonly prototype: EventUtils;
    new (): EventUtils;
    Event: EventUtils;
}
declare class EventUtils {
    static Event: EventUtils;
    domLoaded: boolean;
    events: Record<string, any>;
    private readonly expando;
    private hasFocusIn;
    private hasMouseEnterLeave;
    private mouseEnterLeave;
    private count;
    constructor();
    bind<K extends keyof HTMLElementEventMap>(target: any, name: K, callback: EventUtilsCallback<HTMLElementEventMap[K]>, scope?: any): EventUtilsCallback<HTMLElementEventMap[K]>;
    bind<T = any>(target: any, names: string, callback: EventUtilsCallback<T>, scope?: any): EventUtilsCallback<T>;
    unbind<K extends keyof HTMLElementEventMap>(target: any, name: K, callback?: EventUtilsCallback<HTMLElementEventMap[K]>): this;
    unbind<T = any>(target: any, names: string, callback?: EventUtilsCallback<T>): this;
    unbind(target: any): this;
    fire(target: any, name: string, args?: {}): this;
    clean(target: any): this;
    destroy(): void;
    cancel<T = any>(e: EventUtilsEvent<T>): boolean;
    private executeHandlers;
}
declare type DomQuerySelector<T extends Node> = string | T | T[] | DomQuery<T>;
declare type DomQueryInitSelector<T extends Node> = DomQuerySelector<T> | Window;
interface Hook {
    get: <T extends Node>(elm: T) => string;
    set: <T extends Node>($elm: DomQuery<T>, value: string | null) => void;
}
interface DomQueryConstructor {
    readonly prototype: DomQuery;
    attrHooks: Record<string, Hook>;
    cssHooks: Record<string, Hook>;
    fn: DomQuery;
    find: any;
    expr: {
        cacheLength: number;
        createPseudo: Function;
        match: Record<string, RegExp>;
        attrHandle: {};
        find: Record<string, Function>;
        relative: Record<string, {
            dir: string;
            first?: boolean;
        }>;
        preFilter: Record<string, Function>;
        filter: Record<string, Function>;
        pseudos: Record<string, Function>;
    };
    extend: Tools['extend'];
    isArray: Tools['isArray'];
    new <T extends Node = Node>(selector?: DomQueryInitSelector<T>, context?: Node): DomQuery<T>;
    <T extends Node = Node>(selector?: DomQueryInitSelector<T>, context?: Node): DomQuery<T>;
    overrideDefaults(callback: () => {
        context: Node;
        element: Element;
    }): DomQueryConstructor;
    makeArray<T>(object: T): T[];
    inArray<T>(item: {}, array: T[]): number;
    each<T>(obj: T[], callback: (i: number, value: T) => void): void;
    each<T>(obj: T, callback: (key: string, obj: T[keyof T]) => void): void;
    trim(str: string): string;
    grep<T>(array: T[], callback: (item: any, i: number) => boolean): T[];
    unique<T>(results: T[]): T[];
    text(elem: Node): string;
    contains(context: any, elem: Node): number;
    filter(expr: string, elems: Node[], not?: boolean): any;
}
interface DomQuery<T extends Node = Node> extends ArrayLike<T> {
    init: (selector?: DomQueryInitSelector<T>, context?: Node) => void;
    context: T;
    length: number;
    selector: string;
    add(items: Array<string | T> | DomQuery<T>, sort?: boolean): this;
    addClass(className: string): this;
    after(content: DomQuerySelector<T>): this;
    append(content: DomQuerySelector<T>): this;
    appendTo(val: DomQuerySelector<T>): this;
    attr(name: string, value: string | boolean | number | null): this;
    attr(attrs: Record<string, string | boolean | number | null>): this;
    attr(name: string): string;
    before(content: DomQuerySelector<T>): this;
    children(selector?: string): DomQuery<ChildNode>;
    clone(): this;
    closest(selector: DomQuerySelector<T>): this;
    contents(selector?: string): DomQuery<ChildNode>;
    css(name: string, value: string | number | null): this;
    css(styles: Record<string, string | number | null>): this;
    css(name: string): string;
    each(callback: (i: number, value: T) => void): this;
    empty(): this;
    eq(index: number): this;
    filter(selector: string | ((i: number, item: any) => boolean)): this;
    find(selector: string): this;
    first(): this;
    hasClass(className: string): boolean;
    hide(): this;
    html(value: string): this;
    html(): string;
    is(selector: string | ((i: number, item: any) => boolean)): boolean;
    last(): this;
    next(selector?: string): DomQuery<ChildNode>;
    nextUntil(selector: DomQuerySelector<T>, until?: string): DomQuery<ChildNode>;
    off<K extends keyof HTMLElementEventMap>(name: K, callback?: EventUtilsCallback<HTMLElementEventMap[K]>): this;
    off<U>(name?: string, callback?: EventUtilsCallback<U>): this;
    offset(offset?: {}): {} | this;
    on<K extends keyof HTMLElementEventMap>(name: K, callback: EventUtilsCallback<HTMLElementEventMap[K]>): this;
    on<U>(name: string, callback: EventUtilsCallback<U>): this;
    parent(selector?: string): DomQuery<Node>;
    parents(selector?: string): DomQuery<Node>;
    parentsUntil(selector: DomQuerySelector<T>, filter?: string): DomQuery<Node>;
    prepend(content: DomQuerySelector<T>): this;
    prependTo(val: DomQuerySelector<T>): this;
    prev(selector?: string): DomQuery<ChildNode>;
    prevUntil(selector: DomQuerySelector<T>, filter?: string): DomQuery<ChildNode>;
    prop(name: string, value: string): this;
    prop(props: Record<string, string | number>): this;
    prop(name: string): string;
    push(...items: T[]): number;
    remove(): this;
    removeAttr(name: string): this;
    removeClass(className: string): this;
    replaceWith(content: DomQuerySelector<T>): this;
    show(): this;
    slice(start: number, end?: number): this;
    splice(start: number, deleteCount?: number): T[];
    sort(compareFn?: (a: T, b: T) => number): T[];
    text(value: string): DomQuery;
    text(): string;
    toArray(): T[];
    toggleClass(className: string, state?: boolean): this;
    trigger(name: string | {
        type: string;
    }): this;
    unwrap(): this;
    wrap(content: DomQuerySelector<T>): this;
    wrapAll(content: DomQuerySelector<T>): this;
    wrapInner(content: string): this;
}
declare type SchemaType = 'html4' | 'html5' | 'html5-strict';
interface SchemaSettings {
    block_elements?: string;
    boolean_attributes?: string;
    custom_elements?: string;
    extended_valid_elements?: string;
    invalid_elements?: string;
    invalid_styles?: string | Record<string, string>;
    move_caret_before_on_enter_elements?: string;
    non_empty_elements?: string;
    schema?: SchemaType;
    self_closing_elements?: string;
    short_ended_elements?: string;
    special?: string;
    text_block_elements?: string;
    text_inline_elements?: string;
    valid_children?: string;
    valid_classes?: string | Record<string, string>;
    valid_elements?: string;
    valid_styles?: string | Record<string, string>;
    verify_html?: boolean;
    whitespace_elements?: string;
}
declare type Attribute = {
    required?: boolean;
    defaultValue?: string;
    forcedValue?: string;
    validValues?: any;
};
interface DefaultAttribute {
    name: string;
    value: string;
}
interface AttributePattern {
    defaultValue?: string;
    forcedValue?: string;
    pattern: RegExp;
    required?: boolean;
    validValues?: Record<string, string>;
}
declare type ElementRule = {
    attributes: Record<string, Attribute>;
    attributesDefault?: DefaultAttribute[];
    attributesForced?: DefaultAttribute[];
    attributesOrder: string[];
    attributePatterns?: AttributePattern[];
    attributesRequired?: string[];
    paddEmpty?: boolean;
    removeEmpty?: boolean;
    removeEmptyAttrs?: boolean;
};
interface SchemaElement extends ElementRule {
    outputName?: string;
    parentsRequired?: string[];
    pattern?: RegExp;
}
declare type SchemaMap = {
    [name: string]: {};
};
declare type SchemaRegExpMap = {
    [name: string]: RegExp;
};
interface Schema {
    children: Record<string, {}>;
    elements: Record<string, SchemaElement>;
    getValidStyles(): SchemaMap;
    getValidClasses(): SchemaMap;
    getBlockElements(): SchemaMap;
    getInvalidStyles(): SchemaMap;
    getShortEndedElements(): SchemaMap;
    getTextBlockElements(): SchemaMap;
    getTextInlineElements(): SchemaMap;
    getBoolAttrs(): SchemaMap;
    getElementRule(name: string): SchemaElement;
    getSelfClosingElements(): SchemaMap;
    getNonEmptyElements(): SchemaMap;
    getMoveCaretBeforeOnEnterElements(): SchemaMap;
    getWhiteSpaceElements(): SchemaMap;
    getSpecialElements(): SchemaRegExpMap;
    isValidChild(name: string, child: string): boolean;
    isValid(name: string, attr?: string): boolean;
    getCustomElements(): SchemaMap;
    addValidElements(validElements: string): void;
    setValidElements(validElements: string): void;
    addCustomElements(customElements: string): void;
    addValidChildren(validChildren: any): void;
}
declare type Attributes = Array<{
    name: string;
    value: string;
}> & {
    map: Record<string, string>;
};
interface AstNodeConstructor {
    readonly prototype: AstNode;
    new (name: string, type: number): AstNode;
    create(name: string, attrs?: Record<string, string>): AstNode;
}
declare class AstNode {
    static create(name: string, attrs?: Record<string, string>): AstNode;
    name: string;
    type: number;
    attributes?: Attributes;
    value?: string;
    shortEnded?: boolean;
    parent?: AstNode;
    firstChild?: AstNode;
    lastChild?: AstNode;
    next?: AstNode;
    prev?: AstNode;
    constructor(name: string, type: number);
    replace(node: AstNode): AstNode;
    attr(name: string, value: string): string | AstNode;
    attr(name: Record<string, string>): AstNode;
    attr(name: string): string;
    clone(): AstNode;
    wrap(wrapper: AstNode): AstNode;
    unwrap(): void;
    remove(): AstNode;
    append(node: AstNode): AstNode;
    insert(node: AstNode, refNode: AstNode, before?: boolean): AstNode;
    getAll(name: string): AstNode[];
    empty(): AstNode;
    isEmpty(elements: SchemaMap, whitespace?: SchemaMap, predicate?: (node: AstNode) => boolean): boolean;
    walk(prev?: boolean): AstNode;
}
declare type ContentFormat = 'raw' | 'text' | 'html' | 'tree';
interface GetContentArgs {
    format?: ContentFormat;
    get?: boolean;
    content?: string;
    getInner?: boolean;
    no_events?: boolean;
    [key: string]: any;
}
interface SetContentArgs {
    format?: string;
    set?: boolean;
    content?: string;
    no_events?: boolean;
}
interface BlobCache {
    create: (o: string | BlobInfoData, blob?: Blob, base64?: string, filename?: string) => BlobInfo;
    add: (blobInfo: BlobInfo) => void;
    get: (id: string) => BlobInfo | undefined;
    getByUri: (blobUri: string) => BlobInfo | undefined;
    getByData: (base64: string, type: string) => BlobInfo | undefined;
    findFirst: (predicate: (blobInfo: BlobInfo) => boolean) => BlobInfo | undefined;
    removeByUri: (blobUri: string) => void;
    destroy: () => void;
}
interface BlobInfoData {
    id?: string;
    name?: string;
    blob: Blob;
    base64: string;
    blobUri?: string;
    uri?: string;
}
interface BlobInfo {
    id: () => string;
    name: () => string;
    filename: () => string;
    blob: () => Blob;
    base64: () => string;
    blobUri: () => string;
    uri: () => string;
}
interface UploadFailureOptions {
    remove?: boolean;
}
declare type UploadHandler = (blobInfo: BlobInfo, success: (url: string) => void, failure: (err: string, options?: UploadFailureOptions) => void, progress?: (percent: number) => void) => void;
interface RangeLikeObject {
    startContainer: Node;
    startOffset: number;
    endContainer: Node;
    endOffset: number;
}
declare type ApplyFormat = BlockFormat | InlineFormat | SelectorFormat;
declare type RemoveFormat = RemoveBlockFormat | RemoveInlineFormat | RemoveSelectorFormat;
declare type Format = ApplyFormat | RemoveFormat;
declare type Formats = Record<string, Format | Format[]>;
declare type FormatAttrOrStyleValue = string | ((vars?: FormatVars) => string);
declare type FormatVars = Record<string, string>;
interface CommonFormat<T> {
    ceFalseOverride?: boolean;
    classes?: string | string[];
    collapsed?: boolean;
    exact?: boolean;
    expand?: boolean;
    links?: boolean;
    onmatch?: (node: Node, fmt: T, itemName: string) => boolean;
    onformat?: (elm: Node, fmt: T, vars?: FormatVars, node?: Node | RangeLikeObject) => void;
    remove_similar?: boolean;
}
interface CommonApplyFormat<T> extends CommonFormat<T> {
    attributes?: Record<string, FormatAttrOrStyleValue>;
    preview?: string | boolean;
    styles?: Record<string, FormatAttrOrStyleValue>;
    toggle?: boolean;
    wrapper?: boolean;
    merge_siblings?: boolean;
    merge_with_parents?: boolean;
}
interface BlockFormat extends CommonApplyFormat<BlockFormat> {
    block: string;
    block_expand?: boolean;
}
interface InlineFormat extends CommonApplyFormat<InlineFormat> {
    inline: string;
    clear_child_styles?: boolean;
}
interface SelectorFormat extends CommonApplyFormat<SelectorFormat> {
    selector: string;
    defaultBlock?: string;
    inherit?: boolean;
}
interface CommonRemoveFormat<T> extends CommonFormat<T> {
    remove?: 'none' | 'empty' | 'all';
    attributes?: string[] | Record<string, FormatAttrOrStyleValue>;
    styles?: string[] | Record<string, FormatAttrOrStyleValue>;
    split?: boolean;
    deep?: boolean;
    mixed?: boolean;
}
interface RemoveBlockFormat extends CommonRemoveFormat<RemoveBlockFormat> {
    block: string;
    list_block?: string;
}
interface RemoveInlineFormat extends CommonRemoveFormat<RemoveInlineFormat> {
    inline: string;
    preserve_attributes?: string[];
}
interface RemoveSelectorFormat extends CommonRemoveFormat<RemoveSelectorFormat> {
    selector: string;
}
declare type StyleFormat = BlockStyleFormat | InlineStyleFormat | SelectorStyleFormat;
declare type AllowedFormat = Separator | FormatReference | StyleFormat | NestedFormatting;
interface Separator {
    title: string;
}
interface FormatReference {
    title: string;
    format: string;
    icon?: string;
}
interface NestedFormatting {
    title: string;
    items: Array<FormatReference | StyleFormat>;
}
interface CommonStyleFormat {
    title: string;
    icon?: string;
}
interface BlockStyleFormat extends BlockFormat, CommonStyleFormat {
}
interface InlineStyleFormat extends InlineFormat, CommonStyleFormat {
}
interface SelectorStyleFormat extends SelectorFormat, CommonStyleFormat {
}
interface AlertBannerSpec {
    type: 'alertbanner';
    level: 'info' | 'warn' | 'error' | 'success';
    text: string;
    icon: string;
    url?: string;
}
interface ButtonSpec {
    type: 'button';
    text: string;
    disabled?: boolean;
    primary?: boolean;
    name?: string;
    icon?: string;
    borderless?: boolean;
}
interface CheckboxSpec {
    name: string;
    type: 'checkbox';
    label: string;
    disabled?: boolean;
}
interface FormComponentSpec {
    type: string;
    name: string;
}
interface FormComponentWithLabelSpec extends FormComponentSpec {
    label?: string;
}
interface CollectionSpec extends FormComponentWithLabelSpec {
    type: 'collection';
}
interface ColorInputSpec extends FormComponentWithLabelSpec {
    type: 'colorinput';
}
interface ColorPickerSpec extends FormComponentWithLabelSpec {
    type: 'colorpicker';
}
interface DropZoneSpec extends FormComponentWithLabelSpec {
    type: 'dropzone';
}
interface GridSpec {
    type: 'grid';
    columns: number;
    items: BodyComponentSpec[];
}
interface IframeSpec extends FormComponentWithLabelSpec {
    type: 'iframe';
    sandboxed?: boolean;
}
interface ImageToolsState {
    blob: Blob;
    url: string;
}
interface ImageToolsSpec extends FormComponentWithLabelSpec {
    type: 'imagetools';
    currentState: ImageToolsState;
}
interface InputSpec extends FormComponentWithLabelSpec {
    type: 'input';
    inputMode?: string;
    placeholder?: string;
    maximized?: boolean;
    disabled?: boolean;
}
interface LabelSpec {
    type: 'label';
    label: string;
    items: BodyComponentSpec[];
}
interface ListBoxSingleItemSpec {
    text: string;
    value: string;
}
interface ListBoxNestedItemSpec {
    text: string;
    items: ListBoxItemSpec[];
}
declare type ListBoxItemSpec = ListBoxNestedItemSpec | ListBoxSingleItemSpec;
interface ListBoxSpec extends FormComponentWithLabelSpec {
    type: 'listbox';
    items: ListBoxItemSpec[];
    disabled?: boolean;
}
interface SelectBoxItemSpec {
    text: string;
    value: string;
}
interface SelectBoxSpec extends FormComponentWithLabelSpec {
    type: 'selectbox';
    items: SelectBoxItemSpec[];
    size?: number;
    disabled?: boolean;
}
interface SizeInputSpec extends FormComponentWithLabelSpec {
    type: 'sizeinput';
    constrain?: boolean;
    disabled?: boolean;
}
interface TableSpec {
    type: 'table';
    header: string[];
    cells: string[][];
}
interface TextAreaSpec extends FormComponentWithLabelSpec {
    type: 'textarea';
    placeholder?: string;
    maximized?: boolean;
    disabled?: boolean;
}
interface UrlInputSpec extends FormComponentWithLabelSpec {
    type: 'urlinput';
    filetype?: 'image' | 'media' | 'file';
    disabled?: boolean;
}
interface HtmlPanelSpec {
    type: 'htmlpanel';
    html: string;
    presets?: 'presentation' | 'document';
}
interface PanelSpec {
    type: 'panel';
    classes?: string[];
    items: BodyComponentSpec[];
}
declare type BodyComponentSpec = BarSpec | ButtonSpec | CheckboxSpec | TextAreaSpec | InputSpec | ListBoxSpec | SelectBoxSpec | SizeInputSpec | IframeSpec | HtmlPanelSpec | UrlInputSpec | DropZoneSpec | ColorInputSpec | GridSpec | ColorPickerSpec | ImageToolsSpec | AlertBannerSpec | CollectionSpec | LabelSpec | TableSpec | PanelSpec;
interface BarSpec {
    type: 'bar';
    items: BodyComponentSpec[];
}
interface CustomEditorInit {
    setValue: (value: string) => void;
    getValue: () => string;
    destroy: () => void;
}
declare type CustomEditorInitFn = (elm: Element, settings: any) => Promise<CustomEditorInit>;
interface CustomEditorOldSpec extends FormComponentSpec {
    type: 'customeditor';
    tag?: string;
    init: (e: Element) => Promise<CustomEditorInit>;
}
interface CustomEditorNewSpec extends FormComponentSpec {
    type: 'customeditor';
    tag?: string;
    scriptId: string;
    scriptUrl: string;
    settings?: any;
}
declare type CustomEditorSpec = CustomEditorOldSpec | CustomEditorNewSpec;
interface CommonMenuItemSpec {
    disabled?: boolean;
    text?: string;
    value?: string;
    meta?: Record<string, any>;
    shortcut?: string;
}
interface CommonMenuItemInstanceApi {
    isDisabled: () => boolean;
    setDisabled: (state: boolean) => void;
}
interface DialogToggleMenuItemSpec extends CommonMenuItemSpec {
    type?: 'togglemenuitem';
    name: string;
}
declare type DialogFooterMenuButtonItemSpec = DialogToggleMenuItemSpec;
interface BaseDialogFooterButtonSpec {
    name?: string;
    align?: 'start' | 'end';
    primary?: boolean;
    disabled?: boolean;
    icon?: string;
}
interface DialogFooterNormalButtonSpec extends BaseDialogFooterButtonSpec {
    type: 'submit' | 'cancel' | 'custom';
    text: string;
}
interface DialogFooterMenuButtonSpec extends BaseDialogFooterButtonSpec {
    type: 'menu';
    text?: string;
    tooltip?: string;
    icon?: string;
    items: DialogFooterMenuButtonItemSpec[];
}
declare type DialogFooterButtonSpec = DialogFooterNormalButtonSpec | DialogFooterMenuButtonSpec;
interface TabSpec {
    name?: string;
    title: string;
    items: BodyComponentSpec[];
}
interface TabPanelSpec {
    type: 'tabpanel';
    tabs: TabSpec[];
}
declare type DialogDataItem = any;
declare type DialogData = Record<string, DialogDataItem>;
interface DialogInstanceApi<T extends DialogData> {
    getData: () => T;
    setData: (data: Partial<T>) => void;
    disable: (name: string) => void;
    focus: (name: string) => void;
    showTab: (name: string) => void;
    redial: (nu: DialogSpec<T>) => void;
    enable: (name: string) => void;
    block: (msg: string) => void;
    unblock: () => void;
    close: () => void;
}
interface DialogActionDetails {
    name: string;
    value?: any;
}
interface DialogChangeDetails<T> {
    name: keyof T;
}
interface DialogTabChangeDetails {
    newTabName: string;
    oldTabName: string;
}
declare type DialogActionHandler<T> = (api: DialogInstanceApi<T>, details: DialogActionDetails) => void;
declare type DialogChangeHandler<T> = (api: DialogInstanceApi<T>, details: DialogChangeDetails<T>) => void;
declare type DialogSubmitHandler<T> = (api: DialogInstanceApi<T>) => void;
declare type DialogCloseHandler = () => void;
declare type DialogCancelHandler<T> = (api: DialogInstanceApi<T>) => void;
declare type DialogTabChangeHandler<T> = (api: DialogInstanceApi<T>, details: DialogTabChangeDetails) => void;
declare type DialogSize = 'normal' | 'medium' | 'large';
interface DialogSpec<T extends DialogData> {
    title: string;
    size?: DialogSize;
    body: TabPanelSpec | PanelSpec;
    buttons: DialogFooterButtonSpec[];
    initialData?: T;
    onAction?: DialogActionHandler<T>;
    onChange?: DialogChangeHandler<T>;
    onSubmit?: DialogSubmitHandler<T>;
    onClose?: DialogCloseHandler;
    onCancel?: DialogCancelHandler<T>;
    onTabChange?: DialogTabChangeHandler<T>;
}
interface UrlDialogInstanceApi {
    block: (msg: string) => void;
    unblock: () => void;
    close: () => void;
    sendMessage: (msg: any) => void;
}
interface UrlDialogActionDetails {
    name: string;
    value?: any;
}
interface UrlDialogMessage {
    mceAction: string;
    [key: string]: any;
}
declare type UrlDialogActionHandler = (api: UrlDialogInstanceApi, actions: UrlDialogActionDetails) => void;
declare type UrlDialogCloseHandler = () => void;
declare type UrlDialogCancelHandler = (api: UrlDialogInstanceApi) => void;
declare type UrlDialogMessageHandler = (api: UrlDialogInstanceApi, message: UrlDialogMessage) => void;
interface UrlDialogFooterButtonSpec extends DialogFooterNormalButtonSpec {
    type: 'cancel' | 'custom';
}
interface UrlDialogSpec {
    title: string;
    url: string;
    height?: number;
    width?: number;
    buttons?: UrlDialogFooterButtonSpec[];
    onAction?: UrlDialogActionHandler;
    onClose?: UrlDialogCloseHandler;
    onCancel?: UrlDialogCancelHandler;
    onMessage?: UrlDialogMessageHandler;
}
interface SeparatorMenuItemSpec {
    type?: 'separator';
    text?: string;
}
declare type ColumnTypes = number | 'auto';
declare type SeparatorItemSpec = SeparatorMenuItemSpec;
interface AutocompleterItemSpec {
    type?: 'autocompleteitem';
    value: string;
    text?: string;
    icon?: string;
    meta?: Record<string, any>;
}
declare type AutocompleterContents = SeparatorItemSpec | AutocompleterItemSpec;
interface AutocompleterSpec {
    type?: 'autocompleter';
    ch: string;
    minChars?: number;
    columns?: ColumnTypes;
    matches?: (rng: Range, text: string, pattern: string) => boolean;
    fetch: (pattern: string, maxResults: number, fetchOptions: Record<string, any>) => Promise<AutocompleterContents[]>;
    onAction: (autocompleterApi: AutocompleterInstanceApi, rng: any, value: string, meta: Record<string, any>) => void;
    maxResults?: number;
}
interface AutocompleterInstanceApi {
    hide: () => void;
    reload: (fetchOptions: Record<string, any>) => void;
}
declare type ContextPosition = 'node' | 'selection' | 'line';
declare type ContextScope = 'node' | 'editor';
interface ContextBarSpec {
    predicate?: (elem: Element) => boolean;
    position?: ContextPosition;
    scope?: ContextScope;
}
interface BaseToolbarButtonSpec<I extends BaseToolbarButtonInstanceApi> {
    disabled?: boolean;
    tooltip?: string;
    icon?: string;
    text?: string;
    onSetup?: (api: I) => (api: I) => void;
}
interface BaseToolbarButtonInstanceApi {
    isDisabled: () => boolean;
    setDisabled: (state: boolean) => void;
}
interface ToolbarButtonSpec extends BaseToolbarButtonSpec<ToolbarButtonInstanceApi> {
    type?: 'button';
    onAction: (api: ToolbarButtonInstanceApi) => void;
}
interface ToolbarButtonInstanceApi extends BaseToolbarButtonInstanceApi {
}
interface BaseToolbarToggleButtonSpec<I extends BaseToolbarButtonInstanceApi> extends BaseToolbarButtonSpec<I> {
    active?: boolean;
}
interface BaseToolbarToggleButtonInstanceApi extends BaseToolbarButtonInstanceApi {
    isActive: () => boolean;
    setActive: (state: boolean) => void;
}
interface ToolbarToggleButtonSpec extends BaseToolbarToggleButtonSpec<ToolbarToggleButtonInstanceApi> {
    type?: 'togglebutton';
    onAction: (api: ToolbarToggleButtonInstanceApi) => void;
}
interface ToolbarToggleButtonInstanceApi extends BaseToolbarToggleButtonInstanceApi {
}
interface ContextFormLaunchButtonApi extends BaseToolbarButtonSpec<BaseToolbarButtonInstanceApi> {
    type: 'contextformbutton';
}
interface ContextFormLaunchToggleButtonSpec extends BaseToolbarToggleButtonSpec<BaseToolbarToggleButtonInstanceApi> {
    type: 'contextformtogglebutton';
}
interface ContextFormButtonInstanceApi extends BaseToolbarButtonInstanceApi {
}
interface ContextFormToggleButtonInstanceApi extends BaseToolbarToggleButtonInstanceApi {
}
interface ContextFormButtonSpec extends BaseToolbarButtonSpec<ContextFormButtonInstanceApi> {
    type?: 'contextformbutton';
    primary?: boolean;
    onAction: (formApi: ContextFormInstanceApi, api: ContextFormButtonInstanceApi) => void;
}
interface ContextFormToggleButtonSpec extends BaseToolbarToggleButtonSpec<ContextFormToggleButtonInstanceApi> {
    type?: 'contextformtogglebutton';
    onAction: (formApi: ContextFormInstanceApi, buttonApi: ContextFormToggleButtonInstanceApi) => void;
    primary?: boolean;
}
interface ContextFormInstanceApi {
    hide: () => void;
    getValue: () => string;
}
interface ContextFormSpec extends ContextBarSpec {
    type?: 'contextform';
    initValue?: () => string;
    label?: string;
    launch?: ContextFormLaunchButtonApi | ContextFormLaunchToggleButtonSpec;
    commands: Array<ContextFormToggleButtonSpec | ContextFormButtonSpec>;
}
interface ContextToolbarSpec extends ContextBarSpec {
    type?: 'contexttoolbar';
    items: string;
}
interface ChoiceMenuItemSpec extends CommonMenuItemSpec {
    type?: 'choiceitem';
    icon?: string;
}
interface ChoiceMenuItemInstanceApi extends CommonMenuItemInstanceApi {
    isActive: () => boolean;
    setActive: (state: boolean) => void;
}
interface ContextMenuItem {
    text: string;
    icon?: string;
    type?: 'item';
    onAction: () => void;
}
interface ContextSubMenu {
    type: 'submenu';
    text: string;
    icon?: string;
    getSubmenuItems: () => string | Array<ContextMenuContents>;
}
declare type ContextMenuContents = string | ContextMenuItem | SeparatorMenuItemSpec | ContextSubMenu;
interface ContextMenuApi {
    update: (element: Element) => string | Array<ContextMenuContents>;
}
interface FancyMenuItemSpec {
    type: 'fancymenuitem';
    fancytype: string;
    onAction: (data: any) => void;
}
interface MenuItemSpec extends CommonMenuItemSpec {
    type?: 'menuitem';
    icon?: string;
    onSetup?: (api: MenuItemInstanceApi) => (api: MenuItemInstanceApi) => void;
    onAction?: (api: MenuItemInstanceApi) => void;
}
interface MenuItemInstanceApi extends CommonMenuItemInstanceApi {
}
declare type NestedMenuItemContents = string | MenuItemSpec | NestedMenuItemSpec | ToggleMenuItemSpec | SeparatorMenuItemSpec | FancyMenuItemSpec;
interface NestedMenuItemSpec extends CommonMenuItemSpec {
    type?: 'nestedmenuitem';
    icon?: string;
    getSubmenuItems: () => string | Array<NestedMenuItemContents>;
    onSetup?: (api: NestedMenuItemInstanceApi) => (api: NestedMenuItemInstanceApi) => void;
}
interface NestedMenuItemInstanceApi extends CommonMenuItemInstanceApi {
}
interface ToggleMenuItemSpec extends CommonMenuItemSpec {
    type?: 'togglemenuitem';
    icon?: string;
    active?: boolean;
    onSetup?: (api: ToggleMenuItemInstanceApi) => void;
    onAction: (api: ToggleMenuItemInstanceApi) => void;
}
interface ToggleMenuItemInstanceApi extends CommonMenuItemInstanceApi {
    isActive: () => boolean;
    setActive: (state: boolean) => void;
}
type PublicDialog_d_AlertBannerSpec = AlertBannerSpec;
type PublicDialog_d_BarSpec = BarSpec;
type PublicDialog_d_BodyComponentSpec = BodyComponentSpec;
type PublicDialog_d_ButtonSpec = ButtonSpec;
type PublicDialog_d_CheckboxSpec = CheckboxSpec;
type PublicDialog_d_CollectionSpec = CollectionSpec;
type PublicDialog_d_ColorInputSpec = ColorInputSpec;
type PublicDialog_d_ColorPickerSpec = ColorPickerSpec;
type PublicDialog_d_CustomEditorSpec = CustomEditorSpec;
type PublicDialog_d_CustomEditorInit = CustomEditorInit;
type PublicDialog_d_CustomEditorInitFn = CustomEditorInitFn;
type PublicDialog_d_DialogData = DialogData;
type PublicDialog_d_DialogSize = DialogSize;
type PublicDialog_d_DialogSpec<_0> = DialogSpec<_0>;
type PublicDialog_d_DialogInstanceApi<_0> = DialogInstanceApi<_0>;
type PublicDialog_d_DialogFooterButtonSpec = DialogFooterButtonSpec;
type PublicDialog_d_DialogActionDetails = DialogActionDetails;
type PublicDialog_d_DialogChangeDetails<_0> = DialogChangeDetails<_0>;
type PublicDialog_d_DialogTabChangeDetails = DialogTabChangeDetails;
type PublicDialog_d_DropZoneSpec = DropZoneSpec;
type PublicDialog_d_GridSpec = GridSpec;
type PublicDialog_d_HtmlPanelSpec = HtmlPanelSpec;
type PublicDialog_d_IframeSpec = IframeSpec;
type PublicDialog_d_ImageToolsSpec = ImageToolsSpec;
type PublicDialog_d_InputSpec = InputSpec;
type PublicDialog_d_LabelSpec = LabelSpec;
type PublicDialog_d_ListBoxSpec = ListBoxSpec;
type PublicDialog_d_ListBoxItemSpec = ListBoxItemSpec;
type PublicDialog_d_ListBoxNestedItemSpec = ListBoxNestedItemSpec;
type PublicDialog_d_ListBoxSingleItemSpec = ListBoxSingleItemSpec;
type PublicDialog_d_PanelSpec = PanelSpec;
type PublicDialog_d_SelectBoxSpec = SelectBoxSpec;
type PublicDialog_d_SelectBoxItemSpec = SelectBoxItemSpec;
type PublicDialog_d_SizeInputSpec = SizeInputSpec;
type PublicDialog_d_TableSpec = TableSpec;
type PublicDialog_d_TabSpec = TabSpec;
type PublicDialog_d_TabPanelSpec = TabPanelSpec;
type PublicDialog_d_TextAreaSpec = TextAreaSpec;
type PublicDialog_d_UrlInputSpec = UrlInputSpec;
type PublicDialog_d_UrlDialogSpec = UrlDialogSpec;
type PublicDialog_d_UrlDialogFooterButtonSpec = UrlDialogFooterButtonSpec;
type PublicDialog_d_UrlDialogInstanceApi = UrlDialogInstanceApi;
type PublicDialog_d_UrlDialogActionDetails = UrlDialogActionDetails;
type PublicDialog_d_UrlDialogMessage = UrlDialogMessage;
declare namespace PublicDialog_d {
    export { PublicDialog_d_AlertBannerSpec as AlertBannerSpec, PublicDialog_d_BarSpec as BarSpec, PublicDialog_d_BodyComponentSpec as BodyComponentSpec, PublicDialog_d_ButtonSpec as ButtonSpec, PublicDialog_d_CheckboxSpec as CheckboxSpec, PublicDialog_d_CollectionSpec as CollectionSpec, PublicDialog_d_ColorInputSpec as ColorInputSpec, PublicDialog_d_ColorPickerSpec as ColorPickerSpec, PublicDialog_d_CustomEditorSpec as CustomEditorSpec, PublicDialog_d_CustomEditorInit as CustomEditorInit, PublicDialog_d_CustomEditorInitFn as CustomEditorInitFn, PublicDialog_d_DialogData as DialogData, PublicDialog_d_DialogSize as DialogSize, PublicDialog_d_DialogSpec as DialogSpec, PublicDialog_d_DialogInstanceApi as DialogInstanceApi, PublicDialog_d_DialogFooterButtonSpec as DialogFooterButtonSpec, PublicDialog_d_DialogActionDetails as DialogActionDetails, PublicDialog_d_DialogChangeDetails as DialogChangeDetails, PublicDialog_d_DialogTabChangeDetails as DialogTabChangeDetails, PublicDialog_d_DropZoneSpec as DropZoneSpec, PublicDialog_d_GridSpec as GridSpec, PublicDialog_d_HtmlPanelSpec as HtmlPanelSpec, PublicDialog_d_IframeSpec as IframeSpec, PublicDialog_d_ImageToolsSpec as ImageToolsSpec, PublicDialog_d_InputSpec as InputSpec, PublicDialog_d_LabelSpec as LabelSpec, PublicDialog_d_ListBoxSpec as ListBoxSpec, PublicDialog_d_ListBoxItemSpec as ListBoxItemSpec, PublicDialog_d_ListBoxNestedItemSpec as ListBoxNestedItemSpec, PublicDialog_d_ListBoxSingleItemSpec as ListBoxSingleItemSpec, PublicDialog_d_PanelSpec as PanelSpec, PublicDialog_d_SelectBoxSpec as SelectBoxSpec, PublicDialog_d_SelectBoxItemSpec as SelectBoxItemSpec, PublicDialog_d_SizeInputSpec as SizeInputSpec, PublicDialog_d_TableSpec as TableSpec, PublicDialog_d_TabSpec as TabSpec, PublicDialog_d_TabPanelSpec as TabPanelSpec, PublicDialog_d_TextAreaSpec as TextAreaSpec, PublicDialog_d_UrlInputSpec as UrlInputSpec, PublicDialog_d_UrlDialogSpec as UrlDialogSpec, PublicDialog_d_UrlDialogFooterButtonSpec as UrlDialogFooterButtonSpec, PublicDialog_d_UrlDialogInstanceApi as UrlDialogInstanceApi, PublicDialog_d_UrlDialogActionDetails as UrlDialogActionDetails, PublicDialog_d_UrlDialogMessage as UrlDialogMessage, };
}
type PublicInlineContent_d_AutocompleterSpec = AutocompleterSpec;
type PublicInlineContent_d_AutocompleterItemSpec = AutocompleterItemSpec;
type PublicInlineContent_d_AutocompleterContents = AutocompleterContents;
type PublicInlineContent_d_AutocompleterInstanceApi = AutocompleterInstanceApi;
type PublicInlineContent_d_ContextPosition = ContextPosition;
type PublicInlineContent_d_ContextScope = ContextScope;
type PublicInlineContent_d_ContextFormSpec = ContextFormSpec;
type PublicInlineContent_d_ContextFormInstanceApi = ContextFormInstanceApi;
type PublicInlineContent_d_ContextFormButtonSpec = ContextFormButtonSpec;
type PublicInlineContent_d_ContextFormButtonInstanceApi = ContextFormButtonInstanceApi;
type PublicInlineContent_d_ContextFormToggleButtonSpec = ContextFormToggleButtonSpec;
type PublicInlineContent_d_ContextFormToggleButtonInstanceApi = ContextFormToggleButtonInstanceApi;
type PublicInlineContent_d_ContextToolbarSpec = ContextToolbarSpec;
type PublicInlineContent_d_SeparatorItemSpec = SeparatorItemSpec;
declare namespace PublicInlineContent_d {
    export { PublicInlineContent_d_AutocompleterSpec as AutocompleterSpec, PublicInlineContent_d_AutocompleterItemSpec as AutocompleterItemSpec, PublicInlineContent_d_AutocompleterContents as AutocompleterContents, PublicInlineContent_d_AutocompleterInstanceApi as AutocompleterInstanceApi, PublicInlineContent_d_ContextPosition as ContextPosition, PublicInlineContent_d_ContextScope as ContextScope, PublicInlineContent_d_ContextFormSpec as ContextFormSpec, PublicInlineContent_d_ContextFormInstanceApi as ContextFormInstanceApi, PublicInlineContent_d_ContextFormButtonSpec as ContextFormButtonSpec, PublicInlineContent_d_ContextFormButtonInstanceApi as ContextFormButtonInstanceApi, PublicInlineContent_d_ContextFormToggleButtonSpec as ContextFormToggleButtonSpec, PublicInlineContent_d_ContextFormToggleButtonInstanceApi as ContextFormToggleButtonInstanceApi, PublicInlineContent_d_ContextToolbarSpec as ContextToolbarSpec, PublicInlineContent_d_SeparatorItemSpec as SeparatorItemSpec, };
}
type PublicMenu_d_MenuItemSpec = MenuItemSpec;
type PublicMenu_d_MenuItemInstanceApi = MenuItemInstanceApi;
type PublicMenu_d_NestedMenuItemContents = NestedMenuItemContents;
type PublicMenu_d_NestedMenuItemSpec = NestedMenuItemSpec;
type PublicMenu_d_NestedMenuItemInstanceApi = NestedMenuItemInstanceApi;
type PublicMenu_d_FancyMenuItemSpec = FancyMenuItemSpec;
type PublicMenu_d_ToggleMenuItemSpec = ToggleMenuItemSpec;
type PublicMenu_d_ToggleMenuItemInstanceApi = ToggleMenuItemInstanceApi;
type PublicMenu_d_ChoiceMenuItemSpec = ChoiceMenuItemSpec;
type PublicMenu_d_ChoiceMenuItemInstanceApi = ChoiceMenuItemInstanceApi;
type PublicMenu_d_SeparatorMenuItemSpec = SeparatorMenuItemSpec;
type PublicMenu_d_ContextMenuApi = ContextMenuApi;
type PublicMenu_d_ContextMenuContents = ContextMenuContents;
type PublicMenu_d_ContextMenuItem = ContextMenuItem;
type PublicMenu_d_ContextSubMenu = ContextSubMenu;
declare namespace PublicMenu_d {
    export { PublicMenu_d_MenuItemSpec as MenuItemSpec, PublicMenu_d_MenuItemInstanceApi as MenuItemInstanceApi, PublicMenu_d_NestedMenuItemContents as NestedMenuItemContents, PublicMenu_d_NestedMenuItemSpec as NestedMenuItemSpec, PublicMenu_d_NestedMenuItemInstanceApi as NestedMenuItemInstanceApi, PublicMenu_d_FancyMenuItemSpec as FancyMenuItemSpec, PublicMenu_d_ToggleMenuItemSpec as ToggleMenuItemSpec, PublicMenu_d_ToggleMenuItemInstanceApi as ToggleMenuItemInstanceApi, PublicMenu_d_ChoiceMenuItemSpec as ChoiceMenuItemSpec, PublicMenu_d_ChoiceMenuItemInstanceApi as ChoiceMenuItemInstanceApi, PublicMenu_d_SeparatorMenuItemSpec as SeparatorMenuItemSpec, PublicMenu_d_ContextMenuApi as ContextMenuApi, PublicMenu_d_ContextMenuContents as ContextMenuContents, PublicMenu_d_ContextMenuItem as ContextMenuItem, PublicMenu_d_ContextSubMenu as ContextSubMenu, };
}
interface SidebarInstanceApi {
    element: () => HTMLElement;
}
interface SidebarSpec {
    icon?: string;
    tooltip?: string;
    onShow?: (api: SidebarInstanceApi) => void;
    onSetup?: (api: SidebarInstanceApi) => (api: SidebarInstanceApi) => void;
    onHide?: (api: SidebarInstanceApi) => void;
}
type PublicSidebar_d_SidebarSpec = SidebarSpec;
type PublicSidebar_d_SidebarInstanceApi = SidebarInstanceApi;
declare namespace PublicSidebar_d {
    export { PublicSidebar_d_SidebarSpec as SidebarSpec, PublicSidebar_d_SidebarInstanceApi as SidebarInstanceApi, };
}
interface ToolbarGroupSetting {
    name: string;
    items: string[];
}
declare type ToolbarConfig = string | ToolbarGroupSetting[];
interface GroupToolbarButtonInstanceApi extends BaseToolbarButtonInstanceApi {
}
interface GroupToolbarButtonSpec extends BaseToolbarButtonSpec<GroupToolbarButtonInstanceApi> {
    type?: 'grouptoolbarbutton';
    items?: ToolbarConfig;
}
declare type MenuButtonItemTypes = NestedMenuItemContents;
declare type SuccessCallback = (menu: string | MenuButtonItemTypes[]) => void;
interface BaseMenuButtonSpec {
    text?: string;
    tooltip?: string;
    icon?: string;
    fetch: (success: SuccessCallback) => void;
    onSetup?: (api: BaseMenuButtonInstanceApi) => (api: BaseMenuButtonInstanceApi) => void;
}
interface BaseMenuButtonInstanceApi {
    isDisabled: () => boolean;
    setDisabled: (state: boolean) => void;
    isActive: () => boolean;
    setActive: (state: boolean) => void;
}
interface ToolbarMenuButtonSpec extends BaseMenuButtonSpec {
    type?: 'menubutton';
    onSetup?: (api: ToolbarMenuButtonInstanceApi) => (api: ToolbarMenuButtonInstanceApi) => void;
}
interface ToolbarMenuButtonInstanceApi extends BaseMenuButtonInstanceApi {
}
declare type ToolbarSplitButtonItemTypes = ChoiceMenuItemSpec | SeparatorMenuItemSpec;
declare type SuccessCallback$1 = (menu: ToolbarSplitButtonItemTypes[]) => void;
declare type SelectPredicate = (value: string) => boolean;
declare type PresetTypes = 'color' | 'normal' | 'listpreview';
declare type ColumnTypes$1 = number | 'auto';
interface ToolbarSplitButtonSpec {
    type?: 'splitbutton';
    tooltip?: string;
    icon?: string;
    text?: string;
    select?: SelectPredicate;
    presets?: PresetTypes;
    columns?: ColumnTypes$1;
    fetch: (success: SuccessCallback$1) => void;
    onSetup?: (api: ToolbarSplitButtonInstanceApi) => (api: ToolbarSplitButtonInstanceApi) => void;
    onAction: (api: ToolbarSplitButtonInstanceApi) => void;
    onItemAction: (api: ToolbarSplitButtonInstanceApi, value: string) => void;
}
interface ToolbarSplitButtonInstanceApi {
    isDisabled: () => boolean;
    setDisabled: (state: boolean) => void;
    setIconFill: (id: string, value: string) => void;
    setIconStroke: (id: string, value: string) => void;
    isActive: () => boolean;
    setActive: (state: boolean) => void;
}
type PublicToolbar_d_ToolbarButtonSpec = ToolbarButtonSpec;
type PublicToolbar_d_ToolbarButtonInstanceApi = ToolbarButtonInstanceApi;
type PublicToolbar_d_ToolbarSplitButtonSpec = ToolbarSplitButtonSpec;
type PublicToolbar_d_ToolbarSplitButtonInstanceApi = ToolbarSplitButtonInstanceApi;
type PublicToolbar_d_ToolbarMenuButtonSpec = ToolbarMenuButtonSpec;
type PublicToolbar_d_ToolbarMenuButtonInstanceApi = ToolbarMenuButtonInstanceApi;
type PublicToolbar_d_ToolbarToggleButtonSpec = ToolbarToggleButtonSpec;
type PublicToolbar_d_ToolbarToggleButtonInstanceApi = ToolbarToggleButtonInstanceApi;
type PublicToolbar_d_GroupToolbarButtonSpec = GroupToolbarButtonSpec;
type PublicToolbar_d_GroupToolbarButtonInstanceApi = GroupToolbarButtonInstanceApi;
declare namespace PublicToolbar_d {
    export { PublicToolbar_d_ToolbarButtonSpec as ToolbarButtonSpec, PublicToolbar_d_ToolbarButtonInstanceApi as ToolbarButtonInstanceApi, PublicToolbar_d_ToolbarSplitButtonSpec as ToolbarSplitButtonSpec, PublicToolbar_d_ToolbarSplitButtonInstanceApi as ToolbarSplitButtonInstanceApi, PublicToolbar_d_ToolbarMenuButtonSpec as ToolbarMenuButtonSpec, PublicToolbar_d_ToolbarMenuButtonInstanceApi as ToolbarMenuButtonInstanceApi, PublicToolbar_d_ToolbarToggleButtonSpec as ToolbarToggleButtonSpec, PublicToolbar_d_ToolbarToggleButtonInstanceApi as ToolbarToggleButtonInstanceApi, PublicToolbar_d_GroupToolbarButtonSpec as GroupToolbarButtonSpec, PublicToolbar_d_GroupToolbarButtonInstanceApi as GroupToolbarButtonInstanceApi, };
}
interface Registry {
    addButton: (name: string, spec: ToolbarButtonSpec) => void;
    addGroupToolbarButton: (name: string, spec: GroupToolbarButtonSpec) => void;
    addToggleButton: (name: string, spec: ToolbarToggleButtonSpec) => void;
    addMenuButton: (name: string, spec: ToolbarMenuButtonSpec) => void;
    addSplitButton: (name: string, spec: ToolbarSplitButtonSpec) => void;
    addMenuItem: (name: string, spec: MenuItemSpec) => void;
    addNestedMenuItem: (name: string, spec: NestedMenuItemSpec) => void;
    addToggleMenuItem: (name: string, spec: ToggleMenuItemSpec) => void;
    addContextMenu: (name: string, spec: ContextMenuApi) => void;
    addContextToolbar: (name: string, spec: ContextToolbarSpec) => void;
    addContextForm: (name: string, spec: ContextFormSpec) => void;
    addIcon: (name: string, svgData: string) => void;
    addAutocompleter: (name: string, spec: AutocompleterSpec) => void;
    addSidebar: (name: string, spec: SidebarSpec) => void;
    getAll: () => {
        buttons: Record<string, ToolbarButtonSpec | GroupToolbarButtonSpec | ToolbarMenuButtonSpec | ToolbarSplitButtonSpec | ToolbarToggleButtonSpec>;
        menuItems: Record<string, MenuItemSpec | NestedMenuItemSpec | ToggleMenuItemSpec>;
        popups: Record<string, AutocompleterSpec>;
        contextMenus: Record<string, ContextMenuApi>;
        contextToolbars: Record<string, ContextToolbarSpec | ContextFormSpec>;
        icons: Record<string, string>;
        sidebars: Record<string, SidebarSpec>;
    };
}
interface StyleSheetLoader {
    load: (url: string, success: () => void, failure?: () => void) => void;
    loadAll: (urls: string[], success: (urls: string[]) => void, failure: (urls: string[]) => void) => void;
    unload: (url: string) => void;
    unloadAll: (urls: string[]) => void;
    _setReferrerPolicy: (referrerPolicy: ReferrerPolicy) => void;
}
interface StyleSheetLoaderSettings {
    maxLoadTime?: number;
    contentCssCors?: boolean;
    referrerPolicy?: ReferrerPolicy;
}
declare type Registry$1 = Registry;
interface EditorUiApi {
    show: () => void;
    hide: () => void;
}
interface EditorUi extends EditorUiApi {
    registry: Registry$1;
    styleSheetLoader: StyleSheetLoader;
}
type Ui_d_EditorUiApi = EditorUiApi;
type Ui_d_EditorUi = EditorUi;
declare namespace Ui_d {
    export { Ui_d_EditorUiApi as EditorUiApi, Ui_d_EditorUi as EditorUi, Registry$1 as Registry, PublicDialog_d as Dialog, PublicInlineContent_d as InlineContent, PublicMenu_d as Menu, PublicSidebar_d as Sidebar, PublicToolbar_d as Toolbar, };
}
declare type EntityEncoding = 'named' | 'numeric' | 'raw';
declare type ThemeInitFunc = (editor: Editor, elm: HTMLElement) => {
    editorContainer: HTMLElement;
    iframeContainer: HTMLElement;
    height?: number;
    iframeHeight?: number;
    api?: EditorUiApi;
};
declare type SetupCallback = (editor: Editor) => void;
declare type FilePickerCallback = (callback: Function, value: any, meta: Record<string, any>) => void;
declare type FilePickerValidationStatus = 'valid' | 'unknown' | 'invalid' | 'none';
declare type FilePickerValidationCallback = (info: {
    type: string;
    url: string;
}, callback: (validation: {
    status: FilePickerValidationStatus;
    message: string;
}) => void) => void;
declare type URLConverter = (url: string, name: string, elm?: HTMLElement) => string;
declare type URLConverterCallback = (url: string, node: Node, on_save: boolean, name: string) => void;
interface ToolbarGroup {
    name?: string;
    items: string[];
}
declare type ToolbarMode = 'floating' | 'sliding' | 'scrolling' | 'wrap';
interface BaseEditorSettings {
    add_form_submit_trigger?: boolean;
    add_unload_trigger?: boolean;
    allow_conditional_comments?: boolean;
    allow_html_data_urls?: boolean;
    allow_html_in_named_anchor?: boolean;
    allow_script_urls?: boolean;
    allow_unsafe_link_target?: boolean;
    anchor_bottom?: false | string;
    anchor_top?: false | string;
    auto_focus?: string | true;
    automatic_uploads?: boolean;
    base_url?: string;
    block_formats?: string;
    block_unsupported_drop?: boolean;
    body_id?: string;
    body_class?: string;
    br_in_pre?: boolean;
    br_newline_selector?: string;
    browser_spellcheck?: boolean;
    branding?: boolean;
    cache_suffix?: string;
    color_cols?: number;
    color_map?: string[];
    content_css?: boolean | string | string[];
    content_css_cors?: boolean;
    content_security_policy?: string;
    content_style?: string;
    contextmenu?: string | false;
    contextmenu_never_use_native?: boolean;
    convert_fonts_to_spans?: boolean;
    convert_urls?: boolean;
    custom_colors?: boolean;
    custom_elements?: string;
    custom_ui_selector?: string;
    custom_undo_redo_levels?: number;
    directionality?: 'ltr' | 'rtl';
    doctype?: string;
    document_base_url?: string;
    element_format?: 'xhtml' | 'html';
    elementpath?: boolean;
    encoding?: string;
    end_container_on_empty_block?: boolean;
    entities?: string;
    entity_encoding?: EntityEncoding;
    extended_valid_elements?: string;
    event_root?: string;
    file_picker_callback?: FilePickerCallback;
    file_picker_types?: string;
    file_picker_validator_handler?: FilePickerValidationCallback;
    fix_list_elements?: boolean;
    fixed_toolbar_container?: string;
    font_formats?: string;
    font_size_classes?: string;
    font_size_legacy_values?: string;
    font_size_style_values?: string;
    fontsize_formats?: string;
    force_hex_style_colors?: boolean;
    forced_root_block?: boolean | string;
    forced_root_block_attrs?: Record<string, string>;
    formats?: Formats;
    gecko_spellcheck?: boolean;
    height?: number | string;
    hidden_input?: boolean;
    icons?: string;
    icons_url?: string;
    id?: string;
    images_dataimg_filter?: (imgElm: HTMLImageElement) => boolean;
    images_replace_blob_uris?: boolean;
    images_reuse_filename?: boolean;
    images_upload_base_path?: string;
    images_upload_credentials?: boolean;
    images_upload_handler?: UploadHandler;
    images_upload_url?: string;
    indent?: boolean;
    indent_after?: string;
    indent_before?: string;
    indent_use_margin?: boolean;
    indentation?: string;
    init_instance_callback?: SetupCallback;
    inline?: boolean;
    inline_boundaries?: boolean;
    inline_boundaries_selector?: string;
    inline_styles?: boolean;
    invalid_elements?: string;
    invalid_styles?: string;
    keep_styles?: boolean;
    language?: string;
    language_load?: boolean;
    language_url?: string;
    lineheight_formats?: string;
    max_height?: number;
    max_width?: number;
    menu?: Record<string, {
        title: string;
        items: string;
    }>;
    menubar?: boolean | string;
    min_height?: number;
    min_width?: number;
    no_newline_selector?: string;
    nowrap?: boolean;
    object_resizing?: boolean | string;
    placeholder?: string;
    preserve_cdata?: boolean;
    preview_styles?: boolean | string;
    protect?: RegExp[];
    readonly?: boolean;
    referrer_policy?: ReferrerPolicy;
    relative_urls?: boolean;
    remove_script_host?: boolean;
    remove_trailing_brs?: boolean;
    removed_menuitems?: string;
    resize?: boolean | 'both';
    resize_img_proportional?: boolean;
    root_name?: string;
    schema?: SchemaType;
    selector?: string;
    setup?: SetupCallback;
    skin?: boolean | string;
    skin_url?: string;
    statusbar?: boolean;
    style_formats?: AllowedFormat[];
    style_formats_autohide?: boolean;
    style_formats_merge?: boolean;
    submit_patch?: boolean;
    suffix?: string;
    target?: HTMLElement;
    theme?: string | ThemeInitFunc;
    theme_url?: string;
    toolbar?: boolean | string | string[] | Array<ToolbarGroup>;
    toolbar1?: string;
    toolbar2?: string;
    toolbar3?: string;
    toolbar4?: string;
    toolbar5?: string;
    toolbar6?: string;
    toolbar7?: string;
    toolbar8?: string;
    toolbar9?: string;
    toolbar_mode?: ToolbarMode;
    typeahead_urls?: boolean;
    url_converter?: URLConverter;
    url_converter_scope?: any;
    urlconverter_callback?: string | URLConverterCallback;
    valid_children?: string;
    valid_classes?: string | Record<string, string>;
    valid_elements?: string;
    valid_styles?: string | Record<string, string>;
    visual?: boolean;
    visual_anchor_class?: string;
    visual_table_class?: string;
    width?: number | string;
    toolbar_drawer?: false | 'floating' | 'sliding' | 'scrolling';
    editor_deselector?: string;
    editor_selector?: string;
    elements?: string;
    filepicker_validator_handler?: FilePickerValidationCallback;
    mode?: 'exact' | 'textareas' | 'specific_textareas';
    types?: Record<string, any>[];
    block_elements?: string;
    boolean_attributes?: string;
    move_caret_before_on_enter_elements?: string;
    non_empty_elements?: string;
    self_closing_elements?: string;
    short_ended_elements?: string;
    text_block_elements?: string;
    text_inline_elements?: string;
    whitespace_elements?: string;
    disable_nodechange?: boolean;
    forced_plugins?: string | string[];
    plugin_base_urls?: Record<string, string>;
    service_message?: string;
    validate?: boolean;
    [key: string]: any;
}
interface RawEditorSettings extends BaseEditorSettings {
    external_plugins?: Record<string, string>;
    mobile?: RawEditorSettings;
    plugins?: string | string[];
}
interface EditorSettings extends BaseEditorSettings {
    external_plugins: Record<string, string>;
    plugins: string;
}
interface ParamTypeMap {
    'hash': Record<string, string>;
    'string': string;
    'number': number;
    'boolean': boolean;
    'string[]': string[];
    'array': any[];
}
interface BlobInfoImagePair {
    image: HTMLImageElement;
    blobInfo: BlobInfo;
}
declare class NodeChange {
    private readonly editor;
    private lastPath;
    constructor(editor: Editor);
    nodeChanged(args?: any): void;
    private isSameElementPath;
}
interface SelectionOverrides {
    showCaret: (direction: number, node: Element, before: boolean, scrollIntoView?: boolean) => Range | null;
    showBlockCaretContainer: (blockCaretContainer: Element) => void;
    hideFakeCaret: () => void;
    destroy: () => void;
}
interface Quirks {
    refreshContentEditable(): void;
    isHidden(): boolean;
}
declare type DecoratorData = Record<string, any>;
declare type Decorator = (uid: string, data: DecoratorData) => {
    attributes?: {};
    classes?: string[];
};
declare type AnnotationListener = (state: boolean, name: string, data?: {
    uid: string;
    nodes: any[];
}) => void;
declare type AnnotationListenerApi = AnnotationListener;
interface AnnotatorSettings {
    decorate: Decorator;
    persistent?: boolean;
}
interface Annotator {
    register: (name: string, settings: AnnotatorSettings) => void;
    annotate: (name: string, data: DecoratorData) => void;
    annotationChanged: (name: string, f: AnnotationListenerApi) => void;
    remove: (name: string) => void;
    getAll: (name: string) => Record<string, Element[]>;
}
interface GeomRect {
    readonly x: number;
    readonly y: number;
    readonly w: number;
    readonly h: number;
}
interface Rect {
    inflate(rect: GeomRect, w: number, h: number): GeomRect;
    relativePosition(rect: GeomRect, targetRect: GeomRect, rel: string): GeomRect;
    findBestRelativePosition(rect: GeomRect, targetRect: GeomRect, constrainRect: GeomRect, rels: string[]): string | null;
    intersect(rect: GeomRect, cropRect: GeomRect): GeomRect | null;
    clamp(rect: GeomRect, clampRect: GeomRect, fixedSize?: boolean): GeomRect;
    create(x: number, y: number, w: number, h: number): GeomRect;
    fromClientRect(clientRect: ClientRect): GeomRect;
}
interface StyleMap {
    [s: string]: string | number;
}
interface StylesSettings {
    allow_script_urls?: boolean;
    allow_svg_data_urls?: boolean;
    url_converter?: URLConverter;
    url_converter_scope?: any;
}
interface Styles {
    toHex(color: string): string;
    parse(css: string): Record<string, string>;
    serialize(styles: StyleMap, elementName?: string): string;
}
interface DOMUtilsSettings {
    schema: Schema;
    url_converter: URLConverter;
    url_converter_scope: {};
    ownEvents: boolean;
    proxy: any;
    keep_values: boolean;
    hex_colors: boolean;
    update_styles: boolean;
    root_element: HTMLElement;
    collect: Function;
    onSetAttrib: Function;
    contentCssCors: boolean;
    referrerPolicy: ReferrerPolicy;
}
declare type Target = Node | Window;
declare type RunArguments<T extends Node = Node> = string | T | Array<string | T>;
declare type BoundEvent = [Target, string, EventUtilsCallback<any>, any];
declare type Callback<K extends string> = EventUtilsCallback<MappedEvent<HTMLElementEventMap, K>>;
interface DOMUtils {
    doc: Document;
    settings: Partial<DOMUtilsSettings>;
    win: Window;
    files: Record<string, boolean>;
    stdMode: boolean;
    boxModel: boolean;
    styleSheetLoader: StyleSheetLoader;
    boundEvents: BoundEvent[];
    styles: Styles;
    schema: Schema;
    events: EventUtils;
    root: Node;
    $: DomQueryConstructor;
    $$<T extends Node>(elm: T | T[] | DomQuery<T>): DomQuery<T>;
    $$(elm: string): DomQuery<Node>;
    isBlock(node: string | Node): boolean;
    clone(node: Node, deep: boolean): Node;
    getRoot(): HTMLElement;
    getViewPort(argWin?: Window): GeomRect;
    getRect(elm: string | HTMLElement): GeomRect;
    getSize(elm: string | HTMLElement): {
        w: number;
        h: number;
    };
    getParent<K extends keyof HTMLElementTagNameMap>(node: string | Node, selector: K, root?: Node): HTMLElementTagNameMap[K] | null;
    getParent<T extends HTMLElement>(node: string | Node, selector: (node: HTMLElement) => node is T, root?: Node): T | null;
    getParent<T extends Element = Element>(node: string | Node, selector?: string | ((node: HTMLElement) => boolean | void), root?: Node): T | null;
    getParents<K extends keyof HTMLElementTagNameMap>(elm: string | Node, selector: K, root?: Node, collect?: boolean): Array<HTMLElementTagNameMap[K]>;
    getParents<T extends HTMLElement>(node: string | Node, selector: (node: HTMLElement) => node is T, root?: Node): T[];
    getParents<T extends Element = Element>(elm: string | Node, selector?: string | ((node: HTMLElement) => boolean | void), root?: Node, collect?: boolean): T[];
    get(elm: string | Node): HTMLElement | null;
    getNext(node: Node, selector: string | ((node: Node) => boolean)): Node | null;
    getPrev(node: Node, selector: string | ((node: Node) => boolean)): Node | null;
    select<K extends keyof HTMLElementTagNameMap>(selector: K, scope?: string | Node): Array<HTMLElementTagNameMap[K]>;
    select<T extends HTMLElement = HTMLElement>(selector: string, scope?: string | Node): T[];
    is(elm: Node | Node[], selector: string): boolean;
    add(parentElm: RunArguments, name: string | Node, attrs?: Record<string, string | boolean | number>, html?: string | Node, create?: boolean): HTMLElement;
    create(name: string, attrs?: Record<string, string | boolean | number>, html?: string | Node): HTMLElement;
    createHTML(name: string, attrs?: Record<string, string>, html?: string): string;
    createFragment(html?: string): DocumentFragment;
    remove<T extends Node>(node: string | T | T[] | DomQuery<T>, keepChildren?: boolean): T | T[];
    setStyle(elm: string | Node, name: string, value: string | number | null): void;
    setStyle(elm: string | Node, styles: StyleMap): void;
    getStyle(elm: string | Node, name: string, computed?: boolean): string;
    setStyles(elm: string | Node, stylesArg: StyleMap): void;
    removeAllAttribs(e: RunArguments<Element>): void;
    setAttrib(elm: string | Node, name: string, value: string | boolean | number | null): void;
    setAttribs(elm: string | Node, attrs: Record<string, string | boolean | number | null>): void;
    getAttrib(elm: string | Node, name: string, defaultVal?: string): string;
    getPos(elm: string | Node, rootElm?: Node): {
        x: number;
        y: number;
    };
    parseStyle(cssText: string): Record<string, string>;
    serializeStyle(stylesArg: StyleMap, name?: string): string;
    addStyle(cssText: string): void;
    loadCSS(url: string): void;
    addClass(elm: string | Node | Node[], cls: string): void;
    removeClass(elm: string | Node | Node[], cls: string): void;
    hasClass(elm: string | Node, cls: string): boolean;
    toggleClass(elm: string | Node | Node[], cls: string, state?: boolean): void;
    show(elm: string | Node): void;
    hide(elm: string | Node): void;
    isHidden(elm: string | Node): boolean;
    uniqueId(prefix?: string): string;
    setHTML(elm: string | Node, html: string): void;
    getOuterHTML(elm: string | Node): string;
    setOuterHTML(elm: string | Node, html: string): void;
    decode(text: string): string;
    encode(text: string): string;
    insertAfter<T extends Node>(node: T | T[], reference: string | Node): T;
    insertAfter<T extends Node>(node: RunArguments<T>, reference: string | Node): false | T;
    replace<T extends Node>(newElm: Node, oldElm: T | T[], keepChildren?: boolean): T;
    replace<T extends Node>(newElm: Node, oldElm: RunArguments<T>, keepChildren?: boolean): false | T;
    rename<K extends keyof HTMLElementTagNameMap>(elm: Element, name: K): HTMLElementTagNameMap[K];
    rename(elm: Element, name: string): Element;
    findCommonAncestor(a: Node, b: Node): Node;
    toHex(rgbVal: string): string;
    run<R, T extends Node>(elm: T | T[], func: (node: T) => R, scope?: any): R;
    run<R, T extends Node>(elm: RunArguments<T>, func: (node: T) => R, scope?: any): false | R;
    getAttribs(elm: string | Node): NamedNodeMap | Attr[];
    isEmpty(node: Node, elements?: Record<string, any>): boolean;
    createRng(): Range;
    nodeIndex(node: Node, normalized?: boolean): number;
    split<T extends Node>(parentElm: Node, splitElm: Node, replacementElm: T): T;
    split<T extends Node>(parentElm: Node, splitElm: T): T;
    bind<K extends string>(target: Target, name: K, func: Callback<K>, scope?: any): Callback<K>;
    bind<K extends string>(target: Target[], name: K, func: Callback<K>, scope?: any): Callback<K>[];
    unbind<K extends string>(target: Target, name?: K, func?: EventUtilsCallback<MappedEvent<HTMLElementEventMap, K>>): EventUtils;
    unbind<K extends string>(target: Target[], name?: K, func?: EventUtilsCallback<MappedEvent<HTMLElementEventMap, K>>): EventUtils[];
    fire(target: Node | Window, name: string, evt?: {}): EventUtils;
    getContentEditable(node: Node): string | null;
    getContentEditableParent(node: Node): string | null;
    destroy(): void;
    isChildOf(node: Node, parent: Node): boolean;
    dumpRng(r: Range): string;
}
declare namespace DOMUtils {
    const DOM: DOMUtils;
    const nodeIndex: (node: Node, normalized?: boolean) => number;
}
interface GetSelectionContentArgs extends GetContentArgs {
    selection?: boolean;
    contextual?: boolean;
}
interface SelectionSetContentArgs extends SetContentArgs {
    selection?: boolean;
}
interface BookmarkManager {
    getBookmark(type: number, normalized?: boolean): Bookmark;
    moveToBookmark(bookmark: Bookmark): boolean;
}
declare namespace BookmarkManager {
    const isBookmarkNode: (node: Node) => boolean;
}
interface ControlSelection {
    isResizable(elm: Element): boolean;
    showResizeRect(elm: Element): void;
    hideResizeRect(): void;
    updateResizeRect(evt: EditorEvent<any>): void;
    destroy(): void;
}
interface ParserArgs {
    getInner?: boolean | number;
    forced_root_block?: boolean | string;
    context?: string;
    isRootContent?: boolean;
    format?: string;
    [key: string]: any;
}
declare type ParserFilterCallback = (nodes: AstNode[], name: string, args: ParserArgs) => void;
interface ParserFilter {
    name: string;
    callbacks: ParserFilterCallback[];
}
interface DomParserSettings {
    allow_html_data_urls?: boolean;
    allow_conditional_comments?: boolean;
    allow_html_in_named_anchor?: boolean;
    allow_script_urls?: boolean;
    allow_unsafe_link_target?: boolean;
    convert_fonts_to_spans?: boolean;
    fix_list_elements?: boolean;
    font_size_legacy_values?: string;
    forced_root_block?: boolean | string;
    forced_root_block_attrs?: Record<string, string>;
    padd_empty_with_br?: boolean;
    preserve_cdata?: boolean;
    remove_trailing_brs?: boolean;
    root_name?: string;
    validate?: boolean;
    inline_styles?: boolean;
    blob_cache?: BlobCache;
    images_dataimg_filter?: (img: HTMLImageElement) => boolean;
}
interface DomParser {
    schema: Schema;
    addAttributeFilter(name: string, callback: (nodes: AstNode[], name: string, args: ParserArgs) => void): void;
    getAttributeFilters(): ParserFilter[];
    addNodeFilter(name: string, callback: (nodes: AstNode[], name: string, args: ParserArgs) => void): void;
    getNodeFilters(): ParserFilter[];
    filterNode(node: AstNode): AstNode;
    parse(html: string, args?: ParserArgs): AstNode;
}
interface WriterSettings {
    element_format?: 'xhtml' | 'html';
    entities?: string;
    entity_encoding?: string;
    indent?: boolean;
    indent_after?: string;
    indent_before?: string;
}
interface Writer {
    cdata(text: string): void;
    comment(text: string): void;
    doctype(text: string): void;
    end(name: string): void;
    getContent(): string;
    pi(name: string, text: string): void;
    reset(): void;
    start(name: string, attrs?: Attributes, empty?: boolean): void;
    text(text: string, raw?: boolean): void;
}
interface HtmlSerializerSettings extends WriterSettings {
    inner?: boolean;
    validate?: boolean;
}
interface HtmlSerializer {
    serialize(node: AstNode): string;
}
interface DomSerializerArgs extends ParserArgs {
    format?: string;
}
interface DomSerializerSettings extends DomParserSettings, WriterSettings, SchemaSettings, HtmlSerializerSettings {
    url_converter?: URLConverter;
    url_converter_scope?: {};
}
interface DomSerializerImpl {
    schema: Schema;
    addNodeFilter(name: string, callback: (nodes: AstNode[], name: string, args: ParserArgs) => void): void;
    addAttributeFilter(name: string, callback: (nodes: AstNode[], name: string, args: ParserArgs) => void): void;
    getNodeFilters(): ParserFilter[];
    getAttributeFilters(): ParserFilter[];
    serialize(node: Element, parserArgs: {
        format: 'tree';
    } & DomSerializerArgs): AstNode;
    serialize(node: Element, parserArgs?: DomSerializerArgs): string;
    addRules(rules: string): void;
    setRules(rules: string): void;
    addTempAttr(name: string): void;
    getTempAttrs(): string[];
}
interface DomSerializer extends DomSerializerImpl {
}
interface EditorSelection {
    bookmarkManager: BookmarkManager;
    controlSelection: ControlSelection;
    dom: DOMUtils;
    win: Window;
    serializer: DomSerializer;
    editor: Editor;
    collapse: (toStart?: boolean) => void;
    setCursorLocation: (node?: Node, offset?: number) => void;
    getContent(args: {
        format: 'tree';
    } & GetSelectionContentArgs): AstNode;
    getContent(args?: GetSelectionContentArgs): string;
    setContent: (content: string, args?: SelectionSetContentArgs) => void;
    getBookmark: (type?: number, normalized?: boolean) => Bookmark;
    moveToBookmark: (bookmark: Bookmark) => boolean;
    select: (node: Node, content?: boolean) => Node;
    isCollapsed: () => boolean;
    isForward: () => boolean;
    setNode: (elm: Element) => Element;
    getNode: () => Element;
    getSel: () => Selection | null;
    setRng: (rng: Range, forward?: boolean) => void;
    getRng: () => Range | null;
    getStart: (real?: boolean) => Element;
    getEnd: (real?: boolean) => Element;
    getSelectedBlocks: (startElm?: Element, endElm?: Element) => Element[];
    normalize: () => Range;
    selectorChanged: (selector: string, callback: (active: boolean, args: {
        node: Node;
        selector: String;
        parents: Element[];
    }) => void) => EditorSelection;
    selectorChangedWithUnbind: (selector: string, callback: (active: boolean, args: {
        node: Node;
        selector: String;
        parents: Element[];
    }) => void) => {
        unbind: () => void;
    };
    getScrollContainer: () => HTMLElement;
    scrollIntoView: (elm: Element, alignToTop?: boolean) => void;
    placeCaretAt: (clientX: number, clientY: number) => void;
    getBoundingClientRect: () => ClientRect;
    destroy: () => void;
}
declare type EditorCommandCallback = (ui: boolean, value: any, args: any) => void;
declare type EditorCommandsCallback = (command: string, ui: boolean, value: any, args: any) => void;
interface Commands {
    state: Record<string, (command: string) => boolean>;
    exec: Record<string, EditorCommandsCallback>;
    value: Record<string, (command: string) => string>;
}
interface EditorCommandsConstructor {
    readonly prototype: EditorCommands;
    new (editor: Editor): EditorCommands;
}
declare class EditorCommands {
    private readonly editor;
    private selectionBookmark;
    private commands;
    constructor(editor: Editor);
    execCommand(command: string, ui?: boolean, value?: any, args?: any): boolean;
    queryCommandState(command: string): boolean;
    queryCommandValue(command: string): string;
    addCommands<K extends keyof Commands>(commandList: Commands[K], type: K): void;
    addCommands(commandList: Record<string, EditorCommandsCallback>): void;
    addCommand(command: string, callback: EditorCommandCallback, scope?: any): void;
    queryCommandSupported(command: string): boolean;
    addQueryStateHandler(command: string, callback: () => boolean, scope?: any): void;
    addQueryValueHandler(command: string, callback: () => string, scope?: any): void;
    hasCustomCommand(command: string): boolean;
    private execNativeCommand;
    private isFormatMatch;
    private toggleFormat;
    private storeSelection;
    private restoreSelection;
    private setupCommands;
}
interface WindowManager {
    open: <T>(config: DialogSpec<T>, params?: any) => DialogInstanceApi<T>;
    openUrl: (config: UrlDialogSpec) => UrlDialogInstanceApi;
    alert: (message: string, callback?: () => void, scope?: any) => void;
    confirm: (message: string, callback?: (state: boolean) => void, scope?: any) => void;
    close: () => void;
}
declare type InstanceApi<T> = UrlDialogInstanceApi | DialogInstanceApi<T>;
interface WindowManagerImpl {
    open: <T>(config: DialogSpec<T>, params: any, closeWindow: (dialog: DialogInstanceApi<T>) => void) => DialogInstanceApi<T>;
    openUrl: (config: UrlDialogSpec, closeWindow: (dialog: UrlDialogInstanceApi) => void) => UrlDialogInstanceApi;
    alert: (message: string, callback: () => void) => void;
    confirm: (message: string, callback: (state: boolean) => void) => void;
    close: (dialog: InstanceApi<any>) => void;
}
declare type ExecCommandEvent = {
    command: string;
    ui?: boolean;
    value?: any;
};
declare type GetContentEvent = GetContentArgs & {
    source_view?: boolean;
    selection?: boolean;
    save?: boolean;
};
declare type SetContentEvent = SetContentArgs & {
    paste?: boolean;
    selection?: boolean;
};
declare type NewBlockEvent = {
    newBlock: Element;
};
declare type NodeChangeEvent = {
    element: Element;
    parents: Node[];
    selectionChange?: boolean;
    initial?: boolean;
};
declare type ObjectResizeEvent = {
    target: HTMLElement;
    width: number;
    height: number;
    origin: string;
};
declare type ObjectSelectedEvent = {
    target: Node;
    targetClone?: Node;
};
declare type ScrollIntoViewEvent = {
    elm: HTMLElement;
    alignToTop: boolean;
};
declare type SetSelectionRangeEvent = {
    range: Range;
    forward: boolean;
};
declare type ShowCaretEvent = {
    target: Node;
    direction: number;
    before: boolean;
};
declare type SwitchModeEvent = {
    mode: string;
};
declare type AddUndoEvent = {
    level: UndoLevel;
    lastLevel: UndoLevel;
    originalEvent: Event;
};
declare type UndoRedoEvent = {
    level: UndoLevel;
};
declare type WindowEvent<T extends DialogData> = {
    dialog: InstanceApi<T>;
};
declare type ProgressStateEvent = {
    state: boolean;
    time?: number;
};
declare type PlaceholderToggleEvent = {
    state: boolean;
};
declare type LoadErrorEvent = {
    message: string;
};
interface EditorEventMap extends Omit<NativeEventMap, 'blur' | 'focus'> {
    'activate': {
        relatedTarget: Editor;
    };
    'deactivate': {
        relatedTarget: Editor;
    };
    'focus': {
        blurredEditor: Editor;
    };
    'blur': {
        focusedEditor: Editor;
    };
    'resize': UIEvent;
    'scroll': UIEvent;
    'detach': {};
    'remove': {};
    'init': {};
    'ScrollIntoView': ScrollIntoViewEvent;
    'AfterScrollIntoView': ScrollIntoViewEvent;
    'ObjectResized': ObjectResizeEvent;
    'ObjectResizeStart': ObjectResizeEvent;
    'SwitchMode': SwitchModeEvent;
    'ScrollWindow': UIEvent;
    'ResizeWindow': UIEvent;
    'SkinLoaded': {};
    'SkinLoadError': LoadErrorEvent;
    'PluginLoadError': LoadErrorEvent;
    'IconsLoadError': LoadErrorEvent;
    'LanguageLoadError': LoadErrorEvent;
    'BeforeExecCommand': ExecCommandEvent;
    'ExecCommand': ExecCommandEvent;
    'NodeChange': NodeChangeEvent;
    'ShowCaret': ShowCaretEvent;
    'SelectionChange': {};
    'ObjectSelected': ObjectSelectedEvent;
    'BeforeObjectSelected': ObjectSelectedEvent;
    'GetSelectionRange': {
        range: Range;
    };
    'SetSelectionRange': SetSelectionRangeEvent;
    'AfterSetSelectionRange': SetSelectionRangeEvent;
    'BeforeGetContent': GetContentEvent;
    'GetContent': GetContentEvent;
    'BeforeSetContent': SetContentEvent;
    'SetContent': SetContentEvent;
    'LoadContent': {};
    'PreviewFormats': {};
    'AfterPreviewFormats': {};
    'ScriptsLoaded': {};
    'PreInit': {};
    'PostRender': {};
    'NewBlock': NewBlockEvent;
    'ClearUndos': {};
    'TypingUndo': {};
    'Redo': UndoRedoEvent;
    'Undo': UndoRedoEvent;
    'BeforeAddUndo': AddUndoEvent;
    'AddUndo': AddUndoEvent;
    'CloseWindow': WindowEvent<any>;
    'OpenWindow': WindowEvent<any>;
    'ProgressState': ProgressStateEvent;
    'PlaceholderToggle': PlaceholderToggleEvent;
    'tap': TouchEvent;
    'longpress': TouchEvent;
    'longpresscancel': {};
}
interface EditorManagerEventMap {
    'AddEditor': {
        editor: Editor;
    };
    'RemoveEditor': {
        editor: Editor;
    };
    'BeforeUnload': {
        returnValue: any;
    };
}
type EventTypes_d_ExecCommandEvent = ExecCommandEvent;
type EventTypes_d_GetContentEvent = GetContentEvent;
type EventTypes_d_SetContentEvent = SetContentEvent;
type EventTypes_d_NewBlockEvent = NewBlockEvent;
type EventTypes_d_NodeChangeEvent = NodeChangeEvent;
type EventTypes_d_ObjectResizeEvent = ObjectResizeEvent;
type EventTypes_d_ObjectSelectedEvent = ObjectSelectedEvent;
type EventTypes_d_ScrollIntoViewEvent = ScrollIntoViewEvent;
type EventTypes_d_SetSelectionRangeEvent = SetSelectionRangeEvent;
type EventTypes_d_ShowCaretEvent = ShowCaretEvent;
type EventTypes_d_SwitchModeEvent = SwitchModeEvent;
type EventTypes_d_AddUndoEvent = AddUndoEvent;
type EventTypes_d_UndoRedoEvent = UndoRedoEvent;
type EventTypes_d_WindowEvent<_0> = WindowEvent<_0>;
type EventTypes_d_ProgressStateEvent = ProgressStateEvent;
type EventTypes_d_PlaceholderToggleEvent = PlaceholderToggleEvent;
type EventTypes_d_LoadErrorEvent = LoadErrorEvent;
type EventTypes_d_EditorEventMap = EditorEventMap;
type EventTypes_d_EditorManagerEventMap = EditorManagerEventMap;
declare namespace EventTypes_d {
    export { EventTypes_d_ExecCommandEvent as ExecCommandEvent, EventTypes_d_GetContentEvent as GetContentEvent, EventTypes_d_SetContentEvent as SetContentEvent, EventTypes_d_NewBlockEvent as NewBlockEvent, EventTypes_d_NodeChangeEvent as NodeChangeEvent, EventTypes_d_ObjectResizeEvent as ObjectResizeEvent, EventTypes_d_ObjectSelectedEvent as ObjectSelectedEvent, EventTypes_d_ScrollIntoViewEvent as ScrollIntoViewEvent, EventTypes_d_SetSelectionRangeEvent as SetSelectionRangeEvent, EventTypes_d_ShowCaretEvent as ShowCaretEvent, EventTypes_d_SwitchModeEvent as SwitchModeEvent, EventTypes_d_AddUndoEvent as AddUndoEvent, EventTypes_d_UndoRedoEvent as UndoRedoEvent, EventTypes_d_WindowEvent as WindowEvent, EventTypes_d_ProgressStateEvent as ProgressStateEvent, EventTypes_d_PlaceholderToggleEvent as PlaceholderToggleEvent, EventTypes_d_LoadErrorEvent as LoadErrorEvent, EventTypes_d_EditorEventMap as EditorEventMap, EventTypes_d_EditorManagerEventMap as EditorManagerEventMap, };
}
interface RawString {
    raw: string;
}
declare type Primitive = string | number | boolean | Record<string | number, any> | Function;
declare type TokenisedString = [string, ...Primitive[]];
declare type Untranslated = Primitive | TokenisedString | RawString;
declare type TranslatedString = string;
interface I18n {
    getData(): Record<string, Record<string, string>>;
    setCode(newCode: string): void;
    getCode(): string;
    add(code: string, items: Record<string, string>): void;
    translate(text: Untranslated): TranslatedString;
    isRtl(): boolean;
    hasCode(code: string): boolean;
}
interface Observable<T> {
    fire<K extends string, U extends MappedEvent<T, K>>(name: K, args?: U, bubble?: boolean): EditorEvent<U>;
    on<K extends string>(name: K, callback: (event: EditorEvent<MappedEvent<T, K>>) => void, prepend?: boolean): EventDispatcher<T>;
    off<K extends string>(name?: K, callback?: (event: EditorEvent<MappedEvent<T, K>>) => void): EventDispatcher<T>;
    once<K extends string>(name: K, callback: (event: EditorEvent<MappedEvent<T, K>>) => void): EventDispatcher<T>;
    hasEventListeners(name: string): boolean;
}
interface URISettings {
    base_uri?: URI;
}
interface URIConstructor {
    readonly prototype: URI;
    new (url: string, settings?: URISettings): URI;
    getDocumentBaseUrl(loc: {
        protocol: string;
        host?: string;
        href?: string;
        pathname?: string;
    }): string;
    parseDataUri(uri: string): {
        type: string;
        data: string;
    };
}
declare class URI {
    static parseDataUri(uri: string): {
        type: string;
        data: string;
    };
    static getDocumentBaseUrl(loc: {
        protocol: string;
        host?: string;
        href?: string;
        pathname?: string;
    }): string;
    source: string;
    protocol: string;
    authority: string;
    userInfo: string;
    user: string;
    password: string;
    host: string;
    port: string;
    relative: string;
    path: string;
    directory: string;
    file: string;
    query: string;
    anchor: string;
    settings: URISettings;
    constructor(url: string, settings?: URISettings);
    setPath(path: string): void;
    toRelative(uri: string): string;
    toAbsolute(uri: string, noHost?: boolean): string;
    isSameOrigin(uri: URI): boolean;
    toRelPath(base: string, path: string): string;
    toAbsPath(base: string, path: string): string;
    getURI(noProtoHost?: boolean): string;
}
interface EditorManager extends Observable<EditorManagerEventMap> {
    $: DomQueryConstructor;
    defaultSettings: RawEditorSettings;
    majorVersion: string;
    minorVersion: string;
    releaseDate: string;
    editors: Editor[];
    activeEditor: Editor;
    focusedEditor: Editor;
    settings: RawEditorSettings;
    baseURI: URI;
    baseURL: string;
    documentBaseURL: string;
    i18n: I18n;
    suffix: string;
    add(editor: Editor): Editor;
    addI18n(code: string, item: Record<string, string>): void;
    createEditor(id: string, settings: RawEditorSettings): Editor;
    execCommand(cmd: string, ui: boolean, value: any): boolean;
    get(): Editor[];
    get(id: number | string): Editor;
    init(settings: RawEditorSettings): Promise<Editor[]>;
    overrideDefaults(defaultSettings: Partial<RawEditorSettings>): void;
    remove(): void;
    remove(selector: string | Editor): Editor | void;
    setActive(editor: Editor): void;
    setup(): void;
    translate(text: string): string;
    triggerSave(): void;
    _setBaseUrl(baseUrl: string): void;
}
interface EditorObservable extends Observable<EditorEventMap> {
    bindPendingEventDelegates(): void;
    toggleNativeEvent(name: string, state: boolean): any;
    unbindAllNativeEvents(): void;
}
interface UploadResult {
    element: HTMLImageElement;
    status: boolean;
    blobInfo: BlobInfo;
    uploadUri: string;
}
declare type UploadCallback = (results: UploadResult[]) => void;
interface EditorUpload {
    blobCache: BlobCache;
    addFilter(filter: (img: HTMLImageElement) => boolean): void;
    uploadImages(callback?: UploadCallback): Promise<UploadResult[]>;
    uploadImagesAuto(callback?: UploadCallback): void | Promise<UploadResult[]>;
    scanForImages(): Promise<BlobInfoImagePair[]>;
    destroy(): void;
}
declare type FormatChangeCallback = (state: boolean, data: {
    node: Node;
    format: string;
    parents: any;
}) => void;
interface FormatRegistry {
    get(name?: string): Format[] | Record<string, Format[]>;
    has(name: string): boolean;
    register(name: string | Formats, format?: Format[] | Format): void;
    unregister(name: string): Formats;
}
interface Formatter extends FormatRegistry {
    apply(name: string, vars?: FormatVars, node?: Node | RangeLikeObject): void;
    remove(name: string, vars?: FormatVars, node?: Node | Range, similar?: boolean): void;
    toggle(name: string, vars?: FormatVars, node?: Node): void;
    match(name: string, vars?: FormatVars, node?: Node): boolean;
    matchAll(names: string[], vars?: FormatVars): string[];
    matchNode(node: Node, name: string, vars?: FormatVars, similar?: boolean): boolean;
    canApply(name: string): boolean;
    formatChanged(names: string, callback: FormatChangeCallback, similar?: boolean): {
        unbind: () => void;
    };
    getCssText(format: string | Format): string;
}
interface EditorMode {
    isReadOnly: () => boolean;
    set: (mode: string) => void;
    get: () => string;
    register: (mode: string, api: EditorModeApi) => void;
}
interface EditorModeApi {
    activate: () => void;
    deactivate: () => void;
    editorReadOnly: boolean;
}
interface NotificationManagerImpl {
    open(spec: NotificationSpec, closeCallback?: () => void): NotificationApi;
    close<T extends NotificationApi>(notification: T): void;
    reposition<T extends NotificationApi>(notifications: T[]): void;
    getArgs<T extends NotificationApi>(notification: T): NotificationSpec;
}
interface NotificationSpec {
    type?: 'info' | 'warning' | 'error' | 'success';
    text: string;
    icon?: string;
    progressBar?: boolean;
    timeout?: number;
    closeButton?: boolean;
}
interface NotificationApi {
    close: () => void;
    progressBar: {
        value: (percent: number) => void;
    };
    text: (text: string) => void;
    moveTo: (x: number, y: number) => void;
    moveRel: (element: Element, rel: 'tc-tc' | 'bc-bc' | 'bc-tc' | 'tc-bc' | 'banner') => void;
    getEl: () => HTMLElement;
    settings: NotificationSpec;
}
interface NotificationManager {
    open: (spec: NotificationSpec) => NotificationApi;
    close: () => void;
    getNotifications: () => NotificationApi[];
}
interface Plugin {
    getMetadata?(): {
        name: string;
        url: string;
    };
    [key: string]: any;
}
declare type PluginManager = AddOnManager<Plugin>;
interface ShortcutsConstructor {
    readonly prototype: Shortcuts;
    new (editor: Editor): Shortcuts;
}
declare type CommandFunc = string | [string, boolean, any] | (() => void);
declare class Shortcuts {
    private readonly editor;
    private readonly shortcuts;
    private pendingPatterns;
    constructor(editor: Editor);
    add(pattern: string, desc: string, cmdFunc: CommandFunc, scope?: any): boolean;
    remove(pattern: string): boolean;
    private normalizeCommandFunc;
    private parseShortcut;
    private createShortcut;
    private hasModifier;
    private isFunctionKey;
    private matchShortcut;
    private executeShortcutAction;
}
declare type Theme = {
    ui?: any;
    inline?: any;
    execCommand?(command: string, ui?: boolean, value?: any): boolean;
    destroy?(): void;
    init?(editor: Editor, url: string, $: DomQueryConstructor): any;
    renderUI?(): {
        iframeContainer?: HTMLIFrameElement;
        editorContainer: HTMLElement;
        api?: EditorUiApi;
    };
    getNotificationManagerImpl?(): NotificationManagerImpl;
    getWindowManagerImpl?(): WindowManagerImpl;
};
declare type ThemeManager = AddOnManager<Theme>;
interface EditorConstructor {
    readonly prototype: Editor;
    new (id: string, settings: RawEditorSettings, editorManager: EditorManager): Editor;
}
declare class Editor implements EditorObservable {
    documentBaseUrl: string;
    baseUri: URI;
    settings: EditorSettings;
    id: string;
    plugins: Record<string, Plugin>;
    documentBaseURI: URI;
    baseURI: URI;
    contentCSS: string[];
    contentStyles: string[];
    ui: EditorUi;
    mode: EditorMode;
    setMode: (mode: string) => void;
    $: DomQueryConstructor;
    shortcuts: Shortcuts;
    loadedCSS: Record<string, any>;
    editorCommands: EditorCommands;
    suffix: string;
    editorManager: EditorManager;
    inline: boolean;
    isNotDirty: boolean;
    callbackLookup: any;
    _nodeChangeDispatcher: NodeChange;
    editorUpload: EditorUpload;
    annotator: Annotator;
    bodyElement: HTMLElement;
    bookmark: any;
    composing: boolean;
    container: HTMLElement;
    contentAreaContainer: HTMLElement;
    contentDocument: Document;
    contentWindow: Window;
    delegates: Record<string, (event: any) => void>;
    destroyed: boolean;
    dom: DOMUtils;
    editorContainer: HTMLElement;
    eventRoot?: Element;
    formatter: Formatter;
    formElement: HTMLElement;
    formEventDelegate: (e: Event) => void;
    hasHiddenInput: boolean;
    hasVisual: boolean;
    hidden: boolean;
    iframeElement: HTMLIFrameElement | null;
    iframeHTML: string;
    initialized: boolean;
    notificationManager: NotificationManager;
    orgDisplay: string;
    orgVisibility: string;
    parser: DomParser;
    quirks: Quirks;
    readonly: boolean;
    removed: boolean;
    schema: Schema;
    selection: EditorSelection;
    serializer: DomSerializer;
    startContent: string;
    targetElm: HTMLElement;
    theme: Theme;
    undoManager: UndoManager;
    validate: boolean;
    windowManager: WindowManager;
    _beforeUnload: () => void;
    _eventDispatcher: EventDispatcher<NativeEventMap>;
    _mceOldSubmit: any;
    _pendingNativeEvents: string[];
    _selectionOverrides: SelectionOverrides;
    _skinLoaded: boolean;
    bindPendingEventDelegates: EditorObservable['bindPendingEventDelegates'];
    toggleNativeEvent: EditorObservable['toggleNativeEvent'];
    unbindAllNativeEvents: EditorObservable['unbindAllNativeEvents'];
    fire: EditorObservable['fire'];
    on: EditorObservable['on'];
    off: EditorObservable['off'];
    once: EditorObservable['once'];
    hasEventListeners: EditorObservable['hasEventListeners'];
    constructor(id: string, settings: RawEditorSettings, editorManager: EditorManager);
    render(): void;
    focus(skipFocus?: boolean): void;
    hasFocus(): boolean;
    execCallback(name: string, ...x: any[]): any;
    translate(text: Untranslated): TranslatedString;
    getParam<K extends keyof ParamTypeMap>(name: string, defaultVal: ParamTypeMap[K], type: K): ParamTypeMap[K];
    getParam<K extends keyof EditorSettings>(name: K, defaultVal?: EditorSettings[K], type?: string): EditorSettings[K];
    getParam<T>(name: string, defaultVal: T, type?: string): T;
    hasPlugin(name: string, loaded?: boolean): boolean;
    nodeChanged(args?: any): void;
    addCommand(name: string, callback: EditorCommandCallback, scope?: object): void;
    addQueryStateHandler(name: string, callback: () => boolean, scope?: any): void;
    addQueryValueHandler(name: string, callback: () => string, scope?: any): void;
    addShortcut(pattern: string, desc: string, cmdFunc: string | [string, boolean, any] | (() => void), scope?: any): void;
    execCommand(cmd: string, ui?: boolean, value?: any, args?: any): boolean;
    queryCommandState(cmd: string): boolean;
    queryCommandValue(cmd: string): string;
    queryCommandSupported(cmd: string): boolean;
    show(): void;
    hide(): void;
    isHidden(): boolean;
    setProgressState(state: boolean, time?: number): void;
    load(args?: any): string;
    save(args?: any): string;
    setContent(content: string, args?: SetContentArgs): string;
    setContent(content: AstNode, args?: SetContentArgs): AstNode;
    getContent(args: {
        format: 'tree';
    } & GetContentArgs): AstNode;
    getContent(args?: GetContentArgs): string;
    insertContent(content: string, args?: any): void;
    resetContent(initialContent?: string): void;
    isDirty(): boolean;
    setDirty(state: boolean): void;
    getContainer(): HTMLElement;
    getContentAreaContainer(): HTMLElement;
    getElement(): HTMLElement;
    getWin(): Window;
    getDoc(): Document;
    getBody(): HTMLElement;
    convertURL(url: string, name: string, elm?: any): string;
    addVisual(elm?: HTMLElement): void;
    remove(): void;
    destroy(automatic?: boolean): void;
    uploadImages(callback?: UploadCallback): Promise<UploadResult[]>;
    _scanForImages(): Promise<BlobInfoImagePair[]>;
    addButton(): void;
    addSidebar(): void;
    addMenuItem(): void;
    addContextToolbar(): void;
}
interface UrlObject {
    prefix: string;
    resource: string;
    suffix: string;
}
declare type WaitState = 'added' | 'loaded';
declare type AddOnCallback<T> = (editor: Editor, url: string, $?: DomQueryConstructor) => void | T;
declare type AddOnConstructor<T> = new (editor: Editor, url: string, $?: DomQueryConstructor) => T;
interface AddOnManager<T> {
    items: AddOnConstructor<T>[];
    urls: Record<string, string>;
    lookup: Record<string, {
        instance: AddOnConstructor<T>;
        dependencies?: string[];
    }>;
    _listeners: {
        name: string;
        state: WaitState;
        callback: () => void;
    }[];
    get(name: string): AddOnConstructor<T>;
    dependencies(name: string): string[];
    requireLangPack(name: string, languages: string): void;
    add(id: string, addOn: AddOnCallback<T>, dependencies?: string[]): AddOnConstructor<T>;
    remove(name: string): void;
    createUrl(baseUrl: UrlObject, dep: string | UrlObject): UrlObject;
    addComponents(pluginName: string, scripts: string[]): void;
    load(name: string, addOnUrl: string | UrlObject, success?: () => void, scope?: any, failure?: () => void): void;
    waitFor(name: string, callback: () => void, state?: WaitState): void;
}
declare namespace AddOnManager {
    let language: string;
    let languageLoad: boolean;
    let baseURL: string;
    const PluginManager: AddOnManager<any>;
    const ThemeManager: AddOnManager<any>;
}
interface RangeUtils {
    walk(rng: Range, callback: (nodes: Node[]) => void): void;
    split(rng: Range): RangeLikeObject;
    normalize(rng: Range): boolean;
}
declare namespace RangeUtils {
    const compareRanges: (rng1: RangeLikeObject, rng2: RangeLikeObject) => boolean;
    const getCaretRangeFromPoint: (clientX: number, clientY: number, doc: Document) => Range;
    const getSelectedNode: (range: Range) => Node;
    const getNode: (container: Node, offset: number) => Node;
}
interface ScriptLoaderSettings {
    referrerPolicy?: ReferrerPolicy;
}
interface ScriptLoaderConstructor {
    readonly prototype: ScriptLoader;
    new (): ScriptLoader;
    ScriptLoader: ScriptLoader;
}
declare class ScriptLoader {
    static ScriptLoader: ScriptLoader;
    private settings;
    private states;
    private queue;
    private scriptLoadedCallbacks;
    private queueLoadedCallbacks;
    private loading;
    constructor(settings?: ScriptLoaderSettings);
    _setReferrerPolicy(referrerPolicy: ReferrerPolicy): void;
    loadScript(url: string, success?: () => void, failure?: () => void): void;
    isDone(url: string): boolean;
    markDone(url: string): void;
    add(url: string, success?: () => void, scope?: any, failure?: () => void): void;
    load(url: string, success?: () => void, scope?: any, failure?: () => void): void;
    remove(url: string): void;
    loadQueue(success?: () => void, scope?: any, failure?: (urls: string[]) => void): void;
    loadScripts(scripts: string[], success?: () => void, scope?: any, failure?: (urls: string[]) => void): void;
}
declare type TextProcessCallback = (node: Text, offset: number, text: string) => number;
interface Spot {
    container: Text;
    offset: number;
}
interface TextSeeker {
    backwards: (node: Node, offset: number, process: TextProcessCallback, root?: Node) => Spot | null;
    forwards: (node: Node, offset: number, process: TextProcessCallback, root?: Node) => Spot | null;
}
interface DomTreeWalkerConstructor {
    readonly prototype: DomTreeWalker;
    new (startNode: Node, rootNode: Node): DomTreeWalker;
}
declare class DomTreeWalker {
    private readonly rootNode;
    private node;
    constructor(startNode: Node, rootNode: Node);
    current(): Node;
    next(shallow?: boolean): Node;
    prev(shallow?: boolean): Node;
    prev2(shallow?: boolean): Node;
    private findSibling;
    private findPreviousNode;
}
interface Version {
    major: number;
    minor: number;
}
interface Env {
    opera: boolean;
    webkit: boolean;
    ie: false | number;
    gecko: boolean;
    mac: boolean;
    iOS: boolean;
    android: boolean;
    contentEditable: boolean;
    transparentSrc: string;
    caretAfter: boolean;
    range: boolean;
    documentMode: number;
    fileApi: boolean;
    ceFalse: boolean;
    cacheSuffix: any;
    container: any;
    experimentalShadowDom: boolean;
    canHaveCSP: boolean;
    desktop: boolean;
    windowsPhone: boolean;
    browser: {
        current: string | undefined;
        version: Version;
        isEdge: () => boolean;
        isChrome: () => boolean;
        isIE: () => boolean;
        isOpera: () => boolean;
        isFirefox: () => boolean;
        isSafari: () => boolean;
    };
    os: {
        current: string | undefined;
        version: Version;
        isWindows: () => boolean;
        isiOS: () => boolean;
        isAndroid: () => boolean;
        isOSX: () => boolean;
        isLinux: () => boolean;
        isSolaris: () => boolean;
        isFreeBSD: () => boolean;
        isChromeOS: () => boolean;
    };
    deviceType: {
        isiPad: () => boolean;
        isiPhone: () => boolean;
        isTablet: () => boolean;
        isPhone: () => boolean;
        isTouch: () => boolean;
        isWebView: () => boolean;
        isDesktop: () => boolean;
    };
}
interface FocusManager {
    isEditorUIElement: (elm: Element) => boolean;
}
interface EntitiesMap {
    [name: string]: string;
}
interface Entities {
    encodeRaw(text: string, attr?: boolean): string;
    encodeAllRaw(text: string): string;
    encodeNumeric(text: string, attr?: boolean): string;
    encodeNamed(text: string, attr?: boolean, entities?: EntitiesMap): string;
    getEncodeFunc(name: string, entities?: EntitiesMap | string): (text: string, attr?: boolean) => string;
    decode(text: string): string;
}
declare type AttrList = Array<{
    name: string;
    value: string;
}> & {
    map: Record<string, string>;
};
interface SaxParserSettings {
    allow_conditional_comments?: boolean;
    allow_html_data_urls?: boolean;
    allow_script_urls?: boolean;
    allow_svg_data_urls?: boolean;
    fix_self_closing?: boolean;
    preserve_cdata?: boolean;
    remove_internals?: boolean;
    self_closing_elements?: Record<string, {}>;
    validate?: boolean;
    cdata?(text: string): void;
    comment?(text: string): void;
    doctype?(text: string): void;
    end?(name: string): void;
    pi?(name: string, text: string): void;
    start?(name: string, attrs: AttrList, empty: boolean): void;
    text?(text: string, raw?: boolean): void;
}
declare type ParserFormat = 'html' | 'xhtml' | 'xml';
interface SaxParser {
    parse(html: string, format?: ParserFormat): void;
}
declare namespace SaxParser {
    const findEndTag: (schema: Schema, html: string, startIndex: number) => number;
}
interface IconPack {
    icons: Record<string, string>;
}
interface IconManager {
    add: (id: string, iconPack: IconPack) => void;
    get: (id: string) => IconPack;
    has: (id: string) => boolean;
}
interface Resource {
    load<T = any>(id: string, url: string): Promise<T>;
    add(id: string, data: any): void;
}
declare type WithSubItems<T, K extends keyof T> = T[K] extends Array<any> ? (T & T[K][number]) : T;
interface Props<A extends any[] = any[]> {
    Mixins?: Array<Record<string, any>>;
    Methods?: string;
    Properties?: string;
    Statics?: Record<string, any>;
    Defaults?: Record<string, any>;
    init?: (...args: A) => void;
}
declare type ExtendedClass<T extends Props<A>, A extends any[]> = WithSubItems<T, 'Mixins'>;
interface ExtendedClassConstructor<T extends Props<A>, A extends any[] = any[]> extends Class {
    readonly prototype: ExtendedClass<T, A>;
    new (...args: A): ExtendedClass<T, A>;
    [key: string]: T['Statics'];
}
interface Class {
    extend<T extends Props<A>, A extends any[] = any[]>(props: T): ExtendedClassConstructor<T, A>;
}
interface RGB {
    r: number;
    g: number;
    b: number;
}
interface HSV {
    h: number;
    s: number;
    v: number;
}
interface Color {
    toRgb(): RGB;
    toHsv(): HSV;
    toHex(): string;
    parse(value: string | RGB | HSV): Color;
}
declare type ColorConstructor = new (value?: string | RGB | HSV) => Color;
declare type DebounceFunc<T extends (...args: any[]) => void> = {
    (...args: Parameters<T>): void;
    stop: () => void;
};
interface Delay {
    requestAnimationFrame(callback: () => void, element?: HTMLElement): void;
    setEditorInterval(editor: Editor, callback: () => void, time?: number): number;
    setEditorTimeout(editor: Editor, callback: () => void, time?: number): number;
    setInterval(callback: () => void, time?: number): number;
    setTimeout(callback: () => void, time?: number): number;
    clearInterval(id: number): void;
    clearTimeout(id: number): void;
    debounce<T extends (...args: any[]) => any>(callback: T, time?: number): DebounceFunc<T>;
    throttle<T extends (...args: any[]) => any>(callback: T, time?: number): DebounceFunc<T>;
}
interface JSONUtils {
    serialize(obj: any): string;
    parse(text: string): any;
}
interface JSONPSettings {
    count?: number;
    url: string;
    callback(json: string): void;
}
interface JSONP {
    callbacks: {};
    count: number;
    send(settings: JSONPSettings): void;
}
interface JSONRequestSettings {
    crossDomain?: boolean;
    requestheaders?: Record<string, {
        key: string;
        value: string;
    }>;
    type?: string;
    url?: string;
    error_scope?: any;
    success_scope?: any;
    success?(data: any): void;
    error?(error: any, xhr: XMLHttpRequest): void;
}
interface JSONRequestArgs extends JSONRequestSettings {
    id?: string;
    method?: string;
    params?: string;
}
interface JSONRequestConstructor {
    readonly prototype: JSONRequest;
    new (settings?: JSONRequestSettings): JSONRequest;
    sendRPC(o: JSONRequestArgs): void;
}
declare class JSONRequest {
    static sendRPC(o: JSONRequestArgs): void;
    settings: JSONRequestSettings;
    count: number;
    constructor(settings?: JSONRequestSettings);
    send(args: JSONRequestArgs): void;
}
interface KeyboardLikeEvent {
    shiftKey: boolean;
    ctrlKey: boolean;
    altKey: boolean;
    metaKey: boolean;
}
interface VK {
    BACKSPACE: number;
    DELETE: number;
    DOWN: number;
    ENTER: number;
    LEFT: number;
    RIGHT: number;
    SPACEBAR: number;
    TAB: number;
    UP: number;
    END: number;
    HOME: number;
    modifierPressed(e: KeyboardLikeEvent): boolean;
    metaKeyPressed(e: KeyboardLikeEvent): boolean;
}
interface XHRSettings {
    async?: boolean;
    content_type?: string;
    crossDomain?: boolean;
    data?: Document | BodyInit;
    requestheaders?: Record<string, {
        key: string;
        value: string;
    }>;
    scope?: any;
    type?: string;
    url: string;
    error_scope?: any;
    success_scope?: any;
    error?(message: 'TIMED_OUT' | 'GENERAL', xhr: XMLHttpRequest, settings: XHRSettings): void;
    success?(text: string, xhr: XMLHttpRequest, settings: XHRSettings): void;
}
interface XHREventMap {
    beforeInitialize: {
        settings: XHRSettings;
    };
    beforeSend: {
        xhr: XMLHttpRequest;
        settings: XHRSettings;
    };
}
interface XHR extends Observable<XHREventMap> {
    send(settings: XHRSettings): void;
}
interface TinyMCE extends EditorManager {
    geom: {
        Rect: Rect;
    };
    util: {
        Promise: PromiseConstructor;
        Delay: Delay;
        Tools: Tools;
        VK: VK;
        URI: URIConstructor;
        Class: Class;
        EventDispatcher: EventDispatcherConstructor<any>;
        Observable: Observable<any>;
        I18n: I18n;
        XHR: XHR;
        JSON: JSONUtils;
        JSONRequest: JSONRequestConstructor;
        JSONP: JSONP;
        LocalStorage: Storage;
        Color: ColorConstructor;
    };
    dom: {
        EventUtils: EventUtilsConstructor;
        Sizzle: any;
        DomQuery: DomQueryConstructor;
        TreeWalker: DomTreeWalkerConstructor;
        TextSeeker: new (dom: DOMUtils, isBlockBoundary?: (node: Node) => boolean) => TextSeeker;
        DOMUtils: new (doc: Document, settings: Partial<DOMUtilsSettings>) => DOMUtils;
        ScriptLoader: ScriptLoaderConstructor;
        RangeUtils: new (dom: DOMUtils) => RangeUtils;
        Serializer: new (settings: DomSerializerSettings, editor?: Editor) => DomSerializer;
        ControlSelection: (selection: EditorSelection, editor: Editor) => ControlSelection;
        BookmarkManager: (selection: EditorSelection) => BookmarkManager;
        Selection: new (dom: DOMUtils, win: Window, serializer: DomSerializer, editor: Editor) => EditorSelection;
        StyleSheetLoader: new (documentOrShadowRoot: Document | ShadowRoot, settings: StyleSheetLoaderSettings) => StyleSheetLoader;
        Event: EventUtils;
    };
    html: {
        Styles: new (settings?: StylesSettings, schema?: Schema) => Styles;
        Entities: Entities;
        Node: AstNodeConstructor;
        Schema: new (settings?: SchemaSettings) => Schema;
        SaxParser: new (settings?: SaxParserSettings, schema?: Schema) => SaxParser;
        DomParser: new (settings?: DomParserSettings, schema?: Schema) => DomParser;
        Writer: new (settings?: WriterSettings) => Writer;
        Serializer: new (settings?: HtmlSerializerSettings, schema?: Schema) => HtmlSerializer;
    };
    AddOnManager: new <T>() => AddOnManager<T>;
    Annotator: new (editor: Editor) => Annotator;
    Editor: EditorConstructor;
    EditorCommands: EditorCommandsConstructor;
    EditorManager: EditorManager;
    EditorObservable: EditorObservable;
    Env: Env;
    FocusManager: FocusManager;
    Formatter: new (editor: Editor) => Formatter;
    NotificationManager: new (editor: Editor) => NotificationManager;
    Shortcuts: ShortcutsConstructor;
    UndoManager: new (editor: Editor) => UndoManager;
    WindowManager: new (editor: Editor) => WindowManager;
    DOM: DOMUtils;
    ScriptLoader: ScriptLoader;
    PluginManager: PluginManager;
    ThemeManager: ThemeManager;
    IconManager: IconManager;
    Resource: Resource;
    trim: Tools['trim'];
    isArray: Tools['isArray'];
    is: Tools['is'];
    toArray: Tools['toArray'];
    makeMap: Tools['makeMap'];
    each: Tools['each'];
    map: Tools['map'];
    grep: Tools['grep'];
    inArray: Tools['inArray'];
    extend: Tools['extend'];
    create: Tools['create'];
    walk: Tools['walk'];
    createNS: Tools['createNS'];
    resolve: Tools['resolve'];
    explode: Tools['explode'];
    _addCacheSuffix: Tools['_addCacheSuffix'];
    isOpera: boolean;
    isWebKit: boolean;
    isIE: false | number;
    isGecko: boolean;
    isMac: boolean;
}
declare const tinymce: TinyMCE;
declare type Formats$1 = {
    Formats: Formats;
    Format: Format;
    ApplyFormat: ApplyFormat;
    BlockFormat: BlockFormat;
    InlineFormat: InlineFormat;
    SelectorFormat: SelectorFormat;
    RemoveFormat: RemoveFormat;
    RemoveBlockFormat: RemoveBlockFormat;
    RemoveInlineFormat: RemoveInlineFormat;
    RemoveSelectorFormat: RemoveSelectorFormat;
};
export default tinymce;
export { AddOnManager, Annotator, AstNode, Bookmark, BookmarkManager, Class, Color, ControlSelection, DOMUtils, Delay, DomParser, DomParserSettings, DomQuery, DomSerializer, DomSerializerSettings, DomTreeWalker, Editor, EditorCommands, EditorEvent, EditorManager, EditorModeApi, EditorObservable, EditorSelection, EditorSettings, Entities, Env, EventDispatcher, EventUtils, EventTypes_d as Events, FocusManager, Formats$1 as Formats, Formatter, GeomRect, HtmlSerializer, HtmlSerializerSettings, I18n, IconManager, JSONUtils as JSON, JSONP, JSONRequest, JSONRequestArgs, JSONRequestSettings, NotificationApi, NotificationManager, NotificationSpec, Observable, Plugin, PluginManager, RangeUtils, RawEditorSettings, Rect, Resource, SaxParser, SaxParserSettings, Schema, SchemaSettings, ScriptLoader, Shortcuts, StyleSheetLoader, Styles, TextSeeker, Theme, ThemeManager, TinyMCE, Tools, URI, Ui_d as Ui, UndoManager, VK, WindowManager, Writer, WriterSettings, XHR, XHRSettings };