argous 1.2.202 → 1.2.204
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/Events.d.ts +9 -7
- package/dist/components/Editor/Events.js +0 -7
- package/dist/components/Editor/ScriptLoader2.d.ts +10 -0
- package/dist/components/Editor/ScriptLoader2.js +146 -0
- package/dist/components/Editor/TinyMCE.d.ts +1 -8
- package/dist/components/Editor/TinyMCE.js +2 -10
- package/dist/components/Editor/Utils.d.ts +2 -7
- package/dist/components/Editor/Utils.js +29 -9
- package/dist/components/Editor/components/Editor.d.ts +17 -16
- package/dist/components/Editor/components/Editor.js +94 -51
- package/dist/components/Editor/components/EditorPropTypes.d.ts +1 -8
- package/dist/components/Editor/components/EditorPropTypes.js +19 -9
- package/dist/components/Editor/index.d.ts +2 -9
- package/dist/components/Editor/index.js +0 -7
- 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/Events.ts +9 -8
- package/lib/components/Editor/ScriptLoader2.ts +161 -0
- package/lib/components/Editor/TinyMCE.ts +2 -12
- package/lib/components/Editor/Utils.ts +25 -8
- package/lib/components/Editor/components/Editor.tsx +102 -79
- package/lib/components/Editor/components/EditorPropTypes.ts +21 -12
- package/lib/components/Editor/index.tsx +2 -10
- 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/ScriptLoader.ts +0 -96
- 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,5 +1,5 @@
|
|
|
1
1
|
import { ModalProviderContextProps } from '.';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
export declare const ModalProviderContext: React.Context<ModalProviderContextProps>;
|
|
4
|
-
declare const _default: import("react-redux").ConnectedComponent<({ children, argousSystem }: any) => React.JSX.Element, import("react-redux").Omit<any, "
|
|
4
|
+
declare const _default: import("react-redux").ConnectedComponent<({ children, argousSystem }: any) => React.JSX.Element, import("react-redux").Omit<any, "dispatch" | "argousSystem">>;
|
|
5
5
|
export default _default;
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2017-present, Ephox, Inc.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the Apache 2 license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
*/
|
|
8
1
|
import { Editor as TinyMCEEditor, EditorEvent, Events } from './tinymce/tinymce';
|
|
9
2
|
export declare type EventHandler<A> = (a: EditorEvent<A>, editor: TinyMCEEditor) => unknown;
|
|
10
3
|
declare type EEventHandler<K extends keyof Events.EditorEventMap> = EventHandler<Events.EditorEventMap[K]>;
|
|
@@ -48,6 +41,7 @@ export interface ITinyEvents {
|
|
|
48
41
|
onBeforeSetContent: EEventHandler<'BeforeSetContent'>;
|
|
49
42
|
onChange: EventHandler<unknown>;
|
|
50
43
|
onClearUndos: EEventHandler<'ClearUndos'>;
|
|
44
|
+
onCommentChange: EventHandler<unknown>;
|
|
51
45
|
onDeactivate: EEventHandler<'deactivate'>;
|
|
52
46
|
onDirty: EventHandler<unknown>;
|
|
53
47
|
onExecCommand: EEventHandler<'ExecCommand'>;
|
|
@@ -73,6 +67,14 @@ export interface ITinyEvents {
|
|
|
73
67
|
onSubmit: EventHandler<unknown>;
|
|
74
68
|
onUndo: EEventHandler<'Undo'>;
|
|
75
69
|
onVisualAid: EventHandler<unknown>;
|
|
70
|
+
onSkinLoadError: EEventHandler<'SkinLoadError'>;
|
|
71
|
+
onThemeLoadError: EEventHandler<'ThemeLoadError'>;
|
|
72
|
+
onModelLoadError: EEventHandler<'ModelLoadError'>;
|
|
73
|
+
onPluginLoadError: EEventHandler<'PluginLoadError'>;
|
|
74
|
+
onIconsLoadError: EEventHandler<'IconsLoadError'>;
|
|
75
|
+
onLanguageLoadError: EEventHandler<'LanguageLoadError'>;
|
|
76
|
+
onScriptsLoad: () => void;
|
|
77
|
+
onScriptsLoadError: (err: unknown) => void;
|
|
76
78
|
}
|
|
77
79
|
export interface IEvents extends INativeEvents, ITinyEvents {
|
|
78
80
|
}
|
|
@@ -1,9 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Copyright (c) 2017-present, Ephox, Inc.
|
|
4
|
-
*
|
|
5
|
-
* This source code is licensed under the Apache 2 license found in the
|
|
6
|
-
* LICENSE file in the root directory of this source tree.
|
|
7
|
-
*
|
|
8
|
-
*/
|
|
9
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare type CallbackFn = () => void;
|
|
2
|
+
export interface ScriptItem {
|
|
3
|
+
src: string;
|
|
4
|
+
async?: boolean;
|
|
5
|
+
defer?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const ScriptLoader: {
|
|
8
|
+
loadList: (doc: Document, items: ScriptItem[], delay: number, success: () => void, failure?: ((err: unknown) => void) | undefined) => void;
|
|
9
|
+
reinitialize: () => void;
|
|
10
|
+
};
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.ScriptLoader = void 0;
|
|
15
|
+
var Utils_1 = require("./Utils");
|
|
16
|
+
var injectScriptTag = function (doc, item, handler) {
|
|
17
|
+
var _a, _b;
|
|
18
|
+
var scriptTag = doc.createElement('script');
|
|
19
|
+
scriptTag.referrerPolicy = 'origin';
|
|
20
|
+
scriptTag.type = 'application/javascript';
|
|
21
|
+
scriptTag.id = item.id;
|
|
22
|
+
scriptTag.src = item.src;
|
|
23
|
+
scriptTag.async = (_a = item.async) !== null && _a !== void 0 ? _a : false;
|
|
24
|
+
scriptTag.defer = (_b = item.defer) !== null && _b !== void 0 ? _b : false;
|
|
25
|
+
var loadHandler = function () {
|
|
26
|
+
scriptTag.removeEventListener('load', loadHandler);
|
|
27
|
+
scriptTag.removeEventListener('error', errorHandler);
|
|
28
|
+
handler(item.src);
|
|
29
|
+
};
|
|
30
|
+
var errorHandler = function (err) {
|
|
31
|
+
scriptTag.removeEventListener('load', loadHandler);
|
|
32
|
+
scriptTag.removeEventListener('error', errorHandler);
|
|
33
|
+
handler(item.src, err);
|
|
34
|
+
};
|
|
35
|
+
scriptTag.addEventListener('load', loadHandler);
|
|
36
|
+
scriptTag.addEventListener('error', errorHandler);
|
|
37
|
+
if (doc.head) {
|
|
38
|
+
doc.head.appendChild(scriptTag);
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
var createDocumentScriptLoader = function (doc) {
|
|
42
|
+
var lookup = {};
|
|
43
|
+
var scriptLoadOrErrorHandler = function (src, err) {
|
|
44
|
+
var item = lookup[src];
|
|
45
|
+
item.done = true;
|
|
46
|
+
item.error = err;
|
|
47
|
+
for (var _i = 0, _a = item.handlers; _i < _a.length; _i++) {
|
|
48
|
+
var h = _a[_i];
|
|
49
|
+
h(src, err);
|
|
50
|
+
}
|
|
51
|
+
item.handlers = [];
|
|
52
|
+
};
|
|
53
|
+
var loadScripts = function (items, success, failure) {
|
|
54
|
+
// eslint-disable-next-line no-console
|
|
55
|
+
var failureOrLog = function (err) { return failure !== undefined ? failure(err) : console.error(err); };
|
|
56
|
+
if (items.length === 0) {
|
|
57
|
+
failureOrLog(new Error('At least one script must be provided'));
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
var successCount = 0;
|
|
61
|
+
var failed = false;
|
|
62
|
+
var loaded = function (_src, err) {
|
|
63
|
+
if (failed) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
if (err) {
|
|
67
|
+
failed = true;
|
|
68
|
+
failureOrLog(err);
|
|
69
|
+
}
|
|
70
|
+
else if (++successCount === items.length) {
|
|
71
|
+
success();
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
for (var _i = 0, items_1 = items; _i < items_1.length; _i++) {
|
|
75
|
+
var item = items_1[_i];
|
|
76
|
+
var existing = lookup[item.src];
|
|
77
|
+
if (existing) {
|
|
78
|
+
if (existing.done) {
|
|
79
|
+
loaded(item.src, existing.error);
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
existing.handlers.push(loaded);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
// create a new entry
|
|
87
|
+
var id = Utils_1.uuid('tiny-');
|
|
88
|
+
lookup[item.src] = {
|
|
89
|
+
id: id,
|
|
90
|
+
src: item.src,
|
|
91
|
+
done: false,
|
|
92
|
+
error: null,
|
|
93
|
+
handlers: [loaded],
|
|
94
|
+
};
|
|
95
|
+
injectScriptTag(doc, __assign({ id: id }, item), scriptLoadOrErrorHandler);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
var deleteScripts = function () {
|
|
100
|
+
var _a;
|
|
101
|
+
for (var _i = 0, _b = Object.values(lookup); _i < _b.length; _i++) {
|
|
102
|
+
var item = _b[_i];
|
|
103
|
+
var scriptTag = doc.getElementById(item.id);
|
|
104
|
+
if (scriptTag != null && scriptTag.tagName === 'SCRIPT') {
|
|
105
|
+
(_a = scriptTag.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(scriptTag);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
lookup = {};
|
|
109
|
+
};
|
|
110
|
+
var getDocument = function () { return doc; };
|
|
111
|
+
return {
|
|
112
|
+
loadScripts: loadScripts,
|
|
113
|
+
deleteScripts: deleteScripts,
|
|
114
|
+
getDocument: getDocument
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
var createScriptLoader = function () {
|
|
118
|
+
var cache = [];
|
|
119
|
+
var getDocumentScriptLoader = function (doc) {
|
|
120
|
+
var loader = cache.find(function (l) { return l.getDocument() === doc; });
|
|
121
|
+
if (loader === undefined) {
|
|
122
|
+
loader = createDocumentScriptLoader(doc);
|
|
123
|
+
cache.push(loader);
|
|
124
|
+
}
|
|
125
|
+
return loader;
|
|
126
|
+
};
|
|
127
|
+
var loadList = function (doc, items, delay, success, failure) {
|
|
128
|
+
var doLoad = function () { return getDocumentScriptLoader(doc).loadScripts(items, success, failure); };
|
|
129
|
+
if (delay > 0) {
|
|
130
|
+
setTimeout(doLoad, delay);
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
doLoad();
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
var reinitialize = function () {
|
|
137
|
+
for (var loader = cache.pop(); loader != null; loader = cache.pop()) {
|
|
138
|
+
loader.deleteScripts();
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
return {
|
|
142
|
+
loadList: loadList,
|
|
143
|
+
reinitialize: reinitialize
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
exports.ScriptLoader = createScriptLoader();
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2017-present, Ephox, Inc.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the Apache 2 license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
*/
|
|
8
1
|
import { TinyMCE as TinyMCEGlobal } from './tinymce/tinymce';
|
|
9
|
-
declare const getTinymce: () => TinyMCEGlobal | null;
|
|
2
|
+
declare const getTinymce: (view: Window) => TinyMCEGlobal | null;
|
|
10
3
|
export { getTinymce };
|
|
@@ -1,16 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Copyright (c) 2017-present, Ephox, Inc.
|
|
4
|
-
*
|
|
5
|
-
* This source code is licensed under the Apache 2 license found in the
|
|
6
|
-
* LICENSE file in the root directory of this source tree.
|
|
7
|
-
*
|
|
8
|
-
*/
|
|
9
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
3
|
exports.getTinymce = void 0;
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
var global = getGlobal();
|
|
4
|
+
var getTinymce = function (view) {
|
|
5
|
+
var global = view;
|
|
14
6
|
return global && global.tinymce ? global.tinymce : null;
|
|
15
7
|
};
|
|
16
8
|
exports.getTinymce = getTinymce;
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2017-present, Ephox, Inc.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the Apache 2 license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
*/
|
|
8
1
|
import { IAllProps } from './components/Editor';
|
|
9
2
|
import { IEventPropTypes } from './components/EditorPropTypes';
|
|
10
3
|
import { Editor as TinyMCEEditor, EditorEvent } from './tinymce/tinymce';
|
|
@@ -16,4 +9,6 @@ export declare const uuid: (prefix: string) => string;
|
|
|
16
9
|
export declare const isTextareaOrInput: (element: Element | null) => element is HTMLInputElement | HTMLTextAreaElement;
|
|
17
10
|
export declare const mergePlugins: (initPlugins: string | string[] | undefined, inputPlugins: string | string[] | undefined) => string[];
|
|
18
11
|
export declare const isBeforeInputEventAvailable: () => boolean;
|
|
12
|
+
export declare const isInDoc: (elem: Node) => boolean;
|
|
13
|
+
export declare const setMode: (editor: TinyMCEEditor | undefined, mode: 'readonly' | 'design') => void;
|
|
19
14
|
export {};
|
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Copyright (c) 2017-present, Ephox, Inc.
|
|
4
|
-
*
|
|
5
|
-
* This source code is licensed under the Apache 2 license found in the
|
|
6
|
-
* LICENSE file in the root directory of this source tree.
|
|
7
|
-
*
|
|
8
|
-
*/
|
|
9
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.isBeforeInputEventAvailable = exports.mergePlugins = exports.isTextareaOrInput = exports.uuid = exports.configHandlers = exports.configHandlers2 = exports.isFunction = void 0;
|
|
3
|
+
exports.setMode = exports.isInDoc = exports.isBeforeInputEventAvailable = exports.mergePlugins = exports.isTextareaOrInput = exports.uuid = exports.configHandlers = exports.configHandlers2 = exports.isFunction = void 0;
|
|
11
4
|
var EditorPropTypes_1 = require("./components/EditorPropTypes");
|
|
12
5
|
var isFunction = function (x) { return typeof x === 'function'; };
|
|
13
6
|
exports.isFunction = isFunction;
|
|
@@ -34,7 +27,9 @@ var configHandlers2 = function (handlerLookup, on, off, adapter, prevProps, prop
|
|
|
34
27
|
};
|
|
35
28
|
exports.configHandlers2 = configHandlers2;
|
|
36
29
|
var configHandlers = function (editor, prevProps, props, boundHandlers, lookup) {
|
|
37
|
-
return exports.configHandlers2(lookup, editor.on.bind(editor), editor.off.bind(editor),
|
|
30
|
+
return exports.configHandlers2(lookup, editor.on.bind(editor), editor.off.bind(editor),
|
|
31
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
32
|
+
function (handlerLookup, key) { return function (e) { var _a; return (_a = handlerLookup(key)) === null || _a === void 0 ? void 0 : _a(e, editor); }; }, prevProps, props, boundHandlers);
|
|
38
33
|
};
|
|
39
34
|
exports.configHandlers = configHandlers;
|
|
40
35
|
var unique = 0;
|
|
@@ -60,3 +55,28 @@ var mergePlugins = function (initPlugins, inputPlugins) { return normalizePlugin
|
|
|
60
55
|
exports.mergePlugins = mergePlugins;
|
|
61
56
|
var isBeforeInputEventAvailable = function () { return window.InputEvent && typeof InputEvent.prototype.getTargetRanges === 'function'; };
|
|
62
57
|
exports.isBeforeInputEventAvailable = isBeforeInputEventAvailable;
|
|
58
|
+
var isInDoc = function (elem) {
|
|
59
|
+
if (!('isConnected' in Node.prototype)) {
|
|
60
|
+
// Fallback for IE and old Edge
|
|
61
|
+
var current = elem;
|
|
62
|
+
var parent_1 = elem.parentNode;
|
|
63
|
+
while (parent_1 != null) {
|
|
64
|
+
current = parent_1;
|
|
65
|
+
parent_1 = current.parentNode;
|
|
66
|
+
}
|
|
67
|
+
return current === elem.ownerDocument;
|
|
68
|
+
}
|
|
69
|
+
return elem.isConnected;
|
|
70
|
+
};
|
|
71
|
+
exports.isInDoc = isInDoc;
|
|
72
|
+
var setMode = function (editor, mode) {
|
|
73
|
+
if (editor !== undefined) {
|
|
74
|
+
if (editor.mode != null && typeof editor.mode === 'object' && typeof editor.mode.set === 'function') {
|
|
75
|
+
editor.mode.set(mode);
|
|
76
|
+
}
|
|
77
|
+
else { // support TinyMCE 4
|
|
78
|
+
editor.setMode(mode);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
exports.setMode = setMode;
|
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2017-present, Ephox, Inc.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the Apache 2 license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
*/
|
|
8
1
|
import { IEditorPropTypes } from './EditorPropTypes';
|
|
9
2
|
import { IEvents } from '../Events';
|
|
10
|
-
import {
|
|
3
|
+
import { ScriptItem } from '../ScriptLoader2';
|
|
4
|
+
import { Editor as TinyMCEEditor, TinyMCE } from '../tinymce/tinymce';
|
|
11
5
|
import * as React from 'react';
|
|
6
|
+
declare type EditorOptions = Parameters<TinyMCE['init']>[0];
|
|
12
7
|
export interface IProps {
|
|
13
8
|
apiKey: string;
|
|
14
9
|
id: string;
|
|
@@ -16,19 +11,18 @@ export interface IProps {
|
|
|
16
11
|
initialValue: string;
|
|
17
12
|
onEditorChange: (a: string, editor: TinyMCEEditor) => void;
|
|
18
13
|
value: string;
|
|
19
|
-
init:
|
|
14
|
+
init: EditorOptions & {
|
|
20
15
|
selector?: undefined;
|
|
21
16
|
target?: undefined;
|
|
22
17
|
};
|
|
23
|
-
/** @deprecated use `editor.getContent({format: 'text' })` in `onEditorChange` prop instead */
|
|
24
|
-
outputFormat: 'html' | 'text';
|
|
25
18
|
tagName: string;
|
|
26
19
|
cloudChannel: string;
|
|
27
|
-
plugins: NonNullable<
|
|
28
|
-
toolbar: NonNullable<
|
|
20
|
+
plugins: NonNullable<EditorOptions['plugins']>;
|
|
21
|
+
toolbar: NonNullable<EditorOptions['toolbar']>;
|
|
29
22
|
disabled: boolean;
|
|
30
23
|
textareaName: string;
|
|
31
|
-
tinymceScriptSrc: string;
|
|
24
|
+
tinymceScriptSrc: string | string[] | ScriptItem[];
|
|
25
|
+
rollback: number | false;
|
|
32
26
|
scriptLoading: {
|
|
33
27
|
async?: boolean;
|
|
34
28
|
defer?: boolean;
|
|
@@ -49,13 +43,19 @@ export declare class Editor extends React.Component<IAllProps> {
|
|
|
49
43
|
private rollbackTimer;
|
|
50
44
|
private valueCursor;
|
|
51
45
|
constructor(props: Partial<IAllProps>);
|
|
46
|
+
private get view();
|
|
52
47
|
componentDidUpdate(prevProps: Partial<IAllProps>): void;
|
|
53
48
|
componentDidMount(): void;
|
|
54
49
|
componentWillUnmount(): void;
|
|
55
|
-
render(): React.
|
|
50
|
+
render(): React.ReactElement<{
|
|
51
|
+
ref: React.RefObject<HTMLElement>;
|
|
52
|
+
id: string;
|
|
53
|
+
}, string | React.JSXElementConstructor<any>>;
|
|
54
|
+
private changeEvents;
|
|
55
|
+
private beforeInputEvent;
|
|
56
56
|
private renderInline;
|
|
57
57
|
private renderIframe;
|
|
58
|
-
private
|
|
58
|
+
private getScriptSources;
|
|
59
59
|
private getInitialValue;
|
|
60
60
|
private bindHandlers;
|
|
61
61
|
private rollbackChange;
|
|
@@ -65,3 +65,4 @@ export declare class Editor extends React.Component<IAllProps> {
|
|
|
65
65
|
private handleEditorChangeSpecial;
|
|
66
66
|
private initialise;
|
|
67
67
|
}
|
|
68
|
+
export {};
|
|
@@ -1,11 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Copyright (c) 2017-present, Ephox, Inc.
|
|
4
|
-
*
|
|
5
|
-
* This source code is licensed under the Apache 2 license found in the
|
|
6
|
-
* LICENSE file in the root directory of this source tree.
|
|
7
|
-
*
|
|
8
|
-
*/
|
|
9
2
|
var __extends = (this && this.__extends) || (function () {
|
|
10
3
|
var extendStatics = function (d, b) {
|
|
11
4
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -54,13 +47,10 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
54
47
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
55
48
|
exports.Editor = void 0;
|
|
56
49
|
var EditorPropTypes_1 = require("./EditorPropTypes");
|
|
57
|
-
var
|
|
50
|
+
var ScriptLoader2_1 = require("../ScriptLoader2");
|
|
58
51
|
var TinyMCE_1 = require("../TinyMCE");
|
|
59
52
|
var Utils_1 = require("../Utils");
|
|
60
|
-
var core_1 = require("@material-ui/core");
|
|
61
53
|
var React = __importStar(require("react"));
|
|
62
|
-
var changeEvents = function () { var _a, _b, _c; return ((_c = (_b = (_a = TinyMCE_1.getTinymce()) === null || _a === void 0 ? void 0 : _a.Env) === null || _b === void 0 ? void 0 : _b.browser) === null || _c === void 0 ? void 0 : _c.isIE()) ? 'change keyup compositionend setcontent' : 'change input compositionend setcontent'; };
|
|
63
|
-
var beforeInputEvent = function () { return Utils_1.isBeforeInputEventAvailable() ? 'beforeinput SelectionChange' : 'SelectionChange'; };
|
|
64
54
|
var Editor = /** @class */ (function (_super) {
|
|
65
55
|
__extends(Editor, _super);
|
|
66
56
|
function Editor(props) {
|
|
@@ -88,7 +78,7 @@ var Editor = /** @class */ (function (_super) {
|
|
|
88
78
|
};
|
|
89
79
|
_this.handleBeforeInput = function (_evt) {
|
|
90
80
|
if (_this.props.value !== undefined && _this.props.value === _this.currentContent && _this.editor) {
|
|
91
|
-
if (!_this.inline || _this.editor.hasFocus) {
|
|
81
|
+
if (!_this.inline || _this.editor.hasFocus()) {
|
|
92
82
|
try {
|
|
93
83
|
// getBookmark throws exceptions when the editor has not been focused
|
|
94
84
|
// possibly only in inline mode but I'm not taking chances
|
|
@@ -107,18 +97,16 @@ var Editor = /** @class */ (function (_super) {
|
|
|
107
97
|
var editor = _this.editor;
|
|
108
98
|
if (editor && editor.initialized) {
|
|
109
99
|
var newContent = editor.getContent();
|
|
110
|
-
if (_this.props.value !== undefined && _this.props.value !== newContent) {
|
|
100
|
+
if (_this.props.value !== undefined && _this.props.value !== newContent && _this.props.rollback !== false) {
|
|
111
101
|
// start a timer and revert to the value if not applied in time
|
|
112
102
|
if (!_this.rollbackTimer) {
|
|
113
|
-
_this.rollbackTimer = window.setTimeout(_this.rollbackChange, 200);
|
|
103
|
+
_this.rollbackTimer = window.setTimeout(_this.rollbackChange, typeof _this.props.rollback === 'number' ? _this.props.rollback : 200);
|
|
114
104
|
}
|
|
115
105
|
}
|
|
116
106
|
if (newContent !== _this.currentContent) {
|
|
117
107
|
_this.currentContent = newContent;
|
|
118
108
|
if (Utils_1.isFunction(_this.props.onEditorChange)) {
|
|
119
|
-
|
|
120
|
-
var out = format === 'html' ? newContent : editor.getContent({ format: format });
|
|
121
|
-
_this.props.onEditorChange(out, editor);
|
|
109
|
+
_this.props.onEditorChange(newContent, editor);
|
|
122
110
|
}
|
|
123
111
|
}
|
|
124
112
|
}
|
|
@@ -128,16 +116,36 @@ var Editor = /** @class */ (function (_super) {
|
|
|
128
116
|
_this.handleEditorChange(evt);
|
|
129
117
|
}
|
|
130
118
|
};
|
|
131
|
-
_this.initialise = function () {
|
|
119
|
+
_this.initialise = function (attempts) {
|
|
120
|
+
var _a, _b, _c;
|
|
121
|
+
if (attempts === void 0) { attempts = 0; }
|
|
132
122
|
var target = _this.elementRef.current;
|
|
133
123
|
if (!target) {
|
|
134
124
|
return; // Editor has been unmounted
|
|
135
125
|
}
|
|
136
|
-
|
|
126
|
+
if (!Utils_1.isInDoc(target)) {
|
|
127
|
+
// this is probably someone trying to help by rendering us offscreen
|
|
128
|
+
// but we can't do that because the editor iframe must be in the document
|
|
129
|
+
// in order to have state
|
|
130
|
+
if (attempts === 0) {
|
|
131
|
+
// we probably just need to wait for the current events to be processed
|
|
132
|
+
setTimeout(function () { return _this.initialise(1); }, 1);
|
|
133
|
+
}
|
|
134
|
+
else if (attempts < 100) {
|
|
135
|
+
// wait for ten seconds, polling every tenth of a second
|
|
136
|
+
setTimeout(function () { return _this.initialise(attempts + 1); }, 100);
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
// give up, at this point it seems that more polling is unlikely to help
|
|
140
|
+
throw new Error('tinymce can only be initialised when in a document');
|
|
141
|
+
}
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
var tinymce = TinyMCE_1.getTinymce(_this.view);
|
|
137
145
|
if (!tinymce) {
|
|
138
146
|
throw new Error('tinymce should have been loaded into global scope');
|
|
139
147
|
}
|
|
140
|
-
var finalInit = __assign(__assign({}, _this.props.init), { selector: undefined, target: target, readonly: _this.props.disabled, inline: _this.inline, plugins: Utils_1.mergePlugins(_this.props.init
|
|
148
|
+
var finalInit = __assign(__assign({}, _this.props.init), { selector: undefined, target: target, readonly: _this.props.disabled, inline: _this.inline, plugins: Utils_1.mergePlugins((_a = _this.props.init) === null || _a === void 0 ? void 0 : _a.plugins, _this.props.plugins), toolbar: (_b = _this.props.toolbar) !== null && _b !== void 0 ? _b : (_c = _this.props.init) === null || _c === void 0 ? void 0 : _c.toolbar, setup: function (editor) {
|
|
141
149
|
_this.editor = editor;
|
|
142
150
|
_this.bindHandlers({});
|
|
143
151
|
// When running in inline mode the editor gets the initial value
|
|
@@ -168,7 +176,7 @@ var Editor = /** @class */ (function (_super) {
|
|
|
168
176
|
editor.setDirty(false);
|
|
169
177
|
}
|
|
170
178
|
var disabled = (_b = _this.props.disabled) !== null && _b !== void 0 ? _b : false;
|
|
171
|
-
|
|
179
|
+
Utils_1.setMode(_this.editor, disabled ? 'readonly' : 'design');
|
|
172
180
|
// ensure existing init_instance_callback is called
|
|
173
181
|
if (_this.props.init && Utils_1.isFunction(_this.props.init.init_instance_callback)) {
|
|
174
182
|
_this.props.init.init_instance_callback(editor);
|
|
@@ -188,6 +196,14 @@ var Editor = /** @class */ (function (_super) {
|
|
|
188
196
|
_this.boundHandlers = {};
|
|
189
197
|
return _this;
|
|
190
198
|
}
|
|
199
|
+
Object.defineProperty(Editor.prototype, "view", {
|
|
200
|
+
get: function () {
|
|
201
|
+
var _a, _b;
|
|
202
|
+
return (_b = (_a = this.elementRef.current) === null || _a === void 0 ? void 0 : _a.ownerDocument.defaultView) !== null && _b !== void 0 ? _b : window;
|
|
203
|
+
},
|
|
204
|
+
enumerable: false,
|
|
205
|
+
configurable: true
|
|
206
|
+
});
|
|
191
207
|
Editor.prototype.componentDidUpdate = function (prevProps) {
|
|
192
208
|
var _this = this;
|
|
193
209
|
var _a, _b;
|
|
@@ -239,26 +255,39 @@ var Editor = /** @class */ (function (_super) {
|
|
|
239
255
|
}
|
|
240
256
|
if (this.props.disabled !== prevProps.disabled) {
|
|
241
257
|
var disabled = (_b = this.props.disabled) !== null && _b !== void 0 ? _b : false;
|
|
242
|
-
this.editor
|
|
258
|
+
Utils_1.setMode(this.editor, disabled ? 'readonly' : 'design');
|
|
243
259
|
}
|
|
244
260
|
}
|
|
245
261
|
}
|
|
246
262
|
};
|
|
247
263
|
Editor.prototype.componentDidMount = function () {
|
|
248
|
-
var
|
|
249
|
-
|
|
264
|
+
var _this = this;
|
|
265
|
+
var _a, _b, _c, _d, _e;
|
|
266
|
+
if (TinyMCE_1.getTinymce(this.view) !== null) {
|
|
250
267
|
this.initialise();
|
|
251
268
|
}
|
|
252
|
-
else if (this.
|
|
253
|
-
|
|
269
|
+
else if (Array.isArray(this.props.tinymceScriptSrc) && this.props.tinymceScriptSrc.length === 0) {
|
|
270
|
+
(_b = (_a = this.props).onScriptsLoadError) === null || _b === void 0 ? void 0 : _b.call(_a, new Error('No `tinymce` global is present but the `tinymceScriptSrc` prop was an empty array.'));
|
|
271
|
+
}
|
|
272
|
+
else if ((_c = this.elementRef.current) === null || _c === void 0 ? void 0 : _c.ownerDocument) {
|
|
273
|
+
var successHandler = function () {
|
|
274
|
+
var _a, _b;
|
|
275
|
+
(_b = (_a = _this.props).onScriptsLoad) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
276
|
+
_this.initialise();
|
|
277
|
+
};
|
|
278
|
+
var errorHandler = function (err) {
|
|
279
|
+
var _a, _b;
|
|
280
|
+
(_b = (_a = _this.props).onScriptsLoadError) === null || _b === void 0 ? void 0 : _b.call(_a, err);
|
|
281
|
+
};
|
|
282
|
+
ScriptLoader2_1.ScriptLoader.loadList(this.elementRef.current.ownerDocument, this.getScriptSources(), (_e = (_d = this.props.scriptLoading) === null || _d === void 0 ? void 0 : _d.delay) !== null && _e !== void 0 ? _e : 0, successHandler, errorHandler);
|
|
254
283
|
}
|
|
255
284
|
};
|
|
256
285
|
Editor.prototype.componentWillUnmount = function () {
|
|
257
286
|
var _this = this;
|
|
258
287
|
var editor = this.editor;
|
|
259
288
|
if (editor) {
|
|
260
|
-
editor.off(changeEvents(), this.handleEditorChange);
|
|
261
|
-
editor.off(beforeInputEvent(), this.handleBeforeInput);
|
|
289
|
+
editor.off(this.changeEvents(), this.handleEditorChange);
|
|
290
|
+
editor.off(this.beforeInputEvent(), this.handleBeforeInput);
|
|
262
291
|
editor.off('keypress', this.handleEditorChangeSpecial);
|
|
263
292
|
editor.off('keydown', this.handleBeforeInputSpecial);
|
|
264
293
|
editor.off('NewBlock', this.handleEditorChange);
|
|
@@ -271,8 +300,17 @@ var Editor = /** @class */ (function (_super) {
|
|
|
271
300
|
}
|
|
272
301
|
};
|
|
273
302
|
Editor.prototype.render = function () {
|
|
274
|
-
return
|
|
275
|
-
|
|
303
|
+
return this.inline ? this.renderInline() : this.renderIframe();
|
|
304
|
+
};
|
|
305
|
+
Editor.prototype.changeEvents = function () {
|
|
306
|
+
var _a, _b, _c;
|
|
307
|
+
var isIE = (_c = (_b = (_a = TinyMCE_1.getTinymce(this.view)) === null || _a === void 0 ? void 0 : _a.Env) === null || _b === void 0 ? void 0 : _b.browser) === null || _c === void 0 ? void 0 : _c.isIE();
|
|
308
|
+
return (isIE
|
|
309
|
+
? 'change keyup compositionend setcontent CommentChange'
|
|
310
|
+
: 'change input compositionend setcontent CommentChange');
|
|
311
|
+
};
|
|
312
|
+
Editor.prototype.beforeInputEvent = function () {
|
|
313
|
+
return Utils_1.isBeforeInputEventAvailable() ? 'beforeinput SelectionChange' : 'SelectionChange';
|
|
276
314
|
};
|
|
277
315
|
Editor.prototype.renderInline = function () {
|
|
278
316
|
var _a = this.props.tagName, tagName = _a === void 0 ? 'div' : _a;
|
|
@@ -289,13 +327,29 @@ var Editor = /** @class */ (function (_super) {
|
|
|
289
327
|
id: this.id
|
|
290
328
|
});
|
|
291
329
|
};
|
|
292
|
-
Editor.prototype.
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
330
|
+
Editor.prototype.getScriptSources = function () {
|
|
331
|
+
var _a, _b;
|
|
332
|
+
var async = (_a = this.props.scriptLoading) === null || _a === void 0 ? void 0 : _a.async;
|
|
333
|
+
var defer = (_b = this.props.scriptLoading) === null || _b === void 0 ? void 0 : _b.defer;
|
|
334
|
+
if (this.props.tinymceScriptSrc !== undefined) {
|
|
335
|
+
if (typeof this.props.tinymceScriptSrc === 'string') {
|
|
336
|
+
return [{ src: this.props.tinymceScriptSrc, async: async, defer: defer }];
|
|
337
|
+
}
|
|
338
|
+
// multiple scripts can be specified which allows for hybrid mode
|
|
339
|
+
return this.props.tinymceScriptSrc.map(function (item) {
|
|
340
|
+
if (typeof item === 'string') {
|
|
341
|
+
// async does not make sense for multiple items unless
|
|
342
|
+
// they are not dependent (which will be unlikely)
|
|
343
|
+
return { src: item, async: async, defer: defer };
|
|
344
|
+
}
|
|
345
|
+
return item;
|
|
346
|
+
});
|
|
347
|
+
}
|
|
348
|
+
// fallback to the cloud when the tinymceScriptSrc is not specified
|
|
296
349
|
var channel = this.props.cloudChannel;
|
|
297
350
|
var apiKey = this.props.apiKey ? this.props.apiKey : 'no-api-key';
|
|
298
|
-
|
|
351
|
+
var cloudTinyJs = "https://cdn.tiny.cloud/1/" + apiKey + "/tinymce/" + channel + "/tinymce.min.js";
|
|
352
|
+
return [{ src: cloudTinyJs, async: async, defer: defer }];
|
|
299
353
|
};
|
|
300
354
|
Editor.prototype.getInitialValue = function () {
|
|
301
355
|
if (typeof this.props.initialValue === 'string') {
|
|
@@ -316,15 +370,15 @@ var Editor = /** @class */ (function (_super) {
|
|
|
316
370
|
var wasControlled = isValueControlled(prevProps);
|
|
317
371
|
var nowControlled = isValueControlled(this.props);
|
|
318
372
|
if (!wasControlled && nowControlled) {
|
|
319
|
-
this.editor.on(changeEvents(), this.handleEditorChange);
|
|
320
|
-
this.editor.on(beforeInputEvent(), this.handleBeforeInput);
|
|
373
|
+
this.editor.on(this.changeEvents(), this.handleEditorChange);
|
|
374
|
+
this.editor.on(this.beforeInputEvent(), this.handleBeforeInput);
|
|
321
375
|
this.editor.on('keydown', this.handleBeforeInputSpecial);
|
|
322
376
|
this.editor.on('keyup', this.handleEditorChangeSpecial);
|
|
323
377
|
this.editor.on('NewBlock', this.handleEditorChange);
|
|
324
378
|
}
|
|
325
379
|
else if (wasControlled && !nowControlled) {
|
|
326
|
-
this.editor.off(changeEvents(), this.handleEditorChange);
|
|
327
|
-
this.editor.off(beforeInputEvent(), this.handleBeforeInput);
|
|
380
|
+
this.editor.off(this.changeEvents(), this.handleEditorChange);
|
|
381
|
+
this.editor.off(this.beforeInputEvent(), this.handleBeforeInput);
|
|
328
382
|
this.editor.off('keydown', this.handleBeforeInputSpecial);
|
|
329
383
|
this.editor.off('keyup', this.handleEditorChangeSpecial);
|
|
330
384
|
this.editor.off('NewBlock', this.handleEditorChange);
|
|
@@ -333,19 +387,8 @@ var Editor = /** @class */ (function (_super) {
|
|
|
333
387
|
};
|
|
334
388
|
Editor.propTypes = EditorPropTypes_1.EditorPropTypes;
|
|
335
389
|
Editor.defaultProps = {
|
|
336
|
-
cloudChannel: '
|
|
390
|
+
cloudChannel: '6'
|
|
337
391
|
};
|
|
338
392
|
return Editor;
|
|
339
393
|
}(React.Component));
|
|
340
394
|
exports.Editor = Editor;
|
|
341
|
-
var Tema = function (_a) {
|
|
342
|
-
var children = _a.children;
|
|
343
|
-
var theme = core_1.useTheme().palette.type;
|
|
344
|
-
return (React.createElement("div", null,
|
|
345
|
-
theme === 'dark' ? React.createElement(React.Fragment, null,
|
|
346
|
-
React.createElement("link", { rel: 'stylesheet', href: './skins/ui/dark/skin.min.css' }),
|
|
347
|
-
React.createElement("link", { rel: 'stylesheet', href: './skins/ui/dark/content.min.css' })) : React.createElement(React.Fragment, null,
|
|
348
|
-
React.createElement("link", { rel: 'stylesheet', href: './skins/ui/default/content.min.css' }),
|
|
349
|
-
React.createElement("link", { rel: 'stylesheet', href: './skins/ui/default/skin.min.css' })),
|
|
350
|
-
children));
|
|
351
|
-
};
|