argous 1.2.202 → 1.2.203
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ConfirmModal/ModalProvider.d.ts +1 -1
- package/dist/components/Editor/components/Editor.d.ts +4 -4
- package/dist/components/Editor/components/Editor.js +3 -3
- package/dist/components/Editor/skins/content/dark/content.d.ts +0 -0
- package/dist/components/Editor/skins/content/dark/content.js +3 -0
- package/dist/components/Editor/skins/content/default/content.d.ts +0 -0
- package/dist/components/Editor/skins/content/default/content.js +3 -0
- package/dist/components/Editor/skins/content/document/content.d.ts +0 -0
- package/dist/components/Editor/skins/content/document/content.js +3 -0
- package/dist/components/Editor/skins/content/tinymce-5/content.d.ts +0 -0
- package/dist/components/Editor/skins/content/tinymce-5/content.js +3 -0
- package/dist/components/Editor/skins/content/tinymce-5-dark/content.d.ts +0 -0
- package/dist/components/Editor/skins/content/tinymce-5-dark/content.js +3 -0
- package/dist/components/Editor/skins/content/writer/content.d.ts +0 -0
- package/dist/components/Editor/skins/content/writer/content.js +3 -0
- package/dist/components/Editor/skins/ui/oxide/content.d.ts +0 -0
- package/dist/components/Editor/skins/ui/oxide/content.inline.d.ts +0 -0
- package/dist/components/Editor/skins/ui/oxide/content.inline.js +3 -0
- package/dist/components/Editor/skins/ui/oxide/content.js +3 -0
- package/dist/components/Editor/skins/ui/oxide/skin.d.ts +0 -0
- package/dist/components/Editor/skins/ui/oxide/skin.js +3 -0
- package/dist/components/Editor/skins/ui/oxide/skin.shadowdom.d.ts +0 -0
- package/dist/components/Editor/skins/ui/oxide/skin.shadowdom.js +3 -0
- package/dist/components/Editor/skins/ui/oxide-dark/content.d.ts +0 -0
- package/dist/components/Editor/skins/ui/oxide-dark/content.inline.d.ts +0 -0
- package/dist/components/Editor/skins/ui/oxide-dark/content.inline.js +3 -0
- package/dist/components/Editor/skins/ui/oxide-dark/content.js +3 -0
- package/dist/components/Editor/skins/ui/oxide-dark/skin.d.ts +0 -0
- package/dist/components/Editor/skins/ui/oxide-dark/skin.js +3 -0
- package/dist/components/Editor/skins/ui/oxide-dark/skin.shadowdom.d.ts +0 -0
- package/dist/components/Editor/skins/ui/oxide-dark/skin.shadowdom.js +3 -0
- package/dist/components/Editor/skins/ui/tinymce-5/content.d.ts +0 -0
- package/dist/components/Editor/skins/ui/tinymce-5/content.inline.d.ts +0 -0
- package/dist/components/Editor/skins/ui/tinymce-5/content.inline.js +3 -0
- package/dist/components/Editor/skins/ui/tinymce-5/content.js +3 -0
- package/dist/components/Editor/skins/ui/tinymce-5/skin.d.ts +0 -0
- package/dist/components/Editor/skins/ui/tinymce-5/skin.js +3 -0
- package/dist/components/Editor/skins/ui/tinymce-5/skin.shadowdom.d.ts +0 -0
- package/dist/components/Editor/skins/ui/tinymce-5/skin.shadowdom.js +3 -0
- package/dist/components/Editor/skins/ui/tinymce-5-dark/content.d.ts +0 -0
- package/dist/components/Editor/skins/ui/tinymce-5-dark/content.inline.d.ts +0 -0
- package/dist/components/Editor/skins/ui/tinymce-5-dark/content.inline.js +3 -0
- package/dist/components/Editor/skins/ui/tinymce-5-dark/content.js +3 -0
- package/dist/components/Editor/skins/ui/tinymce-5-dark/skin.d.ts +0 -0
- package/dist/components/Editor/skins/ui/tinymce-5-dark/skin.js +3 -0
- package/dist/components/Editor/skins/ui/tinymce-5-dark/skin.shadowdom.d.ts +0 -0
- package/dist/components/Editor/skins/ui/tinymce-5-dark/skin.shadowdom.js +3 -0
- package/dist/components/Editor/tinymce/tinymce.d.ts +1722 -1447
- package/lib/components/Editor/components/Editor.tsx +8 -8
- package/lib/components/Editor/skins/content/dark/content.js +2 -0
- package/lib/components/Editor/skins/content/dark/content.min.css +1 -8
- package/lib/components/Editor/skins/content/default/content.js +2 -0
- package/lib/components/Editor/skins/content/default/content.min.css +0 -7
- package/lib/components/Editor/skins/content/document/content.js +2 -0
- package/lib/components/Editor/skins/content/document/content.min.css +0 -7
- package/lib/components/Editor/skins/content/tinymce-5/content.js +2 -0
- package/lib/components/Editor/skins/content/tinymce-5/content.min.css +1 -0
- package/lib/components/Editor/skins/content/tinymce-5-dark/content.js +2 -0
- package/lib/components/Editor/skins/content/tinymce-5-dark/content.min.css +1 -0
- package/lib/components/Editor/skins/content/writer/content.js +2 -0
- package/lib/components/Editor/skins/content/writer/content.min.css +0 -7
- package/lib/components/Editor/skins/ui/oxide/content.inline.js +2 -0
- package/lib/components/Editor/skins/ui/oxide/content.inline.min.css +1 -0
- package/lib/components/Editor/skins/ui/oxide/content.js +2 -0
- package/lib/components/Editor/skins/ui/oxide/content.min.css +1 -0
- package/lib/components/Editor/skins/ui/oxide/skin.js +2 -0
- package/lib/components/Editor/skins/ui/oxide/skin.min.css +1 -0
- package/lib/components/Editor/skins/ui/oxide/skin.shadowdom.js +2 -0
- package/lib/components/Editor/skins/ui/oxide/skin.shadowdom.min.css +1 -0
- package/lib/components/Editor/skins/ui/oxide-dark/content.inline.js +2 -0
- package/lib/components/Editor/skins/ui/oxide-dark/content.inline.min.css +1 -0
- package/lib/components/Editor/skins/ui/oxide-dark/content.js +2 -0
- package/lib/components/Editor/skins/ui/oxide-dark/content.min.css +1 -0
- package/lib/components/Editor/skins/ui/oxide-dark/skin.js +2 -0
- package/lib/components/Editor/skins/ui/oxide-dark/skin.min.css +1 -0
- package/lib/components/Editor/skins/ui/oxide-dark/skin.shadowdom.js +2 -0
- package/lib/components/Editor/skins/ui/oxide-dark/skin.shadowdom.min.css +1 -0
- package/lib/components/Editor/skins/ui/tinymce-5/content.inline.js +2 -0
- package/lib/components/Editor/skins/ui/tinymce-5/content.inline.min.css +1 -0
- package/lib/components/Editor/skins/ui/tinymce-5/content.js +2 -0
- package/lib/components/Editor/skins/ui/tinymce-5/content.min.css +1 -0
- package/lib/components/Editor/skins/ui/tinymce-5/skin.js +2 -0
- package/lib/components/Editor/skins/ui/tinymce-5/skin.min.css +1 -0
- package/lib/components/Editor/skins/ui/tinymce-5/skin.shadowdom.js +2 -0
- package/lib/components/Editor/skins/ui/tinymce-5/skin.shadowdom.min.css +1 -0
- package/lib/components/Editor/skins/ui/tinymce-5-dark/content.inline.js +2 -0
- package/lib/components/Editor/skins/ui/tinymce-5-dark/content.inline.min.css +1 -0
- package/lib/components/Editor/skins/ui/tinymce-5-dark/content.js +2 -0
- package/lib/components/Editor/skins/ui/tinymce-5-dark/content.min.css +1 -0
- package/lib/components/Editor/skins/ui/tinymce-5-dark/skin.js +2 -0
- package/lib/components/Editor/skins/ui/tinymce-5-dark/skin.min.css +1 -0
- package/lib/components/Editor/skins/ui/tinymce-5-dark/skin.shadowdom.js +2 -0
- package/lib/components/Editor/skins/ui/tinymce-5-dark/skin.shadowdom.min.css +1 -0
- package/lib/components/Editor/tinymce/README.md +24 -14
- package/lib/components/Editor/tinymce/icons/default/icons.js +185 -163
- package/lib/components/Editor/tinymce/icons/default/icons.min.js +1 -1
- package/lib/components/Editor/tinymce/langs/README.md +1 -1
- package/lib/components/Editor/tinymce/license.txt +21 -504
- package/lib/components/Editor/tinymce/models/dom/model.js +8040 -0
- package/lib/components/Editor/tinymce/models/dom/model.min.js +4 -0
- package/lib/components/Editor/tinymce/plugins/accordion/plugin.js +1054 -0
- package/lib/components/Editor/tinymce/plugins/accordion/plugin.min.js +4 -0
- package/lib/components/Editor/tinymce/plugins/advlist/plugin.js +187 -208
- package/lib/components/Editor/tinymce/plugins/advlist/plugin.min.js +2 -7
- package/lib/components/Editor/tinymce/plugins/anchor/plugin.js +82 -84
- package/lib/components/Editor/tinymce/plugins/anchor/plugin.min.js +2 -7
- package/lib/components/Editor/tinymce/plugins/autolink/plugin.js +210 -167
- package/lib/components/Editor/tinymce/plugins/autolink/plugin.min.js +2 -7
- package/lib/components/Editor/tinymce/plugins/autoresize/plugin.js +118 -97
- package/lib/components/Editor/tinymce/plugins/autoresize/plugin.min.js +2 -7
- package/lib/components/Editor/tinymce/plugins/autosave/plugin.js +129 -108
- package/lib/components/Editor/tinymce/plugins/autosave/plugin.min.js +2 -7
- package/lib/components/Editor/tinymce/plugins/charmap/plugin.js +285 -333
- package/lib/components/Editor/tinymce/plugins/charmap/plugin.min.js +2 -7
- package/lib/components/Editor/tinymce/plugins/code/plugin.js +19 -26
- package/lib/components/Editor/tinymce/plugins/code/plugin.min.js +2 -7
- package/lib/components/Editor/tinymce/plugins/codesample/plugin.js +2225 -2094
- package/lib/components/Editor/tinymce/plugins/codesample/plugin.min.js +2 -7
- package/lib/components/Editor/tinymce/plugins/directionality/plugin.js +318 -243
- package/lib/components/Editor/tinymce/plugins/directionality/plugin.min.js +2 -7
- package/lib/components/Editor/tinymce/plugins/emoticons/js/emojiimages.js +1 -9424
- package/lib/components/Editor/tinymce/plugins/emoticons/js/emojiimages.min.js +1 -1
- package/lib/components/Editor/tinymce/plugins/emoticons/js/emojis.js +1 -9423
- package/lib/components/Editor/tinymce/plugins/emoticons/js/emojis.min.js +1 -1
- package/lib/components/Editor/tinymce/plugins/emoticons/plugin.js +406 -416
- package/lib/components/Editor/tinymce/plugins/emoticons/plugin.min.js +2 -7
- package/lib/components/Editor/tinymce/plugins/fullscreen/plugin.js +821 -604
- package/lib/components/Editor/tinymce/plugins/fullscreen/plugin.min.js +2 -7
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/ar.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/bg_BG.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/ca.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/cs.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/da.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/de.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/el.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/en.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/es.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/eu.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/fa.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/fi.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/fr_FR.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/he_IL.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/hi.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/hr.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/hu_HU.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/id.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/it.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/ja.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/kk.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/ko_KR.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/ms.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/nb_NO.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/nl.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/pl.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/pt_BR.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/pt_PT.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/ro.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/ru.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/sk.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/sl_SI.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/sv_SE.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/th_TH.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/tr.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/uk.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/vi.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/zh_CN.js +84 -0
- package/lib/components/Editor/tinymce/plugins/help/js/i18n/keynav/zh_TW.js +90 -0
- package/lib/components/Editor/tinymce/plugins/help/plugin.js +428 -403
- package/lib/components/Editor/tinymce/plugins/help/plugin.min.js +2 -7
- package/lib/components/Editor/tinymce/plugins/image/plugin.js +887 -1043
- package/lib/components/Editor/tinymce/plugins/image/plugin.min.js +2 -7
- package/lib/components/Editor/tinymce/plugins/importcss/plugin.js +163 -162
- package/lib/components/Editor/tinymce/plugins/importcss/plugin.min.js +2 -7
- package/lib/components/Editor/tinymce/plugins/insertdatetime/plugin.js +101 -91
- package/lib/components/Editor/tinymce/plugins/insertdatetime/plugin.min.js +2 -7
- package/lib/components/Editor/tinymce/plugins/link/plugin.js +739 -784
- package/lib/components/Editor/tinymce/plugins/link/plugin.min.js +2 -7
- package/lib/components/Editor/tinymce/plugins/lists/plugin.js +1282 -1396
- package/lib/components/Editor/tinymce/plugins/lists/plugin.min.js +2 -7
- package/lib/components/Editor/tinymce/plugins/media/plugin.js +641 -806
- package/lib/components/Editor/tinymce/plugins/media/plugin.min.js +2 -7
- package/lib/components/Editor/tinymce/plugins/nonbreaking/plugin.js +76 -54
- package/lib/components/Editor/tinymce/plugins/nonbreaking/plugin.min.js +2 -7
- package/lib/components/Editor/tinymce/plugins/pagebreak/plugin.js +58 -46
- package/lib/components/Editor/tinymce/plugins/pagebreak/plugin.min.js +2 -7
- package/lib/components/Editor/tinymce/plugins/preview/plugin.js +39 -69
- package/lib/components/Editor/tinymce/plugins/preview/plugin.min.js +2 -7
- package/lib/components/Editor/tinymce/plugins/quickbars/plugin.js +307 -349
- package/lib/components/Editor/tinymce/plugins/quickbars/plugin.min.js +2 -7
- package/lib/components/Editor/tinymce/plugins/save/plugin.js +50 -51
- package/lib/components/Editor/tinymce/plugins/save/plugin.min.js +2 -7
- package/lib/components/Editor/tinymce/plugins/searchreplace/plugin.js +517 -587
- package/lib/components/Editor/tinymce/plugins/searchreplace/plugin.min.js +2 -7
- package/lib/components/Editor/tinymce/plugins/table/plugin.js +2666 -10142
- package/lib/components/Editor/tinymce/plugins/table/plugin.min.js +2 -7
- package/lib/components/Editor/tinymce/plugins/template/plugin.js +403 -413
- package/lib/components/Editor/tinymce/plugins/template/plugin.min.js +2 -7
- package/lib/components/Editor/tinymce/plugins/visualblocks/plugin.js +42 -48
- package/lib/components/Editor/tinymce/plugins/visualblocks/plugin.min.js +2 -7
- package/lib/components/Editor/tinymce/plugins/visualchars/plugin.js +352 -333
- package/lib/components/Editor/tinymce/plugins/visualchars/plugin.min.js +2 -7
- package/lib/components/Editor/tinymce/plugins/wordcount/plugin.js +184 -195
- package/lib/components/Editor/tinymce/plugins/wordcount/plugin.min.js +2 -7
- package/lib/components/Editor/tinymce/skins/content/dark/content.css +2 -8
- package/lib/components/Editor/tinymce/skins/content/dark/content.js +2 -0
- package/lib/components/Editor/tinymce/skins/content/dark/content.js.map +1 -0
- package/lib/components/Editor/tinymce/skins/content/dark/content.min.css +2 -8
- package/lib/components/Editor/tinymce/skins/content/dark/content.min.css.map +1 -1
- package/lib/components/Editor/tinymce/skins/content/default/content.css +0 -6
- package/lib/components/Editor/tinymce/skins/content/default/content.js +2 -0
- package/lib/components/Editor/tinymce/skins/content/default/content.js.map +1 -0
- package/lib/components/Editor/tinymce/skins/content/default/content.min.css +1 -7
- package/lib/components/Editor/tinymce/skins/content/default/content.min.css.map +1 -1
- package/lib/components/Editor/tinymce/skins/content/document/content.css +0 -6
- package/lib/components/Editor/tinymce/skins/content/document/content.js +2 -0
- package/lib/components/Editor/tinymce/skins/content/document/content.js.map +1 -0
- package/lib/components/Editor/tinymce/skins/content/document/content.min.css +0 -6
- package/lib/components/Editor/tinymce/skins/content/document/content.min.css.map +1 -1
- package/lib/components/Editor/{skins/content/default → tinymce/skins/content/tinymce-5}/content.css +0 -6
- package/lib/components/Editor/tinymce/skins/content/tinymce-5/content.js +2 -0
- package/lib/components/Editor/tinymce/skins/content/tinymce-5/content.js.map +1 -0
- package/lib/components/Editor/tinymce/skins/content/tinymce-5/content.min.css +2 -0
- package/lib/components/Editor/tinymce/skins/content/tinymce-5/content.min.css.map +1 -0
- package/lib/components/Editor/{skins/content/dark → tinymce/skins/content/tinymce-5-dark}/content.css +1 -7
- package/lib/components/Editor/tinymce/skins/content/tinymce-5-dark/content.js +2 -0
- package/lib/components/Editor/tinymce/skins/content/tinymce-5-dark/content.js.map +1 -0
- package/lib/components/Editor/tinymce/skins/content/tinymce-5-dark/content.min.css +2 -0
- package/lib/components/Editor/tinymce/skins/content/tinymce-5-dark/content.min.css.map +1 -0
- package/lib/components/Editor/tinymce/skins/content/writer/content.css +0 -6
- package/lib/components/Editor/tinymce/skins/content/writer/content.js +2 -0
- package/lib/components/Editor/tinymce/skins/content/writer/content.js.map +1 -0
- package/lib/components/Editor/tinymce/skins/content/writer/content.min.css +0 -6
- package/lib/components/Editor/tinymce/skins/content/writer/content.min.css.map +1 -1
- package/lib/components/Editor/tinymce/skins/ui/oxide/content.css +74 -21
- package/lib/components/Editor/tinymce/skins/ui/oxide/content.inline.css +74 -21
- package/lib/components/Editor/tinymce/skins/ui/oxide/content.inline.js +2 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide/content.inline.js.map +1 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide/content.inline.min.css +1 -7
- package/lib/components/Editor/tinymce/skins/ui/oxide/content.inline.min.css.map +1 -1
- package/lib/components/Editor/tinymce/skins/ui/oxide/content.js +2 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide/content.js.map +1 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide/content.min.css +1 -7
- package/lib/components/Editor/tinymce/skins/ui/oxide/content.min.css.map +1 -1
- package/lib/components/Editor/tinymce/skins/ui/oxide/skin.css +1131 -402
- package/lib/components/Editor/tinymce/skins/ui/oxide/skin.js +2 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide/skin.js.map +1 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide/skin.min.css +1 -7
- package/lib/components/Editor/tinymce/skins/ui/oxide/skin.min.css.map +1 -1
- package/lib/components/Editor/tinymce/skins/ui/oxide/skin.shadowdom.css +8 -15
- package/lib/components/Editor/tinymce/skins/ui/oxide/skin.shadowdom.js +2 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide/skin.shadowdom.js.map +1 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide/skin.shadowdom.min.css +1 -7
- package/lib/components/Editor/tinymce/skins/ui/oxide/skin.shadowdom.min.css.map +1 -1
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.css +72 -20
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.inline.css +74 -21
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.inline.js +2 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.inline.js.map +1 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.inline.min.css +1 -7
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.inline.min.css.map +1 -1
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.js +2 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.js.map +1 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.min.css +1 -7
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.min.css.map +1 -1
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.css +1155 -423
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.js +2 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.js.map +1 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.min.css +1 -7
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.min.css.map +1 -1
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.shadowdom.css +8 -15
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.shadowdom.js +2 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.shadowdom.js.map +1 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css +1 -7
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css.map +1 -1
- package/lib/components/Editor/{skins/ui/default → tinymce/skins/ui/tinymce-5}/content.css +75 -22
- package/lib/components/Editor/{skins/ui/default → tinymce/skins/ui/tinymce-5}/content.inline.css +75 -22
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5/content.inline.js +2 -0
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5/content.inline.js.map +1 -0
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5/content.inline.min.css +2 -0
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5/content.inline.min.css.map +1 -0
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5/content.js +2 -0
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5/content.js.map +1 -0
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5/content.min.css +2 -0
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5/content.min.css.map +1 -0
- package/lib/components/Editor/{skins/ui/default → tinymce/skins/ui/tinymce-5}/skin.css +1261 -438
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5/skin.js +2 -0
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5/skin.js.map +1 -0
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5/skin.min.css +2 -0
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5/skin.min.css.map +1 -0
- package/lib/components/Editor/{skins/ui/default → tinymce/skins/ui/tinymce-5}/skin.shadowdom.css +8 -15
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5/skin.shadowdom.js +2 -0
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5/skin.shadowdom.js.map +1 -0
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5/skin.shadowdom.min.css +2 -0
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5/skin.shadowdom.min.css.map +1 -0
- package/lib/components/Editor/{skins/ui/dark → tinymce/skins/ui/tinymce-5-dark}/content.css +73 -21
- package/lib/components/Editor/{skins/ui/dark → tinymce/skins/ui/tinymce-5-dark}/content.inline.css +75 -22
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/content.inline.js +2 -0
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/content.inline.js.map +1 -0
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/content.inline.min.css +2 -0
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/content.inline.min.css.map +1 -0
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/content.js +2 -0
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/content.js.map +1 -0
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/content.min.css +2 -0
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/content.min.css.map +1 -0
- package/lib/components/Editor/{skins/ui/dark → tinymce/skins/ui/tinymce-5-dark}/skin.css +1244 -421
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/skin.js +2 -0
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/skin.js.map +1 -0
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/skin.min.css +2 -0
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/skin.min.css.map +1 -0
- package/lib/components/Editor/{skins/ui/dark → tinymce/skins/ui/tinymce-5-dark}/skin.shadowdom.css +8 -15
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.js +2 -0
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.js.map +1 -0
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.min.css +2 -0
- package/lib/components/Editor/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.min.css.map +1 -0
- package/lib/components/Editor/tinymce/themes/silver/theme.js +23228 -24955
- package/lib/components/Editor/tinymce/themes/silver/theme.min.js +2 -7
- package/lib/components/Editor/tinymce/tinymce.d.ts +1722 -1447
- package/lib/components/Editor/tinymce/tinymce.js +23668 -22018
- package/lib/components/Editor/tinymce/tinymce.min.js +2 -30104
- package/package.json +1 -1
- package/lib/components/Editor/skins/content/dark/content.min.css.map +0 -1
- package/lib/components/Editor/skins/content/default/content.min.css.map +0 -1
- package/lib/components/Editor/skins/content/document/content.css +0 -72
- package/lib/components/Editor/skins/content/document/content.min.css.map +0 -1
- package/lib/components/Editor/skins/content/writer/content.css +0 -68
- package/lib/components/Editor/skins/content/writer/content.min.css.map +0 -1
- package/lib/components/Editor/skins/ui/dark/content.inline.min.css +0 -8
- package/lib/components/Editor/skins/ui/dark/content.inline.min.css.map +0 -1
- package/lib/components/Editor/skins/ui/dark/content.min.css +0 -8
- package/lib/components/Editor/skins/ui/dark/content.min.css.map +0 -1
- package/lib/components/Editor/skins/ui/dark/content.mobile.css +0 -29
- package/lib/components/Editor/skins/ui/dark/content.mobile.min.css +0 -8
- package/lib/components/Editor/skins/ui/dark/content.mobile.min.css.map +0 -1
- package/lib/components/Editor/skins/ui/dark/fonts/tinymce-mobile.woff +0 -0
- package/lib/components/Editor/skins/ui/dark/skin.min.css +0 -8
- package/lib/components/Editor/skins/ui/dark/skin.min.css.map +0 -1
- package/lib/components/Editor/skins/ui/dark/skin.mobile.css +0 -673
- package/lib/components/Editor/skins/ui/dark/skin.mobile.min.css +0 -8
- package/lib/components/Editor/skins/ui/dark/skin.mobile.min.css.map +0 -1
- package/lib/components/Editor/skins/ui/dark/skin.shadowdom.min.css +0 -8
- package/lib/components/Editor/skins/ui/dark/skin.shadowdom.min.css.map +0 -1
- package/lib/components/Editor/skins/ui/default/content.inline.min.css +0 -8
- package/lib/components/Editor/skins/ui/default/content.inline.min.css.map +0 -1
- package/lib/components/Editor/skins/ui/default/content.min.css +0 -8
- package/lib/components/Editor/skins/ui/default/content.min.css.map +0 -1
- package/lib/components/Editor/skins/ui/default/content.mobile.css +0 -29
- package/lib/components/Editor/skins/ui/default/content.mobile.min.css +0 -8
- package/lib/components/Editor/skins/ui/default/content.mobile.min.css.map +0 -1
- package/lib/components/Editor/skins/ui/default/fonts/tinymce-mobile.woff +0 -0
- package/lib/components/Editor/skins/ui/default/skin.min.css +0 -8
- package/lib/components/Editor/skins/ui/default/skin.min.css.map +0 -1
- package/lib/components/Editor/skins/ui/default/skin.mobile.css +0 -673
- package/lib/components/Editor/skins/ui/default/skin.mobile.min.css +0 -8
- package/lib/components/Editor/skins/ui/default/skin.mobile.min.css.map +0 -1
- package/lib/components/Editor/skins/ui/default/skin.shadowdom.min.css +0 -8
- package/lib/components/Editor/skins/ui/default/skin.shadowdom.min.css.map +0 -1
- package/lib/components/Editor/skins/ui/plugin-tinycomments-tinymce4/fonts/tinymce-mobile.woff +0 -0
- package/lib/components/Editor/skins/ui/plugin-tinycomments-tinymce4/plugin-tinycomments-tinymce4.css +0 -1641
- package/lib/components/Editor/skins/ui/plugin-tinycomments-tinymce4/plugin-tinycomments-tinymce4.min.css +0 -8
- package/lib/components/Editor/skins/ui/plugin-tinycomments-tinymce4/plugin-tinycomments-tinymce4.min.css.map +0 -1
- package/lib/components/Editor/tinymce/jquery.tinymce.min.js +0 -92
- package/lib/components/Editor/tinymce/langs/pt_BR.js +0 -419
- package/lib/components/Editor/tinymce/plugins/bbcode/plugin.js +0 -99
- package/lib/components/Editor/tinymce/plugins/bbcode/plugin.min.js +0 -9
- package/lib/components/Editor/tinymce/plugins/colorpicker/plugin.js +0 -22
- package/lib/components/Editor/tinymce/plugins/colorpicker/plugin.min.js +0 -9
- package/lib/components/Editor/tinymce/plugins/contextmenu/plugin.js +0 -22
- package/lib/components/Editor/tinymce/plugins/contextmenu/plugin.min.js +0 -9
- package/lib/components/Editor/tinymce/plugins/fullpage/plugin.js +0 -544
- package/lib/components/Editor/tinymce/plugins/fullpage/plugin.min.js +0 -9
- package/lib/components/Editor/tinymce/plugins/hr/plugin.js +0 -46
- package/lib/components/Editor/tinymce/plugins/hr/plugin.min.js +0 -9
- package/lib/components/Editor/tinymce/plugins/imagetools/plugin.js +0 -1354
- package/lib/components/Editor/tinymce/plugins/imagetools/plugin.min.js +0 -9
- package/lib/components/Editor/tinymce/plugins/legacyoutput/plugin.js +0 -199
- package/lib/components/Editor/tinymce/plugins/legacyoutput/plugin.min.js +0 -9
- package/lib/components/Editor/tinymce/plugins/noneditable/plugin.js +0 -117
- package/lib/components/Editor/tinymce/plugins/noneditable/plugin.min.js +0 -9
- package/lib/components/Editor/tinymce/plugins/paste/plugin.js +0 -1764
- package/lib/components/Editor/tinymce/plugins/paste/plugin.min.js +0 -9
- package/lib/components/Editor/tinymce/plugins/print/plugin.js +0 -53
- package/lib/components/Editor/tinymce/plugins/print/plugin.min.js +0 -9
- package/lib/components/Editor/tinymce/plugins/spellchecker/plugin.js +0 -731
- package/lib/components/Editor/tinymce/plugins/spellchecker/plugin.min.js +0 -9
- package/lib/components/Editor/tinymce/plugins/tabfocus/plugin.js +0 -129
- package/lib/components/Editor/tinymce/plugins/tabfocus/plugin.min.js +0 -9
- package/lib/components/Editor/tinymce/plugins/textcolor/plugin.js +0 -22
- package/lib/components/Editor/tinymce/plugins/textcolor/plugin.min.js +0 -9
- package/lib/components/Editor/tinymce/plugins/textpattern/plugin.js +0 -1394
- package/lib/components/Editor/tinymce/plugins/textpattern/plugin.min.js +0 -9
- package/lib/components/Editor/tinymce/plugins/toc/plugin.js +0 -236
- package/lib/components/Editor/tinymce/plugins/toc/plugin.min.js +0 -9
- package/lib/components/Editor/tinymce/skins/ui/oxide/content.mobile.css +0 -29
- package/lib/components/Editor/tinymce/skins/ui/oxide/content.mobile.min.css +0 -8
- package/lib/components/Editor/tinymce/skins/ui/oxide/content.mobile.min.css.map +0 -1
- package/lib/components/Editor/tinymce/skins/ui/oxide/fonts/tinymce-mobile.woff +0 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide/skin.mobile.css +0 -673
- package/lib/components/Editor/tinymce/skins/ui/oxide/skin.mobile.min.css +0 -8
- package/lib/components/Editor/tinymce/skins/ui/oxide/skin.mobile.min.css.map +0 -1
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.mobile.css +0 -29
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.mobile.min.css +0 -8
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.mobile.min.css.map +0 -1
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/fonts/tinymce-mobile.woff +0 -0
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.mobile.css +0 -673
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.mobile.min.css +0 -8
- package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.mobile.min.css.map +0 -1
- package/lib/components/Editor/tinymce/themes/mobile/theme.js +0 -13587
- package/lib/components/Editor/tinymce/themes/mobile/theme.min.js +0 -9
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
interface StringPathBookmark {
|
|
2
2
|
start: string;
|
|
3
3
|
end?: string;
|
|
4
|
+
forward?: boolean;
|
|
4
5
|
}
|
|
5
6
|
interface RangeBookmark {
|
|
6
7
|
rng: Range;
|
|
8
|
+
forward?: boolean;
|
|
7
9
|
}
|
|
8
10
|
interface IdBookmark {
|
|
9
11
|
id: string;
|
|
10
12
|
keep?: boolean;
|
|
13
|
+
forward?: boolean;
|
|
11
14
|
}
|
|
12
15
|
interface IndexBookmark {
|
|
13
16
|
name: string;
|
|
@@ -16,9 +19,21 @@ interface IndexBookmark {
|
|
|
16
19
|
interface PathBookmark {
|
|
17
20
|
start: number[];
|
|
18
21
|
end?: number[];
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
isFakeCaret?: boolean;
|
|
23
|
+
forward?: boolean;
|
|
24
|
+
}
|
|
25
|
+
type Bookmark = StringPathBookmark | RangeBookmark | IdBookmark | IndexBookmark | PathBookmark;
|
|
26
|
+
type NormalizedEvent<E, T = any> = E & {
|
|
27
|
+
readonly type: string;
|
|
28
|
+
readonly target: T;
|
|
29
|
+
readonly isDefaultPrevented: () => boolean;
|
|
30
|
+
readonly preventDefault: () => void;
|
|
31
|
+
readonly isPropagationStopped: () => boolean;
|
|
32
|
+
readonly stopPropagation: () => void;
|
|
33
|
+
readonly isImmediatePropagationStopped: () => boolean;
|
|
34
|
+
readonly stopImmediatePropagation: () => void;
|
|
35
|
+
};
|
|
36
|
+
type MappedEvent<T extends {}, K extends string> = K extends keyof T ? T[K] : any;
|
|
22
37
|
interface NativeEventMap {
|
|
23
38
|
'beforepaste': Event;
|
|
24
39
|
'blur': FocusEvent;
|
|
@@ -61,290 +76,106 @@ interface NativeEventMap {
|
|
|
61
76
|
'touchcancel': TouchEvent;
|
|
62
77
|
'wheel': WheelEvent;
|
|
63
78
|
}
|
|
64
|
-
|
|
65
|
-
target: any;
|
|
66
|
-
type: string;
|
|
67
|
-
preventDefault: () => void;
|
|
68
|
-
isDefaultPrevented: () => boolean;
|
|
69
|
-
stopPropagation: () => void;
|
|
70
|
-
isPropagationStopped: () => boolean;
|
|
71
|
-
stopImmediatePropagation: () => void;
|
|
72
|
-
isImmediatePropagationStopped: () => boolean;
|
|
73
|
-
};
|
|
79
|
+
type EditorEvent<T> = NormalizedEvent<T>;
|
|
74
80
|
interface EventDispatcherSettings {
|
|
75
81
|
scope?: any;
|
|
76
82
|
toggleEvent?: (name: string, state: boolean) => void | boolean;
|
|
77
83
|
beforeFire?: <T>(args: EditorEvent<T>) => void;
|
|
78
84
|
}
|
|
79
|
-
interface EventDispatcherConstructor<T extends
|
|
85
|
+
interface EventDispatcherConstructor<T extends {}> {
|
|
80
86
|
readonly prototype: EventDispatcher<T>;
|
|
81
87
|
new (settings?: EventDispatcherSettings): EventDispatcher<T>;
|
|
82
88
|
isNative: (name: string) => boolean;
|
|
83
89
|
}
|
|
84
|
-
declare class EventDispatcher<T> {
|
|
90
|
+
declare class EventDispatcher<T extends {}> {
|
|
85
91
|
static isNative(name: string): boolean;
|
|
86
92
|
private readonly settings;
|
|
87
93
|
private readonly scope;
|
|
88
94
|
private readonly toggleEvent;
|
|
89
95
|
private bindings;
|
|
90
|
-
constructor(settings?:
|
|
91
|
-
fire<K extends string, U extends MappedEvent<T, K>>(
|
|
92
|
-
|
|
96
|
+
constructor(settings?: EventDispatcherSettings);
|
|
97
|
+
fire<K extends string, U extends MappedEvent<T, K>>(name: K, args?: U): EditorEvent<U>;
|
|
98
|
+
dispatch<K extends string, U extends MappedEvent<T, K>>(name: K, args?: U): EditorEvent<U>;
|
|
99
|
+
on<K extends string>(name: K, callback: false | ((event: EditorEvent<MappedEvent<T, K>>) => void | boolean), prepend?: boolean, extra?: {}): this;
|
|
93
100
|
off<K extends string>(name?: K, callback?: (event: EditorEvent<MappedEvent<T, K>>) => void): this;
|
|
94
101
|
once<K extends string>(name: K, callback: (event: EditorEvent<MappedEvent<T, K>>) => void, prepend?: boolean): this;
|
|
95
102
|
has(name: string): boolean;
|
|
96
103
|
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
Complete = "complete"
|
|
100
|
-
}
|
|
101
|
-
interface UndoLevel {
|
|
104
|
+
type UndoLevelType = 'fragmented' | 'complete';
|
|
105
|
+
interface BaseUndoLevel {
|
|
102
106
|
type: UndoLevelType;
|
|
107
|
+
bookmark: Bookmark | null;
|
|
108
|
+
beforeBookmark: Bookmark | null;
|
|
109
|
+
}
|
|
110
|
+
interface FragmentedUndoLevel extends BaseUndoLevel {
|
|
111
|
+
type: 'fragmented';
|
|
103
112
|
fragments: string[];
|
|
113
|
+
content: '';
|
|
114
|
+
}
|
|
115
|
+
interface CompleteUndoLevel extends BaseUndoLevel {
|
|
116
|
+
type: 'complete';
|
|
117
|
+
fragments: null;
|
|
104
118
|
content: string;
|
|
105
|
-
bookmark: Bookmark;
|
|
106
|
-
beforeBookmark: Bookmark;
|
|
107
119
|
}
|
|
120
|
+
type NewUndoLevel = CompleteUndoLevel | FragmentedUndoLevel;
|
|
121
|
+
type UndoLevel = NewUndoLevel & {
|
|
122
|
+
bookmark: Bookmark;
|
|
123
|
+
};
|
|
108
124
|
interface UndoManager {
|
|
109
125
|
data: UndoLevel[];
|
|
110
126
|
typing: boolean;
|
|
111
|
-
add: (level?: UndoLevel
|
|
127
|
+
add: (level?: Partial<UndoLevel>, event?: EditorEvent<any>) => UndoLevel | null;
|
|
128
|
+
dispatchChange: () => void;
|
|
112
129
|
beforeChange: () => void;
|
|
113
|
-
undo: () => UndoLevel;
|
|
114
|
-
redo: () => UndoLevel;
|
|
130
|
+
undo: () => UndoLevel | undefined;
|
|
131
|
+
redo: () => UndoLevel | undefined;
|
|
115
132
|
clear: () => void;
|
|
116
133
|
reset: () => void;
|
|
117
134
|
hasUndo: () => boolean;
|
|
118
135
|
hasRedo: () => boolean;
|
|
119
|
-
transact: (callback: () => void) => UndoLevel;
|
|
136
|
+
transact: (callback: () => void) => UndoLevel | null;
|
|
120
137
|
ignore: (callback: () => void) => void;
|
|
121
138
|
extra: (callback1: () => void, callback2: () => void) => void;
|
|
122
139
|
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
declare type ArrayCallback$1<T, R> = ArrayCallback<T, R>;
|
|
126
|
-
declare type ObjCallback$1<T, R> = ObjCallback<T, R>;
|
|
127
|
-
interface Tools {
|
|
128
|
-
is: (obj: any, type: string) => boolean;
|
|
129
|
-
isArray: <T>(arr: any) => arr is Array<T>;
|
|
130
|
-
inArray: <T>(arr: ArrayLike<T>, value: T) => number;
|
|
131
|
-
grep: {
|
|
132
|
-
<T>(arr: ArrayLike<T> | null | undefined, pred?: ArrayCallback$1<T, boolean>): T[];
|
|
133
|
-
<T>(arr: Record<string, T> | null | undefined, pred?: ObjCallback$1<T, boolean>): T[];
|
|
134
|
-
};
|
|
135
|
-
trim: (str: string) => string;
|
|
136
|
-
toArray: <T>(obj: ArrayLike<T>) => T[];
|
|
137
|
-
hasOwn: (obj: any, name: string) => boolean;
|
|
138
|
-
makeMap: <T>(items: ArrayLike<T> | string, delim?: string | RegExp, map?: Record<string, T | string>) => Record<string, T | string>;
|
|
139
|
-
each: {
|
|
140
|
-
<T>(arr: ArrayLike<T> | null | undefined, cb: ArrayCallback$1<T, void | boolean>, scope?: any): boolean;
|
|
141
|
-
<T>(obj: Record<string, T> | null | undefined, cb: ObjCallback$1<T, void | boolean>, scope?: any): boolean;
|
|
142
|
-
};
|
|
143
|
-
map: {
|
|
144
|
-
<T, R>(arr: ArrayLike<T> | null | undefined, cb: ArrayCallback$1<T, R>): R[];
|
|
145
|
-
<T, R>(obj: Record<string, T> | null | undefined, cb: ObjCallback$1<T, R>): R[];
|
|
146
|
-
};
|
|
147
|
-
extend: (obj: Object, ext: Object, ...objs: Object[]) => any;
|
|
148
|
-
create: (name: string, p: Object, root?: Object) => void;
|
|
149
|
-
walk: <T = any>(obj: T, f: Function, n?: keyof T, scope?: any) => void;
|
|
150
|
-
createNS: (name: string, o?: Object) => any;
|
|
151
|
-
resolve: (path: string, o?: Object) => any;
|
|
152
|
-
explode: (s: string, d?: string | RegExp) => string[];
|
|
153
|
-
_addCacheSuffix: (url: string) => string;
|
|
154
|
-
}
|
|
155
|
-
declare type EventUtilsCallback<T> = (event: EventUtilsEvent<T>) => void;
|
|
156
|
-
declare type EventUtilsEvent<T> = T & {
|
|
157
|
-
type: string;
|
|
158
|
-
target: any;
|
|
159
|
-
isDefaultPrevented: () => boolean;
|
|
160
|
-
preventDefault: () => void;
|
|
161
|
-
isPropagationStopped: () => boolean;
|
|
162
|
-
stopPropagation: () => void;
|
|
163
|
-
isImmediatePropagationStopped: () => boolean;
|
|
164
|
-
stopImmediatePropagation: () => void;
|
|
165
|
-
};
|
|
166
|
-
interface EventUtilsConstructor {
|
|
167
|
-
readonly prototype: EventUtils;
|
|
168
|
-
new (): EventUtils;
|
|
169
|
-
Event: EventUtils;
|
|
170
|
-
}
|
|
171
|
-
declare class EventUtils {
|
|
172
|
-
static Event: EventUtils;
|
|
173
|
-
domLoaded: boolean;
|
|
174
|
-
events: Record<string, any>;
|
|
175
|
-
private readonly expando;
|
|
176
|
-
private hasFocusIn;
|
|
177
|
-
private hasMouseEnterLeave;
|
|
178
|
-
private mouseEnterLeave;
|
|
179
|
-
private count;
|
|
180
|
-
constructor();
|
|
181
|
-
bind<K extends keyof HTMLElementEventMap>(target: any, name: K, callback: EventUtilsCallback<HTMLElementEventMap[K]>, scope?: any): EventUtilsCallback<HTMLElementEventMap[K]>;
|
|
182
|
-
bind<T = any>(target: any, names: string, callback: EventUtilsCallback<T>, scope?: any): EventUtilsCallback<T>;
|
|
183
|
-
unbind<K extends keyof HTMLElementEventMap>(target: any, name: K, callback?: EventUtilsCallback<HTMLElementEventMap[K]>): this;
|
|
184
|
-
unbind<T = any>(target: any, names: string, callback?: EventUtilsCallback<T>): this;
|
|
185
|
-
unbind(target: any): this;
|
|
186
|
-
fire(target: any, name: string, args?: {}): this;
|
|
187
|
-
clean(target: any): this;
|
|
188
|
-
destroy(): void;
|
|
189
|
-
cancel<T = any>(e: EventUtilsEvent<T>): boolean;
|
|
190
|
-
private executeHandlers;
|
|
191
|
-
}
|
|
192
|
-
declare type DomQuerySelector<T extends Node> = string | T | T[] | DomQuery<T>;
|
|
193
|
-
declare type DomQueryInitSelector<T extends Node> = DomQuerySelector<T> | Window;
|
|
194
|
-
interface Hook {
|
|
195
|
-
get: <T extends Node>(elm: T) => string;
|
|
196
|
-
set: <T extends Node>($elm: DomQuery<T>, value: string | null) => void;
|
|
197
|
-
}
|
|
198
|
-
interface DomQueryConstructor {
|
|
199
|
-
readonly prototype: DomQuery;
|
|
200
|
-
attrHooks: Record<string, Hook>;
|
|
201
|
-
cssHooks: Record<string, Hook>;
|
|
202
|
-
fn: DomQuery;
|
|
203
|
-
find: any;
|
|
204
|
-
expr: {
|
|
205
|
-
cacheLength: number;
|
|
206
|
-
createPseudo: Function;
|
|
207
|
-
match: Record<string, RegExp>;
|
|
208
|
-
attrHandle: {};
|
|
209
|
-
find: Record<string, Function>;
|
|
210
|
-
relative: Record<string, {
|
|
211
|
-
dir: string;
|
|
212
|
-
first?: boolean;
|
|
213
|
-
}>;
|
|
214
|
-
preFilter: Record<string, Function>;
|
|
215
|
-
filter: Record<string, Function>;
|
|
216
|
-
pseudos: Record<string, Function>;
|
|
217
|
-
};
|
|
218
|
-
extend: Tools['extend'];
|
|
219
|
-
isArray: Tools['isArray'];
|
|
220
|
-
new <T extends Node = Node>(selector?: DomQueryInitSelector<T>, context?: Node): DomQuery<T>;
|
|
221
|
-
<T extends Node = Node>(selector?: DomQueryInitSelector<T>, context?: Node): DomQuery<T>;
|
|
222
|
-
overrideDefaults(callback: () => {
|
|
223
|
-
context: Node;
|
|
224
|
-
element: Element;
|
|
225
|
-
}): DomQueryConstructor;
|
|
226
|
-
makeArray<T>(object: T): T[];
|
|
227
|
-
inArray<T>(item: {}, array: T[]): number;
|
|
228
|
-
each<T>(obj: T[], callback: (i: number, value: T) => void): void;
|
|
229
|
-
each<T>(obj: T, callback: (key: string, obj: T[keyof T]) => void): void;
|
|
230
|
-
trim(str: string): string;
|
|
231
|
-
grep<T>(array: T[], callback: (item: any, i: number) => boolean): T[];
|
|
232
|
-
unique<T>(results: T[]): T[];
|
|
233
|
-
text(elem: Node): string;
|
|
234
|
-
contains(context: any, elem: Node): number;
|
|
235
|
-
filter(expr: string, elems: Node[], not?: boolean): any;
|
|
236
|
-
}
|
|
237
|
-
interface DomQuery<T extends Node = Node> extends ArrayLike<T> {
|
|
238
|
-
init: (selector?: DomQueryInitSelector<T>, context?: Node) => void;
|
|
239
|
-
context: T;
|
|
240
|
-
length: number;
|
|
241
|
-
selector: string;
|
|
242
|
-
add(items: Array<string | T> | DomQuery<T>, sort?: boolean): this;
|
|
243
|
-
addClass(className: string): this;
|
|
244
|
-
after(content: DomQuerySelector<T>): this;
|
|
245
|
-
append(content: DomQuerySelector<T>): this;
|
|
246
|
-
appendTo(val: DomQuerySelector<T>): this;
|
|
247
|
-
attr(name: string, value: string | boolean | number | null): this;
|
|
248
|
-
attr(attrs: Record<string, string | boolean | number | null>): this;
|
|
249
|
-
attr(name: string): string;
|
|
250
|
-
before(content: DomQuerySelector<T>): this;
|
|
251
|
-
children(selector?: string): DomQuery<ChildNode>;
|
|
252
|
-
clone(): this;
|
|
253
|
-
closest(selector: DomQuerySelector<T>): this;
|
|
254
|
-
contents(selector?: string): DomQuery<ChildNode>;
|
|
255
|
-
css(name: string, value: string | number | null): this;
|
|
256
|
-
css(styles: Record<string, string | number | null>): this;
|
|
257
|
-
css(name: string): string;
|
|
258
|
-
each(callback: (i: number, value: T) => void): this;
|
|
259
|
-
empty(): this;
|
|
260
|
-
eq(index: number): this;
|
|
261
|
-
filter(selector: string | ((i: number, item: any) => boolean)): this;
|
|
262
|
-
find<K extends keyof HTMLElementTagNameMap>(selector: K): DomQuery<HTMLElementTagNameMap[K]>;
|
|
263
|
-
find<T extends Node>(selector: string): DomQuery<T>;
|
|
264
|
-
first(): this;
|
|
265
|
-
hasClass(className: string): boolean;
|
|
266
|
-
hide(): this;
|
|
267
|
-
html(value: string): this;
|
|
268
|
-
html(): string;
|
|
269
|
-
is(selector: string | ((i: number, item: any) => boolean)): boolean;
|
|
270
|
-
last(): this;
|
|
271
|
-
next(selector?: string): DomQuery<ChildNode>;
|
|
272
|
-
nextUntil(selector: DomQuerySelector<T>, until?: string): DomQuery<ChildNode>;
|
|
273
|
-
off<K extends keyof HTMLElementEventMap>(name: K, callback?: EventUtilsCallback<HTMLElementEventMap[K]>): this;
|
|
274
|
-
off<U>(name?: string, callback?: EventUtilsCallback<U>): this;
|
|
275
|
-
offset(offset?: {}): {} | this;
|
|
276
|
-
on<K extends keyof HTMLElementEventMap>(name: K, callback: EventUtilsCallback<HTMLElementEventMap[K]>): this;
|
|
277
|
-
on<U>(name: string, callback: EventUtilsCallback<U>): this;
|
|
278
|
-
parent(selector?: string): DomQuery<Node>;
|
|
279
|
-
parents(selector?: string): DomQuery<Node>;
|
|
280
|
-
parentsUntil(selector: DomQuerySelector<T>, filter?: string): DomQuery<Node>;
|
|
281
|
-
prepend(content: DomQuerySelector<T>): this;
|
|
282
|
-
prependTo(val: DomQuerySelector<T>): this;
|
|
283
|
-
prev(selector?: string): DomQuery<ChildNode>;
|
|
284
|
-
prevUntil(selector: DomQuerySelector<T>, filter?: string): DomQuery<ChildNode>;
|
|
285
|
-
prop(name: string, value: string): this;
|
|
286
|
-
prop(props: Record<string, string | number>): this;
|
|
287
|
-
prop(name: string): string;
|
|
288
|
-
push(...items: T[]): number;
|
|
289
|
-
remove(): this;
|
|
290
|
-
removeAttr(name: string): this;
|
|
291
|
-
removeClass(className: string): this;
|
|
292
|
-
replaceWith(content: DomQuerySelector<T>): this;
|
|
293
|
-
show(): this;
|
|
294
|
-
slice(start: number, end?: number): this;
|
|
295
|
-
splice(start: number, deleteCount?: number): T[];
|
|
296
|
-
sort(compareFn?: (a: T, b: T) => number): T[];
|
|
297
|
-
text(value: string): DomQuery;
|
|
298
|
-
text(): string;
|
|
299
|
-
toArray(): T[];
|
|
300
|
-
toggleClass(className: string, state?: boolean): this;
|
|
301
|
-
trigger(name: string | {
|
|
302
|
-
type: string;
|
|
303
|
-
}): this;
|
|
304
|
-
unwrap(): this;
|
|
305
|
-
wrap(content: DomQuerySelector<T>): this;
|
|
306
|
-
wrapAll(content: DomQuerySelector<T>): this;
|
|
307
|
-
wrapInner(content: string): this;
|
|
308
|
-
}
|
|
309
|
-
declare type SchemaType = 'html4' | 'html5' | 'html5-strict';
|
|
310
|
-
interface SchemaSettings {
|
|
140
|
+
type SchemaType = 'html4' | 'html5' | 'html5-strict';
|
|
141
|
+
interface ElementSettings {
|
|
311
142
|
block_elements?: string;
|
|
312
143
|
boolean_attributes?: string;
|
|
313
|
-
custom_elements?: string;
|
|
314
|
-
extended_valid_elements?: string;
|
|
315
|
-
invalid_elements?: string;
|
|
316
|
-
invalid_styles?: string | Record<string, string>;
|
|
317
144
|
move_caret_before_on_enter_elements?: string;
|
|
318
145
|
non_empty_elements?: string;
|
|
319
|
-
schema?: SchemaType;
|
|
320
146
|
self_closing_elements?: string;
|
|
321
|
-
short_ended_elements?: string;
|
|
322
|
-
special?: string;
|
|
323
147
|
text_block_elements?: string;
|
|
324
148
|
text_inline_elements?: string;
|
|
149
|
+
void_elements?: string;
|
|
150
|
+
whitespace_elements?: string;
|
|
151
|
+
transparent_elements?: string;
|
|
152
|
+
wrap_block_elements?: string;
|
|
153
|
+
}
|
|
154
|
+
interface SchemaSettings extends ElementSettings {
|
|
155
|
+
custom_elements?: string;
|
|
156
|
+
extended_valid_elements?: string;
|
|
157
|
+
invalid_elements?: string;
|
|
158
|
+
invalid_styles?: string | Record<string, string>;
|
|
159
|
+
schema?: SchemaType;
|
|
325
160
|
valid_children?: string;
|
|
326
161
|
valid_classes?: string | Record<string, string>;
|
|
327
162
|
valid_elements?: string;
|
|
328
163
|
valid_styles?: string | Record<string, string>;
|
|
329
164
|
verify_html?: boolean;
|
|
330
|
-
|
|
165
|
+
padd_empty_block_inline_children?: boolean;
|
|
331
166
|
}
|
|
332
167
|
interface Attribute {
|
|
333
168
|
required?: boolean;
|
|
334
169
|
defaultValue?: string;
|
|
335
170
|
forcedValue?: string;
|
|
336
|
-
validValues?:
|
|
171
|
+
validValues?: Record<string, {}>;
|
|
337
172
|
}
|
|
338
173
|
interface DefaultAttribute {
|
|
339
174
|
name: string;
|
|
340
175
|
value: string;
|
|
341
176
|
}
|
|
342
|
-
interface AttributePattern {
|
|
343
|
-
defaultValue?: string;
|
|
344
|
-
forcedValue?: string;
|
|
177
|
+
interface AttributePattern extends Attribute {
|
|
345
178
|
pattern: RegExp;
|
|
346
|
-
required?: boolean;
|
|
347
|
-
validValues?: Record<string, string>;
|
|
348
179
|
}
|
|
349
180
|
interface ElementRule {
|
|
350
181
|
attributes: Record<string, Attribute>;
|
|
@@ -356,6 +187,7 @@ interface ElementRule {
|
|
|
356
187
|
paddEmpty?: boolean;
|
|
357
188
|
removeEmpty?: boolean;
|
|
358
189
|
removeEmptyAttrs?: boolean;
|
|
190
|
+
paddInEmptyBlock?: boolean;
|
|
359
191
|
}
|
|
360
192
|
interface SchemaElement extends ElementRule {
|
|
361
193
|
outputName?: string;
|
|
@@ -369,31 +201,36 @@ interface SchemaRegExpMap {
|
|
|
369
201
|
[name: string]: RegExp;
|
|
370
202
|
}
|
|
371
203
|
interface Schema {
|
|
372
|
-
|
|
204
|
+
type: SchemaType;
|
|
205
|
+
children: Record<string, SchemaMap>;
|
|
373
206
|
elements: Record<string, SchemaElement>;
|
|
374
|
-
getValidStyles: () =>
|
|
375
|
-
getValidClasses: () => SchemaMap;
|
|
207
|
+
getValidStyles: () => Record<string, string[]> | undefined;
|
|
208
|
+
getValidClasses: () => Record<string, SchemaMap> | undefined;
|
|
376
209
|
getBlockElements: () => SchemaMap;
|
|
377
|
-
getInvalidStyles: () => SchemaMap;
|
|
378
|
-
|
|
210
|
+
getInvalidStyles: () => Record<string, SchemaMap> | undefined;
|
|
211
|
+
getVoidElements: () => SchemaMap;
|
|
379
212
|
getTextBlockElements: () => SchemaMap;
|
|
380
213
|
getTextInlineElements: () => SchemaMap;
|
|
381
214
|
getBoolAttrs: () => SchemaMap;
|
|
382
|
-
getElementRule: (name: string) => SchemaElement;
|
|
215
|
+
getElementRule: (name: string) => SchemaElement | undefined;
|
|
383
216
|
getSelfClosingElements: () => SchemaMap;
|
|
384
217
|
getNonEmptyElements: () => SchemaMap;
|
|
385
218
|
getMoveCaretBeforeOnEnterElements: () => SchemaMap;
|
|
386
|
-
|
|
219
|
+
getWhitespaceElements: () => SchemaMap;
|
|
220
|
+
getTransparentElements: () => SchemaMap;
|
|
387
221
|
getSpecialElements: () => SchemaRegExpMap;
|
|
388
222
|
isValidChild: (name: string, child: string) => boolean;
|
|
389
223
|
isValid: (name: string, attr?: string) => boolean;
|
|
224
|
+
isBlock: (name: string) => boolean;
|
|
225
|
+
isInline: (name: string) => boolean;
|
|
226
|
+
isWrapper: (name: string) => boolean;
|
|
390
227
|
getCustomElements: () => SchemaMap;
|
|
391
228
|
addValidElements: (validElements: string) => void;
|
|
392
229
|
setValidElements: (validElements: string) => void;
|
|
393
230
|
addCustomElements: (customElements: string) => void;
|
|
394
231
|
addValidChildren: (validChildren: any) => void;
|
|
395
232
|
}
|
|
396
|
-
|
|
233
|
+
type Attributes$1 = Array<{
|
|
397
234
|
name: string;
|
|
398
235
|
value: string;
|
|
399
236
|
}> & {
|
|
@@ -408,19 +245,19 @@ declare class AstNode {
|
|
|
408
245
|
static create(name: string, attrs?: Record<string, string>): AstNode;
|
|
409
246
|
name: string;
|
|
410
247
|
type: number;
|
|
411
|
-
attributes?: Attributes;
|
|
248
|
+
attributes?: Attributes$1;
|
|
412
249
|
value?: string;
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
250
|
+
parent?: AstNode | null;
|
|
251
|
+
firstChild?: AstNode | null;
|
|
252
|
+
lastChild?: AstNode | null;
|
|
253
|
+
next?: AstNode | null;
|
|
254
|
+
prev?: AstNode | null;
|
|
255
|
+
raw?: boolean;
|
|
419
256
|
constructor(name: string, type: number);
|
|
420
257
|
replace(node: AstNode): AstNode;
|
|
421
|
-
attr(name: string, value: string | null): AstNode;
|
|
422
|
-
attr(name: Record<string, string | null>): AstNode;
|
|
423
|
-
attr(name: string): string;
|
|
258
|
+
attr(name: string, value: string | null | undefined): AstNode | undefined;
|
|
259
|
+
attr(name: Record<string, string | null | undefined> | undefined): AstNode | undefined;
|
|
260
|
+
attr(name: string): string | undefined;
|
|
424
261
|
clone(): AstNode;
|
|
425
262
|
wrap(wrapper: AstNode): AstNode;
|
|
426
263
|
unwrap(): void;
|
|
@@ -428,35 +265,40 @@ declare class AstNode {
|
|
|
428
265
|
append(node: AstNode): AstNode;
|
|
429
266
|
insert(node: AstNode, refNode: AstNode, before?: boolean): AstNode;
|
|
430
267
|
getAll(name: string): AstNode[];
|
|
268
|
+
children(): AstNode[];
|
|
431
269
|
empty(): AstNode;
|
|
432
270
|
isEmpty(elements: SchemaMap, whitespace?: SchemaMap, predicate?: (node: AstNode) => boolean): boolean;
|
|
433
|
-
walk(prev?: boolean): AstNode;
|
|
271
|
+
walk(prev?: boolean): AstNode | null | undefined;
|
|
434
272
|
}
|
|
435
|
-
|
|
436
|
-
|
|
273
|
+
type Content = string | AstNode;
|
|
274
|
+
type ContentFormat = 'raw' | 'text' | 'html' | 'tree';
|
|
437
275
|
interface GetContentArgs {
|
|
438
|
-
format
|
|
439
|
-
get
|
|
440
|
-
|
|
441
|
-
getInner?: boolean;
|
|
276
|
+
format: ContentFormat;
|
|
277
|
+
get: boolean;
|
|
278
|
+
getInner: boolean;
|
|
442
279
|
no_events?: boolean;
|
|
280
|
+
save?: boolean;
|
|
281
|
+
source_view?: boolean;
|
|
443
282
|
[key: string]: any;
|
|
444
283
|
}
|
|
445
284
|
interface SetContentArgs {
|
|
446
|
-
format
|
|
447
|
-
set
|
|
448
|
-
content
|
|
285
|
+
format: string;
|
|
286
|
+
set: boolean;
|
|
287
|
+
content: Content;
|
|
449
288
|
no_events?: boolean;
|
|
289
|
+
no_selection?: boolean;
|
|
290
|
+
paste?: boolean;
|
|
291
|
+
load?: boolean;
|
|
292
|
+
initial?: boolean;
|
|
293
|
+
[key: string]: any;
|
|
450
294
|
}
|
|
451
|
-
interface
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
removeByUri: (blobUri: string) => void;
|
|
459
|
-
destroy: () => void;
|
|
295
|
+
interface GetSelectionContentArgs extends GetContentArgs {
|
|
296
|
+
selection?: boolean;
|
|
297
|
+
contextual?: boolean;
|
|
298
|
+
}
|
|
299
|
+
interface SetSelectionContentArgs extends SetContentArgs {
|
|
300
|
+
content: string;
|
|
301
|
+
selection?: boolean;
|
|
460
302
|
}
|
|
461
303
|
interface BlobInfoData {
|
|
462
304
|
id?: string;
|
|
@@ -476,10 +318,80 @@ interface BlobInfo {
|
|
|
476
318
|
blobUri: () => string;
|
|
477
319
|
uri: () => string | undefined;
|
|
478
320
|
}
|
|
321
|
+
interface BlobCache {
|
|
322
|
+
create: {
|
|
323
|
+
(o: BlobInfoData): BlobInfo;
|
|
324
|
+
(id: string, blob: Blob, base64: string, name?: string, filename?: string): BlobInfo;
|
|
325
|
+
};
|
|
326
|
+
add: (blobInfo: BlobInfo) => void;
|
|
327
|
+
get: (id: string) => BlobInfo | undefined;
|
|
328
|
+
getByUri: (blobUri: string) => BlobInfo | undefined;
|
|
329
|
+
getByData: (base64: string, type: string) => BlobInfo | undefined;
|
|
330
|
+
findFirst: (predicate: (blobInfo: BlobInfo) => boolean) => BlobInfo | undefined;
|
|
331
|
+
removeByUri: (blobUri: string) => void;
|
|
332
|
+
destroy: () => void;
|
|
333
|
+
}
|
|
334
|
+
interface BlobInfoImagePair {
|
|
335
|
+
image: HTMLImageElement;
|
|
336
|
+
blobInfo: BlobInfo;
|
|
337
|
+
}
|
|
338
|
+
declare class NodeChange {
|
|
339
|
+
private readonly editor;
|
|
340
|
+
private lastPath;
|
|
341
|
+
constructor(editor: Editor);
|
|
342
|
+
nodeChanged(args?: Record<string, any>): void;
|
|
343
|
+
private isSameElementPath;
|
|
344
|
+
}
|
|
345
|
+
interface SelectionOverrides {
|
|
346
|
+
showCaret: (direction: number, node: HTMLElement, before: boolean, scrollIntoView?: boolean) => Range | null;
|
|
347
|
+
showBlockCaretContainer: (blockCaretContainer: HTMLElement) => void;
|
|
348
|
+
hideFakeCaret: () => void;
|
|
349
|
+
destroy: () => void;
|
|
350
|
+
}
|
|
351
|
+
interface Quirks {
|
|
352
|
+
refreshContentEditable(): void;
|
|
353
|
+
isHidden(): boolean;
|
|
354
|
+
}
|
|
355
|
+
type DecoratorData = Record<string, any>;
|
|
356
|
+
type Decorator = (uid: string, data: DecoratorData) => {
|
|
357
|
+
attributes?: {};
|
|
358
|
+
classes?: string[];
|
|
359
|
+
};
|
|
360
|
+
type AnnotationListener = (state: boolean, name: string, data?: {
|
|
361
|
+
uid: string;
|
|
362
|
+
nodes: any[];
|
|
363
|
+
}) => void;
|
|
364
|
+
type AnnotationListenerApi = AnnotationListener;
|
|
365
|
+
interface AnnotatorSettings {
|
|
366
|
+
decorate: Decorator;
|
|
367
|
+
persistent?: boolean;
|
|
368
|
+
}
|
|
369
|
+
interface Annotator {
|
|
370
|
+
register: (name: string, settings: AnnotatorSettings) => void;
|
|
371
|
+
annotate: (name: string, data: DecoratorData) => void;
|
|
372
|
+
annotationChanged: (name: string, f: AnnotationListenerApi) => void;
|
|
373
|
+
remove: (name: string) => void;
|
|
374
|
+
removeAll: (name: string) => void;
|
|
375
|
+
getAll: (name: string) => Record<string, Element[]>;
|
|
376
|
+
}
|
|
377
|
+
interface GeomRect {
|
|
378
|
+
readonly x: number;
|
|
379
|
+
readonly y: number;
|
|
380
|
+
readonly w: number;
|
|
381
|
+
readonly h: number;
|
|
382
|
+
}
|
|
383
|
+
interface Rect {
|
|
384
|
+
inflate: (rect: GeomRect, w: number, h: number) => GeomRect;
|
|
385
|
+
relativePosition: (rect: GeomRect, targetRect: GeomRect, rel: string) => GeomRect;
|
|
386
|
+
findBestRelativePosition: (rect: GeomRect, targetRect: GeomRect, constrainRect: GeomRect, rels: string[]) => string | null;
|
|
387
|
+
intersect: (rect: GeomRect, cropRect: GeomRect) => GeomRect | null;
|
|
388
|
+
clamp: (rect: GeomRect, clampRect: GeomRect, fixedSize?: boolean) => GeomRect;
|
|
389
|
+
create: (x: number, y: number, w: number, h: number) => GeomRect;
|
|
390
|
+
fromClientRect: (clientRect: DOMRect) => GeomRect;
|
|
391
|
+
}
|
|
479
392
|
interface NotificationManagerImpl {
|
|
480
|
-
open: (spec: NotificationSpec, closeCallback
|
|
393
|
+
open: (spec: NotificationSpec, closeCallback: () => void) => NotificationApi;
|
|
481
394
|
close: <T extends NotificationApi>(notification: T) => void;
|
|
482
|
-
reposition: <T extends NotificationApi>(notifications: T[]) => void;
|
|
483
395
|
getArgs: <T extends NotificationApi>(notification: T) => NotificationSpec;
|
|
484
396
|
}
|
|
485
397
|
interface NotificationSpec {
|
|
@@ -496,8 +408,7 @@ interface NotificationApi {
|
|
|
496
408
|
value: (percent: number) => void;
|
|
497
409
|
};
|
|
498
410
|
text: (text: string) => void;
|
|
499
|
-
|
|
500
|
-
moveRel: (element: Element, rel: 'tc-tc' | 'bc-bc' | 'bc-tc' | 'tc-bc' | 'banner') => void;
|
|
411
|
+
reposition: () => void;
|
|
501
412
|
getEl: () => HTMLElement;
|
|
502
413
|
settings: NotificationSpec;
|
|
503
414
|
}
|
|
@@ -506,121 +417,60 @@ interface NotificationManager {
|
|
|
506
417
|
close: () => void;
|
|
507
418
|
getNotifications: () => NotificationApi[];
|
|
508
419
|
}
|
|
509
|
-
interface
|
|
420
|
+
interface UploadFailure {
|
|
421
|
+
message: string;
|
|
510
422
|
remove?: boolean;
|
|
511
423
|
}
|
|
512
|
-
|
|
513
|
-
|
|
424
|
+
type ProgressFn = (percent: number) => void;
|
|
425
|
+
type UploadHandler = (blobInfo: BlobInfo, progress: ProgressFn) => Promise<string>;
|
|
426
|
+
interface UploadResult$2 {
|
|
514
427
|
url: string;
|
|
515
428
|
blobInfo: BlobInfo;
|
|
516
429
|
status: boolean;
|
|
517
|
-
error?:
|
|
518
|
-
options: UploadFailureOptions;
|
|
519
|
-
message: string;
|
|
520
|
-
};
|
|
521
|
-
}
|
|
522
|
-
interface RangeLikeObject {
|
|
523
|
-
startContainer: Node;
|
|
524
|
-
startOffset: number;
|
|
525
|
-
endContainer: Node;
|
|
526
|
-
endOffset: number;
|
|
527
|
-
}
|
|
528
|
-
declare type ApplyFormat = BlockFormat | InlineFormat | SelectorFormat;
|
|
529
|
-
declare type RemoveFormat = RemoveBlockFormat | RemoveInlineFormat | RemoveSelectorFormat;
|
|
530
|
-
declare type Format = ApplyFormat | RemoveFormat;
|
|
531
|
-
declare type Formats = Record<string, Format | Format[]>;
|
|
532
|
-
declare type FormatAttrOrStyleValue = string | ((vars?: FormatVars) => string);
|
|
533
|
-
declare type FormatVars = Record<string, string>;
|
|
534
|
-
interface CommonFormat<T> {
|
|
535
|
-
ceFalseOverride?: boolean;
|
|
536
|
-
classes?: string | string[];
|
|
537
|
-
collapsed?: boolean;
|
|
538
|
-
exact?: boolean;
|
|
539
|
-
expand?: boolean;
|
|
540
|
-
links?: boolean;
|
|
541
|
-
onmatch?: (node: Node, fmt: T, itemName: string) => boolean;
|
|
542
|
-
onformat?: (elm: Node, fmt: T, vars?: FormatVars, node?: Node | RangeLikeObject) => void;
|
|
543
|
-
remove_similar?: boolean;
|
|
544
|
-
}
|
|
545
|
-
interface CommonApplyFormat<T> extends CommonFormat<T> {
|
|
546
|
-
attributes?: Record<string, FormatAttrOrStyleValue>;
|
|
547
|
-
preview?: string | boolean;
|
|
548
|
-
styles?: Record<string, FormatAttrOrStyleValue>;
|
|
549
|
-
toggle?: boolean;
|
|
550
|
-
wrapper?: boolean;
|
|
551
|
-
merge_siblings?: boolean;
|
|
552
|
-
merge_with_parents?: boolean;
|
|
553
|
-
}
|
|
554
|
-
interface BlockFormat extends CommonApplyFormat<BlockFormat> {
|
|
555
|
-
block: string;
|
|
556
|
-
block_expand?: boolean;
|
|
557
|
-
}
|
|
558
|
-
interface InlineFormat extends CommonApplyFormat<InlineFormat> {
|
|
559
|
-
inline: string;
|
|
560
|
-
clear_child_styles?: boolean;
|
|
561
|
-
}
|
|
562
|
-
interface SelectorFormat extends CommonApplyFormat<SelectorFormat> {
|
|
563
|
-
selector: string;
|
|
564
|
-
defaultBlock?: string;
|
|
565
|
-
inherit?: boolean;
|
|
566
|
-
}
|
|
567
|
-
interface CommonRemoveFormat<T> extends CommonFormat<T> {
|
|
568
|
-
remove?: 'none' | 'empty' | 'all';
|
|
569
|
-
attributes?: string[] | Record<string, FormatAttrOrStyleValue>;
|
|
570
|
-
styles?: string[] | Record<string, FormatAttrOrStyleValue>;
|
|
571
|
-
split?: boolean;
|
|
572
|
-
deep?: boolean;
|
|
573
|
-
mixed?: boolean;
|
|
574
|
-
}
|
|
575
|
-
interface RemoveBlockFormat extends CommonRemoveFormat<RemoveBlockFormat> {
|
|
576
|
-
block: string;
|
|
577
|
-
list_block?: string;
|
|
578
|
-
}
|
|
579
|
-
interface RemoveInlineFormat extends CommonRemoveFormat<RemoveInlineFormat> {
|
|
580
|
-
inline: string;
|
|
581
|
-
preserve_attributes?: string[];
|
|
582
|
-
}
|
|
583
|
-
interface RemoveSelectorFormat extends CommonRemoveFormat<RemoveSelectorFormat> {
|
|
584
|
-
selector: string;
|
|
585
|
-
}
|
|
586
|
-
type Format_d_Formats = Formats;
|
|
587
|
-
type Format_d_Format = Format;
|
|
588
|
-
type Format_d_ApplyFormat = ApplyFormat;
|
|
589
|
-
type Format_d_BlockFormat = BlockFormat;
|
|
590
|
-
type Format_d_InlineFormat = InlineFormat;
|
|
591
|
-
type Format_d_SelectorFormat = SelectorFormat;
|
|
592
|
-
type Format_d_RemoveFormat = RemoveFormat;
|
|
593
|
-
type Format_d_RemoveBlockFormat = RemoveBlockFormat;
|
|
594
|
-
type Format_d_RemoveInlineFormat = RemoveInlineFormat;
|
|
595
|
-
type Format_d_RemoveSelectorFormat = RemoveSelectorFormat;
|
|
596
|
-
declare namespace Format_d {
|
|
597
|
-
export { Format_d_Formats as Formats, Format_d_Format as Format, Format_d_ApplyFormat as ApplyFormat, Format_d_BlockFormat as BlockFormat, Format_d_InlineFormat as InlineFormat, Format_d_SelectorFormat as SelectorFormat, Format_d_RemoveFormat as RemoveFormat, Format_d_RemoveBlockFormat as RemoveBlockFormat, Format_d_RemoveInlineFormat as RemoveInlineFormat, Format_d_RemoveSelectorFormat as RemoveSelectorFormat, };
|
|
598
|
-
}
|
|
599
|
-
declare type StyleFormat = BlockStyleFormat | InlineStyleFormat | SelectorStyleFormat;
|
|
600
|
-
declare type AllowedFormat = Separator | FormatReference | StyleFormat | NestedFormatting;
|
|
601
|
-
interface Separator {
|
|
602
|
-
title: string;
|
|
603
|
-
}
|
|
604
|
-
interface FormatReference {
|
|
605
|
-
title: string;
|
|
606
|
-
format: string;
|
|
607
|
-
icon?: string;
|
|
608
|
-
}
|
|
609
|
-
interface NestedFormatting {
|
|
610
|
-
title: string;
|
|
611
|
-
items: Array<FormatReference | StyleFormat>;
|
|
612
|
-
}
|
|
613
|
-
interface CommonStyleFormat {
|
|
614
|
-
name?: string;
|
|
615
|
-
title: string;
|
|
616
|
-
icon?: string;
|
|
617
|
-
}
|
|
618
|
-
interface BlockStyleFormat extends BlockFormat, CommonStyleFormat {
|
|
619
|
-
}
|
|
620
|
-
interface InlineStyleFormat extends InlineFormat, CommonStyleFormat {
|
|
621
|
-
}
|
|
622
|
-
interface SelectorStyleFormat extends SelectorFormat, CommonStyleFormat {
|
|
430
|
+
error?: UploadFailure;
|
|
623
431
|
}
|
|
432
|
+
interface RawPattern {
|
|
433
|
+
start?: any;
|
|
434
|
+
end?: any;
|
|
435
|
+
format?: any;
|
|
436
|
+
cmd?: any;
|
|
437
|
+
value?: any;
|
|
438
|
+
replacement?: any;
|
|
439
|
+
}
|
|
440
|
+
interface InlineBasePattern {
|
|
441
|
+
readonly start: string;
|
|
442
|
+
readonly end: string;
|
|
443
|
+
}
|
|
444
|
+
interface InlineFormatPattern extends InlineBasePattern {
|
|
445
|
+
readonly type: 'inline-format';
|
|
446
|
+
readonly format: string[];
|
|
447
|
+
}
|
|
448
|
+
interface InlineCmdPattern extends InlineBasePattern {
|
|
449
|
+
readonly type: 'inline-command';
|
|
450
|
+
readonly cmd: string;
|
|
451
|
+
readonly value?: any;
|
|
452
|
+
}
|
|
453
|
+
type InlinePattern = InlineFormatPattern | InlineCmdPattern;
|
|
454
|
+
interface BlockBasePattern {
|
|
455
|
+
readonly start: string;
|
|
456
|
+
}
|
|
457
|
+
interface BlockFormatPattern extends BlockBasePattern {
|
|
458
|
+
readonly type: 'block-format';
|
|
459
|
+
readonly format: string;
|
|
460
|
+
}
|
|
461
|
+
interface BlockCmdPattern extends BlockBasePattern {
|
|
462
|
+
readonly type: 'block-command';
|
|
463
|
+
readonly cmd: string;
|
|
464
|
+
readonly value?: any;
|
|
465
|
+
}
|
|
466
|
+
type BlockPattern = BlockFormatPattern | BlockCmdPattern;
|
|
467
|
+
type Pattern = InlinePattern | BlockPattern;
|
|
468
|
+
interface DynamicPatternContext {
|
|
469
|
+
readonly text: string;
|
|
470
|
+
readonly block: Element;
|
|
471
|
+
}
|
|
472
|
+
type DynamicPatternsLookup = (ctx: DynamicPatternContext) => Pattern[];
|
|
473
|
+
type RawDynamicPatternsLookup = (ctx: DynamicPatternContext) => RawPattern[];
|
|
624
474
|
interface AlertBannerSpec {
|
|
625
475
|
type: 'alertbanner';
|
|
626
476
|
level: 'info' | 'warn' | 'error' | 'success';
|
|
@@ -631,17 +481,12 @@ interface AlertBannerSpec {
|
|
|
631
481
|
interface ButtonSpec {
|
|
632
482
|
type: 'button';
|
|
633
483
|
text: string;
|
|
634
|
-
|
|
484
|
+
enabled?: boolean;
|
|
635
485
|
primary?: boolean;
|
|
636
486
|
name?: string;
|
|
637
487
|
icon?: string;
|
|
638
488
|
borderless?: boolean;
|
|
639
|
-
|
|
640
|
-
interface CheckboxSpec {
|
|
641
|
-
name: string;
|
|
642
|
-
type: 'checkbox';
|
|
643
|
-
label: string;
|
|
644
|
-
disabled?: boolean;
|
|
489
|
+
buttonType?: 'primary' | 'secondary' | 'toolbar';
|
|
645
490
|
}
|
|
646
491
|
interface FormComponentSpec {
|
|
647
492
|
type: string;
|
|
@@ -650,11 +495,22 @@ interface FormComponentSpec {
|
|
|
650
495
|
interface FormComponentWithLabelSpec extends FormComponentSpec {
|
|
651
496
|
label?: string;
|
|
652
497
|
}
|
|
498
|
+
interface CheckboxSpec extends FormComponentSpec {
|
|
499
|
+
type: 'checkbox';
|
|
500
|
+
label: string;
|
|
501
|
+
enabled?: boolean;
|
|
502
|
+
}
|
|
653
503
|
interface CollectionSpec extends FormComponentWithLabelSpec {
|
|
654
504
|
type: 'collection';
|
|
655
505
|
}
|
|
506
|
+
interface CollectionItem {
|
|
507
|
+
value: string;
|
|
508
|
+
text: string;
|
|
509
|
+
icon: string;
|
|
510
|
+
}
|
|
656
511
|
interface ColorInputSpec extends FormComponentWithLabelSpec {
|
|
657
512
|
type: 'colorinput';
|
|
513
|
+
storageKey?: string;
|
|
658
514
|
}
|
|
659
515
|
interface ColorPickerSpec extends FormComponentWithLabelSpec {
|
|
660
516
|
type: 'colorpicker';
|
|
@@ -664,7 +520,7 @@ interface CustomEditorInit {
|
|
|
664
520
|
getValue: () => string;
|
|
665
521
|
destroy: () => void;
|
|
666
522
|
}
|
|
667
|
-
|
|
523
|
+
type CustomEditorInitFn = (elm: HTMLElement, settings: any) => Promise<CustomEditorInit>;
|
|
668
524
|
interface CustomEditorOldSpec extends FormComponentSpec {
|
|
669
525
|
type: 'customeditor';
|
|
670
526
|
tag?: string;
|
|
@@ -677,7 +533,7 @@ interface CustomEditorNewSpec extends FormComponentSpec {
|
|
|
677
533
|
scriptUrl: string;
|
|
678
534
|
settings?: any;
|
|
679
535
|
}
|
|
680
|
-
|
|
536
|
+
type CustomEditorSpec = CustomEditorOldSpec | CustomEditorNewSpec;
|
|
681
537
|
interface DropZoneSpec extends FormComponentWithLabelSpec {
|
|
682
538
|
type: 'dropzone';
|
|
683
539
|
}
|
|
@@ -693,27 +549,28 @@ interface HtmlPanelSpec {
|
|
|
693
549
|
}
|
|
694
550
|
interface IframeSpec extends FormComponentWithLabelSpec {
|
|
695
551
|
type: 'iframe';
|
|
552
|
+
border?: boolean;
|
|
696
553
|
sandboxed?: boolean;
|
|
554
|
+
streamContent?: boolean;
|
|
555
|
+
transparent?: boolean;
|
|
697
556
|
}
|
|
698
|
-
interface
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
}
|
|
702
|
-
interface ImageToolsSpec extends FormComponentWithLabelSpec {
|
|
703
|
-
type: 'imagetools';
|
|
704
|
-
currentState: ImageToolsState;
|
|
557
|
+
interface ImagePreviewSpec extends FormComponentSpec {
|
|
558
|
+
type: 'imagepreview';
|
|
559
|
+
height?: string;
|
|
705
560
|
}
|
|
706
561
|
interface InputSpec extends FormComponentWithLabelSpec {
|
|
707
562
|
type: 'input';
|
|
708
563
|
inputMode?: string;
|
|
709
564
|
placeholder?: string;
|
|
710
565
|
maximized?: boolean;
|
|
711
|
-
|
|
566
|
+
enabled?: boolean;
|
|
712
567
|
}
|
|
568
|
+
type Alignment = 'start' | 'center' | 'end';
|
|
713
569
|
interface LabelSpec {
|
|
714
570
|
type: 'label';
|
|
715
571
|
label: string;
|
|
716
572
|
items: BodyComponentSpec[];
|
|
573
|
+
align?: Alignment;
|
|
717
574
|
}
|
|
718
575
|
interface ListBoxSingleItemSpec {
|
|
719
576
|
text: string;
|
|
@@ -723,7 +580,7 @@ interface ListBoxNestedItemSpec {
|
|
|
723
580
|
text: string;
|
|
724
581
|
items: ListBoxItemSpec[];
|
|
725
582
|
}
|
|
726
|
-
|
|
583
|
+
type ListBoxItemSpec = ListBoxNestedItemSpec | ListBoxSingleItemSpec;
|
|
727
584
|
interface ListBoxSpec extends FormComponentWithLabelSpec {
|
|
728
585
|
type: 'listbox';
|
|
729
586
|
items: ListBoxItemSpec[];
|
|
@@ -742,12 +599,18 @@ interface SelectBoxSpec extends FormComponentWithLabelSpec {
|
|
|
742
599
|
type: 'selectbox';
|
|
743
600
|
items: SelectBoxItemSpec[];
|
|
744
601
|
size?: number;
|
|
745
|
-
|
|
602
|
+
enabled?: boolean;
|
|
746
603
|
}
|
|
747
604
|
interface SizeInputSpec extends FormComponentWithLabelSpec {
|
|
748
605
|
type: 'sizeinput';
|
|
749
606
|
constrain?: boolean;
|
|
750
|
-
|
|
607
|
+
enabled?: boolean;
|
|
608
|
+
}
|
|
609
|
+
interface SliderSpec extends FormComponentSpec {
|
|
610
|
+
type: 'slider';
|
|
611
|
+
label: string;
|
|
612
|
+
min?: number;
|
|
613
|
+
max?: number;
|
|
751
614
|
}
|
|
752
615
|
interface TableSpec {
|
|
753
616
|
type: 'table';
|
|
@@ -758,40 +621,292 @@ interface TextAreaSpec extends FormComponentWithLabelSpec {
|
|
|
758
621
|
type: 'textarea';
|
|
759
622
|
placeholder?: string;
|
|
760
623
|
maximized?: boolean;
|
|
761
|
-
|
|
624
|
+
enabled?: boolean;
|
|
762
625
|
}
|
|
763
|
-
interface
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
626
|
+
interface BaseToolbarButtonSpec<I extends BaseToolbarButtonInstanceApi> {
|
|
627
|
+
enabled?: boolean;
|
|
628
|
+
tooltip?: string;
|
|
629
|
+
icon?: string;
|
|
630
|
+
text?: string;
|
|
631
|
+
onSetup?: (api: I) => (api: I) => void;
|
|
767
632
|
}
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
633
|
+
interface BaseToolbarButtonInstanceApi {
|
|
634
|
+
isEnabled: () => boolean;
|
|
635
|
+
setEnabled: (state: boolean) => void;
|
|
636
|
+
setText: (text: string) => void;
|
|
637
|
+
setIcon: (icon: string) => void;
|
|
638
|
+
}
|
|
639
|
+
interface ToolbarButtonSpec extends BaseToolbarButtonSpec<ToolbarButtonInstanceApi> {
|
|
640
|
+
type?: 'button';
|
|
641
|
+
onAction: (api: ToolbarButtonInstanceApi) => void;
|
|
642
|
+
}
|
|
643
|
+
interface ToolbarButtonInstanceApi extends BaseToolbarButtonInstanceApi {
|
|
644
|
+
}
|
|
645
|
+
interface ToolbarGroupSetting {
|
|
646
|
+
name: string;
|
|
647
|
+
items: string[];
|
|
648
|
+
}
|
|
649
|
+
type ToolbarConfig = string | ToolbarGroupSetting[];
|
|
650
|
+
interface GroupToolbarButtonInstanceApi extends BaseToolbarButtonInstanceApi {
|
|
651
|
+
}
|
|
652
|
+
interface GroupToolbarButtonSpec extends BaseToolbarButtonSpec<GroupToolbarButtonInstanceApi> {
|
|
653
|
+
type?: 'grouptoolbarbutton';
|
|
654
|
+
items?: ToolbarConfig;
|
|
655
|
+
}
|
|
656
|
+
interface CardImageSpec {
|
|
657
|
+
type: 'cardimage';
|
|
658
|
+
src: string;
|
|
659
|
+
alt?: string;
|
|
660
|
+
classes?: string[];
|
|
661
|
+
}
|
|
662
|
+
interface CardTextSpec {
|
|
663
|
+
type: 'cardtext';
|
|
664
|
+
text: string;
|
|
665
|
+
name?: string;
|
|
666
|
+
classes?: string[];
|
|
667
|
+
}
|
|
668
|
+
type CardItemSpec = CardContainerSpec | CardImageSpec | CardTextSpec;
|
|
669
|
+
type CardContainerDirection = 'vertical' | 'horizontal';
|
|
670
|
+
type CardContainerAlign = 'left' | 'right';
|
|
671
|
+
type CardContainerValign = 'top' | 'middle' | 'bottom';
|
|
672
|
+
interface CardContainerSpec {
|
|
673
|
+
type: 'cardcontainer';
|
|
674
|
+
items: CardItemSpec[];
|
|
675
|
+
direction?: CardContainerDirection;
|
|
676
|
+
align?: CardContainerAlign;
|
|
677
|
+
valign?: CardContainerValign;
|
|
772
678
|
}
|
|
773
679
|
interface CommonMenuItemSpec {
|
|
774
|
-
|
|
680
|
+
enabled?: boolean;
|
|
775
681
|
text?: string;
|
|
776
682
|
value?: string;
|
|
777
683
|
meta?: Record<string, any>;
|
|
778
684
|
shortcut?: string;
|
|
779
685
|
}
|
|
780
686
|
interface CommonMenuItemInstanceApi {
|
|
781
|
-
|
|
782
|
-
|
|
687
|
+
isEnabled: () => boolean;
|
|
688
|
+
setEnabled: (state: boolean) => void;
|
|
689
|
+
}
|
|
690
|
+
interface CardMenuItemInstanceApi extends CommonMenuItemInstanceApi {
|
|
691
|
+
}
|
|
692
|
+
interface CardMenuItemSpec extends Omit<CommonMenuItemSpec, 'text' | 'shortcut'> {
|
|
693
|
+
type: 'cardmenuitem';
|
|
694
|
+
label?: string;
|
|
695
|
+
items: CardItemSpec[];
|
|
696
|
+
onSetup?: (api: CardMenuItemInstanceApi) => (api: CardMenuItemInstanceApi) => void;
|
|
697
|
+
onAction?: (api: CardMenuItemInstanceApi) => void;
|
|
698
|
+
}
|
|
699
|
+
interface ChoiceMenuItemSpec extends CommonMenuItemSpec {
|
|
700
|
+
type?: 'choiceitem';
|
|
701
|
+
icon?: string;
|
|
702
|
+
}
|
|
703
|
+
interface ChoiceMenuItemInstanceApi extends CommonMenuItemInstanceApi {
|
|
704
|
+
isActive: () => boolean;
|
|
705
|
+
setActive: (state: boolean) => void;
|
|
706
|
+
}
|
|
707
|
+
interface ContextMenuItem extends CommonMenuItemSpec {
|
|
708
|
+
text: string;
|
|
709
|
+
icon?: string;
|
|
710
|
+
type?: 'item';
|
|
711
|
+
onAction: () => void;
|
|
712
|
+
}
|
|
713
|
+
interface ContextSubMenu extends CommonMenuItemSpec {
|
|
714
|
+
type: 'submenu';
|
|
715
|
+
text: string;
|
|
716
|
+
icon?: string;
|
|
717
|
+
getSubmenuItems: () => string | Array<ContextMenuContents>;
|
|
718
|
+
}
|
|
719
|
+
type ContextMenuContents = string | ContextMenuItem | SeparatorMenuItemSpec | ContextSubMenu;
|
|
720
|
+
interface ContextMenuApi {
|
|
721
|
+
update: (element: Element) => string | Array<ContextMenuContents>;
|
|
722
|
+
}
|
|
723
|
+
interface FancyActionArgsMap {
|
|
724
|
+
'inserttable': {
|
|
725
|
+
numRows: number;
|
|
726
|
+
numColumns: number;
|
|
727
|
+
};
|
|
728
|
+
'colorswatch': {
|
|
729
|
+
value: string;
|
|
730
|
+
};
|
|
731
|
+
}
|
|
732
|
+
interface BaseFancyMenuItemSpec<T extends keyof FancyActionArgsMap> {
|
|
733
|
+
type: 'fancymenuitem';
|
|
734
|
+
fancytype: T;
|
|
735
|
+
initData?: Record<string, unknown>;
|
|
736
|
+
onAction?: (data: FancyActionArgsMap[T]) => void;
|
|
737
|
+
}
|
|
738
|
+
interface InsertTableMenuItemSpec extends BaseFancyMenuItemSpec<'inserttable'> {
|
|
739
|
+
fancytype: 'inserttable';
|
|
740
|
+
initData?: {};
|
|
741
|
+
}
|
|
742
|
+
interface ColorSwatchMenuItemSpec extends BaseFancyMenuItemSpec<'colorswatch'> {
|
|
743
|
+
fancytype: 'colorswatch';
|
|
744
|
+
select?: (value: string) => boolean;
|
|
745
|
+
initData?: {
|
|
746
|
+
allowCustomColors?: boolean;
|
|
747
|
+
colors?: ChoiceMenuItemSpec[];
|
|
748
|
+
storageKey?: string;
|
|
749
|
+
};
|
|
750
|
+
}
|
|
751
|
+
type FancyMenuItemSpec = InsertTableMenuItemSpec | ColorSwatchMenuItemSpec;
|
|
752
|
+
interface MenuItemSpec extends CommonMenuItemSpec {
|
|
753
|
+
type?: 'menuitem';
|
|
754
|
+
icon?: string;
|
|
755
|
+
onSetup?: (api: MenuItemInstanceApi) => (api: MenuItemInstanceApi) => void;
|
|
756
|
+
onAction?: (api: MenuItemInstanceApi) => void;
|
|
757
|
+
}
|
|
758
|
+
interface MenuItemInstanceApi extends CommonMenuItemInstanceApi {
|
|
759
|
+
}
|
|
760
|
+
interface SeparatorMenuItemSpec {
|
|
761
|
+
type?: 'separator';
|
|
762
|
+
text?: string;
|
|
763
|
+
}
|
|
764
|
+
interface ToggleMenuItemSpec extends CommonMenuItemSpec {
|
|
765
|
+
type?: 'togglemenuitem';
|
|
766
|
+
icon?: string;
|
|
767
|
+
active?: boolean;
|
|
768
|
+
onSetup?: (api: ToggleMenuItemInstanceApi) => void;
|
|
769
|
+
onAction: (api: ToggleMenuItemInstanceApi) => void;
|
|
770
|
+
}
|
|
771
|
+
interface ToggleMenuItemInstanceApi extends CommonMenuItemInstanceApi {
|
|
772
|
+
isActive: () => boolean;
|
|
773
|
+
setActive: (state: boolean) => void;
|
|
774
|
+
}
|
|
775
|
+
type NestedMenuItemContents = string | MenuItemSpec | NestedMenuItemSpec | ToggleMenuItemSpec | SeparatorMenuItemSpec | FancyMenuItemSpec;
|
|
776
|
+
interface NestedMenuItemSpec extends CommonMenuItemSpec {
|
|
777
|
+
type?: 'nestedmenuitem';
|
|
778
|
+
icon?: string;
|
|
779
|
+
getSubmenuItems: () => string | Array<NestedMenuItemContents>;
|
|
780
|
+
onSetup?: (api: NestedMenuItemInstanceApi) => (api: NestedMenuItemInstanceApi) => void;
|
|
781
|
+
}
|
|
782
|
+
interface NestedMenuItemInstanceApi extends CommonMenuItemInstanceApi {
|
|
783
|
+
setTooltip: (tooltip: string) => void;
|
|
784
|
+
setIconFill: (id: string, value: string) => void;
|
|
785
|
+
}
|
|
786
|
+
type MenuButtonItemTypes = NestedMenuItemContents;
|
|
787
|
+
type SuccessCallback$1 = (menu: string | MenuButtonItemTypes[]) => void;
|
|
788
|
+
interface MenuButtonFetchContext {
|
|
789
|
+
pattern: string;
|
|
790
|
+
}
|
|
791
|
+
interface BaseMenuButtonSpec {
|
|
792
|
+
text?: string;
|
|
793
|
+
tooltip?: string;
|
|
794
|
+
icon?: string;
|
|
795
|
+
search?: boolean | {
|
|
796
|
+
placeholder?: string;
|
|
797
|
+
};
|
|
798
|
+
fetch: (success: SuccessCallback$1, fetchContext: MenuButtonFetchContext, api: BaseMenuButtonInstanceApi) => void;
|
|
799
|
+
onSetup?: (api: BaseMenuButtonInstanceApi) => (api: BaseMenuButtonInstanceApi) => void;
|
|
800
|
+
}
|
|
801
|
+
interface BaseMenuButtonInstanceApi {
|
|
802
|
+
isEnabled: () => boolean;
|
|
803
|
+
setEnabled: (state: boolean) => void;
|
|
804
|
+
isActive: () => boolean;
|
|
805
|
+
setActive: (state: boolean) => void;
|
|
806
|
+
setText: (text: string) => void;
|
|
807
|
+
setIcon: (icon: string) => void;
|
|
808
|
+
}
|
|
809
|
+
interface ToolbarMenuButtonSpec extends BaseMenuButtonSpec {
|
|
810
|
+
type?: 'menubutton';
|
|
811
|
+
onSetup?: (api: ToolbarMenuButtonInstanceApi) => (api: ToolbarMenuButtonInstanceApi) => void;
|
|
812
|
+
}
|
|
813
|
+
interface ToolbarMenuButtonInstanceApi extends BaseMenuButtonInstanceApi {
|
|
814
|
+
}
|
|
815
|
+
type ToolbarSplitButtonItemTypes = ChoiceMenuItemSpec | SeparatorMenuItemSpec;
|
|
816
|
+
type SuccessCallback = (menu: ToolbarSplitButtonItemTypes[]) => void;
|
|
817
|
+
type SelectPredicate = (value: string) => boolean;
|
|
818
|
+
type PresetTypes = 'color' | 'normal' | 'listpreview';
|
|
819
|
+
type ColumnTypes$1 = number | 'auto';
|
|
820
|
+
interface ToolbarSplitButtonSpec {
|
|
821
|
+
type?: 'splitbutton';
|
|
822
|
+
tooltip?: string;
|
|
823
|
+
icon?: string;
|
|
824
|
+
text?: string;
|
|
825
|
+
select?: SelectPredicate;
|
|
826
|
+
presets?: PresetTypes;
|
|
827
|
+
columns?: ColumnTypes$1;
|
|
828
|
+
fetch: (success: SuccessCallback) => void;
|
|
829
|
+
onSetup?: (api: ToolbarSplitButtonInstanceApi) => (api: ToolbarSplitButtonInstanceApi) => void;
|
|
830
|
+
onAction: (api: ToolbarSplitButtonInstanceApi) => void;
|
|
831
|
+
onItemAction: (api: ToolbarSplitButtonInstanceApi, value: string) => void;
|
|
832
|
+
}
|
|
833
|
+
interface ToolbarSplitButtonInstanceApi {
|
|
834
|
+
isEnabled: () => boolean;
|
|
835
|
+
setEnabled: (state: boolean) => void;
|
|
836
|
+
setIconFill: (id: string, value: string) => void;
|
|
837
|
+
isActive: () => boolean;
|
|
838
|
+
setActive: (state: boolean) => void;
|
|
839
|
+
setTooltip: (tooltip: string) => void;
|
|
840
|
+
setText: (text: string) => void;
|
|
841
|
+
setIcon: (icon: string) => void;
|
|
842
|
+
}
|
|
843
|
+
interface BaseToolbarToggleButtonSpec<I extends BaseToolbarButtonInstanceApi> extends BaseToolbarButtonSpec<I> {
|
|
844
|
+
active?: boolean;
|
|
845
|
+
}
|
|
846
|
+
interface BaseToolbarToggleButtonInstanceApi extends BaseToolbarButtonInstanceApi {
|
|
847
|
+
isActive: () => boolean;
|
|
848
|
+
setActive: (state: boolean) => void;
|
|
849
|
+
}
|
|
850
|
+
interface ToolbarToggleButtonSpec extends BaseToolbarToggleButtonSpec<ToolbarToggleButtonInstanceApi> {
|
|
851
|
+
type?: 'togglebutton';
|
|
852
|
+
onAction: (api: ToolbarToggleButtonInstanceApi) => void;
|
|
853
|
+
}
|
|
854
|
+
interface ToolbarToggleButtonInstanceApi extends BaseToolbarToggleButtonInstanceApi {
|
|
855
|
+
}
|
|
856
|
+
type Id = string;
|
|
857
|
+
interface TreeSpec {
|
|
858
|
+
type: 'tree';
|
|
859
|
+
items: TreeItemSpec[];
|
|
860
|
+
onLeafAction?: (id: Id) => void;
|
|
861
|
+
defaultExpandedIds?: Id[];
|
|
862
|
+
onToggleExpand?: (expandedIds: Id[], { expanded, node }: {
|
|
863
|
+
expanded: boolean;
|
|
864
|
+
node: Id;
|
|
865
|
+
}) => void;
|
|
866
|
+
defaultSelectedId?: Id;
|
|
867
|
+
}
|
|
868
|
+
interface BaseTreeItemSpec {
|
|
869
|
+
title: string;
|
|
870
|
+
id: Id;
|
|
871
|
+
menu?: ToolbarMenuButtonSpec;
|
|
872
|
+
}
|
|
873
|
+
interface DirectorySpec extends BaseTreeItemSpec {
|
|
874
|
+
type: 'directory';
|
|
875
|
+
children: TreeItemSpec[];
|
|
876
|
+
}
|
|
877
|
+
interface LeafSpec extends BaseTreeItemSpec {
|
|
878
|
+
type: 'leaf';
|
|
879
|
+
}
|
|
880
|
+
type TreeItemSpec = DirectorySpec | LeafSpec;
|
|
881
|
+
interface UrlInputSpec extends FormComponentWithLabelSpec {
|
|
882
|
+
type: 'urlinput';
|
|
883
|
+
filetype?: 'image' | 'media' | 'file';
|
|
884
|
+
enabled?: boolean;
|
|
885
|
+
picker_text?: string;
|
|
886
|
+
}
|
|
887
|
+
interface UrlInputData {
|
|
888
|
+
value: string;
|
|
889
|
+
meta: {
|
|
890
|
+
text?: string;
|
|
891
|
+
};
|
|
892
|
+
}
|
|
893
|
+
type BodyComponentSpec = BarSpec | ButtonSpec | CheckboxSpec | TextAreaSpec | InputSpec | ListBoxSpec | SelectBoxSpec | SizeInputSpec | SliderSpec | IframeSpec | HtmlPanelSpec | UrlInputSpec | DropZoneSpec | ColorInputSpec | GridSpec | ColorPickerSpec | ImagePreviewSpec | AlertBannerSpec | CollectionSpec | LabelSpec | TableSpec | TreeSpec | PanelSpec | CustomEditorSpec;
|
|
894
|
+
interface BarSpec {
|
|
895
|
+
type: 'bar';
|
|
896
|
+
items: BodyComponentSpec[];
|
|
783
897
|
}
|
|
784
898
|
interface DialogToggleMenuItemSpec extends CommonMenuItemSpec {
|
|
785
899
|
type?: 'togglemenuitem';
|
|
786
900
|
name: string;
|
|
787
901
|
}
|
|
788
|
-
|
|
902
|
+
type DialogFooterMenuButtonItemSpec = DialogToggleMenuItemSpec;
|
|
789
903
|
interface BaseDialogFooterButtonSpec {
|
|
790
904
|
name?: string;
|
|
791
905
|
align?: 'start' | 'end';
|
|
792
906
|
primary?: boolean;
|
|
793
|
-
|
|
907
|
+
enabled?: boolean;
|
|
794
908
|
icon?: string;
|
|
909
|
+
buttonType?: 'primary' | 'secondary';
|
|
795
910
|
}
|
|
796
911
|
interface DialogFooterNormalButtonSpec extends BaseDialogFooterButtonSpec {
|
|
797
912
|
type: 'submit' | 'cancel' | 'custom';
|
|
@@ -804,7 +919,14 @@ interface DialogFooterMenuButtonSpec extends BaseDialogFooterButtonSpec {
|
|
|
804
919
|
icon?: string;
|
|
805
920
|
items: DialogFooterMenuButtonItemSpec[];
|
|
806
921
|
}
|
|
807
|
-
|
|
922
|
+
interface DialogFooterToggleButtonSpec extends BaseDialogFooterButtonSpec {
|
|
923
|
+
type: 'togglebutton';
|
|
924
|
+
tooltip?: string;
|
|
925
|
+
icon?: string;
|
|
926
|
+
text?: string;
|
|
927
|
+
active?: boolean;
|
|
928
|
+
}
|
|
929
|
+
type DialogFooterButtonSpec = DialogFooterNormalButtonSpec | DialogFooterMenuButtonSpec | DialogFooterToggleButtonSpec;
|
|
808
930
|
interface TabSpec {
|
|
809
931
|
name?: string;
|
|
810
932
|
title: string;
|
|
@@ -814,18 +936,18 @@ interface TabPanelSpec {
|
|
|
814
936
|
type: 'tabpanel';
|
|
815
937
|
tabs: TabSpec[];
|
|
816
938
|
}
|
|
817
|
-
|
|
818
|
-
|
|
939
|
+
type DialogDataItem = any;
|
|
940
|
+
type DialogData = Record<string, DialogDataItem>;
|
|
819
941
|
interface DialogInstanceApi<T extends DialogData> {
|
|
820
942
|
getData: () => T;
|
|
821
943
|
setData: (data: Partial<T>) => void;
|
|
822
|
-
|
|
944
|
+
setEnabled: (name: string, state: boolean) => void;
|
|
823
945
|
focus: (name: string) => void;
|
|
824
946
|
showTab: (name: string) => void;
|
|
825
947
|
redial: (nu: DialogSpec<T>) => void;
|
|
826
|
-
enable: (name: string) => void;
|
|
827
948
|
block: (msg: string) => void;
|
|
828
949
|
unblock: () => void;
|
|
950
|
+
toggleFullscreen: () => void;
|
|
829
951
|
close: () => void;
|
|
830
952
|
}
|
|
831
953
|
interface DialogActionDetails {
|
|
@@ -839,19 +961,19 @@ interface DialogTabChangeDetails {
|
|
|
839
961
|
newTabName: string;
|
|
840
962
|
oldTabName: string;
|
|
841
963
|
}
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
964
|
+
type DialogActionHandler<T extends DialogData> = (api: DialogInstanceApi<T>, details: DialogActionDetails) => void;
|
|
965
|
+
type DialogChangeHandler<T extends DialogData> = (api: DialogInstanceApi<T>, details: DialogChangeDetails<T>) => void;
|
|
966
|
+
type DialogSubmitHandler<T extends DialogData> = (api: DialogInstanceApi<T>) => void;
|
|
967
|
+
type DialogCloseHandler = () => void;
|
|
968
|
+
type DialogCancelHandler<T extends DialogData> = (api: DialogInstanceApi<T>) => void;
|
|
969
|
+
type DialogTabChangeHandler<T extends DialogData> = (api: DialogInstanceApi<T>, details: DialogTabChangeDetails) => void;
|
|
970
|
+
type DialogSize = 'normal' | 'medium' | 'large';
|
|
849
971
|
interface DialogSpec<T extends DialogData> {
|
|
850
972
|
title: string;
|
|
851
973
|
size?: DialogSize;
|
|
852
974
|
body: TabPanelSpec | PanelSpec;
|
|
853
|
-
buttons
|
|
854
|
-
initialData?: T
|
|
975
|
+
buttons?: DialogFooterButtonSpec[];
|
|
976
|
+
initialData?: Partial<T>;
|
|
855
977
|
onAction?: DialogActionHandler<T>;
|
|
856
978
|
onChange?: DialogChangeHandler<T>;
|
|
857
979
|
onSubmit?: DialogSubmitHandler<T>;
|
|
@@ -873,10 +995,10 @@ interface UrlDialogMessage {
|
|
|
873
995
|
mceAction: string;
|
|
874
996
|
[key: string]: any;
|
|
875
997
|
}
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
998
|
+
type UrlDialogActionHandler = (api: UrlDialogInstanceApi, actions: UrlDialogActionDetails) => void;
|
|
999
|
+
type UrlDialogCloseHandler = () => void;
|
|
1000
|
+
type UrlDialogCancelHandler = (api: UrlDialogInstanceApi) => void;
|
|
1001
|
+
type UrlDialogMessageHandler = (api: UrlDialogInstanceApi, message: UrlDialogMessage) => void;
|
|
880
1002
|
interface UrlDialogFooterButtonSpec extends DialogFooterNormalButtonSpec {
|
|
881
1003
|
type: 'cancel' | 'custom';
|
|
882
1004
|
}
|
|
@@ -891,44 +1013,8 @@ interface UrlDialogSpec {
|
|
|
891
1013
|
onCancel?: UrlDialogCancelHandler;
|
|
892
1014
|
onMessage?: UrlDialogMessageHandler;
|
|
893
1015
|
}
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
declare type CardContainerValign = 'top' | 'middle' | 'bottom';
|
|
897
|
-
interface CardContainerSpec {
|
|
898
|
-
type: 'cardcontainer';
|
|
899
|
-
items: CardItemSpec[];
|
|
900
|
-
direction?: CardContainerDirection;
|
|
901
|
-
align?: CardContainerAlign;
|
|
902
|
-
valign?: CardContainerValign;
|
|
903
|
-
}
|
|
904
|
-
interface CardImageSpec {
|
|
905
|
-
type: 'cardimage';
|
|
906
|
-
src: string;
|
|
907
|
-
alt?: string;
|
|
908
|
-
classes?: string[];
|
|
909
|
-
}
|
|
910
|
-
interface CardTextSpec {
|
|
911
|
-
type: 'cardtext';
|
|
912
|
-
text: string;
|
|
913
|
-
name?: string;
|
|
914
|
-
classes?: string[];
|
|
915
|
-
}
|
|
916
|
-
declare type CardItemSpec = CardContainerSpec | CardImageSpec | CardTextSpec;
|
|
917
|
-
interface CardMenuItemInstanceApi extends CommonMenuItemInstanceApi {
|
|
918
|
-
}
|
|
919
|
-
interface CardMenuItemSpec extends Omit<CommonMenuItemSpec, 'text' | 'shortcut'> {
|
|
920
|
-
type: 'cardmenuitem';
|
|
921
|
-
label?: string;
|
|
922
|
-
items: CardItemSpec[];
|
|
923
|
-
onSetup?: (api: CardMenuItemInstanceApi) => (api: CardMenuItemInstanceApi) => void;
|
|
924
|
-
onAction?: (api: CardMenuItemInstanceApi) => void;
|
|
925
|
-
}
|
|
926
|
-
interface SeparatorMenuItemSpec {
|
|
927
|
-
type?: 'separator';
|
|
928
|
-
text?: string;
|
|
929
|
-
}
|
|
930
|
-
declare type ColumnTypes = number | 'auto';
|
|
931
|
-
declare type SeparatorItemSpec = SeparatorMenuItemSpec;
|
|
1016
|
+
type ColumnTypes = number | 'auto';
|
|
1017
|
+
type SeparatorItemSpec = SeparatorMenuItemSpec;
|
|
932
1018
|
interface AutocompleterItemSpec {
|
|
933
1019
|
type?: 'autocompleteitem';
|
|
934
1020
|
value: string;
|
|
@@ -936,15 +1022,16 @@ interface AutocompleterItemSpec {
|
|
|
936
1022
|
icon?: string;
|
|
937
1023
|
meta?: Record<string, any>;
|
|
938
1024
|
}
|
|
939
|
-
|
|
1025
|
+
type AutocompleterContents = SeparatorItemSpec | AutocompleterItemSpec | CardMenuItemSpec;
|
|
940
1026
|
interface AutocompleterSpec {
|
|
941
1027
|
type?: 'autocompleter';
|
|
942
|
-
ch
|
|
1028
|
+
ch?: string;
|
|
1029
|
+
trigger?: string;
|
|
943
1030
|
minChars?: number;
|
|
944
1031
|
columns?: ColumnTypes;
|
|
945
1032
|
matches?: (rng: Range, text: string, pattern: string) => boolean;
|
|
946
1033
|
fetch: (pattern: string, maxResults: number, fetchOptions: Record<string, any>) => Promise<AutocompleterContents[]>;
|
|
947
|
-
onAction: (autocompleterApi: AutocompleterInstanceApi, rng:
|
|
1034
|
+
onAction: (autocompleterApi: AutocompleterInstanceApi, rng: Range, value: string, meta: Record<string, any>) => void;
|
|
948
1035
|
maxResults?: number;
|
|
949
1036
|
highlightOn?: string[];
|
|
950
1037
|
}
|
|
@@ -952,43 +1039,13 @@ interface AutocompleterInstanceApi {
|
|
|
952
1039
|
hide: () => void;
|
|
953
1040
|
reload: (fetchOptions: Record<string, any>) => void;
|
|
954
1041
|
}
|
|
955
|
-
|
|
956
|
-
|
|
1042
|
+
type ContextPosition = 'node' | 'selection' | 'line';
|
|
1043
|
+
type ContextScope = 'node' | 'editor';
|
|
957
1044
|
interface ContextBarSpec {
|
|
958
1045
|
predicate?: (elem: Element) => boolean;
|
|
959
1046
|
position?: ContextPosition;
|
|
960
1047
|
scope?: ContextScope;
|
|
961
1048
|
}
|
|
962
|
-
interface BaseToolbarButtonSpec<I extends BaseToolbarButtonInstanceApi> {
|
|
963
|
-
disabled?: boolean;
|
|
964
|
-
tooltip?: string;
|
|
965
|
-
icon?: string;
|
|
966
|
-
text?: string;
|
|
967
|
-
onSetup?: (api: I) => (api: I) => void;
|
|
968
|
-
}
|
|
969
|
-
interface BaseToolbarButtonInstanceApi {
|
|
970
|
-
isDisabled: () => boolean;
|
|
971
|
-
setDisabled: (state: boolean) => void;
|
|
972
|
-
}
|
|
973
|
-
interface ToolbarButtonSpec extends BaseToolbarButtonSpec<ToolbarButtonInstanceApi> {
|
|
974
|
-
type?: 'button';
|
|
975
|
-
onAction: (api: ToolbarButtonInstanceApi) => void;
|
|
976
|
-
}
|
|
977
|
-
interface ToolbarButtonInstanceApi extends BaseToolbarButtonInstanceApi {
|
|
978
|
-
}
|
|
979
|
-
interface BaseToolbarToggleButtonSpec<I extends BaseToolbarButtonInstanceApi> extends BaseToolbarButtonSpec<I> {
|
|
980
|
-
active?: boolean;
|
|
981
|
-
}
|
|
982
|
-
interface BaseToolbarToggleButtonInstanceApi extends BaseToolbarButtonInstanceApi {
|
|
983
|
-
isActive: () => boolean;
|
|
984
|
-
setActive: (state: boolean) => void;
|
|
985
|
-
}
|
|
986
|
-
interface ToolbarToggleButtonSpec extends BaseToolbarToggleButtonSpec<ToolbarToggleButtonInstanceApi> {
|
|
987
|
-
type?: 'togglebutton';
|
|
988
|
-
onAction: (api: ToolbarToggleButtonInstanceApi) => void;
|
|
989
|
-
}
|
|
990
|
-
interface ToolbarToggleButtonInstanceApi extends BaseToolbarToggleButtonInstanceApi {
|
|
991
|
-
}
|
|
992
1049
|
interface ContextFormLaunchButtonApi extends BaseToolbarButtonSpec<BaseToolbarButtonInstanceApi> {
|
|
993
1050
|
type: 'contextformbutton';
|
|
994
1051
|
}
|
|
@@ -1024,68 +1081,12 @@ interface ContextToolbarSpec extends ContextBarSpec {
|
|
|
1024
1081
|
type?: 'contexttoolbar';
|
|
1025
1082
|
items: string;
|
|
1026
1083
|
}
|
|
1027
|
-
interface ChoiceMenuItemSpec extends CommonMenuItemSpec {
|
|
1028
|
-
type?: 'choiceitem';
|
|
1029
|
-
icon?: string;
|
|
1030
|
-
}
|
|
1031
|
-
interface ChoiceMenuItemInstanceApi extends CommonMenuItemInstanceApi {
|
|
1032
|
-
isActive: () => boolean;
|
|
1033
|
-
setActive: (state: boolean) => void;
|
|
1034
|
-
}
|
|
1035
|
-
interface ContextMenuItem extends CommonMenuItemSpec {
|
|
1036
|
-
text: string;
|
|
1037
|
-
icon?: string;
|
|
1038
|
-
type?: 'item';
|
|
1039
|
-
onAction: () => void;
|
|
1040
|
-
}
|
|
1041
|
-
interface ContextSubMenu extends CommonMenuItemSpec {
|
|
1042
|
-
type: 'submenu';
|
|
1043
|
-
text: string;
|
|
1044
|
-
icon?: string;
|
|
1045
|
-
getSubmenuItems: () => string | Array<ContextMenuContents>;
|
|
1046
|
-
}
|
|
1047
|
-
declare type ContextMenuContents = string | ContextMenuItem | SeparatorMenuItemSpec | ContextSubMenu;
|
|
1048
|
-
interface ContextMenuApi {
|
|
1049
|
-
update: (element: Element) => string | Array<ContextMenuContents>;
|
|
1050
|
-
}
|
|
1051
|
-
interface FancyMenuItemSpec {
|
|
1052
|
-
type: 'fancymenuitem';
|
|
1053
|
-
fancytype: string;
|
|
1054
|
-
onAction: (data: any) => void;
|
|
1055
|
-
}
|
|
1056
|
-
interface MenuItemSpec extends CommonMenuItemSpec {
|
|
1057
|
-
type?: 'menuitem';
|
|
1058
|
-
icon?: string;
|
|
1059
|
-
onSetup?: (api: MenuItemInstanceApi) => (api: MenuItemInstanceApi) => void;
|
|
1060
|
-
onAction?: (api: MenuItemInstanceApi) => void;
|
|
1061
|
-
}
|
|
1062
|
-
interface MenuItemInstanceApi extends CommonMenuItemInstanceApi {
|
|
1063
|
-
}
|
|
1064
|
-
declare type NestedMenuItemContents = string | MenuItemSpec | NestedMenuItemSpec | ToggleMenuItemSpec | SeparatorMenuItemSpec | FancyMenuItemSpec;
|
|
1065
|
-
interface NestedMenuItemSpec extends CommonMenuItemSpec {
|
|
1066
|
-
type?: 'nestedmenuitem';
|
|
1067
|
-
icon?: string;
|
|
1068
|
-
getSubmenuItems: () => string | Array<NestedMenuItemContents>;
|
|
1069
|
-
onSetup?: (api: NestedMenuItemInstanceApi) => (api: NestedMenuItemInstanceApi) => void;
|
|
1070
|
-
}
|
|
1071
|
-
interface NestedMenuItemInstanceApi extends CommonMenuItemInstanceApi {
|
|
1072
|
-
}
|
|
1073
|
-
interface ToggleMenuItemSpec extends CommonMenuItemSpec {
|
|
1074
|
-
type?: 'togglemenuitem';
|
|
1075
|
-
icon?: string;
|
|
1076
|
-
active?: boolean;
|
|
1077
|
-
onSetup?: (api: ToggleMenuItemInstanceApi) => void;
|
|
1078
|
-
onAction: (api: ToggleMenuItemInstanceApi) => void;
|
|
1079
|
-
}
|
|
1080
|
-
interface ToggleMenuItemInstanceApi extends CommonMenuItemInstanceApi {
|
|
1081
|
-
isActive: () => boolean;
|
|
1082
|
-
setActive: (state: boolean) => void;
|
|
1083
|
-
}
|
|
1084
1084
|
type PublicDialog_d_AlertBannerSpec = AlertBannerSpec;
|
|
1085
1085
|
type PublicDialog_d_BarSpec = BarSpec;
|
|
1086
1086
|
type PublicDialog_d_BodyComponentSpec = BodyComponentSpec;
|
|
1087
1087
|
type PublicDialog_d_ButtonSpec = ButtonSpec;
|
|
1088
1088
|
type PublicDialog_d_CheckboxSpec = CheckboxSpec;
|
|
1089
|
+
type PublicDialog_d_CollectionItem = CollectionItem;
|
|
1089
1090
|
type PublicDialog_d_CollectionSpec = CollectionSpec;
|
|
1090
1091
|
type PublicDialog_d_ColorInputSpec = ColorInputSpec;
|
|
1091
1092
|
type PublicDialog_d_ColorPickerSpec = ColorPickerSpec;
|
|
@@ -1094,17 +1095,17 @@ type PublicDialog_d_CustomEditorInit = CustomEditorInit;
|
|
|
1094
1095
|
type PublicDialog_d_CustomEditorInitFn = CustomEditorInitFn;
|
|
1095
1096
|
type PublicDialog_d_DialogData = DialogData;
|
|
1096
1097
|
type PublicDialog_d_DialogSize = DialogSize;
|
|
1097
|
-
type PublicDialog_d_DialogSpec<
|
|
1098
|
-
type PublicDialog_d_DialogInstanceApi<
|
|
1098
|
+
type PublicDialog_d_DialogSpec<T extends DialogData> = DialogSpec<T>;
|
|
1099
|
+
type PublicDialog_d_DialogInstanceApi<T extends DialogData> = DialogInstanceApi<T>;
|
|
1099
1100
|
type PublicDialog_d_DialogFooterButtonSpec = DialogFooterButtonSpec;
|
|
1100
1101
|
type PublicDialog_d_DialogActionDetails = DialogActionDetails;
|
|
1101
|
-
type PublicDialog_d_DialogChangeDetails<
|
|
1102
|
+
type PublicDialog_d_DialogChangeDetails<T> = DialogChangeDetails<T>;
|
|
1102
1103
|
type PublicDialog_d_DialogTabChangeDetails = DialogTabChangeDetails;
|
|
1103
1104
|
type PublicDialog_d_DropZoneSpec = DropZoneSpec;
|
|
1104
1105
|
type PublicDialog_d_GridSpec = GridSpec;
|
|
1105
1106
|
type PublicDialog_d_HtmlPanelSpec = HtmlPanelSpec;
|
|
1106
1107
|
type PublicDialog_d_IframeSpec = IframeSpec;
|
|
1107
|
-
type
|
|
1108
|
+
type PublicDialog_d_ImagePreviewSpec = ImagePreviewSpec;
|
|
1108
1109
|
type PublicDialog_d_InputSpec = InputSpec;
|
|
1109
1110
|
type PublicDialog_d_LabelSpec = LabelSpec;
|
|
1110
1111
|
type PublicDialog_d_ListBoxSpec = ListBoxSpec;
|
|
@@ -1115,10 +1116,14 @@ type PublicDialog_d_PanelSpec = PanelSpec;
|
|
|
1115
1116
|
type PublicDialog_d_SelectBoxSpec = SelectBoxSpec;
|
|
1116
1117
|
type PublicDialog_d_SelectBoxItemSpec = SelectBoxItemSpec;
|
|
1117
1118
|
type PublicDialog_d_SizeInputSpec = SizeInputSpec;
|
|
1119
|
+
type PublicDialog_d_SliderSpec = SliderSpec;
|
|
1118
1120
|
type PublicDialog_d_TableSpec = TableSpec;
|
|
1119
1121
|
type PublicDialog_d_TabSpec = TabSpec;
|
|
1120
1122
|
type PublicDialog_d_TabPanelSpec = TabPanelSpec;
|
|
1121
1123
|
type PublicDialog_d_TextAreaSpec = TextAreaSpec;
|
|
1124
|
+
type PublicDialog_d_TreeSpec = TreeSpec;
|
|
1125
|
+
type PublicDialog_d_TreeItemSpec = TreeItemSpec;
|
|
1126
|
+
type PublicDialog_d_UrlInputData = UrlInputData;
|
|
1122
1127
|
type PublicDialog_d_UrlInputSpec = UrlInputSpec;
|
|
1123
1128
|
type PublicDialog_d_UrlDialogSpec = UrlDialogSpec;
|
|
1124
1129
|
type PublicDialog_d_UrlDialogFooterButtonSpec = UrlDialogFooterButtonSpec;
|
|
@@ -1126,7 +1131,7 @@ type PublicDialog_d_UrlDialogInstanceApi = UrlDialogInstanceApi;
|
|
|
1126
1131
|
type PublicDialog_d_UrlDialogActionDetails = UrlDialogActionDetails;
|
|
1127
1132
|
type PublicDialog_d_UrlDialogMessage = UrlDialogMessage;
|
|
1128
1133
|
declare namespace PublicDialog_d {
|
|
1129
|
-
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,
|
|
1134
|
+
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_CollectionItem as CollectionItem, 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_ImagePreviewSpec as ImagePreviewSpec, 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_SliderSpec as SliderSpec, PublicDialog_d_TableSpec as TableSpec, PublicDialog_d_TabSpec as TabSpec, PublicDialog_d_TabPanelSpec as TabPanelSpec, PublicDialog_d_TextAreaSpec as TextAreaSpec, PublicDialog_d_TreeSpec as TreeSpec, PublicDialog_d_TreeItemSpec as TreeItemSpec, DirectorySpec as TreeDirectorySpec, LeafSpec as TreeLeafSpec, PublicDialog_d_UrlInputData as UrlInputData, 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, };
|
|
1130
1135
|
}
|
|
1131
1136
|
type PublicInlineContent_d_AutocompleterSpec = AutocompleterSpec;
|
|
1132
1137
|
type PublicInlineContent_d_AutocompleterItemSpec = AutocompleterItemSpec;
|
|
@@ -1151,6 +1156,8 @@ type PublicMenu_d_NestedMenuItemContents = NestedMenuItemContents;
|
|
|
1151
1156
|
type PublicMenu_d_NestedMenuItemSpec = NestedMenuItemSpec;
|
|
1152
1157
|
type PublicMenu_d_NestedMenuItemInstanceApi = NestedMenuItemInstanceApi;
|
|
1153
1158
|
type PublicMenu_d_FancyMenuItemSpec = FancyMenuItemSpec;
|
|
1159
|
+
type PublicMenu_d_ColorSwatchMenuItemSpec = ColorSwatchMenuItemSpec;
|
|
1160
|
+
type PublicMenu_d_InsertTableMenuItemSpec = InsertTableMenuItemSpec;
|
|
1154
1161
|
type PublicMenu_d_ToggleMenuItemSpec = ToggleMenuItemSpec;
|
|
1155
1162
|
type PublicMenu_d_ToggleMenuItemInstanceApi = ToggleMenuItemInstanceApi;
|
|
1156
1163
|
type PublicMenu_d_ChoiceMenuItemSpec = ChoiceMenuItemSpec;
|
|
@@ -1167,7 +1174,7 @@ type PublicMenu_d_CardContainerSpec = CardContainerSpec;
|
|
|
1167
1174
|
type PublicMenu_d_CardImageSpec = CardImageSpec;
|
|
1168
1175
|
type PublicMenu_d_CardTextSpec = CardTextSpec;
|
|
1169
1176
|
declare namespace PublicMenu_d {
|
|
1170
|
-
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, PublicMenu_d_CardMenuItemSpec as CardMenuItemSpec, PublicMenu_d_CardMenuItemInstanceApi as CardMenuItemInstanceApi, PublicMenu_d_CardItemSpec as CardItemSpec, PublicMenu_d_CardContainerSpec as CardContainerSpec, PublicMenu_d_CardImageSpec as CardImageSpec, PublicMenu_d_CardTextSpec as CardTextSpec, };
|
|
1177
|
+
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_ColorSwatchMenuItemSpec as ColorSwatchMenuItemSpec, PublicMenu_d_InsertTableMenuItemSpec as InsertTableMenuItemSpec, 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, PublicMenu_d_CardMenuItemSpec as CardMenuItemSpec, PublicMenu_d_CardMenuItemInstanceApi as CardMenuItemInstanceApi, PublicMenu_d_CardItemSpec as CardItemSpec, PublicMenu_d_CardContainerSpec as CardContainerSpec, PublicMenu_d_CardImageSpec as CardImageSpec, PublicMenu_d_CardTextSpec as CardTextSpec, };
|
|
1171
1178
|
}
|
|
1172
1179
|
interface SidebarInstanceApi {
|
|
1173
1180
|
element: () => HTMLElement;
|
|
@@ -1184,157 +1191,615 @@ type PublicSidebar_d_SidebarInstanceApi = SidebarInstanceApi;
|
|
|
1184
1191
|
declare namespace PublicSidebar_d {
|
|
1185
1192
|
export { PublicSidebar_d_SidebarSpec as SidebarSpec, PublicSidebar_d_SidebarInstanceApi as SidebarInstanceApi, };
|
|
1186
1193
|
}
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1194
|
+
type PublicToolbar_d_ToolbarButtonSpec = ToolbarButtonSpec;
|
|
1195
|
+
type PublicToolbar_d_ToolbarButtonInstanceApi = ToolbarButtonInstanceApi;
|
|
1196
|
+
type PublicToolbar_d_ToolbarSplitButtonSpec = ToolbarSplitButtonSpec;
|
|
1197
|
+
type PublicToolbar_d_ToolbarSplitButtonInstanceApi = ToolbarSplitButtonInstanceApi;
|
|
1198
|
+
type PublicToolbar_d_ToolbarMenuButtonSpec = ToolbarMenuButtonSpec;
|
|
1199
|
+
type PublicToolbar_d_ToolbarMenuButtonInstanceApi = ToolbarMenuButtonInstanceApi;
|
|
1200
|
+
type PublicToolbar_d_ToolbarToggleButtonSpec = ToolbarToggleButtonSpec;
|
|
1201
|
+
type PublicToolbar_d_ToolbarToggleButtonInstanceApi = ToolbarToggleButtonInstanceApi;
|
|
1202
|
+
type PublicToolbar_d_GroupToolbarButtonSpec = GroupToolbarButtonSpec;
|
|
1203
|
+
type PublicToolbar_d_GroupToolbarButtonInstanceApi = GroupToolbarButtonInstanceApi;
|
|
1204
|
+
declare namespace PublicToolbar_d {
|
|
1205
|
+
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, };
|
|
1190
1206
|
}
|
|
1191
|
-
|
|
1192
|
-
|
|
1207
|
+
interface ViewButtonApi {
|
|
1208
|
+
setIcon: (newIcon: string) => void;
|
|
1193
1209
|
}
|
|
1194
|
-
interface
|
|
1195
|
-
|
|
1196
|
-
|
|
1210
|
+
interface ViewToggleButtonApi extends ViewButtonApi {
|
|
1211
|
+
isActive: () => boolean;
|
|
1212
|
+
setActive: (state: boolean) => void;
|
|
1197
1213
|
}
|
|
1198
|
-
|
|
1199
|
-
declare type SuccessCallback = (menu: string | MenuButtonItemTypes[]) => void;
|
|
1200
|
-
interface BaseMenuButtonSpec {
|
|
1214
|
+
interface BaseButtonSpec<Api extends ViewButtonApi> {
|
|
1201
1215
|
text?: string;
|
|
1202
|
-
tooltip?: string;
|
|
1203
1216
|
icon?: string;
|
|
1204
|
-
|
|
1205
|
-
|
|
1217
|
+
tooltip?: string;
|
|
1218
|
+
buttonType?: 'primary' | 'secondary';
|
|
1219
|
+
borderless?: boolean;
|
|
1220
|
+
onAction: (api: Api) => void;
|
|
1206
1221
|
}
|
|
1207
|
-
interface
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1222
|
+
interface ViewNormalButtonSpec extends BaseButtonSpec<ViewButtonApi> {
|
|
1223
|
+
text: string;
|
|
1224
|
+
type: 'button';
|
|
1225
|
+
}
|
|
1226
|
+
interface ViewToggleButtonSpec extends BaseButtonSpec<ViewToggleButtonApi> {
|
|
1227
|
+
type: 'togglebutton';
|
|
1228
|
+
active?: boolean;
|
|
1229
|
+
onAction: (api: ViewToggleButtonApi) => void;
|
|
1230
|
+
}
|
|
1231
|
+
interface ViewButtonsGroupSpec {
|
|
1232
|
+
type: 'group';
|
|
1233
|
+
buttons: Array<ViewNormalButtonSpec | ViewToggleButtonSpec>;
|
|
1234
|
+
}
|
|
1235
|
+
type ViewButtonSpec = ViewNormalButtonSpec | ViewToggleButtonSpec | ViewButtonsGroupSpec;
|
|
1236
|
+
interface ViewInstanceApi {
|
|
1237
|
+
getContainer: () => HTMLElement;
|
|
1238
|
+
}
|
|
1239
|
+
interface ViewSpec {
|
|
1240
|
+
buttons?: ViewButtonSpec[];
|
|
1241
|
+
onShow: (api: ViewInstanceApi) => void;
|
|
1242
|
+
onHide: (api: ViewInstanceApi) => void;
|
|
1243
|
+
}
|
|
1244
|
+
type PublicView_d_ViewSpec = ViewSpec;
|
|
1245
|
+
type PublicView_d_ViewInstanceApi = ViewInstanceApi;
|
|
1246
|
+
declare namespace PublicView_d {
|
|
1247
|
+
export { PublicView_d_ViewSpec as ViewSpec, PublicView_d_ViewInstanceApi as ViewInstanceApi, };
|
|
1248
|
+
}
|
|
1249
|
+
interface Registry$1 {
|
|
1250
|
+
addButton: (name: string, spec: ToolbarButtonSpec) => void;
|
|
1251
|
+
addGroupToolbarButton: (name: string, spec: GroupToolbarButtonSpec) => void;
|
|
1252
|
+
addToggleButton: (name: string, spec: ToolbarToggleButtonSpec) => void;
|
|
1253
|
+
addMenuButton: (name: string, spec: ToolbarMenuButtonSpec) => void;
|
|
1254
|
+
addSplitButton: (name: string, spec: ToolbarSplitButtonSpec) => void;
|
|
1255
|
+
addMenuItem: (name: string, spec: MenuItemSpec) => void;
|
|
1256
|
+
addNestedMenuItem: (name: string, spec: NestedMenuItemSpec) => void;
|
|
1257
|
+
addToggleMenuItem: (name: string, spec: ToggleMenuItemSpec) => void;
|
|
1258
|
+
addContextMenu: (name: string, spec: ContextMenuApi) => void;
|
|
1259
|
+
addContextToolbar: (name: string, spec: ContextToolbarSpec) => void;
|
|
1260
|
+
addContextForm: (name: string, spec: ContextFormSpec) => void;
|
|
1261
|
+
addIcon: (name: string, svgData: string) => void;
|
|
1262
|
+
addAutocompleter: (name: string, spec: AutocompleterSpec) => void;
|
|
1263
|
+
addSidebar: (name: string, spec: SidebarSpec) => void;
|
|
1264
|
+
addView: (name: string, spec: ViewSpec) => void;
|
|
1265
|
+
getAll: () => {
|
|
1266
|
+
buttons: Record<string, ToolbarButtonSpec | GroupToolbarButtonSpec | ToolbarMenuButtonSpec | ToolbarSplitButtonSpec | ToolbarToggleButtonSpec>;
|
|
1267
|
+
menuItems: Record<string, MenuItemSpec | NestedMenuItemSpec | ToggleMenuItemSpec>;
|
|
1268
|
+
popups: Record<string, AutocompleterSpec>;
|
|
1269
|
+
contextMenus: Record<string, ContextMenuApi>;
|
|
1270
|
+
contextToolbars: Record<string, ContextToolbarSpec | ContextFormSpec>;
|
|
1271
|
+
icons: Record<string, string>;
|
|
1272
|
+
sidebars: Record<string, SidebarSpec>;
|
|
1273
|
+
views: Record<string, ViewSpec>;
|
|
1274
|
+
};
|
|
1275
|
+
}
|
|
1276
|
+
interface AutocompleteLookupData {
|
|
1277
|
+
readonly matchText: string;
|
|
1278
|
+
readonly items: AutocompleterContents[];
|
|
1279
|
+
readonly columns: ColumnTypes;
|
|
1280
|
+
readonly onAction: (autoApi: AutocompleterInstanceApi, rng: Range, value: string, meta: Record<string, any>) => void;
|
|
1281
|
+
readonly highlightOn: string[];
|
|
1282
|
+
}
|
|
1283
|
+
interface AutocompleterEventArgs {
|
|
1284
|
+
readonly lookupData: AutocompleteLookupData[];
|
|
1285
|
+
}
|
|
1286
|
+
interface RangeLikeObject {
|
|
1287
|
+
startContainer: Node;
|
|
1288
|
+
startOffset: number;
|
|
1289
|
+
endContainer: Node;
|
|
1290
|
+
endOffset: number;
|
|
1291
|
+
}
|
|
1292
|
+
type ApplyFormat = BlockFormat | InlineFormat | SelectorFormat;
|
|
1293
|
+
type RemoveFormat = RemoveBlockFormat | RemoveInlineFormat | RemoveSelectorFormat;
|
|
1294
|
+
type Format = ApplyFormat | RemoveFormat;
|
|
1295
|
+
type Formats = Record<string, Format | Format[]>;
|
|
1296
|
+
type FormatAttrOrStyleValue = string | ((vars?: FormatVars) => string | null);
|
|
1297
|
+
type FormatVars = Record<string, string | null>;
|
|
1298
|
+
interface BaseFormat<T> {
|
|
1299
|
+
ceFalseOverride?: boolean;
|
|
1300
|
+
classes?: string | string[];
|
|
1301
|
+
collapsed?: boolean;
|
|
1302
|
+
exact?: boolean;
|
|
1303
|
+
expand?: boolean;
|
|
1304
|
+
links?: boolean;
|
|
1305
|
+
mixed?: boolean;
|
|
1306
|
+
block_expand?: boolean;
|
|
1307
|
+
onmatch?: (node: Element, fmt: T, itemName: string) => boolean;
|
|
1308
|
+
remove?: 'none' | 'empty' | 'all';
|
|
1309
|
+
remove_similar?: boolean;
|
|
1310
|
+
split?: boolean;
|
|
1311
|
+
deep?: boolean;
|
|
1312
|
+
preserve_attributes?: string[];
|
|
1313
|
+
}
|
|
1314
|
+
interface Block {
|
|
1315
|
+
block: string;
|
|
1316
|
+
list_block?: string;
|
|
1317
|
+
wrapper?: boolean;
|
|
1318
|
+
}
|
|
1319
|
+
interface Inline {
|
|
1320
|
+
inline: string;
|
|
1321
|
+
}
|
|
1322
|
+
interface Selector {
|
|
1323
|
+
selector: string;
|
|
1324
|
+
inherit?: boolean;
|
|
1325
|
+
}
|
|
1326
|
+
interface CommonFormat<T> extends BaseFormat<T> {
|
|
1327
|
+
attributes?: Record<string, FormatAttrOrStyleValue>;
|
|
1328
|
+
styles?: Record<string, FormatAttrOrStyleValue>;
|
|
1329
|
+
toggle?: boolean;
|
|
1330
|
+
preview?: string | false;
|
|
1331
|
+
onformat?: (elm: Element, fmt: T, vars?: FormatVars, node?: Node | RangeLikeObject | null) => void;
|
|
1332
|
+
clear_child_styles?: boolean;
|
|
1333
|
+
merge_siblings?: boolean;
|
|
1334
|
+
merge_with_parents?: boolean;
|
|
1335
|
+
}
|
|
1336
|
+
interface BlockFormat extends Block, CommonFormat<BlockFormat> {
|
|
1337
|
+
}
|
|
1338
|
+
interface InlineFormat extends Inline, CommonFormat<InlineFormat> {
|
|
1339
|
+
}
|
|
1340
|
+
interface SelectorFormat extends Selector, CommonFormat<SelectorFormat> {
|
|
1341
|
+
}
|
|
1342
|
+
interface CommonRemoveFormat<T> extends BaseFormat<T> {
|
|
1343
|
+
attributes?: string[] | Record<string, FormatAttrOrStyleValue>;
|
|
1344
|
+
styles?: string[] | Record<string, FormatAttrOrStyleValue>;
|
|
1345
|
+
}
|
|
1346
|
+
interface RemoveBlockFormat extends Block, CommonRemoveFormat<RemoveBlockFormat> {
|
|
1347
|
+
}
|
|
1348
|
+
interface RemoveInlineFormat extends Inline, CommonRemoveFormat<RemoveInlineFormat> {
|
|
1349
|
+
}
|
|
1350
|
+
interface RemoveSelectorFormat extends Selector, CommonRemoveFormat<RemoveSelectorFormat> {
|
|
1351
|
+
}
|
|
1352
|
+
interface Filter<C extends Function> {
|
|
1353
|
+
name: string;
|
|
1354
|
+
callbacks: C[];
|
|
1355
|
+
}
|
|
1356
|
+
interface ParserArgs {
|
|
1357
|
+
getInner?: boolean | number;
|
|
1358
|
+
forced_root_block?: boolean | string;
|
|
1359
|
+
context?: string;
|
|
1360
|
+
isRootContent?: boolean;
|
|
1361
|
+
format?: string;
|
|
1362
|
+
invalid?: boolean;
|
|
1363
|
+
no_events?: boolean;
|
|
1364
|
+
[key: string]: any;
|
|
1365
|
+
}
|
|
1366
|
+
type ParserFilterCallback = (nodes: AstNode[], name: string, args: ParserArgs) => void;
|
|
1367
|
+
interface ParserFilter extends Filter<ParserFilterCallback> {
|
|
1368
|
+
}
|
|
1369
|
+
interface DomParserSettings {
|
|
1370
|
+
allow_html_data_urls?: boolean;
|
|
1371
|
+
allow_svg_data_urls?: boolean;
|
|
1372
|
+
allow_conditional_comments?: boolean;
|
|
1373
|
+
allow_html_in_named_anchor?: boolean;
|
|
1374
|
+
allow_script_urls?: boolean;
|
|
1375
|
+
allow_unsafe_link_target?: boolean;
|
|
1376
|
+
blob_cache?: BlobCache;
|
|
1377
|
+
convert_fonts_to_spans?: boolean;
|
|
1378
|
+
convert_unsafe_embeds?: boolean;
|
|
1379
|
+
document?: Document;
|
|
1380
|
+
fix_list_elements?: boolean;
|
|
1381
|
+
font_size_legacy_values?: string;
|
|
1382
|
+
forced_root_block?: boolean | string;
|
|
1383
|
+
forced_root_block_attrs?: Record<string, string>;
|
|
1384
|
+
inline_styles?: boolean;
|
|
1385
|
+
pad_empty_with_br?: boolean;
|
|
1386
|
+
preserve_cdata?: boolean;
|
|
1387
|
+
remove_trailing_brs?: boolean;
|
|
1388
|
+
root_name?: string;
|
|
1389
|
+
sandbox_iframes?: boolean;
|
|
1390
|
+
sanitize?: boolean;
|
|
1391
|
+
validate?: boolean;
|
|
1392
|
+
}
|
|
1393
|
+
interface DomParser {
|
|
1394
|
+
schema: Schema;
|
|
1395
|
+
addAttributeFilter: (name: string, callback: ParserFilterCallback) => void;
|
|
1396
|
+
getAttributeFilters: () => ParserFilter[];
|
|
1397
|
+
removeAttributeFilter: (name: string, callback?: ParserFilterCallback) => void;
|
|
1398
|
+
addNodeFilter: (name: string, callback: ParserFilterCallback) => void;
|
|
1399
|
+
getNodeFilters: () => ParserFilter[];
|
|
1400
|
+
removeNodeFilter: (name: string, callback?: ParserFilterCallback) => void;
|
|
1401
|
+
parse: (html: string, args?: ParserArgs) => AstNode;
|
|
1402
|
+
}
|
|
1403
|
+
interface StyleSheetLoaderSettings {
|
|
1404
|
+
maxLoadTime?: number;
|
|
1405
|
+
contentCssCors?: boolean;
|
|
1406
|
+
referrerPolicy?: ReferrerPolicy;
|
|
1407
|
+
}
|
|
1408
|
+
interface StyleSheetLoader {
|
|
1409
|
+
load: (url: string) => Promise<void>;
|
|
1410
|
+
loadRawCss: (key: string, css: string) => void;
|
|
1411
|
+
loadAll: (urls: string[]) => Promise<string[]>;
|
|
1412
|
+
unload: (url: string) => void;
|
|
1413
|
+
unloadRawCss: (key: string) => void;
|
|
1414
|
+
unloadAll: (urls: string[]) => void;
|
|
1415
|
+
_setReferrerPolicy: (referrerPolicy: ReferrerPolicy) => void;
|
|
1416
|
+
_setContentCssCors: (contentCssCors: boolean) => void;
|
|
1417
|
+
}
|
|
1418
|
+
type Registry = Registry$1;
|
|
1419
|
+
interface EditorUiApi {
|
|
1420
|
+
show: () => void;
|
|
1421
|
+
hide: () => void;
|
|
1422
|
+
setEnabled: (state: boolean) => void;
|
|
1423
|
+
isEnabled: () => boolean;
|
|
1424
|
+
}
|
|
1425
|
+
interface EditorUi extends EditorUiApi {
|
|
1426
|
+
registry: Registry;
|
|
1427
|
+
styleSheetLoader: StyleSheetLoader;
|
|
1428
|
+
}
|
|
1429
|
+
type Ui_d_Registry = Registry;
|
|
1430
|
+
type Ui_d_EditorUiApi = EditorUiApi;
|
|
1431
|
+
type Ui_d_EditorUi = EditorUi;
|
|
1432
|
+
declare namespace Ui_d {
|
|
1433
|
+
export { Ui_d_Registry as Registry, PublicDialog_d as Dialog, PublicInlineContent_d as InlineContent, PublicMenu_d as Menu, PublicView_d as View, PublicSidebar_d as Sidebar, PublicToolbar_d as Toolbar, Ui_d_EditorUiApi as EditorUiApi, Ui_d_EditorUi as EditorUi, };
|
|
1434
|
+
}
|
|
1435
|
+
interface WindowParams {
|
|
1436
|
+
readonly inline?: 'cursor' | 'toolbar' | 'bottom';
|
|
1437
|
+
readonly ariaAttrs?: boolean;
|
|
1438
|
+
readonly persistent?: boolean;
|
|
1439
|
+
}
|
|
1440
|
+
type InstanceApi<T extends DialogData> = UrlDialogInstanceApi | DialogInstanceApi<T>;
|
|
1441
|
+
interface WindowManagerImpl {
|
|
1442
|
+
open: <T extends DialogData>(config: DialogSpec<T>, params: WindowParams | undefined, closeWindow: (dialog: DialogInstanceApi<T>) => void) => DialogInstanceApi<T>;
|
|
1443
|
+
openUrl: (config: UrlDialogSpec, closeWindow: (dialog: UrlDialogInstanceApi) => void) => UrlDialogInstanceApi;
|
|
1444
|
+
alert: (message: string, callback: () => void) => void;
|
|
1445
|
+
confirm: (message: string, callback: (state: boolean) => void) => void;
|
|
1446
|
+
close: (dialog: InstanceApi<any>) => void;
|
|
1447
|
+
}
|
|
1448
|
+
interface WindowManager {
|
|
1449
|
+
open: <T extends DialogData>(config: DialogSpec<T>, params?: WindowParams) => DialogInstanceApi<T>;
|
|
1450
|
+
openUrl: (config: UrlDialogSpec) => UrlDialogInstanceApi;
|
|
1451
|
+
alert: (message: string, callback?: () => void, scope?: any) => void;
|
|
1452
|
+
confirm: (message: string, callback?: (state: boolean) => void, scope?: any) => void;
|
|
1453
|
+
close: () => void;
|
|
1454
|
+
}
|
|
1455
|
+
interface ExecCommandEvent {
|
|
1456
|
+
command: string;
|
|
1457
|
+
ui: boolean;
|
|
1458
|
+
value?: any;
|
|
1459
|
+
}
|
|
1460
|
+
interface BeforeGetContentEvent extends GetContentArgs {
|
|
1461
|
+
selection?: boolean;
|
|
1462
|
+
}
|
|
1463
|
+
interface GetContentEvent extends BeforeGetContentEvent {
|
|
1464
|
+
content: string;
|
|
1465
|
+
}
|
|
1466
|
+
interface BeforeSetContentEvent extends SetContentArgs {
|
|
1467
|
+
content: string;
|
|
1468
|
+
selection?: boolean;
|
|
1469
|
+
}
|
|
1470
|
+
interface SetContentEvent extends BeforeSetContentEvent {
|
|
1471
|
+
content: string;
|
|
1472
|
+
}
|
|
1473
|
+
interface SaveContentEvent extends GetContentEvent {
|
|
1474
|
+
save: boolean;
|
|
1475
|
+
}
|
|
1476
|
+
interface NewBlockEvent {
|
|
1477
|
+
newBlock: Element;
|
|
1478
|
+
}
|
|
1479
|
+
interface NodeChangeEvent {
|
|
1480
|
+
element: Element;
|
|
1481
|
+
parents: Node[];
|
|
1482
|
+
selectionChange?: boolean;
|
|
1483
|
+
initial?: boolean;
|
|
1484
|
+
}
|
|
1485
|
+
interface FormatEvent {
|
|
1486
|
+
format: string;
|
|
1487
|
+
vars?: FormatVars;
|
|
1488
|
+
node?: Node | RangeLikeObject | null;
|
|
1489
|
+
}
|
|
1490
|
+
interface ObjectResizeEvent {
|
|
1491
|
+
target: HTMLElement;
|
|
1492
|
+
width: number;
|
|
1493
|
+
height: number;
|
|
1494
|
+
origin: string;
|
|
1495
|
+
}
|
|
1496
|
+
interface ObjectSelectedEvent {
|
|
1497
|
+
target: Node;
|
|
1498
|
+
targetClone?: Node;
|
|
1499
|
+
}
|
|
1500
|
+
interface ScrollIntoViewEvent {
|
|
1501
|
+
elm: HTMLElement;
|
|
1502
|
+
alignToTop: boolean | undefined;
|
|
1503
|
+
}
|
|
1504
|
+
interface SetSelectionRangeEvent {
|
|
1505
|
+
range: Range;
|
|
1506
|
+
forward: boolean | undefined;
|
|
1507
|
+
}
|
|
1508
|
+
interface ShowCaretEvent {
|
|
1509
|
+
target: Node;
|
|
1510
|
+
direction: number;
|
|
1511
|
+
before: boolean;
|
|
1512
|
+
}
|
|
1513
|
+
interface SwitchModeEvent {
|
|
1514
|
+
mode: string;
|
|
1515
|
+
}
|
|
1516
|
+
interface ChangeEvent {
|
|
1517
|
+
level: UndoLevel;
|
|
1518
|
+
lastLevel: UndoLevel | undefined;
|
|
1519
|
+
}
|
|
1520
|
+
interface AddUndoEvent extends ChangeEvent {
|
|
1521
|
+
originalEvent: Event | undefined;
|
|
1522
|
+
}
|
|
1523
|
+
interface UndoRedoEvent {
|
|
1524
|
+
level: UndoLevel;
|
|
1525
|
+
}
|
|
1526
|
+
interface WindowEvent<T extends DialogData> {
|
|
1527
|
+
dialog: InstanceApi<T>;
|
|
1528
|
+
}
|
|
1529
|
+
interface ProgressStateEvent {
|
|
1530
|
+
state: boolean;
|
|
1531
|
+
time?: number;
|
|
1532
|
+
}
|
|
1533
|
+
interface AfterProgressStateEvent {
|
|
1534
|
+
state: boolean;
|
|
1535
|
+
}
|
|
1536
|
+
interface PlaceholderToggleEvent {
|
|
1537
|
+
state: boolean;
|
|
1538
|
+
}
|
|
1539
|
+
interface LoadErrorEvent {
|
|
1540
|
+
message: string;
|
|
1541
|
+
}
|
|
1542
|
+
interface PreProcessEvent extends ParserArgs {
|
|
1543
|
+
node: Element;
|
|
1544
|
+
}
|
|
1545
|
+
interface PostProcessEvent extends ParserArgs {
|
|
1546
|
+
content: string;
|
|
1547
|
+
}
|
|
1548
|
+
interface PastePlainTextToggleEvent {
|
|
1549
|
+
state: boolean;
|
|
1550
|
+
}
|
|
1551
|
+
interface PastePreProcessEvent {
|
|
1552
|
+
content: string;
|
|
1553
|
+
readonly internal: boolean;
|
|
1554
|
+
}
|
|
1555
|
+
interface PastePostProcessEvent {
|
|
1556
|
+
node: HTMLElement;
|
|
1557
|
+
readonly internal: boolean;
|
|
1558
|
+
}
|
|
1559
|
+
interface EditableRootStateChangeEvent {
|
|
1560
|
+
state: boolean;
|
|
1561
|
+
}
|
|
1562
|
+
interface NewTableRowEvent {
|
|
1563
|
+
node: HTMLTableRowElement;
|
|
1564
|
+
}
|
|
1565
|
+
interface NewTableCellEvent {
|
|
1566
|
+
node: HTMLTableCellElement;
|
|
1567
|
+
}
|
|
1568
|
+
interface TableEventData {
|
|
1569
|
+
readonly structure: boolean;
|
|
1570
|
+
readonly style: boolean;
|
|
1571
|
+
}
|
|
1572
|
+
interface TableModifiedEvent extends TableEventData {
|
|
1573
|
+
readonly table: HTMLTableElement;
|
|
1574
|
+
}
|
|
1575
|
+
interface BeforeOpenNotificationEvent {
|
|
1576
|
+
notification: NotificationSpec;
|
|
1577
|
+
}
|
|
1578
|
+
interface OpenNotificationEvent {
|
|
1579
|
+
notification: NotificationApi;
|
|
1580
|
+
}
|
|
1581
|
+
interface EditorEventMap extends Omit<NativeEventMap, 'blur' | 'focus'> {
|
|
1582
|
+
'activate': {
|
|
1583
|
+
relatedTarget: Editor | null;
|
|
1584
|
+
};
|
|
1585
|
+
'deactivate': {
|
|
1586
|
+
relatedTarget: Editor;
|
|
1587
|
+
};
|
|
1588
|
+
'focus': {
|
|
1589
|
+
blurredEditor: Editor | null;
|
|
1590
|
+
};
|
|
1591
|
+
'blur': {
|
|
1592
|
+
focusedEditor: Editor | null;
|
|
1593
|
+
};
|
|
1594
|
+
'resize': UIEvent;
|
|
1595
|
+
'scroll': UIEvent;
|
|
1596
|
+
'input': InputEvent;
|
|
1597
|
+
'beforeinput': InputEvent;
|
|
1598
|
+
'detach': {};
|
|
1599
|
+
'remove': {};
|
|
1600
|
+
'init': {};
|
|
1601
|
+
'ScrollIntoView': ScrollIntoViewEvent;
|
|
1602
|
+
'AfterScrollIntoView': ScrollIntoViewEvent;
|
|
1603
|
+
'ObjectResized': ObjectResizeEvent;
|
|
1604
|
+
'ObjectResizeStart': ObjectResizeEvent;
|
|
1605
|
+
'SwitchMode': SwitchModeEvent;
|
|
1606
|
+
'ScrollWindow': Event;
|
|
1607
|
+
'ResizeWindow': UIEvent;
|
|
1608
|
+
'SkinLoaded': {};
|
|
1609
|
+
'SkinLoadError': LoadErrorEvent;
|
|
1610
|
+
'PluginLoadError': LoadErrorEvent;
|
|
1611
|
+
'ModelLoadError': LoadErrorEvent;
|
|
1612
|
+
'IconsLoadError': LoadErrorEvent;
|
|
1613
|
+
'ThemeLoadError': LoadErrorEvent;
|
|
1614
|
+
'LanguageLoadError': LoadErrorEvent;
|
|
1615
|
+
'BeforeExecCommand': ExecCommandEvent;
|
|
1616
|
+
'ExecCommand': ExecCommandEvent;
|
|
1617
|
+
'NodeChange': NodeChangeEvent;
|
|
1618
|
+
'FormatApply': FormatEvent;
|
|
1619
|
+
'FormatRemove': FormatEvent;
|
|
1620
|
+
'ShowCaret': ShowCaretEvent;
|
|
1621
|
+
'SelectionChange': {};
|
|
1622
|
+
'ObjectSelected': ObjectSelectedEvent;
|
|
1623
|
+
'BeforeObjectSelected': ObjectSelectedEvent;
|
|
1624
|
+
'GetSelectionRange': {
|
|
1625
|
+
range: Range;
|
|
1626
|
+
};
|
|
1627
|
+
'SetSelectionRange': SetSelectionRangeEvent;
|
|
1628
|
+
'AfterSetSelectionRange': SetSelectionRangeEvent;
|
|
1629
|
+
'BeforeGetContent': BeforeGetContentEvent;
|
|
1630
|
+
'GetContent': GetContentEvent;
|
|
1631
|
+
'BeforeSetContent': BeforeSetContentEvent;
|
|
1632
|
+
'SetContent': SetContentEvent;
|
|
1633
|
+
'SaveContent': SaveContentEvent;
|
|
1634
|
+
'RawSaveContent': SaveContentEvent;
|
|
1635
|
+
'LoadContent': {
|
|
1636
|
+
load: boolean;
|
|
1637
|
+
element: HTMLElement;
|
|
1638
|
+
};
|
|
1639
|
+
'PreviewFormats': {};
|
|
1640
|
+
'AfterPreviewFormats': {};
|
|
1641
|
+
'ScriptsLoaded': {};
|
|
1642
|
+
'PreInit': {};
|
|
1643
|
+
'PostRender': {};
|
|
1644
|
+
'NewBlock': NewBlockEvent;
|
|
1645
|
+
'ClearUndos': {};
|
|
1646
|
+
'TypingUndo': {};
|
|
1647
|
+
'Redo': UndoRedoEvent;
|
|
1648
|
+
'Undo': UndoRedoEvent;
|
|
1649
|
+
'BeforeAddUndo': AddUndoEvent;
|
|
1650
|
+
'AddUndo': AddUndoEvent;
|
|
1651
|
+
'change': ChangeEvent;
|
|
1652
|
+
'CloseWindow': WindowEvent<any>;
|
|
1653
|
+
'OpenWindow': WindowEvent<any>;
|
|
1654
|
+
'ProgressState': ProgressStateEvent;
|
|
1655
|
+
'AfterProgressState': AfterProgressStateEvent;
|
|
1656
|
+
'PlaceholderToggle': PlaceholderToggleEvent;
|
|
1657
|
+
'tap': TouchEvent;
|
|
1658
|
+
'longpress': TouchEvent;
|
|
1659
|
+
'longpresscancel': {};
|
|
1660
|
+
'PreProcess': PreProcessEvent;
|
|
1661
|
+
'PostProcess': PostProcessEvent;
|
|
1662
|
+
'AutocompleterStart': AutocompleterEventArgs;
|
|
1663
|
+
'AutocompleterUpdate': AutocompleterEventArgs;
|
|
1664
|
+
'AutocompleterEnd': {};
|
|
1665
|
+
'PastePlainTextToggle': PastePlainTextToggleEvent;
|
|
1666
|
+
'PastePreProcess': PastePreProcessEvent;
|
|
1667
|
+
'PastePostProcess': PastePostProcessEvent;
|
|
1668
|
+
'TableModified': TableModifiedEvent;
|
|
1669
|
+
'NewRow': NewTableRowEvent;
|
|
1670
|
+
'NewCell': NewTableCellEvent;
|
|
1671
|
+
'SetAttrib': SetAttribEvent;
|
|
1672
|
+
'hide': {};
|
|
1673
|
+
'show': {};
|
|
1674
|
+
'dirty': {};
|
|
1675
|
+
'BeforeOpenNotification': BeforeOpenNotificationEvent;
|
|
1676
|
+
'OpenNotification': OpenNotificationEvent;
|
|
1677
|
+
}
|
|
1678
|
+
interface EditorManagerEventMap {
|
|
1679
|
+
'AddEditor': {
|
|
1680
|
+
editor: Editor;
|
|
1681
|
+
};
|
|
1682
|
+
'RemoveEditor': {
|
|
1683
|
+
editor: Editor;
|
|
1684
|
+
};
|
|
1685
|
+
'BeforeUnload': {
|
|
1686
|
+
returnValue: any;
|
|
1687
|
+
};
|
|
1688
|
+
}
|
|
1689
|
+
type EventTypes_d_ExecCommandEvent = ExecCommandEvent;
|
|
1690
|
+
type EventTypes_d_BeforeGetContentEvent = BeforeGetContentEvent;
|
|
1691
|
+
type EventTypes_d_GetContentEvent = GetContentEvent;
|
|
1692
|
+
type EventTypes_d_BeforeSetContentEvent = BeforeSetContentEvent;
|
|
1693
|
+
type EventTypes_d_SetContentEvent = SetContentEvent;
|
|
1694
|
+
type EventTypes_d_SaveContentEvent = SaveContentEvent;
|
|
1695
|
+
type EventTypes_d_NewBlockEvent = NewBlockEvent;
|
|
1696
|
+
type EventTypes_d_NodeChangeEvent = NodeChangeEvent;
|
|
1697
|
+
type EventTypes_d_FormatEvent = FormatEvent;
|
|
1698
|
+
type EventTypes_d_ObjectResizeEvent = ObjectResizeEvent;
|
|
1699
|
+
type EventTypes_d_ObjectSelectedEvent = ObjectSelectedEvent;
|
|
1700
|
+
type EventTypes_d_ScrollIntoViewEvent = ScrollIntoViewEvent;
|
|
1701
|
+
type EventTypes_d_SetSelectionRangeEvent = SetSelectionRangeEvent;
|
|
1702
|
+
type EventTypes_d_ShowCaretEvent = ShowCaretEvent;
|
|
1703
|
+
type EventTypes_d_SwitchModeEvent = SwitchModeEvent;
|
|
1704
|
+
type EventTypes_d_ChangeEvent = ChangeEvent;
|
|
1705
|
+
type EventTypes_d_AddUndoEvent = AddUndoEvent;
|
|
1706
|
+
type EventTypes_d_UndoRedoEvent = UndoRedoEvent;
|
|
1707
|
+
type EventTypes_d_WindowEvent<T extends DialogData> = WindowEvent<T>;
|
|
1708
|
+
type EventTypes_d_ProgressStateEvent = ProgressStateEvent;
|
|
1709
|
+
type EventTypes_d_AfterProgressStateEvent = AfterProgressStateEvent;
|
|
1710
|
+
type EventTypes_d_PlaceholderToggleEvent = PlaceholderToggleEvent;
|
|
1711
|
+
type EventTypes_d_LoadErrorEvent = LoadErrorEvent;
|
|
1712
|
+
type EventTypes_d_PreProcessEvent = PreProcessEvent;
|
|
1713
|
+
type EventTypes_d_PostProcessEvent = PostProcessEvent;
|
|
1714
|
+
type EventTypes_d_PastePlainTextToggleEvent = PastePlainTextToggleEvent;
|
|
1715
|
+
type EventTypes_d_PastePreProcessEvent = PastePreProcessEvent;
|
|
1716
|
+
type EventTypes_d_PastePostProcessEvent = PastePostProcessEvent;
|
|
1717
|
+
type EventTypes_d_EditableRootStateChangeEvent = EditableRootStateChangeEvent;
|
|
1718
|
+
type EventTypes_d_NewTableRowEvent = NewTableRowEvent;
|
|
1719
|
+
type EventTypes_d_NewTableCellEvent = NewTableCellEvent;
|
|
1720
|
+
type EventTypes_d_TableEventData = TableEventData;
|
|
1721
|
+
type EventTypes_d_TableModifiedEvent = TableModifiedEvent;
|
|
1722
|
+
type EventTypes_d_BeforeOpenNotificationEvent = BeforeOpenNotificationEvent;
|
|
1723
|
+
type EventTypes_d_OpenNotificationEvent = OpenNotificationEvent;
|
|
1724
|
+
type EventTypes_d_EditorEventMap = EditorEventMap;
|
|
1725
|
+
type EventTypes_d_EditorManagerEventMap = EditorManagerEventMap;
|
|
1726
|
+
declare namespace EventTypes_d {
|
|
1727
|
+
export { EventTypes_d_ExecCommandEvent as ExecCommandEvent, EventTypes_d_BeforeGetContentEvent as BeforeGetContentEvent, EventTypes_d_GetContentEvent as GetContentEvent, EventTypes_d_BeforeSetContentEvent as BeforeSetContentEvent, EventTypes_d_SetContentEvent as SetContentEvent, EventTypes_d_SaveContentEvent as SaveContentEvent, EventTypes_d_NewBlockEvent as NewBlockEvent, EventTypes_d_NodeChangeEvent as NodeChangeEvent, EventTypes_d_FormatEvent as FormatEvent, 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_ChangeEvent as ChangeEvent, EventTypes_d_AddUndoEvent as AddUndoEvent, EventTypes_d_UndoRedoEvent as UndoRedoEvent, EventTypes_d_WindowEvent as WindowEvent, EventTypes_d_ProgressStateEvent as ProgressStateEvent, EventTypes_d_AfterProgressStateEvent as AfterProgressStateEvent, EventTypes_d_PlaceholderToggleEvent as PlaceholderToggleEvent, EventTypes_d_LoadErrorEvent as LoadErrorEvent, EventTypes_d_PreProcessEvent as PreProcessEvent, EventTypes_d_PostProcessEvent as PostProcessEvent, EventTypes_d_PastePlainTextToggleEvent as PastePlainTextToggleEvent, EventTypes_d_PastePreProcessEvent as PastePreProcessEvent, EventTypes_d_PastePostProcessEvent as PastePostProcessEvent, EventTypes_d_EditableRootStateChangeEvent as EditableRootStateChangeEvent, EventTypes_d_NewTableRowEvent as NewTableRowEvent, EventTypes_d_NewTableCellEvent as NewTableCellEvent, EventTypes_d_TableEventData as TableEventData, EventTypes_d_TableModifiedEvent as TableModifiedEvent, EventTypes_d_BeforeOpenNotificationEvent as BeforeOpenNotificationEvent, EventTypes_d_OpenNotificationEvent as OpenNotificationEvent, EventTypes_d_EditorEventMap as EditorEventMap, EventTypes_d_EditorManagerEventMap as EditorManagerEventMap, };
|
|
1212
1728
|
}
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1729
|
+
type Format_d_Formats = Formats;
|
|
1730
|
+
type Format_d_Format = Format;
|
|
1731
|
+
type Format_d_ApplyFormat = ApplyFormat;
|
|
1732
|
+
type Format_d_BlockFormat = BlockFormat;
|
|
1733
|
+
type Format_d_InlineFormat = InlineFormat;
|
|
1734
|
+
type Format_d_SelectorFormat = SelectorFormat;
|
|
1735
|
+
type Format_d_RemoveFormat = RemoveFormat;
|
|
1736
|
+
type Format_d_RemoveBlockFormat = RemoveBlockFormat;
|
|
1737
|
+
type Format_d_RemoveInlineFormat = RemoveInlineFormat;
|
|
1738
|
+
type Format_d_RemoveSelectorFormat = RemoveSelectorFormat;
|
|
1739
|
+
declare namespace Format_d {
|
|
1740
|
+
export { Format_d_Formats as Formats, Format_d_Format as Format, Format_d_ApplyFormat as ApplyFormat, Format_d_BlockFormat as BlockFormat, Format_d_InlineFormat as InlineFormat, Format_d_SelectorFormat as SelectorFormat, Format_d_RemoveFormat as RemoveFormat, Format_d_RemoveBlockFormat as RemoveBlockFormat, Format_d_RemoveInlineFormat as RemoveInlineFormat, Format_d_RemoveSelectorFormat as RemoveSelectorFormat, };
|
|
1216
1741
|
}
|
|
1217
|
-
|
|
1742
|
+
type StyleFormat = BlockStyleFormat | InlineStyleFormat | SelectorStyleFormat;
|
|
1743
|
+
type AllowedFormat = Separator | FormatReference | StyleFormat | NestedFormatting;
|
|
1744
|
+
interface Separator {
|
|
1745
|
+
title: string;
|
|
1218
1746
|
}
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
declare type PresetTypes = 'color' | 'normal' | 'listpreview';
|
|
1223
|
-
declare type ColumnTypes$1 = number | 'auto';
|
|
1224
|
-
interface ToolbarSplitButtonSpec {
|
|
1225
|
-
type?: 'splitbutton';
|
|
1226
|
-
tooltip?: string;
|
|
1747
|
+
interface FormatReference {
|
|
1748
|
+
title: string;
|
|
1749
|
+
format: string;
|
|
1227
1750
|
icon?: string;
|
|
1228
|
-
text?: string;
|
|
1229
|
-
select?: SelectPredicate;
|
|
1230
|
-
presets?: PresetTypes;
|
|
1231
|
-
columns?: ColumnTypes$1;
|
|
1232
|
-
fetch: (success: SuccessCallback$1) => void;
|
|
1233
|
-
onSetup?: (api: ToolbarSplitButtonInstanceApi) => (api: ToolbarSplitButtonInstanceApi) => void;
|
|
1234
|
-
onAction: (api: ToolbarSplitButtonInstanceApi) => void;
|
|
1235
|
-
onItemAction: (api: ToolbarSplitButtonInstanceApi, value: string) => void;
|
|
1236
|
-
}
|
|
1237
|
-
interface ToolbarSplitButtonInstanceApi {
|
|
1238
|
-
isDisabled: () => boolean;
|
|
1239
|
-
setDisabled: (state: boolean) => void;
|
|
1240
|
-
setIconFill: (id: string, value: string) => void;
|
|
1241
|
-
setIconStroke: (id: string, value: string) => void;
|
|
1242
|
-
isActive: () => boolean;
|
|
1243
|
-
setActive: (state: boolean) => void;
|
|
1244
|
-
}
|
|
1245
|
-
type PublicToolbar_d_ToolbarButtonSpec = ToolbarButtonSpec;
|
|
1246
|
-
type PublicToolbar_d_ToolbarButtonInstanceApi = ToolbarButtonInstanceApi;
|
|
1247
|
-
type PublicToolbar_d_ToolbarSplitButtonSpec = ToolbarSplitButtonSpec;
|
|
1248
|
-
type PublicToolbar_d_ToolbarSplitButtonInstanceApi = ToolbarSplitButtonInstanceApi;
|
|
1249
|
-
type PublicToolbar_d_ToolbarMenuButtonSpec = ToolbarMenuButtonSpec;
|
|
1250
|
-
type PublicToolbar_d_ToolbarMenuButtonInstanceApi = ToolbarMenuButtonInstanceApi;
|
|
1251
|
-
type PublicToolbar_d_ToolbarToggleButtonSpec = ToolbarToggleButtonSpec;
|
|
1252
|
-
type PublicToolbar_d_ToolbarToggleButtonInstanceApi = ToolbarToggleButtonInstanceApi;
|
|
1253
|
-
type PublicToolbar_d_GroupToolbarButtonSpec = GroupToolbarButtonSpec;
|
|
1254
|
-
type PublicToolbar_d_GroupToolbarButtonInstanceApi = GroupToolbarButtonInstanceApi;
|
|
1255
|
-
declare namespace PublicToolbar_d {
|
|
1256
|
-
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, };
|
|
1257
1751
|
}
|
|
1258
|
-
interface
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
addToggleButton: (name: string, spec: ToolbarToggleButtonSpec) => void;
|
|
1262
|
-
addMenuButton: (name: string, spec: ToolbarMenuButtonSpec) => void;
|
|
1263
|
-
addSplitButton: (name: string, spec: ToolbarSplitButtonSpec) => void;
|
|
1264
|
-
addMenuItem: (name: string, spec: MenuItemSpec) => void;
|
|
1265
|
-
addNestedMenuItem: (name: string, spec: NestedMenuItemSpec) => void;
|
|
1266
|
-
addToggleMenuItem: (name: string, spec: ToggleMenuItemSpec) => void;
|
|
1267
|
-
addContextMenu: (name: string, spec: ContextMenuApi) => void;
|
|
1268
|
-
addContextToolbar: (name: string, spec: ContextToolbarSpec) => void;
|
|
1269
|
-
addContextForm: (name: string, spec: ContextFormSpec) => void;
|
|
1270
|
-
addIcon: (name: string, svgData: string) => void;
|
|
1271
|
-
addAutocompleter: (name: string, spec: AutocompleterSpec) => void;
|
|
1272
|
-
addSidebar: (name: string, spec: SidebarSpec) => void;
|
|
1273
|
-
getAll: () => {
|
|
1274
|
-
buttons: Record<string, ToolbarButtonSpec | GroupToolbarButtonSpec | ToolbarMenuButtonSpec | ToolbarSplitButtonSpec | ToolbarToggleButtonSpec>;
|
|
1275
|
-
menuItems: Record<string, MenuItemSpec | NestedMenuItemSpec | ToggleMenuItemSpec>;
|
|
1276
|
-
popups: Record<string, AutocompleterSpec>;
|
|
1277
|
-
contextMenus: Record<string, ContextMenuApi>;
|
|
1278
|
-
contextToolbars: Record<string, ContextToolbarSpec | ContextFormSpec>;
|
|
1279
|
-
icons: Record<string, string>;
|
|
1280
|
-
sidebars: Record<string, SidebarSpec>;
|
|
1281
|
-
};
|
|
1752
|
+
interface NestedFormatting {
|
|
1753
|
+
title: string;
|
|
1754
|
+
items: Array<FormatReference | StyleFormat>;
|
|
1282
1755
|
}
|
|
1283
|
-
interface
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
unloadAll: (urls: string[]) => void;
|
|
1288
|
-
_setReferrerPolicy: (referrerPolicy: ReferrerPolicy) => void;
|
|
1756
|
+
interface CommonStyleFormat {
|
|
1757
|
+
name?: string;
|
|
1758
|
+
title: string;
|
|
1759
|
+
icon?: string;
|
|
1289
1760
|
}
|
|
1290
|
-
interface
|
|
1291
|
-
maxLoadTime?: number;
|
|
1292
|
-
contentCssCors?: boolean;
|
|
1293
|
-
referrerPolicy?: ReferrerPolicy;
|
|
1761
|
+
interface BlockStyleFormat extends BlockFormat, CommonStyleFormat {
|
|
1294
1762
|
}
|
|
1295
|
-
|
|
1296
|
-
interface EditorUiApi {
|
|
1297
|
-
show: () => void;
|
|
1298
|
-
hide: () => void;
|
|
1299
|
-
enable: () => void;
|
|
1300
|
-
disable: () => void;
|
|
1301
|
-
isDisabled: () => boolean;
|
|
1763
|
+
interface InlineStyleFormat extends InlineFormat, CommonStyleFormat {
|
|
1302
1764
|
}
|
|
1303
|
-
interface
|
|
1304
|
-
registry: Registry$1;
|
|
1305
|
-
styleSheetLoader: StyleSheetLoader;
|
|
1765
|
+
interface SelectorStyleFormat extends SelectorFormat, CommonStyleFormat {
|
|
1306
1766
|
}
|
|
1307
|
-
type
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1767
|
+
type EntityEncoding = 'named' | 'numeric' | 'raw' | 'named,numeric' | 'named+numeric' | 'numeric,named' | 'numeric+named';
|
|
1768
|
+
interface ContentLanguage {
|
|
1769
|
+
readonly title: string;
|
|
1770
|
+
readonly code: string;
|
|
1771
|
+
readonly customCode?: string;
|
|
1311
1772
|
}
|
|
1312
|
-
|
|
1313
|
-
declare type ThemeInitFunc = (editor: Editor, elm: HTMLElement) => {
|
|
1773
|
+
type ThemeInitFunc = (editor: Editor, elm: HTMLElement) => {
|
|
1314
1774
|
editorContainer: HTMLElement;
|
|
1315
1775
|
iframeContainer: HTMLElement;
|
|
1316
1776
|
height?: number;
|
|
1317
1777
|
iframeHeight?: number;
|
|
1318
1778
|
api?: EditorUiApi;
|
|
1319
1779
|
};
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1780
|
+
type SetupCallback = (editor: Editor) => void;
|
|
1781
|
+
type FilePickerCallback = (callback: (value: string, meta?: Record<string, any>) => void, value: string, meta: Record<string, any>) => void;
|
|
1782
|
+
type FilePickerValidationStatus = 'valid' | 'unknown' | 'invalid' | 'none';
|
|
1783
|
+
type FilePickerValidationCallback = (info: {
|
|
1324
1784
|
type: string;
|
|
1325
1785
|
url: string;
|
|
1326
1786
|
}, callback: (validation: {
|
|
1327
1787
|
status: FilePickerValidationStatus;
|
|
1328
1788
|
message: string;
|
|
1329
1789
|
}) => void) => void;
|
|
1330
|
-
|
|
1331
|
-
|
|
1790
|
+
type PastePreProcessFn = (editor: Editor, args: PastePreProcessEvent) => void;
|
|
1791
|
+
type PastePostProcessFn = (editor: Editor, args: PastePostProcessEvent) => void;
|
|
1792
|
+
type URLConverter = (url: string, name: string, elm?: string | Element) => string;
|
|
1793
|
+
type URLConverterCallback = (url: string, node: Node | string | undefined, on_save: boolean, name: string) => string;
|
|
1332
1794
|
interface ToolbarGroup {
|
|
1333
1795
|
name?: string;
|
|
1334
1796
|
items: string[];
|
|
1335
1797
|
}
|
|
1336
|
-
|
|
1337
|
-
|
|
1798
|
+
type ToolbarMode = 'floating' | 'sliding' | 'scrolling' | 'wrap';
|
|
1799
|
+
type ToolbarLocation = 'top' | 'bottom' | 'auto';
|
|
1800
|
+
type ForceHexColor = 'always' | 'rgb_only' | 'off';
|
|
1801
|
+
interface BaseEditorOptions {
|
|
1802
|
+
a11y_advanced_options?: boolean;
|
|
1338
1803
|
add_form_submit_trigger?: boolean;
|
|
1339
1804
|
add_unload_trigger?: boolean;
|
|
1340
1805
|
allow_conditional_comments?: boolean;
|
|
@@ -1358,27 +1823,39 @@ interface BaseEditorSettings {
|
|
|
1358
1823
|
branding?: boolean;
|
|
1359
1824
|
cache_suffix?: string;
|
|
1360
1825
|
color_cols?: number;
|
|
1826
|
+
color_cols_foreground?: number;
|
|
1827
|
+
color_cols_background?: number;
|
|
1361
1828
|
color_map?: string[];
|
|
1829
|
+
color_map_foreground?: string[];
|
|
1830
|
+
color_map_background?: string[];
|
|
1831
|
+
color_default_foreground?: string;
|
|
1832
|
+
color_default_background?: string;
|
|
1362
1833
|
content_css?: boolean | string | string[];
|
|
1363
1834
|
content_css_cors?: boolean;
|
|
1364
1835
|
content_security_policy?: string;
|
|
1365
1836
|
content_style?: string;
|
|
1366
|
-
|
|
1367
|
-
contextmenu?: string | false;
|
|
1837
|
+
content_langs?: ContentLanguage[];
|
|
1838
|
+
contextmenu?: string | string[] | false;
|
|
1368
1839
|
contextmenu_never_use_native?: boolean;
|
|
1369
1840
|
convert_fonts_to_spans?: boolean;
|
|
1841
|
+
convert_unsafe_embeds?: boolean;
|
|
1370
1842
|
convert_urls?: boolean;
|
|
1371
1843
|
custom_colors?: boolean;
|
|
1372
1844
|
custom_elements?: string;
|
|
1373
1845
|
custom_ui_selector?: string;
|
|
1374
1846
|
custom_undo_redo_levels?: number;
|
|
1847
|
+
default_font_stack?: string[];
|
|
1848
|
+
deprecation_warnings?: boolean;
|
|
1375
1849
|
directionality?: 'ltr' | 'rtl';
|
|
1376
1850
|
doctype?: string;
|
|
1377
1851
|
document_base_url?: string;
|
|
1852
|
+
draggable_modal?: boolean;
|
|
1853
|
+
editable_class?: string;
|
|
1854
|
+
editable_root?: boolean;
|
|
1378
1855
|
element_format?: 'xhtml' | 'html';
|
|
1379
1856
|
elementpath?: boolean;
|
|
1380
1857
|
encoding?: string;
|
|
1381
|
-
end_container_on_empty_block?: boolean;
|
|
1858
|
+
end_container_on_empty_block?: boolean | string;
|
|
1382
1859
|
entities?: string;
|
|
1383
1860
|
entity_encoding?: EntityEncoding;
|
|
1384
1861
|
extended_valid_elements?: string;
|
|
@@ -1389,22 +1866,27 @@ interface BaseEditorSettings {
|
|
|
1389
1866
|
fix_list_elements?: boolean;
|
|
1390
1867
|
fixed_toolbar_container?: string;
|
|
1391
1868
|
fixed_toolbar_container_target?: HTMLElement;
|
|
1392
|
-
|
|
1869
|
+
font_css?: string | string[];
|
|
1870
|
+
font_family_formats?: string;
|
|
1393
1871
|
font_size_classes?: string;
|
|
1394
1872
|
font_size_legacy_values?: string;
|
|
1395
1873
|
font_size_style_values?: string;
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1874
|
+
font_size_formats?: string;
|
|
1875
|
+
font_size_input_default_unit?: string;
|
|
1876
|
+
force_hex_color?: ForceHexColor;
|
|
1877
|
+
forced_root_block?: string;
|
|
1399
1878
|
forced_root_block_attrs?: Record<string, string>;
|
|
1400
1879
|
formats?: Formats;
|
|
1401
|
-
|
|
1880
|
+
format_noneditable_selector?: string;
|
|
1402
1881
|
height?: number | string;
|
|
1882
|
+
help_accessibility?: boolean;
|
|
1403
1883
|
hidden_input?: boolean;
|
|
1884
|
+
highlight_on_focus?: boolean;
|
|
1404
1885
|
icons?: string;
|
|
1405
1886
|
icons_url?: string;
|
|
1406
1887
|
id?: string;
|
|
1407
|
-
|
|
1888
|
+
iframe_aria_text?: string;
|
|
1889
|
+
iframe_attrs?: Record<string, string>;
|
|
1408
1890
|
images_file_types?: string;
|
|
1409
1891
|
images_replace_blob_uris?: boolean;
|
|
1410
1892
|
images_reuse_filename?: boolean;
|
|
@@ -1423,12 +1905,12 @@ interface BaseEditorSettings {
|
|
|
1423
1905
|
inline_boundaries_selector?: string;
|
|
1424
1906
|
inline_styles?: boolean;
|
|
1425
1907
|
invalid_elements?: string;
|
|
1426
|
-
invalid_styles?: string
|
|
1908
|
+
invalid_styles?: string | Record<string, string>;
|
|
1427
1909
|
keep_styles?: boolean;
|
|
1428
1910
|
language?: string;
|
|
1429
1911
|
language_load?: boolean;
|
|
1430
1912
|
language_url?: string;
|
|
1431
|
-
|
|
1913
|
+
line_height_formats?: string;
|
|
1432
1914
|
max_height?: number;
|
|
1433
1915
|
max_width?: number;
|
|
1434
1916
|
menu?: Record<string, {
|
|
@@ -1438,12 +1920,29 @@ interface BaseEditorSettings {
|
|
|
1438
1920
|
menubar?: boolean | string;
|
|
1439
1921
|
min_height?: number;
|
|
1440
1922
|
min_width?: number;
|
|
1923
|
+
model?: string;
|
|
1924
|
+
model_url?: string;
|
|
1925
|
+
newdocument_content?: string;
|
|
1926
|
+
newline_behavior?: 'block' | 'linebreak' | 'invert' | 'default';
|
|
1441
1927
|
no_newline_selector?: string;
|
|
1928
|
+
noneditable_class?: string;
|
|
1929
|
+
noneditable_regexp?: RegExp | RegExp[];
|
|
1442
1930
|
nowrap?: boolean;
|
|
1443
1931
|
object_resizing?: boolean | string;
|
|
1932
|
+
pad_empty_with_br?: boolean;
|
|
1933
|
+
paste_as_text?: boolean;
|
|
1934
|
+
paste_block_drop?: boolean;
|
|
1935
|
+
paste_data_images?: boolean;
|
|
1936
|
+
paste_merge_formats?: boolean;
|
|
1937
|
+
paste_postprocess?: PastePostProcessFn;
|
|
1938
|
+
paste_preprocess?: PastePreProcessFn;
|
|
1939
|
+
paste_remove_styles_if_webkit?: boolean;
|
|
1940
|
+
paste_tab_spaces?: number;
|
|
1941
|
+
paste_webkit_styles?: string;
|
|
1444
1942
|
placeholder?: string;
|
|
1445
1943
|
preserve_cdata?: boolean;
|
|
1446
|
-
preview_styles?:
|
|
1944
|
+
preview_styles?: false | string;
|
|
1945
|
+
promotion?: boolean;
|
|
1447
1946
|
protect?: RegExp[];
|
|
1448
1947
|
readonly?: boolean;
|
|
1449
1948
|
referrer_policy?: ReferrerPolicy;
|
|
@@ -1454,19 +1953,25 @@ interface BaseEditorSettings {
|
|
|
1454
1953
|
resize?: boolean | 'both';
|
|
1455
1954
|
resize_img_proportional?: boolean;
|
|
1456
1955
|
root_name?: string;
|
|
1956
|
+
sandbox_iframes?: boolean;
|
|
1457
1957
|
schema?: SchemaType;
|
|
1458
1958
|
selector?: string;
|
|
1459
1959
|
setup?: SetupCallback;
|
|
1960
|
+
sidebar_show?: string;
|
|
1460
1961
|
skin?: boolean | string;
|
|
1461
1962
|
skin_url?: string;
|
|
1963
|
+
smart_paste?: boolean;
|
|
1462
1964
|
statusbar?: boolean;
|
|
1463
1965
|
style_formats?: AllowedFormat[];
|
|
1464
1966
|
style_formats_autohide?: boolean;
|
|
1465
1967
|
style_formats_merge?: boolean;
|
|
1466
1968
|
submit_patch?: boolean;
|
|
1467
1969
|
suffix?: string;
|
|
1970
|
+
table_tab_navigation?: boolean;
|
|
1468
1971
|
target?: HTMLElement;
|
|
1469
|
-
|
|
1972
|
+
text_patterns?: RawPattern[] | false;
|
|
1973
|
+
text_patterns_lookup?: RawDynamicPatternsLookup;
|
|
1974
|
+
theme?: string | ThemeInitFunc | false;
|
|
1470
1975
|
theme_url?: string;
|
|
1471
1976
|
toolbar?: boolean | string | string[] | Array<ToolbarGroup>;
|
|
1472
1977
|
toolbar1?: string;
|
|
@@ -1478,153 +1983,206 @@ interface BaseEditorSettings {
|
|
|
1478
1983
|
toolbar7?: string;
|
|
1479
1984
|
toolbar8?: string;
|
|
1480
1985
|
toolbar9?: string;
|
|
1986
|
+
toolbar_groups?: Record<string, GroupToolbarButtonSpec>;
|
|
1987
|
+
toolbar_location?: ToolbarLocation;
|
|
1481
1988
|
toolbar_mode?: ToolbarMode;
|
|
1989
|
+
toolbar_sticky?: boolean;
|
|
1990
|
+
toolbar_sticky_offset?: number;
|
|
1482
1991
|
typeahead_urls?: boolean;
|
|
1992
|
+
ui_mode?: 'combined' | 'split';
|
|
1483
1993
|
url_converter?: URLConverter;
|
|
1484
1994
|
url_converter_scope?: any;
|
|
1485
|
-
urlconverter_callback?:
|
|
1995
|
+
urlconverter_callback?: URLConverterCallback;
|
|
1486
1996
|
valid_children?: string;
|
|
1487
1997
|
valid_classes?: string | Record<string, string>;
|
|
1488
1998
|
valid_elements?: string;
|
|
1489
1999
|
valid_styles?: string | Record<string, string>;
|
|
2000
|
+
verify_html?: boolean;
|
|
1490
2001
|
visual?: boolean;
|
|
1491
2002
|
visual_anchor_class?: string;
|
|
1492
2003
|
visual_table_class?: string;
|
|
1493
2004
|
width?: number | string;
|
|
1494
|
-
|
|
1495
|
-
editor_deselector?: string;
|
|
1496
|
-
editor_selector?: string;
|
|
1497
|
-
elements?: string;
|
|
1498
|
-
filepicker_validator_handler?: FilePickerValidationCallback;
|
|
1499
|
-
mode?: 'exact' | 'textareas' | 'specific_textareas';
|
|
1500
|
-
types?: Record<string, any>[];
|
|
1501
|
-
block_elements?: string;
|
|
1502
|
-
boolean_attributes?: string;
|
|
1503
|
-
move_caret_before_on_enter_elements?: string;
|
|
1504
|
-
non_empty_elements?: string;
|
|
1505
|
-
self_closing_elements?: string;
|
|
1506
|
-
short_ended_elements?: string;
|
|
1507
|
-
text_block_elements?: string;
|
|
1508
|
-
text_inline_elements?: string;
|
|
1509
|
-
whitespace_elements?: string;
|
|
2005
|
+
xss_sanitization?: boolean;
|
|
1510
2006
|
disable_nodechange?: boolean;
|
|
1511
2007
|
forced_plugins?: string | string[];
|
|
1512
2008
|
plugin_base_urls?: Record<string, string>;
|
|
1513
2009
|
service_message?: string;
|
|
1514
|
-
validate?: boolean;
|
|
1515
2010
|
[key: string]: any;
|
|
1516
2011
|
}
|
|
1517
|
-
interface
|
|
2012
|
+
interface RawEditorOptions extends BaseEditorOptions {
|
|
1518
2013
|
external_plugins?: Record<string, string>;
|
|
1519
|
-
mobile?:
|
|
2014
|
+
mobile?: RawEditorOptions;
|
|
1520
2015
|
plugins?: string | string[];
|
|
1521
2016
|
}
|
|
1522
|
-
interface
|
|
2017
|
+
interface NormalizedEditorOptions extends BaseEditorOptions {
|
|
1523
2018
|
external_plugins: Record<string, string>;
|
|
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
|
-
|
|
2019
|
+
forced_plugins: string[];
|
|
2020
|
+
plugins: string[];
|
|
2021
|
+
}
|
|
2022
|
+
interface EditorOptions extends NormalizedEditorOptions {
|
|
2023
|
+
a11y_advanced_options: boolean;
|
|
2024
|
+
allow_unsafe_link_target: boolean;
|
|
2025
|
+
anchor_bottom: string;
|
|
2026
|
+
anchor_top: string;
|
|
2027
|
+
automatic_uploads: boolean;
|
|
2028
|
+
block_formats: string;
|
|
2029
|
+
body_class: string;
|
|
2030
|
+
body_id: string;
|
|
2031
|
+
br_newline_selector: string;
|
|
2032
|
+
color_map: string[];
|
|
2033
|
+
color_cols: number;
|
|
2034
|
+
color_cols_foreground: number;
|
|
2035
|
+
color_cols_background: number;
|
|
2036
|
+
color_default_background: string;
|
|
2037
|
+
color_default_foreground: string;
|
|
2038
|
+
content_css: string[];
|
|
2039
|
+
contextmenu: string[];
|
|
2040
|
+
convert_unsafe_embeds: boolean;
|
|
2041
|
+
custom_colors: boolean;
|
|
2042
|
+
default_font_stack: string[];
|
|
2043
|
+
document_base_url: string;
|
|
2044
|
+
init_content_sync: boolean;
|
|
2045
|
+
draggable_modal: boolean;
|
|
2046
|
+
editable_class: string;
|
|
2047
|
+
editable_root: boolean;
|
|
2048
|
+
font_css: string[];
|
|
2049
|
+
font_family_formats: string;
|
|
2050
|
+
font_size_classes: string;
|
|
2051
|
+
font_size_formats: string;
|
|
2052
|
+
font_size_input_default_unit: string;
|
|
2053
|
+
font_size_legacy_values: string;
|
|
2054
|
+
font_size_style_values: string;
|
|
2055
|
+
forced_root_block: string;
|
|
2056
|
+
forced_root_block_attrs: Record<string, string>;
|
|
2057
|
+
force_hex_color: ForceHexColor;
|
|
2058
|
+
format_noneditable_selector: string;
|
|
2059
|
+
height: number | string;
|
|
2060
|
+
highlight_on_focus: boolean;
|
|
2061
|
+
iframe_attrs: Record<string, string>;
|
|
2062
|
+
images_file_types: string;
|
|
2063
|
+
images_upload_base_path: string;
|
|
2064
|
+
images_upload_credentials: boolean;
|
|
2065
|
+
images_upload_url: string;
|
|
2066
|
+
indent_use_margin: boolean;
|
|
2067
|
+
indentation: string;
|
|
2068
|
+
inline: boolean;
|
|
2069
|
+
inline_boundaries_selector: string;
|
|
2070
|
+
language: string;
|
|
2071
|
+
language_load: boolean;
|
|
2072
|
+
language_url: string;
|
|
2073
|
+
line_height_formats: string;
|
|
2074
|
+
menu: Record<string, {
|
|
2075
|
+
title: string;
|
|
2076
|
+
items: string;
|
|
2077
|
+
}>;
|
|
2078
|
+
menubar: boolean | string;
|
|
2079
|
+
model: string;
|
|
2080
|
+
newdocument_content: string;
|
|
2081
|
+
no_newline_selector: string;
|
|
2082
|
+
noneditable_class: string;
|
|
2083
|
+
noneditable_regexp: RegExp[];
|
|
2084
|
+
object_resizing: string;
|
|
2085
|
+
pad_empty_with_br: boolean;
|
|
2086
|
+
paste_as_text: boolean;
|
|
2087
|
+
preview_styles: string;
|
|
2088
|
+
promotion: boolean;
|
|
2089
|
+
readonly: boolean;
|
|
2090
|
+
removed_menuitems: string;
|
|
2091
|
+
sandbox_iframes: boolean;
|
|
2092
|
+
toolbar: boolean | string | string[] | Array<ToolbarGroup>;
|
|
2093
|
+
toolbar_groups: Record<string, GroupToolbarButtonSpec>;
|
|
2094
|
+
toolbar_location: ToolbarLocation;
|
|
2095
|
+
toolbar_mode: ToolbarMode;
|
|
2096
|
+
toolbar_persist: boolean;
|
|
2097
|
+
toolbar_sticky: boolean;
|
|
2098
|
+
toolbar_sticky_offset: number;
|
|
2099
|
+
text_patterns: Pattern[];
|
|
2100
|
+
text_patterns_lookup: DynamicPatternsLookup;
|
|
2101
|
+
visual: boolean;
|
|
2102
|
+
visual_anchor_class: string;
|
|
2103
|
+
visual_table_class: string;
|
|
2104
|
+
width: number | string;
|
|
2105
|
+
xss_sanitization: boolean;
|
|
2106
|
+
}
|
|
2107
|
+
type StyleMap = Record<string, string | number>;
|
|
1594
2108
|
interface StylesSettings {
|
|
1595
2109
|
allow_script_urls?: boolean;
|
|
1596
2110
|
allow_svg_data_urls?: boolean;
|
|
1597
2111
|
url_converter?: URLConverter;
|
|
1598
2112
|
url_converter_scope?: any;
|
|
2113
|
+
force_hex_color?: ForceHexColor;
|
|
1599
2114
|
}
|
|
1600
2115
|
interface Styles {
|
|
1601
|
-
|
|
1602
|
-
parse: (css: string) => Record<string, string>;
|
|
2116
|
+
parse: (css: string | undefined) => Record<string, string>;
|
|
1603
2117
|
serialize: (styles: StyleMap, elementName?: string) => string;
|
|
1604
2118
|
}
|
|
2119
|
+
type EventUtilsCallback<T> = (event: EventUtilsEvent<T>) => void | boolean;
|
|
2120
|
+
type EventUtilsEvent<T> = NormalizedEvent<T> & {
|
|
2121
|
+
metaKey: boolean;
|
|
2122
|
+
};
|
|
2123
|
+
interface Callback$1<T> {
|
|
2124
|
+
func: EventUtilsCallback<T>;
|
|
2125
|
+
scope: any;
|
|
2126
|
+
}
|
|
2127
|
+
interface CallbackList<T> extends Array<Callback$1<T>> {
|
|
2128
|
+
fakeName: string | false;
|
|
2129
|
+
capture: boolean;
|
|
2130
|
+
nativeHandler: EventListener;
|
|
2131
|
+
}
|
|
2132
|
+
interface EventUtilsConstructor {
|
|
2133
|
+
readonly prototype: EventUtils;
|
|
2134
|
+
new (): EventUtils;
|
|
2135
|
+
Event: EventUtils;
|
|
2136
|
+
}
|
|
2137
|
+
declare class EventUtils {
|
|
2138
|
+
static Event: EventUtils;
|
|
2139
|
+
domLoaded: boolean;
|
|
2140
|
+
events: Record<number, Record<string, CallbackList<any>>>;
|
|
2141
|
+
private readonly expando;
|
|
2142
|
+
private hasFocusIn;
|
|
2143
|
+
private count;
|
|
2144
|
+
constructor();
|
|
2145
|
+
bind<K extends keyof HTMLElementEventMap>(target: any, name: K, callback: EventUtilsCallback<HTMLElementEventMap[K]>, scope?: any): EventUtilsCallback<HTMLElementEventMap[K]>;
|
|
2146
|
+
bind<T = any>(target: any, names: string, callback: EventUtilsCallback<T>, scope?: any): EventUtilsCallback<T>;
|
|
2147
|
+
unbind<K extends keyof HTMLElementEventMap>(target: any, name: K, callback?: EventUtilsCallback<HTMLElementEventMap[K]>): this;
|
|
2148
|
+
unbind<T = any>(target: any, names: string, callback?: EventUtilsCallback<T>): this;
|
|
2149
|
+
unbind(target: any): this;
|
|
2150
|
+
fire(target: any, name: string, args?: {}): this;
|
|
2151
|
+
dispatch(target: any, name: string, args?: {}): this;
|
|
2152
|
+
clean(target: any): this;
|
|
2153
|
+
destroy(): void;
|
|
2154
|
+
cancel<T>(e: EventUtilsEvent<T>): boolean;
|
|
2155
|
+
private executeHandlers;
|
|
2156
|
+
}
|
|
2157
|
+
interface SetAttribEvent {
|
|
2158
|
+
attrElm: HTMLElement;
|
|
2159
|
+
attrName: string;
|
|
2160
|
+
attrValue: string | boolean | number | null;
|
|
2161
|
+
}
|
|
1605
2162
|
interface DOMUtilsSettings {
|
|
1606
2163
|
schema: Schema;
|
|
1607
2164
|
url_converter: URLConverter;
|
|
1608
2165
|
url_converter_scope: any;
|
|
1609
2166
|
ownEvents: boolean;
|
|
1610
2167
|
keep_values: boolean;
|
|
1611
|
-
hex_colors: boolean;
|
|
1612
2168
|
update_styles: boolean;
|
|
1613
|
-
root_element: HTMLElement;
|
|
1614
|
-
collect:
|
|
1615
|
-
onSetAttrib:
|
|
2169
|
+
root_element: HTMLElement | null;
|
|
2170
|
+
collect: boolean;
|
|
2171
|
+
onSetAttrib: (event: SetAttribEvent) => void;
|
|
1616
2172
|
contentCssCors: boolean;
|
|
1617
2173
|
referrerPolicy: ReferrerPolicy;
|
|
2174
|
+
force_hex_color: ForceHexColor;
|
|
1618
2175
|
}
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
2176
|
+
type Target = Node | Window;
|
|
2177
|
+
type RunArguments<T extends Node = Node> = string | T | Array<string | T> | null;
|
|
2178
|
+
type BoundEvent = [
|
|
1622
2179
|
Target,
|
|
1623
2180
|
string,
|
|
1624
2181
|
EventUtilsCallback<any>,
|
|
1625
2182
|
any
|
|
1626
2183
|
];
|
|
1627
|
-
|
|
2184
|
+
type Callback<K extends string> = EventUtilsCallback<MappedEvent<HTMLElementEventMap, K>>;
|
|
2185
|
+
type RunResult<T, R> = T extends Array<any> ? R[] : false | R;
|
|
1628
2186
|
interface DOMUtils {
|
|
1629
2187
|
doc: Document;
|
|
1630
2188
|
settings: Partial<DOMUtilsSettings>;
|
|
@@ -1637,13 +2195,11 @@ interface DOMUtils {
|
|
|
1637
2195
|
styles: Styles;
|
|
1638
2196
|
schema: Schema;
|
|
1639
2197
|
events: EventUtils;
|
|
1640
|
-
root: Node;
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
(elm: string): DomQuery<Node>;
|
|
2198
|
+
root: Node | null;
|
|
2199
|
+
isBlock: {
|
|
2200
|
+
(node: Node | null): node is HTMLElement;
|
|
2201
|
+
(node: string): boolean;
|
|
1645
2202
|
};
|
|
1646
|
-
isBlock: (node: string | Node) => boolean;
|
|
1647
2203
|
clone: (node: Node, deep: boolean) => Node;
|
|
1648
2204
|
getRoot: () => HTMLElement;
|
|
1649
2205
|
getViewPort: (argWin?: Window) => GeomRect;
|
|
@@ -1653,42 +2209,52 @@ interface DOMUtils {
|
|
|
1653
2209
|
h: number;
|
|
1654
2210
|
};
|
|
1655
2211
|
getParent: {
|
|
1656
|
-
<K extends keyof HTMLElementTagNameMap>(node: string | Node, selector: K, root?: Node): HTMLElementTagNameMap[K] | null;
|
|
1657
|
-
<T extends
|
|
1658
|
-
|
|
2212
|
+
<K extends keyof HTMLElementTagNameMap>(node: string | Node | null, selector: K, root?: Node): HTMLElementTagNameMap[K] | null;
|
|
2213
|
+
<T extends Element>(node: string | Node | null, selector: string | ((node: Node) => node is T), root?: Node): T | null;
|
|
2214
|
+
(node: string | Node | null, selector?: string | ((node: Node) => boolean | void), root?: Node): Node | null;
|
|
1659
2215
|
};
|
|
1660
2216
|
getParents: {
|
|
1661
|
-
<K extends keyof HTMLElementTagNameMap>(elm: string |
|
|
1662
|
-
<T extends
|
|
1663
|
-
|
|
2217
|
+
<K extends keyof HTMLElementTagNameMap>(elm: string | HTMLElementTagNameMap[K] | null, selector: K, root?: Node, collect?: boolean): Array<HTMLElementTagNameMap[K]>;
|
|
2218
|
+
<T extends Element>(node: string | Node | null, selector: string | ((node: Node) => node is T), root?: Node, collect?: boolean): T[];
|
|
2219
|
+
(elm: string | Node | null, selector?: string | ((node: Node) => boolean | void), root?: Node, collect?: boolean): Node[];
|
|
2220
|
+
};
|
|
2221
|
+
get: {
|
|
2222
|
+
<T extends Node>(elm: T): T;
|
|
2223
|
+
(elm: string): HTMLElement | null;
|
|
1664
2224
|
};
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
getPrev: (node: Node, selector: string | ((node: Node) => boolean)) => Node | null;
|
|
2225
|
+
getNext: (node: Node | null, selector: string | ((node: Node) => boolean)) => Node | null;
|
|
2226
|
+
getPrev: (node: Node | null, selector: string | ((node: Node) => boolean)) => Node | null;
|
|
1668
2227
|
select: {
|
|
1669
2228
|
<K extends keyof HTMLElementTagNameMap>(selector: K, scope?: string | Node): Array<HTMLElementTagNameMap[K]>;
|
|
1670
2229
|
<T extends HTMLElement = HTMLElement>(selector: string, scope?: string | Node): T[];
|
|
1671
2230
|
};
|
|
1672
|
-
is:
|
|
1673
|
-
|
|
2231
|
+
is: {
|
|
2232
|
+
<T extends Element>(elm: Node | Node[] | null, selector: string): elm is T;
|
|
2233
|
+
(elm: Node | Node[] | null, selector: string): boolean;
|
|
2234
|
+
};
|
|
2235
|
+
add: (parentElm: RunArguments, name: string | Element, attrs?: Record<string, string | boolean | number | null>, html?: string | Node | null, create?: boolean) => HTMLElement;
|
|
1674
2236
|
create: {
|
|
1675
|
-
<K extends keyof HTMLElementTagNameMap>(name: K, attrs?: Record<string, string | boolean | number>, html?: string | Node): HTMLElementTagNameMap[K];
|
|
1676
|
-
(name: string, attrs?: Record<string, string | boolean | number>, html?: string | Node): HTMLElement;
|
|
2237
|
+
<K extends keyof HTMLElementTagNameMap>(name: K, attrs?: Record<string, string | boolean | number | null>, html?: string | Node | null): HTMLElementTagNameMap[K];
|
|
2238
|
+
(name: string, attrs?: Record<string, string | boolean | number | null>, html?: string | Node | null): HTMLElement;
|
|
1677
2239
|
};
|
|
1678
|
-
createHTML: (name: string, attrs?: Record<string, string>, html?: string) => string;
|
|
2240
|
+
createHTML: (name: string, attrs?: Record<string, string | null>, html?: string) => string;
|
|
1679
2241
|
createFragment: (html?: string) => DocumentFragment;
|
|
1680
|
-
remove:
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
(elm: string | Node | Node[], styles: StyleMap): void;
|
|
2242
|
+
remove: {
|
|
2243
|
+
<T extends Node>(node: T | T[], keepChildren?: boolean): typeof node extends Array<any> ? T[] : T;
|
|
2244
|
+
<T extends Node>(node: string, keepChildren?: boolean): T | false;
|
|
1684
2245
|
};
|
|
1685
|
-
getStyle:
|
|
1686
|
-
|
|
2246
|
+
getStyle: {
|
|
2247
|
+
(elm: Element, name: string, computed: true): string;
|
|
2248
|
+
(elm: string | Element | null, name: string, computed?: boolean): string | undefined;
|
|
2249
|
+
};
|
|
2250
|
+
setStyle: (elm: string | Element | Element[], name: string, value: string | number | null) => void;
|
|
2251
|
+
setStyles: (elm: string | Element | Element[], stylesArg: StyleMap) => void;
|
|
1687
2252
|
removeAllAttribs: (e: RunArguments<Element>) => void;
|
|
1688
|
-
setAttrib: (elm:
|
|
1689
|
-
setAttribs: (elm:
|
|
1690
|
-
getAttrib: (elm: string |
|
|
1691
|
-
|
|
2253
|
+
setAttrib: (elm: RunArguments<Element>, name: string, value: string | boolean | number | null) => void;
|
|
2254
|
+
setAttribs: (elm: RunArguments<Element>, attrs: Record<string, string | boolean | number | null>) => void;
|
|
2255
|
+
getAttrib: (elm: string | Element | null, name: string, defaultVal?: string) => string;
|
|
2256
|
+
getAttribs: (elm: string | Element) => NamedNodeMap | Attr[];
|
|
2257
|
+
getPos: (elm: string | Element, rootElm?: Node) => {
|
|
1692
2258
|
x: number;
|
|
1693
2259
|
y: number;
|
|
1694
2260
|
};
|
|
@@ -1696,22 +2262,22 @@ interface DOMUtils {
|
|
|
1696
2262
|
serializeStyle: (stylesArg: StyleMap, name?: string) => string;
|
|
1697
2263
|
addStyle: (cssText: string) => void;
|
|
1698
2264
|
loadCSS: (url: string) => void;
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
toggleClass: (elm:
|
|
2265
|
+
hasClass: (elm: string | Element, cls: string) => boolean;
|
|
2266
|
+
addClass: (elm: RunArguments<Element>, cls: string) => void;
|
|
2267
|
+
removeClass: (elm: RunArguments<Element>, cls: string) => void;
|
|
2268
|
+
toggleClass: (elm: RunArguments<Element>, cls: string, state?: boolean) => void;
|
|
1703
2269
|
show: (elm: string | Node | Node[]) => void;
|
|
1704
2270
|
hide: (elm: string | Node | Node[]) => void;
|
|
1705
2271
|
isHidden: (elm: string | Node) => boolean;
|
|
1706
2272
|
uniqueId: (prefix?: string) => string;
|
|
1707
|
-
setHTML: (elm:
|
|
2273
|
+
setHTML: (elm: RunArguments<Element>, html: string) => void;
|
|
1708
2274
|
getOuterHTML: (elm: string | Node) => string;
|
|
1709
2275
|
setOuterHTML: (elm: string | Node | Node[], html: string) => void;
|
|
1710
2276
|
decode: (text: string) => string;
|
|
1711
2277
|
encode: (text: string) => string;
|
|
1712
2278
|
insertAfter: {
|
|
1713
2279
|
<T extends Node>(node: T | T[], reference: string | Node): T;
|
|
1714
|
-
<T extends Node>(node: RunArguments<T>, reference: string | Node):
|
|
2280
|
+
<T extends Node>(node: RunArguments<T>, reference: string | Node): RunResult<typeof node, T>;
|
|
1715
2281
|
};
|
|
1716
2282
|
replace: {
|
|
1717
2283
|
<T extends Node>(newElm: Node, oldElm: T | T[], keepChildren?: boolean): T;
|
|
@@ -1721,17 +2287,17 @@ interface DOMUtils {
|
|
|
1721
2287
|
<K extends keyof HTMLElementTagNameMap>(elm: Element, name: K): HTMLElementTagNameMap[K];
|
|
1722
2288
|
(elm: Element, name: string): Element;
|
|
1723
2289
|
};
|
|
1724
|
-
findCommonAncestor: (a: Node, b: Node) => Node;
|
|
1725
|
-
|
|
1726
|
-
run<R, T extends Node>(this: DOMUtils, elm: T
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
2290
|
+
findCommonAncestor: (a: Node, b: Node) => Node | null;
|
|
2291
|
+
run<R, T extends Node>(this: DOMUtils, elm: T | T[], func: (node: T) => R, scope?: any): typeof elm extends Array<any> ? R[] : R;
|
|
2292
|
+
run<R, T extends Node>(this: DOMUtils, elm: RunArguments<T>, func: (node: T) => R, scope?: any): RunResult<typeof elm, R>;
|
|
2293
|
+
isEmpty: (node: Node, elements?: Record<string, any>, options?: ({
|
|
2294
|
+
includeZwsp?: boolean;
|
|
2295
|
+
})) => boolean;
|
|
1730
2296
|
createRng: () => Range;
|
|
1731
2297
|
nodeIndex: (node: Node, normalized?: boolean) => number;
|
|
1732
2298
|
split: {
|
|
1733
|
-
<T extends Node>(parentElm: Node, splitElm: Node, replacementElm: T): T;
|
|
1734
|
-
<T extends Node>(parentElm: Node, splitElm: T): T;
|
|
2299
|
+
<T extends Node>(parentElm: Node, splitElm: Node, replacementElm: T): T | undefined;
|
|
2300
|
+
<T extends Node>(parentElm: Node, splitElm: T): T | undefined;
|
|
1735
2301
|
};
|
|
1736
2302
|
bind: {
|
|
1737
2303
|
<K extends string>(target: Target, name: K, func: Callback<K>, scope?: any): Callback<K>;
|
|
@@ -1742,73 +2308,33 @@ interface DOMUtils {
|
|
|
1742
2308
|
<K extends string>(target: Target[], name?: K, func?: EventUtilsCallback<MappedEvent<HTMLElementEventMap, K>>): EventUtils[];
|
|
1743
2309
|
};
|
|
1744
2310
|
fire: (target: Node | Window, name: string, evt?: {}) => EventUtils;
|
|
2311
|
+
dispatch: (target: Node | Window, name: string, evt?: {}) => EventUtils;
|
|
1745
2312
|
getContentEditable: (node: Node) => string | null;
|
|
1746
2313
|
getContentEditableParent: (node: Node) => string | null;
|
|
2314
|
+
isEditable: (node: Node | null | undefined) => boolean;
|
|
1747
2315
|
destroy: () => void;
|
|
1748
2316
|
isChildOf: (node: Node, parent: Node) => boolean;
|
|
1749
2317
|
dumpRng: (r: Range) => string;
|
|
1750
2318
|
}
|
|
1751
|
-
interface
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
2319
|
+
interface ClientRect {
|
|
2320
|
+
left: number;
|
|
2321
|
+
top: number;
|
|
2322
|
+
bottom: number;
|
|
2323
|
+
right: number;
|
|
2324
|
+
width: number;
|
|
2325
|
+
height: number;
|
|
1757
2326
|
}
|
|
1758
2327
|
interface BookmarkManager {
|
|
1759
|
-
getBookmark: (type
|
|
2328
|
+
getBookmark: (type?: number, normalized?: boolean) => Bookmark;
|
|
1760
2329
|
moveToBookmark: (bookmark: Bookmark) => void;
|
|
1761
2330
|
}
|
|
1762
2331
|
interface ControlSelection {
|
|
1763
2332
|
isResizable: (elm: Element) => boolean;
|
|
1764
|
-
showResizeRect: (elm:
|
|
2333
|
+
showResizeRect: (elm: HTMLElement) => void;
|
|
1765
2334
|
hideResizeRect: () => void;
|
|
1766
2335
|
updateResizeRect: (evt: EditorEvent<any>) => void;
|
|
1767
2336
|
destroy: () => void;
|
|
1768
2337
|
}
|
|
1769
|
-
interface ParserArgs {
|
|
1770
|
-
getInner?: boolean | number;
|
|
1771
|
-
forced_root_block?: boolean | string;
|
|
1772
|
-
context?: string;
|
|
1773
|
-
isRootContent?: boolean;
|
|
1774
|
-
format?: string;
|
|
1775
|
-
[key: string]: any;
|
|
1776
|
-
}
|
|
1777
|
-
declare type ParserFilterCallback = (nodes: AstNode[], name: string, args: ParserArgs) => void;
|
|
1778
|
-
interface ParserFilter {
|
|
1779
|
-
name: string;
|
|
1780
|
-
callbacks: ParserFilterCallback[];
|
|
1781
|
-
}
|
|
1782
|
-
interface DomParserSettings {
|
|
1783
|
-
allow_html_data_urls?: boolean;
|
|
1784
|
-
allow_svg_data_urls?: boolean;
|
|
1785
|
-
allow_conditional_comments?: boolean;
|
|
1786
|
-
allow_html_in_named_anchor?: boolean;
|
|
1787
|
-
allow_script_urls?: boolean;
|
|
1788
|
-
allow_unsafe_link_target?: boolean;
|
|
1789
|
-
convert_fonts_to_spans?: boolean;
|
|
1790
|
-
fix_list_elements?: boolean;
|
|
1791
|
-
font_size_legacy_values?: string;
|
|
1792
|
-
forced_root_block?: boolean | string;
|
|
1793
|
-
forced_root_block_attrs?: Record<string, string>;
|
|
1794
|
-
padd_empty_with_br?: boolean;
|
|
1795
|
-
preserve_cdata?: boolean;
|
|
1796
|
-
remove_trailing_brs?: boolean;
|
|
1797
|
-
root_name?: string;
|
|
1798
|
-
validate?: boolean;
|
|
1799
|
-
inline_styles?: boolean;
|
|
1800
|
-
blob_cache?: BlobCache;
|
|
1801
|
-
images_dataimg_filter?: (img: HTMLImageElement) => boolean;
|
|
1802
|
-
}
|
|
1803
|
-
interface DomParser {
|
|
1804
|
-
schema: Schema;
|
|
1805
|
-
addAttributeFilter: (name: string, callback: (nodes: AstNode[], name: string, args: ParserArgs) => void) => void;
|
|
1806
|
-
getAttributeFilters: () => ParserFilter[];
|
|
1807
|
-
addNodeFilter: (name: string, callback: (nodes: AstNode[], name: string, args: ParserArgs) => void) => void;
|
|
1808
|
-
getNodeFilters: () => ParserFilter[];
|
|
1809
|
-
filterNode: (node: AstNode) => AstNode;
|
|
1810
|
-
parse: (html: string, args?: ParserArgs) => AstNode;
|
|
1811
|
-
}
|
|
1812
2338
|
interface WriterSettings {
|
|
1813
2339
|
element_format?: 'xhtml' | 'html';
|
|
1814
2340
|
entities?: string;
|
|
@@ -1817,7 +2343,7 @@ interface WriterSettings {
|
|
|
1817
2343
|
indent_after?: string;
|
|
1818
2344
|
indent_before?: string;
|
|
1819
2345
|
}
|
|
1820
|
-
|
|
2346
|
+
type Attributes = Array<{
|
|
1821
2347
|
name: string;
|
|
1822
2348
|
value: string;
|
|
1823
2349
|
}>;
|
|
@@ -1829,7 +2355,7 @@ interface Writer {
|
|
|
1829
2355
|
getContent: () => string;
|
|
1830
2356
|
pi: (name: string, text?: string) => void;
|
|
1831
2357
|
reset: () => void;
|
|
1832
|
-
start: (name: string, attrs?: Attributes
|
|
2358
|
+
start: (name: string, attrs?: Attributes | null, empty?: boolean) => void;
|
|
1833
2359
|
text: (text: string, raw?: boolean) => void;
|
|
1834
2360
|
}
|
|
1835
2361
|
interface HtmlSerializerSettings extends WriterSettings {
|
|
@@ -1839,24 +2365,24 @@ interface HtmlSerializerSettings extends WriterSettings {
|
|
|
1839
2365
|
interface HtmlSerializer {
|
|
1840
2366
|
serialize: (node: AstNode) => string;
|
|
1841
2367
|
}
|
|
1842
|
-
interface DomSerializerArgs extends ParserArgs {
|
|
1843
|
-
format?: string;
|
|
1844
|
-
}
|
|
1845
2368
|
interface DomSerializerSettings extends DomParserSettings, WriterSettings, SchemaSettings, HtmlSerializerSettings {
|
|
2369
|
+
remove_trailing_brs?: boolean;
|
|
1846
2370
|
url_converter?: URLConverter;
|
|
1847
2371
|
url_converter_scope?: {};
|
|
1848
2372
|
}
|
|
1849
2373
|
interface DomSerializerImpl {
|
|
1850
2374
|
schema: Schema;
|
|
1851
|
-
addNodeFilter: (name: string, callback:
|
|
1852
|
-
addAttributeFilter: (name: string, callback:
|
|
2375
|
+
addNodeFilter: (name: string, callback: ParserFilterCallback) => void;
|
|
2376
|
+
addAttributeFilter: (name: string, callback: ParserFilterCallback) => void;
|
|
1853
2377
|
getNodeFilters: () => ParserFilter[];
|
|
1854
2378
|
getAttributeFilters: () => ParserFilter[];
|
|
2379
|
+
removeNodeFilter: (name: string, callback?: ParserFilterCallback) => void;
|
|
2380
|
+
removeAttributeFilter: (name: string, callback?: ParserFilterCallback) => void;
|
|
1855
2381
|
serialize: {
|
|
1856
2382
|
(node: Element, parserArgs: {
|
|
1857
2383
|
format: 'tree';
|
|
1858
|
-
} &
|
|
1859
|
-
(node: Element, parserArgs?:
|
|
2384
|
+
} & ParserArgs): AstNode;
|
|
2385
|
+
(node: Element, parserArgs?: ParserArgs): string;
|
|
1860
2386
|
};
|
|
1861
2387
|
addRules: (rules: string) => void;
|
|
1862
2388
|
setRules: (rules: string) => void;
|
|
@@ -1880,17 +2406,18 @@ interface EditorSelection {
|
|
|
1880
2406
|
getContent: {
|
|
1881
2407
|
(args: {
|
|
1882
2408
|
format: 'tree';
|
|
1883
|
-
} & GetSelectionContentArgs): AstNode;
|
|
1884
|
-
(args?: GetSelectionContentArgs): string;
|
|
2409
|
+
} & Partial<GetSelectionContentArgs>): AstNode;
|
|
2410
|
+
(args?: Partial<GetSelectionContentArgs>): string;
|
|
1885
2411
|
};
|
|
1886
|
-
setContent: (content: string, args?:
|
|
2412
|
+
setContent: (content: string, args?: Partial<SetSelectionContentArgs>) => void;
|
|
1887
2413
|
getBookmark: (type?: number, normalized?: boolean) => Bookmark;
|
|
1888
2414
|
moveToBookmark: (bookmark: Bookmark) => void;
|
|
1889
2415
|
select: (node: Node, content?: boolean) => Node;
|
|
1890
2416
|
isCollapsed: () => boolean;
|
|
2417
|
+
isEditable: () => boolean;
|
|
1891
2418
|
isForward: () => boolean;
|
|
1892
2419
|
setNode: (elm: Element) => Element;
|
|
1893
|
-
getNode: () =>
|
|
2420
|
+
getNode: () => HTMLElement;
|
|
1894
2421
|
getSel: () => Selection | null;
|
|
1895
2422
|
setRng: (rng: Range, forward?: boolean) => void;
|
|
1896
2423
|
getRng: () => Range;
|
|
@@ -1901,258 +2428,65 @@ interface EditorSelection {
|
|
|
1901
2428
|
selectorChanged: (selector: string, callback: (active: boolean, args: {
|
|
1902
2429
|
node: Node;
|
|
1903
2430
|
selector: String;
|
|
1904
|
-
parents:
|
|
2431
|
+
parents: Node[];
|
|
1905
2432
|
}) => void) => EditorSelection;
|
|
1906
2433
|
selectorChangedWithUnbind: (selector: string, callback: (active: boolean, args: {
|
|
1907
2434
|
node: Node;
|
|
1908
2435
|
selector: String;
|
|
1909
|
-
parents:
|
|
2436
|
+
parents: Node[];
|
|
1910
2437
|
}) => void) => {
|
|
1911
2438
|
unbind: () => void;
|
|
1912
2439
|
};
|
|
1913
|
-
getScrollContainer: () => HTMLElement;
|
|
1914
|
-
scrollIntoView: (elm
|
|
2440
|
+
getScrollContainer: () => HTMLElement | undefined;
|
|
2441
|
+
scrollIntoView: (elm?: HTMLElement, alignToTop?: boolean) => void;
|
|
1915
2442
|
placeCaretAt: (clientX: number, clientY: number) => void;
|
|
1916
|
-
getBoundingClientRect: () => ClientRect;
|
|
2443
|
+
getBoundingClientRect: () => ClientRect | DOMRect;
|
|
1917
2444
|
destroy: () => void;
|
|
2445
|
+
expand: (options?: {
|
|
2446
|
+
type: 'word';
|
|
2447
|
+
}) => void;
|
|
1918
2448
|
}
|
|
1919
|
-
|
|
1920
|
-
|
|
2449
|
+
type EditorCommandCallback<S> = (this: S, ui: boolean, value: any) => void;
|
|
2450
|
+
type EditorCommandsCallback = (command: string, ui: boolean, value?: any) => void;
|
|
1921
2451
|
interface Commands {
|
|
1922
2452
|
state: Record<string, (command: string) => boolean>;
|
|
1923
2453
|
exec: Record<string, EditorCommandsCallback>;
|
|
1924
2454
|
value: Record<string, (command: string) => string>;
|
|
1925
2455
|
}
|
|
2456
|
+
interface ExecCommandArgs {
|
|
2457
|
+
skip_focus?: boolean;
|
|
2458
|
+
}
|
|
1926
2459
|
interface EditorCommandsConstructor {
|
|
1927
2460
|
readonly prototype: EditorCommands;
|
|
1928
2461
|
new (editor: Editor): EditorCommands;
|
|
1929
2462
|
}
|
|
1930
2463
|
declare class EditorCommands {
|
|
1931
2464
|
private readonly editor;
|
|
1932
|
-
private selectionBookmark;
|
|
1933
2465
|
private commands;
|
|
1934
2466
|
constructor(editor: Editor);
|
|
1935
|
-
execCommand(command: string, ui?: boolean, value?: any, args?:
|
|
2467
|
+
execCommand(command: string, ui?: boolean, value?: any, args?: ExecCommandArgs): boolean;
|
|
1936
2468
|
queryCommandState(command: string): boolean;
|
|
1937
2469
|
queryCommandValue(command: string): string;
|
|
1938
2470
|
addCommands<K extends keyof Commands>(commandList: Commands[K], type: K): void;
|
|
1939
2471
|
addCommands(commandList: Record<string, EditorCommandsCallback>): void;
|
|
1940
|
-
addCommand(command: string, callback: EditorCommandCallback
|
|
2472
|
+
addCommand<S>(command: string, callback: EditorCommandCallback<S>, scope: S): void;
|
|
2473
|
+
addCommand(command: string, callback: EditorCommandCallback<Editor>): void;
|
|
1941
2474
|
queryCommandSupported(command: string): boolean;
|
|
1942
|
-
addQueryStateHandler(command: string, callback: () => boolean, scope
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
private isFormatMatch;
|
|
1947
|
-
private toggleFormat;
|
|
1948
|
-
private storeSelection;
|
|
1949
|
-
private restoreSelection;
|
|
1950
|
-
private setupCommands;
|
|
1951
|
-
}
|
|
1952
|
-
interface WindowParams {
|
|
1953
|
-
readonly inline?: 'cursor' | 'toolbar';
|
|
1954
|
-
readonly ariaAttrs?: boolean;
|
|
1955
|
-
}
|
|
1956
|
-
interface WindowManager {
|
|
1957
|
-
open: <T>(config: DialogSpec<T>, params?: WindowParams) => DialogInstanceApi<T>;
|
|
1958
|
-
openUrl: (config: UrlDialogSpec) => UrlDialogInstanceApi;
|
|
1959
|
-
alert: (message: string, callback?: () => void, scope?: any) => void;
|
|
1960
|
-
confirm: (message: string, callback?: (state: boolean) => void, scope?: any) => void;
|
|
1961
|
-
close: () => void;
|
|
1962
|
-
}
|
|
1963
|
-
declare type InstanceApi<T> = UrlDialogInstanceApi | DialogInstanceApi<T>;
|
|
1964
|
-
interface WindowManagerImpl {
|
|
1965
|
-
open: <T>(config: DialogSpec<T>, params: WindowParams, closeWindow: (dialog: DialogInstanceApi<T>) => void) => DialogInstanceApi<T>;
|
|
1966
|
-
openUrl: (config: UrlDialogSpec, closeWindow: (dialog: UrlDialogInstanceApi) => void) => UrlDialogInstanceApi;
|
|
1967
|
-
alert: (message: string, callback: () => void) => void;
|
|
1968
|
-
confirm: (message: string, callback: (state: boolean) => void) => void;
|
|
1969
|
-
close: (dialog: InstanceApi<any>) => void;
|
|
1970
|
-
}
|
|
1971
|
-
interface ExecCommandEvent {
|
|
1972
|
-
command: string;
|
|
1973
|
-
ui?: boolean;
|
|
1974
|
-
value?: any;
|
|
1975
|
-
}
|
|
1976
|
-
declare type GetContentEvent = GetContentArgs & {
|
|
1977
|
-
source_view?: boolean;
|
|
1978
|
-
selection?: boolean;
|
|
1979
|
-
save?: boolean;
|
|
1980
|
-
};
|
|
1981
|
-
declare type SetContentEvent = SetContentArgs & {
|
|
1982
|
-
paste?: boolean;
|
|
1983
|
-
selection?: boolean;
|
|
1984
|
-
};
|
|
1985
|
-
interface NewBlockEvent {
|
|
1986
|
-
newBlock: Element;
|
|
1987
|
-
}
|
|
1988
|
-
interface NodeChangeEvent {
|
|
1989
|
-
element: Element;
|
|
1990
|
-
parents: Node[];
|
|
1991
|
-
selectionChange?: boolean;
|
|
1992
|
-
initial?: boolean;
|
|
1993
|
-
}
|
|
1994
|
-
interface ObjectResizeEvent {
|
|
1995
|
-
target: HTMLElement;
|
|
1996
|
-
width: number;
|
|
1997
|
-
height: number;
|
|
1998
|
-
origin: string;
|
|
1999
|
-
}
|
|
2000
|
-
interface ObjectSelectedEvent {
|
|
2001
|
-
target: Node;
|
|
2002
|
-
targetClone?: Node;
|
|
2003
|
-
}
|
|
2004
|
-
interface ScrollIntoViewEvent {
|
|
2005
|
-
elm: HTMLElement;
|
|
2006
|
-
alignToTop: boolean;
|
|
2007
|
-
}
|
|
2008
|
-
interface SetSelectionRangeEvent {
|
|
2009
|
-
range: Range;
|
|
2010
|
-
forward: boolean;
|
|
2011
|
-
}
|
|
2012
|
-
interface ShowCaretEvent {
|
|
2013
|
-
target: Node;
|
|
2014
|
-
direction: number;
|
|
2015
|
-
before: boolean;
|
|
2016
|
-
}
|
|
2017
|
-
interface SwitchModeEvent {
|
|
2018
|
-
mode: string;
|
|
2019
|
-
}
|
|
2020
|
-
interface AddUndoEvent {
|
|
2021
|
-
level: UndoLevel;
|
|
2022
|
-
lastLevel: UndoLevel;
|
|
2023
|
-
originalEvent: Event;
|
|
2024
|
-
}
|
|
2025
|
-
interface UndoRedoEvent {
|
|
2026
|
-
level: UndoLevel;
|
|
2027
|
-
}
|
|
2028
|
-
interface WindowEvent<T extends DialogData> {
|
|
2029
|
-
dialog: InstanceApi<T>;
|
|
2030
|
-
}
|
|
2031
|
-
interface ProgressStateEvent {
|
|
2032
|
-
state: boolean;
|
|
2033
|
-
time?: number;
|
|
2034
|
-
}
|
|
2035
|
-
interface AfterProgressStateEvent {
|
|
2036
|
-
state: boolean;
|
|
2037
|
-
}
|
|
2038
|
-
interface PlaceholderToggleEvent {
|
|
2039
|
-
state: boolean;
|
|
2040
|
-
}
|
|
2041
|
-
interface LoadErrorEvent {
|
|
2042
|
-
message: string;
|
|
2043
|
-
}
|
|
2044
|
-
interface EditorEventMap extends Omit<NativeEventMap, 'blur' | 'focus'> {
|
|
2045
|
-
'activate': {
|
|
2046
|
-
relatedTarget: Editor;
|
|
2047
|
-
};
|
|
2048
|
-
'deactivate': {
|
|
2049
|
-
relatedTarget: Editor;
|
|
2050
|
-
};
|
|
2051
|
-
'focus': {
|
|
2052
|
-
blurredEditor: Editor;
|
|
2053
|
-
};
|
|
2054
|
-
'blur': {
|
|
2055
|
-
focusedEditor: Editor;
|
|
2056
|
-
};
|
|
2057
|
-
'resize': UIEvent;
|
|
2058
|
-
'scroll': UIEvent;
|
|
2059
|
-
'detach': {};
|
|
2060
|
-
'remove': {};
|
|
2061
|
-
'init': {};
|
|
2062
|
-
'ScrollIntoView': ScrollIntoViewEvent;
|
|
2063
|
-
'AfterScrollIntoView': ScrollIntoViewEvent;
|
|
2064
|
-
'ObjectResized': ObjectResizeEvent;
|
|
2065
|
-
'ObjectResizeStart': ObjectResizeEvent;
|
|
2066
|
-
'SwitchMode': SwitchModeEvent;
|
|
2067
|
-
'ScrollWindow': UIEvent;
|
|
2068
|
-
'ResizeWindow': UIEvent;
|
|
2069
|
-
'SkinLoaded': {};
|
|
2070
|
-
'SkinLoadError': LoadErrorEvent;
|
|
2071
|
-
'PluginLoadError': LoadErrorEvent;
|
|
2072
|
-
'IconsLoadError': LoadErrorEvent;
|
|
2073
|
-
'LanguageLoadError': LoadErrorEvent;
|
|
2074
|
-
'BeforeExecCommand': ExecCommandEvent;
|
|
2075
|
-
'ExecCommand': ExecCommandEvent;
|
|
2076
|
-
'NodeChange': NodeChangeEvent;
|
|
2077
|
-
'ShowCaret': ShowCaretEvent;
|
|
2078
|
-
'SelectionChange': {};
|
|
2079
|
-
'ObjectSelected': ObjectSelectedEvent;
|
|
2080
|
-
'BeforeObjectSelected': ObjectSelectedEvent;
|
|
2081
|
-
'GetSelectionRange': {
|
|
2082
|
-
range: Range;
|
|
2083
|
-
};
|
|
2084
|
-
'SetSelectionRange': SetSelectionRangeEvent;
|
|
2085
|
-
'AfterSetSelectionRange': SetSelectionRangeEvent;
|
|
2086
|
-
'BeforeGetContent': GetContentEvent;
|
|
2087
|
-
'GetContent': GetContentEvent;
|
|
2088
|
-
'BeforeSetContent': SetContentEvent;
|
|
2089
|
-
'SetContent': SetContentEvent;
|
|
2090
|
-
'LoadContent': {};
|
|
2091
|
-
'PreviewFormats': {};
|
|
2092
|
-
'AfterPreviewFormats': {};
|
|
2093
|
-
'ScriptsLoaded': {};
|
|
2094
|
-
'PreInit': {};
|
|
2095
|
-
'PostRender': {};
|
|
2096
|
-
'NewBlock': NewBlockEvent;
|
|
2097
|
-
'ClearUndos': {};
|
|
2098
|
-
'TypingUndo': {};
|
|
2099
|
-
'Redo': UndoRedoEvent;
|
|
2100
|
-
'Undo': UndoRedoEvent;
|
|
2101
|
-
'BeforeAddUndo': AddUndoEvent;
|
|
2102
|
-
'AddUndo': AddUndoEvent;
|
|
2103
|
-
'CloseWindow': WindowEvent<any>;
|
|
2104
|
-
'OpenWindow': WindowEvent<any>;
|
|
2105
|
-
'ProgressState': ProgressStateEvent;
|
|
2106
|
-
'AfterProgressState': AfterProgressStateEvent;
|
|
2107
|
-
'PlaceholderToggle': PlaceholderToggleEvent;
|
|
2108
|
-
'tap': TouchEvent;
|
|
2109
|
-
'longpress': TouchEvent;
|
|
2110
|
-
'longpresscancel': {};
|
|
2111
|
-
}
|
|
2112
|
-
interface EditorManagerEventMap {
|
|
2113
|
-
'AddEditor': {
|
|
2114
|
-
editor: Editor;
|
|
2115
|
-
};
|
|
2116
|
-
'RemoveEditor': {
|
|
2117
|
-
editor: Editor;
|
|
2118
|
-
};
|
|
2119
|
-
'BeforeUnload': {
|
|
2120
|
-
returnValue: any;
|
|
2121
|
-
};
|
|
2122
|
-
}
|
|
2123
|
-
type EventTypes_d_ExecCommandEvent = ExecCommandEvent;
|
|
2124
|
-
type EventTypes_d_GetContentEvent = GetContentEvent;
|
|
2125
|
-
type EventTypes_d_SetContentEvent = SetContentEvent;
|
|
2126
|
-
type EventTypes_d_NewBlockEvent = NewBlockEvent;
|
|
2127
|
-
type EventTypes_d_NodeChangeEvent = NodeChangeEvent;
|
|
2128
|
-
type EventTypes_d_ObjectResizeEvent = ObjectResizeEvent;
|
|
2129
|
-
type EventTypes_d_ObjectSelectedEvent = ObjectSelectedEvent;
|
|
2130
|
-
type EventTypes_d_ScrollIntoViewEvent = ScrollIntoViewEvent;
|
|
2131
|
-
type EventTypes_d_SetSelectionRangeEvent = SetSelectionRangeEvent;
|
|
2132
|
-
type EventTypes_d_ShowCaretEvent = ShowCaretEvent;
|
|
2133
|
-
type EventTypes_d_SwitchModeEvent = SwitchModeEvent;
|
|
2134
|
-
type EventTypes_d_AddUndoEvent = AddUndoEvent;
|
|
2135
|
-
type EventTypes_d_UndoRedoEvent = UndoRedoEvent;
|
|
2136
|
-
type EventTypes_d_WindowEvent<_0> = WindowEvent<_0>;
|
|
2137
|
-
type EventTypes_d_ProgressStateEvent = ProgressStateEvent;
|
|
2138
|
-
type EventTypes_d_AfterProgressStateEvent = AfterProgressStateEvent;
|
|
2139
|
-
type EventTypes_d_PlaceholderToggleEvent = PlaceholderToggleEvent;
|
|
2140
|
-
type EventTypes_d_LoadErrorEvent = LoadErrorEvent;
|
|
2141
|
-
type EventTypes_d_EditorEventMap = EditorEventMap;
|
|
2142
|
-
type EventTypes_d_EditorManagerEventMap = EditorManagerEventMap;
|
|
2143
|
-
declare namespace EventTypes_d {
|
|
2144
|
-
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_AfterProgressStateEvent as AfterProgressStateEvent, EventTypes_d_PlaceholderToggleEvent as PlaceholderToggleEvent, EventTypes_d_LoadErrorEvent as LoadErrorEvent, EventTypes_d_EditorEventMap as EditorEventMap, EventTypes_d_EditorManagerEventMap as EditorManagerEventMap, };
|
|
2475
|
+
addQueryStateHandler<S>(command: string, callback: (this: S) => boolean, scope: S): void;
|
|
2476
|
+
addQueryStateHandler(command: string, callback: (this: Editor) => boolean): void;
|
|
2477
|
+
addQueryValueHandler<S>(command: string, callback: (this: S) => string, scope: S): void;
|
|
2478
|
+
addQueryValueHandler(command: string, callback: (this: Editor) => string): void;
|
|
2145
2479
|
}
|
|
2146
2480
|
interface RawString {
|
|
2147
2481
|
raw: string;
|
|
2148
2482
|
}
|
|
2149
|
-
|
|
2150
|
-
|
|
2483
|
+
type Primitive = string | number | boolean | Record<string | number, any> | Function;
|
|
2484
|
+
type TokenisedString = [
|
|
2151
2485
|
string,
|
|
2152
2486
|
...Primitive[]
|
|
2153
2487
|
];
|
|
2154
|
-
|
|
2155
|
-
|
|
2488
|
+
type Untranslated = Primitive | TokenisedString | RawString | null | undefined;
|
|
2489
|
+
type TranslatedString = string;
|
|
2156
2490
|
interface I18n {
|
|
2157
2491
|
getData: () => Record<string, Record<string, string>>;
|
|
2158
2492
|
setCode: (newCode: string) => void;
|
|
@@ -2162,8 +2496,9 @@ interface I18n {
|
|
|
2162
2496
|
isRtl: () => boolean;
|
|
2163
2497
|
hasCode: (code: string) => boolean;
|
|
2164
2498
|
}
|
|
2165
|
-
interface Observable<T> {
|
|
2499
|
+
interface Observable<T extends {}> {
|
|
2166
2500
|
fire<K extends string, U extends MappedEvent<T, K>>(name: K, args?: U, bubble?: boolean): EditorEvent<U>;
|
|
2501
|
+
dispatch<K extends string, U extends MappedEvent<T, K>>(name: K, args?: U, bubble?: boolean): EditorEvent<U>;
|
|
2167
2502
|
on<K extends string>(name: K, callback: (event: EditorEvent<MappedEvent<T, K>>) => void, prepend?: boolean): EventDispatcher<T>;
|
|
2168
2503
|
off<K extends string>(name?: K, callback?: (event: EditorEvent<MappedEvent<T, K>>) => void): EventDispatcher<T>;
|
|
2169
2504
|
once<K extends string>(name: K, callback: (event: EditorEvent<MappedEvent<T, K>>) => void): EventDispatcher<T>;
|
|
@@ -2186,11 +2521,17 @@ interface URIConstructor {
|
|
|
2186
2521
|
data: string;
|
|
2187
2522
|
};
|
|
2188
2523
|
}
|
|
2524
|
+
interface SafeUriOptions {
|
|
2525
|
+
readonly allow_html_data_urls?: boolean;
|
|
2526
|
+
readonly allow_script_urls?: boolean;
|
|
2527
|
+
readonly allow_svg_data_urls?: boolean;
|
|
2528
|
+
}
|
|
2189
2529
|
declare class URI {
|
|
2190
2530
|
static parseDataUri(uri: string): {
|
|
2191
|
-
type: string;
|
|
2531
|
+
type: string | undefined;
|
|
2192
2532
|
data: string;
|
|
2193
2533
|
};
|
|
2534
|
+
static isDomSafe(uri: string, context?: string, options?: SafeUriOptions): boolean;
|
|
2194
2535
|
static getDocumentBaseUrl(loc: {
|
|
2195
2536
|
protocol: string;
|
|
2196
2537
|
host?: string;
|
|
@@ -2198,19 +2539,19 @@ declare class URI {
|
|
|
2198
2539
|
pathname?: string;
|
|
2199
2540
|
}): string;
|
|
2200
2541
|
source: string;
|
|
2201
|
-
protocol: string;
|
|
2202
|
-
authority: string;
|
|
2203
|
-
userInfo: string;
|
|
2204
|
-
user: string;
|
|
2205
|
-
password: string;
|
|
2206
|
-
host: string;
|
|
2207
|
-
port: string;
|
|
2208
|
-
relative: string;
|
|
2542
|
+
protocol: string | undefined;
|
|
2543
|
+
authority: string | undefined;
|
|
2544
|
+
userInfo: string | undefined;
|
|
2545
|
+
user: string | undefined;
|
|
2546
|
+
password: string | undefined;
|
|
2547
|
+
host: string | undefined;
|
|
2548
|
+
port: string | undefined;
|
|
2549
|
+
relative: string | undefined;
|
|
2209
2550
|
path: string;
|
|
2210
2551
|
directory: string;
|
|
2211
|
-
file: string;
|
|
2212
|
-
query: string;
|
|
2213
|
-
anchor: string;
|
|
2552
|
+
file: string | undefined;
|
|
2553
|
+
query: string | undefined;
|
|
2554
|
+
anchor: string | undefined;
|
|
2214
2555
|
settings: URISettings;
|
|
2215
2556
|
constructor(url: string, settings?: URISettings);
|
|
2216
2557
|
setPath(path: string): void;
|
|
@@ -2222,15 +2563,12 @@ declare class URI {
|
|
|
2222
2563
|
getURI(noProtoHost?: boolean): string;
|
|
2223
2564
|
}
|
|
2224
2565
|
interface EditorManager extends Observable<EditorManagerEventMap> {
|
|
2225
|
-
|
|
2226
|
-
defaultSettings: RawEditorSettings;
|
|
2566
|
+
defaultOptions: RawEditorOptions;
|
|
2227
2567
|
majorVersion: string;
|
|
2228
2568
|
minorVersion: string;
|
|
2229
2569
|
releaseDate: string;
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
focusedEditor: Editor;
|
|
2233
|
-
settings: RawEditorSettings;
|
|
2570
|
+
activeEditor: Editor | null;
|
|
2571
|
+
focusedEditor: Editor | null;
|
|
2234
2572
|
baseURI: URI;
|
|
2235
2573
|
baseURL: string;
|
|
2236
2574
|
documentBaseURL: string;
|
|
@@ -2238,14 +2576,15 @@ interface EditorManager extends Observable<EditorManagerEventMap> {
|
|
|
2238
2576
|
suffix: string;
|
|
2239
2577
|
add(this: EditorManager, editor: Editor): Editor;
|
|
2240
2578
|
addI18n: (code: string, item: Record<string, string>) => void;
|
|
2241
|
-
createEditor(this: EditorManager, id: string,
|
|
2579
|
+
createEditor(this: EditorManager, id: string, options: RawEditorOptions): Editor;
|
|
2242
2580
|
execCommand(this: EditorManager, cmd: string, ui: boolean, value: any): boolean;
|
|
2243
2581
|
get(this: EditorManager): Editor[];
|
|
2244
|
-
get(this: EditorManager, id: number | string): Editor;
|
|
2245
|
-
init(this: EditorManager,
|
|
2246
|
-
overrideDefaults(this: EditorManager,
|
|
2582
|
+
get(this: EditorManager, id: number | string): Editor | null;
|
|
2583
|
+
init(this: EditorManager, options: RawEditorOptions): Promise<Editor[]>;
|
|
2584
|
+
overrideDefaults(this: EditorManager, defaultOptions: Partial<RawEditorOptions>): void;
|
|
2247
2585
|
remove(this: EditorManager): void;
|
|
2248
|
-
remove(this: EditorManager, selector: string
|
|
2586
|
+
remove(this: EditorManager, selector: string): void;
|
|
2587
|
+
remove(this: EditorManager, editor: Editor): Editor | null;
|
|
2249
2588
|
setActive(this: EditorManager, editor: Editor): void;
|
|
2250
2589
|
setup(this: EditorManager): void;
|
|
2251
2590
|
translate: (text: Untranslated) => TranslatedString;
|
|
@@ -2254,32 +2593,87 @@ interface EditorManager extends Observable<EditorManagerEventMap> {
|
|
|
2254
2593
|
}
|
|
2255
2594
|
interface EditorObservable extends Observable<EditorEventMap> {
|
|
2256
2595
|
bindPendingEventDelegates(this: Editor): void;
|
|
2257
|
-
toggleNativeEvent(this: Editor, name: string, state: boolean):
|
|
2596
|
+
toggleNativeEvent(this: Editor, name: string, state: boolean): void;
|
|
2258
2597
|
unbindAllNativeEvents(this: Editor): void;
|
|
2259
2598
|
}
|
|
2599
|
+
interface ProcessorSuccess<T> {
|
|
2600
|
+
valid: true;
|
|
2601
|
+
value: T;
|
|
2602
|
+
}
|
|
2603
|
+
interface ProcessorError {
|
|
2604
|
+
valid: false;
|
|
2605
|
+
message: string;
|
|
2606
|
+
}
|
|
2607
|
+
type SimpleProcessor = (value: unknown) => boolean;
|
|
2608
|
+
type Processor<T> = (value: unknown) => ProcessorSuccess<T> | ProcessorError;
|
|
2609
|
+
interface BuiltInOptionTypeMap {
|
|
2610
|
+
'string': string;
|
|
2611
|
+
'number': number;
|
|
2612
|
+
'boolean': boolean;
|
|
2613
|
+
'array': any[];
|
|
2614
|
+
'function': Function;
|
|
2615
|
+
'object': any;
|
|
2616
|
+
'string[]': string[];
|
|
2617
|
+
'object[]': any[];
|
|
2618
|
+
'regexp': RegExp;
|
|
2619
|
+
}
|
|
2620
|
+
type BuiltInOptionType = keyof BuiltInOptionTypeMap;
|
|
2621
|
+
interface BaseOptionSpec {
|
|
2622
|
+
immutable?: boolean;
|
|
2623
|
+
deprecated?: boolean;
|
|
2624
|
+
docsUrl?: string;
|
|
2625
|
+
}
|
|
2626
|
+
interface BuiltInOptionSpec<K extends BuiltInOptionType> extends BaseOptionSpec {
|
|
2627
|
+
processor: K;
|
|
2628
|
+
default?: BuiltInOptionTypeMap[K];
|
|
2629
|
+
}
|
|
2630
|
+
interface SimpleOptionSpec<T> extends BaseOptionSpec {
|
|
2631
|
+
processor: SimpleProcessor;
|
|
2632
|
+
default?: T;
|
|
2633
|
+
}
|
|
2634
|
+
interface OptionSpec<T, U> extends BaseOptionSpec {
|
|
2635
|
+
processor: Processor<U>;
|
|
2636
|
+
default?: T;
|
|
2637
|
+
}
|
|
2638
|
+
interface Options {
|
|
2639
|
+
register: {
|
|
2640
|
+
<K extends BuiltInOptionType>(name: string, spec: BuiltInOptionSpec<K>): void;
|
|
2641
|
+
<K extends keyof NormalizedEditorOptions>(name: K, spec: OptionSpec<NormalizedEditorOptions[K], EditorOptions[K]> | SimpleOptionSpec<NormalizedEditorOptions[K]>): void;
|
|
2642
|
+
<T, U>(name: string, spec: OptionSpec<T, U>): void;
|
|
2643
|
+
<T>(name: string, spec: SimpleOptionSpec<T>): void;
|
|
2644
|
+
};
|
|
2645
|
+
isRegistered: (name: string) => boolean;
|
|
2646
|
+
get: {
|
|
2647
|
+
<K extends keyof EditorOptions>(name: K): EditorOptions[K];
|
|
2648
|
+
<T>(name: string): T | undefined;
|
|
2649
|
+
};
|
|
2650
|
+
set: <K extends string, T>(name: K, value: K extends keyof NormalizedEditorOptions ? NormalizedEditorOptions[K] : T) => boolean;
|
|
2651
|
+
unset: (name: string) => boolean;
|
|
2652
|
+
isSet: (name: string) => boolean;
|
|
2653
|
+
}
|
|
2260
2654
|
interface UploadResult$1 {
|
|
2261
2655
|
element: HTMLImageElement;
|
|
2262
2656
|
status: boolean;
|
|
2263
2657
|
blobInfo: BlobInfo;
|
|
2264
2658
|
uploadUri: string;
|
|
2659
|
+
removed: boolean;
|
|
2265
2660
|
}
|
|
2266
|
-
declare type UploadCallback = (results: UploadResult$1[]) => void;
|
|
2267
2661
|
interface EditorUpload {
|
|
2268
2662
|
blobCache: BlobCache;
|
|
2269
2663
|
addFilter: (filter: (img: HTMLImageElement) => boolean) => void;
|
|
2270
|
-
uploadImages: (
|
|
2271
|
-
uploadImagesAuto: (
|
|
2664
|
+
uploadImages: () => Promise<UploadResult$1[]>;
|
|
2665
|
+
uploadImagesAuto: () => Promise<UploadResult$1[]>;
|
|
2272
2666
|
scanForImages: () => Promise<BlobInfoImagePair[]>;
|
|
2273
2667
|
destroy: () => void;
|
|
2274
2668
|
}
|
|
2275
|
-
|
|
2669
|
+
type FormatChangeCallback = (state: boolean, data: {
|
|
2276
2670
|
node: Node;
|
|
2277
2671
|
format: string;
|
|
2278
|
-
parents:
|
|
2672
|
+
parents: Element[];
|
|
2279
2673
|
}) => void;
|
|
2280
2674
|
interface FormatRegistry {
|
|
2281
2675
|
get: {
|
|
2282
|
-
(name: string): Format[];
|
|
2676
|
+
(name: string): Format[] | undefined;
|
|
2283
2677
|
(): Record<string, Format[]>;
|
|
2284
2678
|
};
|
|
2285
2679
|
has: (name: string) => boolean;
|
|
@@ -2287,18 +2681,18 @@ interface FormatRegistry {
|
|
|
2287
2681
|
unregister: (name: string) => Formats;
|
|
2288
2682
|
}
|
|
2289
2683
|
interface Formatter extends FormatRegistry {
|
|
2290
|
-
apply: (name: string, vars?: FormatVars, node?: Node | RangeLikeObject) => void;
|
|
2684
|
+
apply: (name: string, vars?: FormatVars, node?: Node | RangeLikeObject | null) => void;
|
|
2291
2685
|
remove: (name: string, vars?: FormatVars, node?: Node | Range, similar?: boolean) => void;
|
|
2292
2686
|
toggle: (name: string, vars?: FormatVars, node?: Node) => void;
|
|
2293
|
-
match: (name: string, vars?: FormatVars, node?: Node) => boolean;
|
|
2294
|
-
closest: (names:
|
|
2687
|
+
match: (name: string, vars?: FormatVars, node?: Node, similar?: boolean) => boolean;
|
|
2688
|
+
closest: (names: string[]) => string | null;
|
|
2295
2689
|
matchAll: (names: string[], vars?: FormatVars) => string[];
|
|
2296
|
-
matchNode: (node: Node, name: string, vars?: FormatVars, similar?: boolean) =>
|
|
2690
|
+
matchNode: (node: Node | null, name: string, vars?: FormatVars, similar?: boolean) => Format | undefined;
|
|
2297
2691
|
canApply: (name: string) => boolean;
|
|
2298
|
-
formatChanged: (names: string, callback: FormatChangeCallback, similar?: boolean) => {
|
|
2692
|
+
formatChanged: (names: string, callback: FormatChangeCallback, similar?: boolean, vars?: FormatVars) => {
|
|
2299
2693
|
unbind: () => void;
|
|
2300
2694
|
};
|
|
2301
|
-
getCssText: (format: string |
|
|
2695
|
+
getCssText: (format: string | ApplyFormat) => string;
|
|
2302
2696
|
}
|
|
2303
2697
|
interface EditorMode {
|
|
2304
2698
|
isReadOnly: () => boolean;
|
|
@@ -2311,19 +2705,27 @@ interface EditorModeApi {
|
|
|
2311
2705
|
deactivate: () => void;
|
|
2312
2706
|
editorReadOnly: boolean;
|
|
2313
2707
|
}
|
|
2708
|
+
interface Model {
|
|
2709
|
+
readonly table: {
|
|
2710
|
+
readonly getSelectedCells: () => HTMLTableCellElement[];
|
|
2711
|
+
readonly clearSelectedCells: (container: Node) => void;
|
|
2712
|
+
};
|
|
2713
|
+
}
|
|
2714
|
+
type ModelManager = AddOnManager<Model>;
|
|
2314
2715
|
interface Plugin {
|
|
2315
2716
|
getMetadata?: () => {
|
|
2316
2717
|
name: string;
|
|
2317
2718
|
url: string;
|
|
2318
2719
|
};
|
|
2720
|
+
init?: (editor: Editor, url: string) => void;
|
|
2319
2721
|
[key: string]: any;
|
|
2320
2722
|
}
|
|
2321
|
-
|
|
2723
|
+
type PluginManager = AddOnManager<void | Plugin>;
|
|
2322
2724
|
interface ShortcutsConstructor {
|
|
2323
2725
|
readonly prototype: Shortcuts;
|
|
2324
2726
|
new (editor: Editor): Shortcuts;
|
|
2325
2727
|
}
|
|
2326
|
-
|
|
2728
|
+
type CommandFunc = string | [
|
|
2327
2729
|
string,
|
|
2328
2730
|
boolean,
|
|
2329
2731
|
any
|
|
@@ -2333,7 +2735,7 @@ declare class Shortcuts {
|
|
|
2333
2735
|
private readonly shortcuts;
|
|
2334
2736
|
private pendingPatterns;
|
|
2335
2737
|
constructor(editor: Editor);
|
|
2336
|
-
add(pattern: string, desc: string, cmdFunc: CommandFunc, scope?: any): boolean;
|
|
2738
|
+
add(pattern: string, desc: string | null, cmdFunc: CommandFunc, scope?: any): boolean;
|
|
2337
2739
|
remove(pattern: string): boolean;
|
|
2338
2740
|
private normalizeCommandFunc;
|
|
2339
2741
|
private createShortcut;
|
|
@@ -2342,29 +2744,29 @@ declare class Shortcuts {
|
|
|
2342
2744
|
private matchShortcut;
|
|
2343
2745
|
private executeShortcutAction;
|
|
2344
2746
|
}
|
|
2747
|
+
interface RenderResult {
|
|
2748
|
+
iframeContainer?: HTMLElement;
|
|
2749
|
+
editorContainer: HTMLElement;
|
|
2750
|
+
api?: Partial<EditorUiApi>;
|
|
2751
|
+
}
|
|
2345
2752
|
interface Theme {
|
|
2346
2753
|
ui?: any;
|
|
2347
2754
|
inline?: any;
|
|
2348
2755
|
execCommand?: (command: string, ui?: boolean, value?: any) => boolean;
|
|
2349
2756
|
destroy?: () => void;
|
|
2350
|
-
init?: (editor: Editor, url: string
|
|
2351
|
-
renderUI?: () =>
|
|
2352
|
-
iframeContainer?: HTMLIFrameElement;
|
|
2353
|
-
editorContainer: HTMLElement;
|
|
2354
|
-
api?: Partial<EditorUiApi>;
|
|
2355
|
-
};
|
|
2757
|
+
init?: (editor: Editor, url: string) => void;
|
|
2758
|
+
renderUI?: () => Promise<RenderResult> | RenderResult;
|
|
2356
2759
|
getNotificationManagerImpl?: () => NotificationManagerImpl;
|
|
2357
2760
|
getWindowManagerImpl?: () => WindowManagerImpl;
|
|
2358
2761
|
}
|
|
2359
|
-
|
|
2762
|
+
type ThemeManager = AddOnManager<void | Theme>;
|
|
2360
2763
|
interface EditorConstructor {
|
|
2361
2764
|
readonly prototype: Editor;
|
|
2362
|
-
new (id: string,
|
|
2765
|
+
new (id: string, options: RawEditorOptions, editorManager: EditorManager): Editor;
|
|
2363
2766
|
}
|
|
2364
2767
|
declare class Editor implements EditorObservable {
|
|
2365
2768
|
documentBaseUrl: string;
|
|
2366
2769
|
baseUri: URI;
|
|
2367
|
-
settings: EditorSettings;
|
|
2368
2770
|
id: string;
|
|
2369
2771
|
plugins: Record<string, Plugin>;
|
|
2370
2772
|
documentBaseURI: URI;
|
|
@@ -2373,43 +2775,40 @@ declare class Editor implements EditorObservable {
|
|
|
2373
2775
|
contentStyles: string[];
|
|
2374
2776
|
ui: EditorUi;
|
|
2375
2777
|
mode: EditorMode;
|
|
2376
|
-
|
|
2377
|
-
|
|
2778
|
+
options: Options;
|
|
2779
|
+
editorUpload: EditorUpload;
|
|
2378
2780
|
shortcuts: Shortcuts;
|
|
2379
2781
|
loadedCSS: Record<string, any>;
|
|
2380
2782
|
editorCommands: EditorCommands;
|
|
2381
2783
|
suffix: string;
|
|
2382
2784
|
editorManager: EditorManager;
|
|
2785
|
+
hidden: boolean;
|
|
2383
2786
|
inline: boolean;
|
|
2787
|
+
hasVisual: boolean;
|
|
2384
2788
|
isNotDirty: boolean;
|
|
2385
|
-
callbackLookup: any;
|
|
2386
|
-
_nodeChangeDispatcher: NodeChange;
|
|
2387
|
-
editorUpload: EditorUpload;
|
|
2388
2789
|
annotator: Annotator;
|
|
2389
|
-
bodyElement: HTMLElement;
|
|
2790
|
+
bodyElement: HTMLElement | undefined;
|
|
2390
2791
|
bookmark: any;
|
|
2391
2792
|
composing: boolean;
|
|
2392
2793
|
container: HTMLElement;
|
|
2393
2794
|
contentAreaContainer: HTMLElement;
|
|
2394
2795
|
contentDocument: Document;
|
|
2395
2796
|
contentWindow: Window;
|
|
2396
|
-
delegates: Record<string,
|
|
2797
|
+
delegates: Record<string, EventUtilsCallback<any>> | undefined;
|
|
2397
2798
|
destroyed: boolean;
|
|
2398
2799
|
dom: DOMUtils;
|
|
2399
2800
|
editorContainer: HTMLElement;
|
|
2400
|
-
eventRoot
|
|
2801
|
+
eventRoot: Element | undefined;
|
|
2401
2802
|
formatter: Formatter;
|
|
2402
|
-
formElement: HTMLElement;
|
|
2403
|
-
formEventDelegate: (e: Event) => void;
|
|
2803
|
+
formElement: HTMLElement | undefined;
|
|
2804
|
+
formEventDelegate: ((e: Event) => void) | undefined;
|
|
2404
2805
|
hasHiddenInput: boolean;
|
|
2405
|
-
hasVisual: boolean;
|
|
2406
|
-
hidden: boolean;
|
|
2407
2806
|
iframeElement: HTMLIFrameElement | null;
|
|
2408
|
-
iframeHTML: string;
|
|
2807
|
+
iframeHTML: string | undefined;
|
|
2409
2808
|
initialized: boolean;
|
|
2410
2809
|
notificationManager: NotificationManager;
|
|
2411
2810
|
orgDisplay: string;
|
|
2412
|
-
orgVisibility: string;
|
|
2811
|
+
orgVisibility: string | undefined;
|
|
2413
2812
|
parser: DomParser;
|
|
2414
2813
|
quirks: Quirks;
|
|
2415
2814
|
readonly: boolean;
|
|
@@ -2420,43 +2819,47 @@ declare class Editor implements EditorObservable {
|
|
|
2420
2819
|
startContent: string;
|
|
2421
2820
|
targetElm: HTMLElement;
|
|
2422
2821
|
theme: Theme;
|
|
2822
|
+
model: Model;
|
|
2423
2823
|
undoManager: UndoManager;
|
|
2424
|
-
validate: boolean;
|
|
2425
2824
|
windowManager: WindowManager;
|
|
2426
|
-
_beforeUnload: () => void;
|
|
2427
|
-
_eventDispatcher: EventDispatcher<NativeEventMap
|
|
2428
|
-
|
|
2825
|
+
_beforeUnload: (() => void) | undefined;
|
|
2826
|
+
_eventDispatcher: EventDispatcher<NativeEventMap> | undefined;
|
|
2827
|
+
_nodeChangeDispatcher: NodeChange;
|
|
2429
2828
|
_pendingNativeEvents: string[];
|
|
2430
2829
|
_selectionOverrides: SelectionOverrides;
|
|
2431
2830
|
_skinLoaded: boolean;
|
|
2831
|
+
_editableRoot: boolean;
|
|
2432
2832
|
bindPendingEventDelegates: EditorObservable['bindPendingEventDelegates'];
|
|
2433
2833
|
toggleNativeEvent: EditorObservable['toggleNativeEvent'];
|
|
2434
2834
|
unbindAllNativeEvents: EditorObservable['unbindAllNativeEvents'];
|
|
2435
2835
|
fire: EditorObservable['fire'];
|
|
2836
|
+
dispatch: EditorObservable['dispatch'];
|
|
2436
2837
|
on: EditorObservable['on'];
|
|
2437
2838
|
off: EditorObservable['off'];
|
|
2438
2839
|
once: EditorObservable['once'];
|
|
2439
2840
|
hasEventListeners: EditorObservable['hasEventListeners'];
|
|
2440
|
-
constructor(id: string,
|
|
2841
|
+
constructor(id: string, options: RawEditorOptions, editorManager: EditorManager);
|
|
2441
2842
|
render(): void;
|
|
2442
2843
|
focus(skipFocus?: boolean): void;
|
|
2443
2844
|
hasFocus(): boolean;
|
|
2444
|
-
execCallback(name: string, ...x: any[]): any;
|
|
2445
2845
|
translate(text: Untranslated): TranslatedString;
|
|
2446
|
-
getParam<K extends
|
|
2447
|
-
getParam<K extends keyof
|
|
2448
|
-
getParam<T>(name: string, defaultVal: T, type?:
|
|
2846
|
+
getParam<K extends BuiltInOptionType>(name: string, defaultVal: BuiltInOptionTypeMap[K], type: K): BuiltInOptionTypeMap[K];
|
|
2847
|
+
getParam<K extends keyof NormalizedEditorOptions>(name: K, defaultVal?: NormalizedEditorOptions[K], type?: BuiltInOptionType): NormalizedEditorOptions[K];
|
|
2848
|
+
getParam<T>(name: string, defaultVal: T, type?: BuiltInOptionType): T;
|
|
2449
2849
|
hasPlugin(name: string, loaded?: boolean): boolean;
|
|
2450
2850
|
nodeChanged(args?: any): void;
|
|
2451
|
-
addCommand(name: string, callback: EditorCommandCallback
|
|
2452
|
-
|
|
2453
|
-
|
|
2851
|
+
addCommand<S>(name: string, callback: EditorCommandCallback<S>, scope: S): void;
|
|
2852
|
+
addCommand(name: string, callback: EditorCommandCallback<Editor>): void;
|
|
2853
|
+
addQueryStateHandler<S>(name: string, callback: (this: S) => boolean, scope?: S): void;
|
|
2854
|
+
addQueryStateHandler(name: string, callback: (this: Editor) => boolean): void;
|
|
2855
|
+
addQueryValueHandler<S>(name: string, callback: (this: S) => string, scope: S): void;
|
|
2856
|
+
addQueryValueHandler(name: string, callback: (this: Editor) => string): void;
|
|
2454
2857
|
addShortcut(pattern: string, desc: string, cmdFunc: string | [
|
|
2455
2858
|
string,
|
|
2456
2859
|
boolean,
|
|
2457
2860
|
any
|
|
2458
2861
|
] | (() => void), scope?: any): void;
|
|
2459
|
-
execCommand(cmd: string, ui?: boolean, value?: any, args?:
|
|
2862
|
+
execCommand(cmd: string, ui?: boolean, value?: any, args?: ExecCommandArgs): boolean;
|
|
2460
2863
|
queryCommandState(cmd: string): boolean;
|
|
2461
2864
|
queryCommandValue(cmd: string): string;
|
|
2462
2865
|
queryCommandSupported(cmd: string): boolean;
|
|
@@ -2464,15 +2867,15 @@ declare class Editor implements EditorObservable {
|
|
|
2464
2867
|
hide(): void;
|
|
2465
2868
|
isHidden(): boolean;
|
|
2466
2869
|
setProgressState(state: boolean, time?: number): void;
|
|
2467
|
-
load(args?:
|
|
2468
|
-
save(args?:
|
|
2469
|
-
setContent(content: string, args?: SetContentArgs): string;
|
|
2470
|
-
setContent(content: AstNode, args?: SetContentArgs): AstNode;
|
|
2471
|
-
setContent(content: Content, args?: SetContentArgs): Content;
|
|
2870
|
+
load(args?: Partial<SetContentArgs>): string;
|
|
2871
|
+
save(args?: Partial<GetContentArgs>): string;
|
|
2872
|
+
setContent(content: string, args?: Partial<SetContentArgs>): string;
|
|
2873
|
+
setContent(content: AstNode, args?: Partial<SetContentArgs>): AstNode;
|
|
2874
|
+
setContent(content: Content, args?: Partial<SetContentArgs>): Content;
|
|
2472
2875
|
getContent(args: {
|
|
2473
2876
|
format: 'tree';
|
|
2474
|
-
} & GetContentArgs): AstNode;
|
|
2475
|
-
getContent(args?: GetContentArgs): string;
|
|
2877
|
+
} & Partial<GetContentArgs>): AstNode;
|
|
2878
|
+
getContent(args?: Partial<GetContentArgs>): string;
|
|
2476
2879
|
insertContent(content: string, args?: any): void;
|
|
2477
2880
|
resetContent(initialContent?: string): void;
|
|
2478
2881
|
isDirty(): boolean;
|
|
@@ -2483,51 +2886,43 @@ declare class Editor implements EditorObservable {
|
|
|
2483
2886
|
getWin(): Window;
|
|
2484
2887
|
getDoc(): Document;
|
|
2485
2888
|
getBody(): HTMLElement;
|
|
2486
|
-
convertURL(url: string, name: string, elm?:
|
|
2889
|
+
convertURL(url: string, name: string, elm?: string | Element): string;
|
|
2487
2890
|
addVisual(elm?: HTMLElement): void;
|
|
2891
|
+
setEditableRoot(state: boolean): void;
|
|
2892
|
+
hasEditableRoot(): boolean;
|
|
2488
2893
|
remove(): void;
|
|
2489
2894
|
destroy(automatic?: boolean): void;
|
|
2490
|
-
uploadImages(
|
|
2895
|
+
uploadImages(): Promise<UploadResult$1[]>;
|
|
2491
2896
|
_scanForImages(): Promise<BlobInfoImagePair[]>;
|
|
2492
|
-
addButton(): void;
|
|
2493
|
-
addSidebar(): void;
|
|
2494
|
-
addMenuItem(): void;
|
|
2495
|
-
addContextToolbar(): void;
|
|
2496
2897
|
}
|
|
2497
2898
|
interface UrlObject {
|
|
2498
2899
|
prefix: string;
|
|
2499
2900
|
resource: string;
|
|
2500
2901
|
suffix: string;
|
|
2501
2902
|
}
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
declare type AddOnConstructor<T> = new (editor: Editor, url: string, $?: DomQueryConstructor) => T;
|
|
2903
|
+
type WaitState = 'added' | 'loaded';
|
|
2904
|
+
type AddOnConstructor<T> = (editor: Editor, url: string) => T;
|
|
2505
2905
|
interface AddOnManager<T> {
|
|
2506
2906
|
items: AddOnConstructor<T>[];
|
|
2507
2907
|
urls: Record<string, string>;
|
|
2508
2908
|
lookup: Record<string, {
|
|
2509
2909
|
instance: AddOnConstructor<T>;
|
|
2510
|
-
dependencies?: string[];
|
|
2511
2910
|
}>;
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
callback: () => void;
|
|
2516
|
-
}[];
|
|
2517
|
-
get: (name: string) => AddOnConstructor<T>;
|
|
2518
|
-
dependencies: (name: string) => string[];
|
|
2519
|
-
requireLangPack: (name: string, languages: string) => void;
|
|
2520
|
-
add: (id: string, addOn: AddOnCallback<T>, dependencies?: string[]) => AddOnConstructor<T>;
|
|
2911
|
+
get: (name: string) => AddOnConstructor<T> | undefined;
|
|
2912
|
+
requireLangPack: (name: string, languages?: string) => void;
|
|
2913
|
+
add: (id: string, addOn: AddOnConstructor<T>) => AddOnConstructor<T>;
|
|
2521
2914
|
remove: (name: string) => void;
|
|
2522
2915
|
createUrl: (baseUrl: UrlObject, dep: string | UrlObject) => UrlObject;
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
waitFor: (name: string, callback: () => void, state?: WaitState) => void;
|
|
2916
|
+
load: (name: string, addOnUrl: string | UrlObject) => Promise<void>;
|
|
2917
|
+
waitFor: (name: string, state?: WaitState) => Promise<void>;
|
|
2526
2918
|
}
|
|
2527
2919
|
interface RangeUtils {
|
|
2528
2920
|
walk: (rng: Range, callback: (nodes: Node[]) => void) => void;
|
|
2529
2921
|
split: (rng: Range) => RangeLikeObject;
|
|
2530
2922
|
normalize: (rng: Range) => boolean;
|
|
2923
|
+
expand: (rng: Range, options?: {
|
|
2924
|
+
type: 'word';
|
|
2925
|
+
}) => Range;
|
|
2531
2926
|
}
|
|
2532
2927
|
interface ScriptLoaderSettings {
|
|
2533
2928
|
referrerPolicy?: ReferrerPolicy;
|
|
@@ -2547,16 +2942,16 @@ declare class ScriptLoader {
|
|
|
2547
2942
|
private loading;
|
|
2548
2943
|
constructor(settings?: ScriptLoaderSettings);
|
|
2549
2944
|
_setReferrerPolicy(referrerPolicy: ReferrerPolicy): void;
|
|
2550
|
-
loadScript(url: string
|
|
2945
|
+
loadScript(url: string): Promise<void>;
|
|
2551
2946
|
isDone(url: string): boolean;
|
|
2552
2947
|
markDone(url: string): void;
|
|
2553
|
-
add(url: string
|
|
2554
|
-
load(url: string
|
|
2948
|
+
add(url: string): Promise<void>;
|
|
2949
|
+
load(url: string): Promise<void>;
|
|
2555
2950
|
remove(url: string): void;
|
|
2556
|
-
loadQueue(
|
|
2557
|
-
loadScripts(scripts: string[]
|
|
2951
|
+
loadQueue(): Promise<void>;
|
|
2952
|
+
loadScripts(scripts: string[]): Promise<void>;
|
|
2558
2953
|
}
|
|
2559
|
-
|
|
2954
|
+
type TextProcessCallback = (node: Text, offset: number, text: string) => number;
|
|
2560
2955
|
interface Spot {
|
|
2561
2956
|
container: Text;
|
|
2562
2957
|
offset: number;
|
|
@@ -2573,10 +2968,10 @@ declare class DomTreeWalker {
|
|
|
2573
2968
|
private readonly rootNode;
|
|
2574
2969
|
private node;
|
|
2575
2970
|
constructor(startNode: Node, rootNode: Node);
|
|
2576
|
-
current(): Node;
|
|
2577
|
-
next(shallow?: boolean): Node;
|
|
2578
|
-
prev(shallow?: boolean): Node;
|
|
2579
|
-
prev2(shallow?: boolean): Node;
|
|
2971
|
+
current(): Node | null | undefined;
|
|
2972
|
+
next(shallow?: boolean): Node | null | undefined;
|
|
2973
|
+
prev(shallow?: boolean): Node | null | undefined;
|
|
2974
|
+
prev2(shallow?: boolean): Node | null | undefined;
|
|
2580
2975
|
private findSibling;
|
|
2581
2976
|
private findPreviousNode;
|
|
2582
2977
|
}
|
|
@@ -2585,31 +2980,17 @@ interface Version {
|
|
|
2585
2980
|
minor: number;
|
|
2586
2981
|
}
|
|
2587
2982
|
interface Env {
|
|
2588
|
-
opera: boolean;
|
|
2589
|
-
webkit: boolean;
|
|
2590
|
-
ie: false | number;
|
|
2591
|
-
gecko: boolean;
|
|
2592
|
-
mac: boolean;
|
|
2593
|
-
iOS: boolean;
|
|
2594
|
-
android: boolean;
|
|
2595
|
-
contentEditable: boolean;
|
|
2596
2983
|
transparentSrc: string;
|
|
2597
|
-
caretAfter: boolean;
|
|
2598
|
-
range: boolean;
|
|
2599
2984
|
documentMode: number;
|
|
2600
|
-
fileApi: boolean;
|
|
2601
|
-
ceFalse: boolean;
|
|
2602
2985
|
cacheSuffix: any;
|
|
2603
2986
|
container: any;
|
|
2604
|
-
experimentalShadowDom: boolean;
|
|
2605
2987
|
canHaveCSP: boolean;
|
|
2606
|
-
desktop: boolean;
|
|
2607
2988
|
windowsPhone: boolean;
|
|
2608
2989
|
browser: {
|
|
2609
2990
|
current: string | undefined;
|
|
2610
2991
|
version: Version;
|
|
2611
2992
|
isEdge: () => boolean;
|
|
2612
|
-
|
|
2993
|
+
isChromium: () => boolean;
|
|
2613
2994
|
isIE: () => boolean;
|
|
2614
2995
|
isOpera: () => boolean;
|
|
2615
2996
|
isFirefox: () => boolean;
|
|
@@ -2621,7 +3002,7 @@ interface Env {
|
|
|
2621
3002
|
isWindows: () => boolean;
|
|
2622
3003
|
isiOS: () => boolean;
|
|
2623
3004
|
isAndroid: () => boolean;
|
|
2624
|
-
|
|
3005
|
+
isMacOS: () => boolean;
|
|
2625
3006
|
isLinux: () => boolean;
|
|
2626
3007
|
isSolaris: () => boolean;
|
|
2627
3008
|
isFreeBSD: () => boolean;
|
|
@@ -2637,6 +3018,17 @@ interface Env {
|
|
|
2637
3018
|
isDesktop: () => boolean;
|
|
2638
3019
|
};
|
|
2639
3020
|
}
|
|
3021
|
+
interface FakeClipboardItem {
|
|
3022
|
+
readonly items: Record<string, any>;
|
|
3023
|
+
readonly types: ReadonlyArray<string>;
|
|
3024
|
+
readonly getType: <D = any>(type: string) => D | undefined;
|
|
3025
|
+
}
|
|
3026
|
+
interface FakeClipboard {
|
|
3027
|
+
readonly FakeClipboardItem: (items: Record<string, any>) => FakeClipboardItem;
|
|
3028
|
+
readonly write: (data: FakeClipboardItem[]) => void;
|
|
3029
|
+
readonly read: () => FakeClipboardItem[] | undefined;
|
|
3030
|
+
readonly clear: () => void;
|
|
3031
|
+
}
|
|
2640
3032
|
interface FocusManager {
|
|
2641
3033
|
isEditorUIElement: (elm: Element) => boolean;
|
|
2642
3034
|
}
|
|
@@ -2648,37 +3040,9 @@ interface Entities {
|
|
|
2648
3040
|
encodeAllRaw: (text: string) => string;
|
|
2649
3041
|
encodeNumeric: (text: string, attr?: boolean) => string;
|
|
2650
3042
|
encodeNamed: (text: string, attr?: boolean, entities?: EntitiesMap) => string;
|
|
2651
|
-
getEncodeFunc: (name: string, entities?:
|
|
3043
|
+
getEncodeFunc: (name: string, entities?: string) => (text: string, attr?: boolean) => string;
|
|
2652
3044
|
decode: (text: string) => string;
|
|
2653
3045
|
}
|
|
2654
|
-
declare type AttrList = Array<{
|
|
2655
|
-
name: string;
|
|
2656
|
-
value: string;
|
|
2657
|
-
}> & {
|
|
2658
|
-
map: Record<string, string>;
|
|
2659
|
-
};
|
|
2660
|
-
interface SaxParserSettings {
|
|
2661
|
-
allow_conditional_comments?: boolean;
|
|
2662
|
-
allow_html_data_urls?: boolean;
|
|
2663
|
-
allow_script_urls?: boolean;
|
|
2664
|
-
allow_svg_data_urls?: boolean;
|
|
2665
|
-
fix_self_closing?: boolean;
|
|
2666
|
-
preserve_cdata?: boolean;
|
|
2667
|
-
remove_internals?: boolean;
|
|
2668
|
-
self_closing_elements?: Record<string, {}>;
|
|
2669
|
-
validate?: boolean;
|
|
2670
|
-
cdata?: (text: string) => void;
|
|
2671
|
-
comment?: (text: string) => void;
|
|
2672
|
-
doctype?: (text: string) => void;
|
|
2673
|
-
end?: (name: string) => void;
|
|
2674
|
-
pi?: (name: string, text: string) => void;
|
|
2675
|
-
start?: (name: string, attrs: AttrList, empty: boolean) => void;
|
|
2676
|
-
text?: (text: string, raw?: boolean) => void;
|
|
2677
|
-
}
|
|
2678
|
-
declare type ParserFormat = 'html' | 'xhtml' | 'xml';
|
|
2679
|
-
interface SaxParser {
|
|
2680
|
-
parse: (html: string, format?: ParserFormat) => void;
|
|
2681
|
-
}
|
|
2682
3046
|
interface IconPack {
|
|
2683
3047
|
icons: Record<string, string>;
|
|
2684
3048
|
}
|
|
@@ -2690,104 +3054,62 @@ interface IconManager {
|
|
|
2690
3054
|
interface Resource {
|
|
2691
3055
|
load: <T = any>(id: string, url: string) => Promise<T>;
|
|
2692
3056
|
add: (id: string, data: any) => void;
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
extend<T extends Props<A>, A extends any[] = any[]>(props: T): ExtendedClassConstructor<T, A>;
|
|
2711
|
-
}
|
|
2712
|
-
interface RGB {
|
|
2713
|
-
r: number;
|
|
2714
|
-
g: number;
|
|
2715
|
-
b: number;
|
|
2716
|
-
}
|
|
2717
|
-
interface HSV {
|
|
2718
|
-
h: number;
|
|
2719
|
-
s: number;
|
|
2720
|
-
v: number;
|
|
2721
|
-
}
|
|
2722
|
-
interface Color {
|
|
2723
|
-
toRgb: () => RGB;
|
|
2724
|
-
toHsv: () => HSV;
|
|
2725
|
-
toHex: () => string;
|
|
2726
|
-
parse: (value: string | RGB | HSV) => Color;
|
|
2727
|
-
}
|
|
2728
|
-
declare type ColorConstructor = new (value?: string | RGB | HSV) => Color;
|
|
2729
|
-
interface DebounceFunc<T extends (...args: any[]) => void> {
|
|
2730
|
-
(...args: Parameters<T>): void;
|
|
2731
|
-
stop: () => void;
|
|
3057
|
+
has: (id: string) => boolean;
|
|
3058
|
+
get: (id: string) => any;
|
|
3059
|
+
unload: (id: string) => void;
|
|
3060
|
+
}
|
|
3061
|
+
type TextPatterns_d_Pattern = Pattern;
|
|
3062
|
+
type TextPatterns_d_RawPattern = RawPattern;
|
|
3063
|
+
type TextPatterns_d_DynamicPatternsLookup = DynamicPatternsLookup;
|
|
3064
|
+
type TextPatterns_d_RawDynamicPatternsLookup = RawDynamicPatternsLookup;
|
|
3065
|
+
type TextPatterns_d_DynamicPatternContext = DynamicPatternContext;
|
|
3066
|
+
type TextPatterns_d_BlockCmdPattern = BlockCmdPattern;
|
|
3067
|
+
type TextPatterns_d_BlockPattern = BlockPattern;
|
|
3068
|
+
type TextPatterns_d_BlockFormatPattern = BlockFormatPattern;
|
|
3069
|
+
type TextPatterns_d_InlineCmdPattern = InlineCmdPattern;
|
|
3070
|
+
type TextPatterns_d_InlinePattern = InlinePattern;
|
|
3071
|
+
type TextPatterns_d_InlineFormatPattern = InlineFormatPattern;
|
|
3072
|
+
declare namespace TextPatterns_d {
|
|
3073
|
+
export { TextPatterns_d_Pattern as Pattern, TextPatterns_d_RawPattern as RawPattern, TextPatterns_d_DynamicPatternsLookup as DynamicPatternsLookup, TextPatterns_d_RawDynamicPatternsLookup as RawDynamicPatternsLookup, TextPatterns_d_DynamicPatternContext as DynamicPatternContext, TextPatterns_d_BlockCmdPattern as BlockCmdPattern, TextPatterns_d_BlockPattern as BlockPattern, TextPatterns_d_BlockFormatPattern as BlockFormatPattern, TextPatterns_d_InlineCmdPattern as InlineCmdPattern, TextPatterns_d_InlinePattern as InlinePattern, TextPatterns_d_InlineFormatPattern as InlineFormatPattern, };
|
|
2732
3074
|
}
|
|
2733
3075
|
interface Delay {
|
|
2734
|
-
requestAnimationFrame: (callback: () => void, element?: HTMLElement) => void;
|
|
2735
3076
|
setEditorInterval: (editor: Editor, callback: () => void, time?: number) => number;
|
|
2736
3077
|
setEditorTimeout: (editor: Editor, callback: () => void, time?: number) => number;
|
|
2737
|
-
setInterval: (callback: () => void, time?: number) => number;
|
|
2738
|
-
setTimeout: (callback: () => void, time?: number) => number;
|
|
2739
|
-
clearInterval: (id?: number) => void;
|
|
2740
|
-
clearTimeout: (id?: number) => void;
|
|
2741
|
-
debounce: <T extends (...args: any[]) => any>(callback: T, time?: number) => DebounceFunc<T>;
|
|
2742
|
-
throttle: <T extends (...args: any[]) => any>(callback: T, time?: number) => DebounceFunc<T>;
|
|
2743
|
-
}
|
|
2744
|
-
declare type UploadResult$2 = UploadResult;
|
|
2745
|
-
interface ImageUploader {
|
|
2746
|
-
upload: (blobInfos: BlobInfo[], showNotification?: boolean) => Promise<UploadResult$2[]>;
|
|
2747
|
-
}
|
|
2748
|
-
interface JSONUtils {
|
|
2749
|
-
serialize: (obj: any) => string;
|
|
2750
|
-
parse: (text: string) => any;
|
|
2751
|
-
}
|
|
2752
|
-
interface JSONPSettings {
|
|
2753
|
-
count?: number;
|
|
2754
|
-
url: string;
|
|
2755
|
-
callback: (json: string) => void;
|
|
2756
|
-
}
|
|
2757
|
-
interface JSONP {
|
|
2758
|
-
callbacks: {};
|
|
2759
|
-
count: number;
|
|
2760
|
-
send(this: JSONP, settings: JSONPSettings): void;
|
|
2761
|
-
}
|
|
2762
|
-
interface JSONRequestSettings {
|
|
2763
|
-
crossDomain?: boolean;
|
|
2764
|
-
requestheaders?: Record<string, {
|
|
2765
|
-
key: string;
|
|
2766
|
-
value: string;
|
|
2767
|
-
}>;
|
|
2768
|
-
type?: string;
|
|
2769
|
-
url?: string;
|
|
2770
|
-
error_scope?: any;
|
|
2771
|
-
success_scope?: any;
|
|
2772
|
-
success?: (data: any) => void;
|
|
2773
|
-
error?: (error: any, xhr: XMLHttpRequest) => void;
|
|
2774
|
-
}
|
|
2775
|
-
interface JSONRequestArgs extends JSONRequestSettings {
|
|
2776
|
-
id?: string;
|
|
2777
|
-
method?: string;
|
|
2778
|
-
params?: string;
|
|
2779
3078
|
}
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
sendRPC: (o: JSONRequestArgs) => void;
|
|
3079
|
+
type UploadResult = UploadResult$2;
|
|
3080
|
+
interface ImageUploader {
|
|
3081
|
+
upload: (blobInfos: BlobInfo[], showNotification?: boolean) => Promise<UploadResult[]>;
|
|
2784
3082
|
}
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
3083
|
+
type ArrayCallback$1<T, R> = (this: any, x: T, i: number, xs: ArrayLike<T>) => R;
|
|
3084
|
+
type ObjCallback$1<T, R> = (this: any, value: T, key: string, obj: Record<string, T>) => R;
|
|
3085
|
+
type ArrayCallback<T, R> = ArrayCallback$1<T, R>;
|
|
3086
|
+
type ObjCallback<T, R> = ObjCallback$1<T, R>;
|
|
3087
|
+
type WalkCallback<T> = (this: any, o: T, i: string, n: keyof T | undefined) => boolean | void;
|
|
3088
|
+
interface Tools {
|
|
3089
|
+
is: (obj: any, type?: string) => boolean;
|
|
3090
|
+
isArray: <T>(arr: any) => arr is Array<T>;
|
|
3091
|
+
inArray: <T>(arr: ArrayLike<T>, value: T) => number;
|
|
3092
|
+
grep: {
|
|
3093
|
+
<T>(arr: ArrayLike<T> | null | undefined, pred?: ArrayCallback<T, boolean>): T[];
|
|
3094
|
+
<T>(arr: Record<string, T> | null | undefined, pred?: ObjCallback<T, boolean>): T[];
|
|
3095
|
+
};
|
|
3096
|
+
trim: (str: string | null | undefined) => string;
|
|
3097
|
+
toArray: <T>(obj: ArrayLike<T>) => T[];
|
|
3098
|
+
hasOwn: (obj: any, name: string) => boolean;
|
|
3099
|
+
makeMap: (items: ArrayLike<string> | string | undefined, delim?: string | RegExp, map?: Record<string, {}>) => Record<string, {}>;
|
|
3100
|
+
each: {
|
|
3101
|
+
<T>(arr: ArrayLike<T> | null | undefined, cb: ArrayCallback<T, void | boolean>, scope?: any): boolean;
|
|
3102
|
+
<T>(obj: Record<string, T> | null | undefined, cb: ObjCallback<T, void | boolean>, scope?: any): boolean;
|
|
3103
|
+
};
|
|
3104
|
+
map: {
|
|
3105
|
+
<T, R>(arr: ArrayLike<T> | null | undefined, cb: ArrayCallback<T, R>): R[];
|
|
3106
|
+
<T, R>(obj: Record<string, T> | null | undefined, cb: ObjCallback<T, R>): R[];
|
|
3107
|
+
};
|
|
3108
|
+
extend: (obj: Object, ext: Object, ...objs: Object[]) => any;
|
|
3109
|
+
walk: <T extends Record<string, any>>(obj: T, f: WalkCallback<T>, n?: keyof T, scope?: any) => void;
|
|
3110
|
+
resolve: (path: string, o?: Object) => any;
|
|
3111
|
+
explode: (s: string | string[], d?: string | RegExp) => string[];
|
|
3112
|
+
_addCacheSuffix: (url: string) => string;
|
|
2791
3113
|
}
|
|
2792
3114
|
interface KeyboardLikeEvent {
|
|
2793
3115
|
shiftKey: boolean;
|
|
@@ -2800,6 +3122,7 @@ interface VK {
|
|
|
2800
3122
|
DELETE: number;
|
|
2801
3123
|
DOWN: number;
|
|
2802
3124
|
ENTER: number;
|
|
3125
|
+
ESC: number;
|
|
2803
3126
|
LEFT: number;
|
|
2804
3127
|
RIGHT: number;
|
|
2805
3128
|
SPACEBAR: number;
|
|
@@ -2812,130 +3135,90 @@ interface VK {
|
|
|
2812
3135
|
modifierPressed: (e: KeyboardLikeEvent) => boolean;
|
|
2813
3136
|
metaKeyPressed: (e: KeyboardLikeEvent) => boolean;
|
|
2814
3137
|
}
|
|
2815
|
-
interface XHRSettings {
|
|
2816
|
-
async?: boolean;
|
|
2817
|
-
content_type?: string;
|
|
2818
|
-
crossDomain?: boolean;
|
|
2819
|
-
data?: Document | BodyInit;
|
|
2820
|
-
requestheaders?: Record<string, {
|
|
2821
|
-
key: string;
|
|
2822
|
-
value: string;
|
|
2823
|
-
}>;
|
|
2824
|
-
scope?: any;
|
|
2825
|
-
type?: string;
|
|
2826
|
-
url: string;
|
|
2827
|
-
error_scope?: any;
|
|
2828
|
-
success_scope?: any;
|
|
2829
|
-
error?: (message: 'TIMED_OUT' | 'GENERAL', xhr: XMLHttpRequest, settings: XHRSettings) => void;
|
|
2830
|
-
success?: (text: string, xhr: XMLHttpRequest, settings: XHRSettings) => void;
|
|
2831
|
-
}
|
|
2832
|
-
interface XHREventMap {
|
|
2833
|
-
beforeInitialize: {
|
|
2834
|
-
settings: XHRSettings;
|
|
2835
|
-
};
|
|
2836
|
-
beforeSend: {
|
|
2837
|
-
xhr: XMLHttpRequest;
|
|
2838
|
-
settings: XHRSettings;
|
|
2839
|
-
};
|
|
2840
|
-
}
|
|
2841
|
-
interface XHR extends Observable<XHREventMap> {
|
|
2842
|
-
send(this: XHR, settings: XHRSettings): void;
|
|
2843
|
-
}
|
|
2844
3138
|
interface DOMUtilsNamespace {
|
|
2845
|
-
|
|
3139
|
+
(doc: Document, settings: Partial<DOMUtilsSettings>): DOMUtils;
|
|
2846
3140
|
DOM: DOMUtils;
|
|
2847
3141
|
nodeIndex: (node: Node, normalized?: boolean) => number;
|
|
2848
3142
|
}
|
|
2849
3143
|
interface RangeUtilsNamespace {
|
|
2850
|
-
|
|
3144
|
+
(dom: DOMUtils): RangeUtils;
|
|
2851
3145
|
compareRanges: (rng1: RangeLikeObject, rng2: RangeLikeObject) => boolean;
|
|
2852
3146
|
getCaretRangeFromPoint: (clientX: number, clientY: number, doc: Document) => Range;
|
|
2853
3147
|
getSelectedNode: (range: Range) => Node;
|
|
2854
3148
|
getNode: (container: Node, offset: number) => Node;
|
|
2855
3149
|
}
|
|
2856
3150
|
interface AddOnManagerNamespace {
|
|
2857
|
-
|
|
3151
|
+
<T>(): AddOnManager<T>;
|
|
2858
3152
|
language: string | undefined;
|
|
2859
3153
|
languageLoad: boolean;
|
|
2860
3154
|
baseURL: string;
|
|
2861
3155
|
PluginManager: PluginManager;
|
|
2862
3156
|
ThemeManager: ThemeManager;
|
|
3157
|
+
ModelManager: ModelManager;
|
|
2863
3158
|
}
|
|
2864
3159
|
interface BookmarkManagerNamespace {
|
|
2865
3160
|
(selection: EditorSelection): BookmarkManager;
|
|
2866
3161
|
isBookmarkNode: (node: Node) => boolean;
|
|
2867
3162
|
}
|
|
2868
|
-
interface SaxParserNamespace {
|
|
2869
|
-
new (settings?: SaxParserSettings, schema?: Schema): SaxParser;
|
|
2870
|
-
findEndTag: (schema: Schema, html: string, startIndex: number) => number;
|
|
2871
|
-
}
|
|
2872
3163
|
interface TinyMCE extends EditorManager {
|
|
2873
3164
|
geom: {
|
|
2874
3165
|
Rect: Rect;
|
|
2875
3166
|
};
|
|
2876
3167
|
util: {
|
|
2877
|
-
Promise: PromiseConstructor;
|
|
2878
3168
|
Delay: Delay;
|
|
2879
3169
|
Tools: Tools;
|
|
2880
3170
|
VK: VK;
|
|
2881
3171
|
URI: URIConstructor;
|
|
2882
|
-
Class: Class;
|
|
2883
3172
|
EventDispatcher: EventDispatcherConstructor<any>;
|
|
2884
3173
|
Observable: Observable<any>;
|
|
2885
3174
|
I18n: I18n;
|
|
2886
|
-
XHR: XHR;
|
|
2887
|
-
JSON: JSONUtils;
|
|
2888
|
-
JSONRequest: JSONRequestConstructor;
|
|
2889
|
-
JSONP: JSONP;
|
|
2890
3175
|
LocalStorage: Storage;
|
|
2891
|
-
Color: ColorConstructor;
|
|
2892
3176
|
ImageUploader: ImageUploader;
|
|
2893
3177
|
};
|
|
2894
3178
|
dom: {
|
|
2895
3179
|
EventUtils: EventUtilsConstructor;
|
|
2896
|
-
Sizzle: any;
|
|
2897
|
-
DomQuery: DomQueryConstructor;
|
|
2898
3180
|
TreeWalker: DomTreeWalkerConstructor;
|
|
2899
|
-
TextSeeker:
|
|
3181
|
+
TextSeeker: (dom: DOMUtils, isBlockBoundary?: (node: Node) => boolean) => TextSeeker;
|
|
2900
3182
|
DOMUtils: DOMUtilsNamespace;
|
|
2901
3183
|
ScriptLoader: ScriptLoaderConstructor;
|
|
2902
3184
|
RangeUtils: RangeUtilsNamespace;
|
|
2903
|
-
Serializer:
|
|
3185
|
+
Serializer: (settings: DomSerializerSettings, editor?: Editor) => DomSerializer;
|
|
2904
3186
|
ControlSelection: (selection: EditorSelection, editor: Editor) => ControlSelection;
|
|
2905
3187
|
BookmarkManager: BookmarkManagerNamespace;
|
|
2906
|
-
Selection:
|
|
2907
|
-
StyleSheetLoader:
|
|
3188
|
+
Selection: (dom: DOMUtils, win: Window, serializer: DomSerializer, editor: Editor) => EditorSelection;
|
|
3189
|
+
StyleSheetLoader: (documentOrShadowRoot: Document | ShadowRoot, settings: StyleSheetLoaderSettings) => StyleSheetLoader;
|
|
2908
3190
|
Event: EventUtils;
|
|
2909
3191
|
};
|
|
2910
3192
|
html: {
|
|
2911
|
-
Styles:
|
|
3193
|
+
Styles: (settings?: StylesSettings, schema?: Schema) => Styles;
|
|
2912
3194
|
Entities: Entities;
|
|
2913
3195
|
Node: AstNodeConstructor;
|
|
2914
|
-
Schema:
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
Serializer: new (settings?: HtmlSerializerSettings, schema?: Schema) => HtmlSerializer;
|
|
3196
|
+
Schema: (settings?: SchemaSettings) => Schema;
|
|
3197
|
+
DomParser: (settings?: DomParserSettings, schema?: Schema) => DomParser;
|
|
3198
|
+
Writer: (settings?: WriterSettings) => Writer;
|
|
3199
|
+
Serializer: (settings?: HtmlSerializerSettings, schema?: Schema) => HtmlSerializer;
|
|
2919
3200
|
};
|
|
2920
3201
|
AddOnManager: AddOnManagerNamespace;
|
|
2921
|
-
Annotator:
|
|
3202
|
+
Annotator: (editor: Editor) => Annotator;
|
|
2922
3203
|
Editor: EditorConstructor;
|
|
2923
3204
|
EditorCommands: EditorCommandsConstructor;
|
|
2924
3205
|
EditorManager: EditorManager;
|
|
2925
3206
|
EditorObservable: EditorObservable;
|
|
2926
3207
|
Env: Env;
|
|
2927
3208
|
FocusManager: FocusManager;
|
|
2928
|
-
Formatter:
|
|
2929
|
-
NotificationManager:
|
|
3209
|
+
Formatter: (editor: Editor) => Formatter;
|
|
3210
|
+
NotificationManager: (editor: Editor) => NotificationManager;
|
|
2930
3211
|
Shortcuts: ShortcutsConstructor;
|
|
2931
|
-
UndoManager:
|
|
2932
|
-
WindowManager:
|
|
3212
|
+
UndoManager: (editor: Editor) => UndoManager;
|
|
3213
|
+
WindowManager: (editor: Editor) => WindowManager;
|
|
2933
3214
|
DOM: DOMUtils;
|
|
2934
3215
|
ScriptLoader: ScriptLoader;
|
|
2935
3216
|
PluginManager: PluginManager;
|
|
2936
3217
|
ThemeManager: ThemeManager;
|
|
3218
|
+
ModelManager: ModelManager;
|
|
2937
3219
|
IconManager: IconManager;
|
|
2938
3220
|
Resource: Resource;
|
|
3221
|
+
FakeClipboard: FakeClipboard;
|
|
2939
3222
|
trim: Tools['trim'];
|
|
2940
3223
|
isArray: Tools['isArray'];
|
|
2941
3224
|
is: Tools['is'];
|
|
@@ -2946,18 +3229,10 @@ interface TinyMCE extends EditorManager {
|
|
|
2946
3229
|
grep: Tools['grep'];
|
|
2947
3230
|
inArray: Tools['inArray'];
|
|
2948
3231
|
extend: Tools['extend'];
|
|
2949
|
-
create: Tools['create'];
|
|
2950
3232
|
walk: Tools['walk'];
|
|
2951
|
-
createNS: Tools['createNS'];
|
|
2952
3233
|
resolve: Tools['resolve'];
|
|
2953
3234
|
explode: Tools['explode'];
|
|
2954
3235
|
_addCacheSuffix: Tools['_addCacheSuffix'];
|
|
2955
|
-
isOpera: boolean;
|
|
2956
|
-
isWebKit: boolean;
|
|
2957
|
-
isIE: false | number;
|
|
2958
|
-
isGecko: boolean;
|
|
2959
|
-
isMac: boolean;
|
|
2960
3236
|
}
|
|
2961
3237
|
declare const tinymce: TinyMCE;
|
|
2962
|
-
export default
|
|
2963
|
-
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, Format_d 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 };
|
|
3238
|
+
export { AddOnManager, Annotator, AstNode, Bookmark, BookmarkManager, ControlSelection, DOMUtils, Delay, DomParser, DomParserSettings, DomSerializer, DomSerializerSettings, DomTreeWalker, Editor, EditorCommands, EditorEvent, EditorManager, EditorModeApi, EditorObservable, EditorOptions, EditorSelection, Entities, Env, EventDispatcher, EventUtils, EventTypes_d as Events, FakeClipboard, FocusManager, Format_d as Formats, Formatter, GeomRect, HtmlSerializer, HtmlSerializerSettings, I18n, IconManager, Model, ModelManager, NotificationApi, NotificationManager, NotificationSpec, Observable, Plugin, PluginManager, RangeUtils, RawEditorOptions, Rect, Resource, Schema, SchemaSettings, ScriptLoader, Shortcuts, StyleSheetLoader, Styles, TextPatterns_d as TextPatterns, TextSeeker, Theme, ThemeManager, TinyMCE, Tools, URI, Ui_d as Ui, UndoManager, VK, WindowManager, Writer, WriterSettings, tinymce as default };
|