create-nextjs-cms 0.5.18 → 0.5.20
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/index.js +9 -5
- package/package.json +3 -3
- package/templates/default/.uploads/.photos/categories/000e56fada378de1a84a4 +0 -0
- package/templates/default/.uploads/.photos/categories/121e7d13ee3b5fa03795b +0 -0
- package/templates/default/.uploads/.photos/categories/17a55c5a53eb62293c69e +0 -0
- package/templates/default/.uploads/.photos/categories/4c86ad8c1f51f1e3a953b +0 -0
- package/templates/default/.uploads/.photos/categories/4d360813741a45744327c +0 -0
- package/templates/default/.uploads/.photos/categories/5238fefaa3cbebf388178 +0 -0
- package/templates/default/.uploads/.photos/categories/541d7cf8c69895bcb15cd +0 -0
- package/templates/default/.uploads/.photos/categories/57a2f689a910a378247ea +0 -0
- package/templates/default/.uploads/.photos/categories/6de4bdb341a3e1f70ddc3 +0 -0
- package/templates/default/.uploads/.photos/categories/6f52739eaa686441a28f4 +0 -0
- package/templates/default/.uploads/.photos/categories/8a21b9fa8ecd88f460a15 +0 -0
- package/templates/default/.uploads/.photos/categories/91948abcb073c9445fdec +0 -0
- package/templates/default/.uploads/.photos/categories/9ae700d1abfd6b85780e8 +0 -0
- package/templates/default/.uploads/.photos/categories/9edee86e932985fc589b5 +0 -0
- package/templates/default/.uploads/.photos/categories/a520e77b082f35b575dba +0 -0
- package/templates/default/.uploads/.photos/categories/b19c449029330f0a74b20 +0 -0
- package/templates/default/.uploads/.photos/categories/b9802010f68afd4edb0e8 +0 -0
- package/templates/default/.uploads/.photos/categories/c1d7c3b986739bf496730 +0 -0
- package/templates/default/.uploads/.photos/categories/c25dc38567384513ffe93 +0 -0
- package/templates/default/.uploads/.photos/categories/cbe3874a3d13afba388df +0 -0
- package/templates/default/.uploads/.photos/categories/d450fdeb04f0d070442d6 +0 -0
- package/templates/default/.uploads/.photos/categories/f80bf3a4515680ead5a5c +0 -0
- package/templates/default/.uploads/.photos/categories/f8639c2d5b0d24cb76fb1 +0 -0
- package/templates/default/.uploads/.photos/categories/f8d997149d10aab046e40 +0 -0
- package/templates/default/.uploads/.photos/categories/fa2c55690ff96e33a16fe +0 -0
- package/templates/default/.uploads/.photos/featured_slider/d00be4edb4c38ca34b5a5 +0 -0
- package/templates/default/.uploads/.thumbs/categories/000e56fada378de1a84a4 +0 -0
- package/templates/default/.uploads/.thumbs/categories/121e7d13ee3b5fa03795b +0 -0
- package/templates/default/.uploads/.thumbs/categories/17a55c5a53eb62293c69e +0 -0
- package/templates/default/.uploads/.thumbs/categories/4c86ad8c1f51f1e3a953b +0 -0
- package/templates/default/.uploads/.thumbs/categories/4d360813741a45744327c +0 -0
- package/templates/default/.uploads/.thumbs/categories/5238fefaa3cbebf388178 +0 -0
- package/templates/default/.uploads/.thumbs/categories/541d7cf8c69895bcb15cd +0 -0
- package/templates/default/.uploads/.thumbs/categories/57a2f689a910a378247ea +0 -0
- package/templates/default/.uploads/.thumbs/categories/6de4bdb341a3e1f70ddc3 +0 -0
- package/templates/default/.uploads/.thumbs/categories/6f52739eaa686441a28f4 +0 -0
- package/templates/default/.uploads/.thumbs/categories/8a21b9fa8ecd88f460a15 +0 -0
- package/templates/default/.uploads/.thumbs/categories/91948abcb073c9445fdec +0 -0
- package/templates/default/.uploads/.thumbs/categories/9ae700d1abfd6b85780e8 +0 -0
- package/templates/default/.uploads/.thumbs/categories/9edee86e932985fc589b5 +0 -0
- package/templates/default/.uploads/.thumbs/categories/a520e77b082f35b575dba +0 -0
- package/templates/default/.uploads/.thumbs/categories/b19c449029330f0a74b20 +0 -0
- package/templates/default/.uploads/.thumbs/categories/b9802010f68afd4edb0e8 +0 -0
- package/templates/default/.uploads/.thumbs/categories/c1d7c3b986739bf496730 +0 -0
- package/templates/default/.uploads/.thumbs/categories/c25dc38567384513ffe93 +0 -0
- package/templates/default/.uploads/.thumbs/categories/cbe3874a3d13afba388df +0 -0
- package/templates/default/.uploads/.thumbs/categories/d450fdeb04f0d070442d6 +0 -0
- package/templates/default/.uploads/.thumbs/categories/f80bf3a4515680ead5a5c +0 -0
- package/templates/default/.uploads/.thumbs/categories/f8639c2d5b0d24cb76fb1 +0 -0
- package/templates/default/.uploads/.thumbs/categories/f8d997149d10aab046e40 +0 -0
- package/templates/default/.uploads/.thumbs/categories/fa2c55690ff96e33a16fe +0 -0
- package/templates/default/_gitignore +57 -0
- package/templates/default/components/form/helpers/_section-hot-reload.ts +11 -0
- package/templates/default/next-env.d.ts +6 -0
- package/templates/default/package.json +2 -2
- package/templates/default/public/tinymce/CHANGELOG.md +3785 -0
- package/templates/default/public/tinymce/README.md +77 -0
- package/templates/default/public/tinymce/bower.json +27 -0
- package/templates/default/public/tinymce/composer.json +52 -0
- package/templates/default/public/tinymce/icons/default/icons.js +231 -0
- package/templates/default/public/tinymce/icons/default/icons.min.js +1 -0
- package/templates/default/public/tinymce/icons/default/index.js +7 -0
- package/templates/default/public/tinymce/license.md +6 -0
- package/templates/default/public/tinymce/models/dom/index.js +7 -0
- package/templates/default/public/tinymce/models/dom/model.js +8994 -0
- package/templates/default/public/tinymce/models/dom/model.min.js +1 -0
- package/templates/default/public/tinymce/notices.txt +21 -0
- package/templates/default/public/tinymce/package.json +32 -0
- package/templates/default/public/tinymce/plugins/accordion/index.js +7 -0
- package/templates/default/public/tinymce/plugins/accordion/plugin.js +1349 -0
- package/templates/default/public/tinymce/plugins/accordion/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/advlist/index.js +7 -0
- package/templates/default/public/tinymce/plugins/advlist/plugin.js +471 -0
- package/templates/default/public/tinymce/plugins/advlist/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/anchor/index.js +7 -0
- package/templates/default/public/tinymce/plugins/anchor/plugin.js +237 -0
- package/templates/default/public/tinymce/plugins/anchor/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/autolink/index.js +7 -0
- package/templates/default/public/tinymce/plugins/autolink/plugin.js +318 -0
- package/templates/default/public/tinymce/plugins/autolink/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/autoresize/index.js +7 -0
- package/templates/default/public/tinymce/plugins/autoresize/plugin.js +223 -0
- package/templates/default/public/tinymce/plugins/autoresize/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/autosave/index.js +7 -0
- package/templates/default/public/tinymce/plugins/autosave/plugin.js +252 -0
- package/templates/default/public/tinymce/plugins/autosave/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/charmap/index.js +7 -0
- package/templates/default/public/tinymce/plugins/charmap/plugin.js +997 -0
- package/templates/default/public/tinymce/plugins/charmap/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/code/index.js +7 -0
- package/templates/default/public/tinymce/plugins/code/plugin.js +97 -0
- package/templates/default/public/tinymce/plugins/code/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/codesample/index.js +7 -0
- package/templates/default/public/tinymce/plugins/codesample/plugin.js +3654 -0
- package/templates/default/public/tinymce/plugins/codesample/plugin.min.js +9 -0
- package/templates/default/public/tinymce/plugins/directionality/index.js +7 -0
- package/templates/default/public/tinymce/plugins/directionality/plugin.js +636 -0
- package/templates/default/public/tinymce/plugins/directionality/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/emoticons/index.js +7 -0
- package/templates/default/public/tinymce/plugins/emoticons/js/emojiimages.js +1 -0
- package/templates/default/public/tinymce/plugins/emoticons/js/emojiimages.min.js +1 -0
- package/templates/default/public/tinymce/plugins/emoticons/js/emojis.js +1 -0
- package/templates/default/public/tinymce/plugins/emoticons/js/emojis.min.js +1 -0
- package/templates/default/public/tinymce/plugins/emoticons/plugin.js +809 -0
- package/templates/default/public/tinymce/plugins/emoticons/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/fullscreen/index.js +7 -0
- package/templates/default/public/tinymce/plugins/fullscreen/plugin.js +1609 -0
- package/templates/default/public/tinymce/plugins/fullscreen/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/help/index.js +7 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/ar.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/bg_BG.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/ca.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/cs.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/da.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/de.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/el.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/en.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/es.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/eu.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/fa.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/fi.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/fr_FR.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/he_IL.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/hi.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/hr.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/hu_HU.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/id.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/it.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/ja.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/kk.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/ko_KR.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/ms.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/nb_NO.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/nl.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/pl.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/pt_BR.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/pt_PT.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/ro.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/ru.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/sk.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/sl_SI.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/sv_SE.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/th_TH.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/tr.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/uk.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/vi.js +93 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/zh_CN.js +87 -0
- package/templates/default/public/tinymce/plugins/help/js/i18n/keynav/zh_TW.js +93 -0
- package/templates/default/public/tinymce/plugins/help/plugin.js +828 -0
- package/templates/default/public/tinymce/plugins/help/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/image/index.js +7 -0
- package/templates/default/public/tinymce/plugins/image/plugin.js +1689 -0
- package/templates/default/public/tinymce/plugins/image/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/importcss/index.js +7 -0
- package/templates/default/public/tinymce/plugins/importcss/plugin.js +403 -0
- package/templates/default/public/tinymce/plugins/importcss/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/insertdatetime/index.js +7 -0
- package/templates/default/public/tinymce/plugins/insertdatetime/plugin.js +186 -0
- package/templates/default/public/tinymce/plugins/insertdatetime/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/link/index.js +7 -0
- package/templates/default/public/tinymce/plugins/link/plugin.js +1577 -0
- package/templates/default/public/tinymce/plugins/link/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/lists/index.js +7 -0
- package/templates/default/public/tinymce/plugins/lists/plugin.js +2544 -0
- package/templates/default/public/tinymce/plugins/lists/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/media/index.js +7 -0
- package/templates/default/public/tinymce/plugins/media/plugin.js +1450 -0
- package/templates/default/public/tinymce/plugins/media/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/nonbreaking/index.js +7 -0
- package/templates/default/public/tinymce/plugins/nonbreaking/plugin.js +128 -0
- package/templates/default/public/tinymce/plugins/nonbreaking/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/pagebreak/index.js +7 -0
- package/templates/default/public/tinymce/plugins/pagebreak/plugin.js +123 -0
- package/templates/default/public/tinymce/plugins/pagebreak/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/preview/index.js +7 -0
- package/templates/default/public/tinymce/plugins/preview/plugin.js +765 -0
- package/templates/default/public/tinymce/plugins/preview/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/quickbars/index.js +7 -0
- package/templates/default/public/tinymce/plugins/quickbars/plugin.js +654 -0
- package/templates/default/public/tinymce/plugins/quickbars/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/save/index.js +7 -0
- package/templates/default/public/tinymce/plugins/save/plugin.js +136 -0
- package/templates/default/public/tinymce/plugins/save/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/searchreplace/index.js +7 -0
- package/templates/default/public/tinymce/plugins/searchreplace/plugin.js +1370 -0
- package/templates/default/public/tinymce/plugins/searchreplace/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/table/index.js +7 -0
- package/templates/default/public/tinymce/plugins/table/plugin.js +4019 -0
- package/templates/default/public/tinymce/plugins/table/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/visualblocks/index.js +7 -0
- package/templates/default/public/tinymce/plugins/visualblocks/plugin.js +106 -0
- package/templates/default/public/tinymce/plugins/visualblocks/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/visualchars/index.js +7 -0
- package/templates/default/public/tinymce/plugins/visualchars/plugin.js +809 -0
- package/templates/default/public/tinymce/plugins/visualchars/plugin.min.js +1 -0
- package/templates/default/public/tinymce/plugins/wordcount/index.js +7 -0
- package/templates/default/public/tinymce/plugins/wordcount/plugin.js +480 -0
- package/templates/default/public/tinymce/plugins/wordcount/plugin.min.js +1 -0
- package/templates/default/public/tinymce/skins/content/dark/content.css +75 -0
- package/templates/default/public/tinymce/skins/content/dark/content.js +10 -0
- package/templates/default/public/tinymce/skins/content/dark/content.min.css +10 -0
- package/templates/default/public/tinymce/skins/content/default/content.css +70 -0
- package/templates/default/public/tinymce/skins/content/default/content.js +10 -0
- package/templates/default/public/tinymce/skins/content/default/content.min.css +10 -0
- package/templates/default/public/tinymce/skins/content/document/content.css +75 -0
- package/templates/default/public/tinymce/skins/content/document/content.js +10 -0
- package/templates/default/public/tinymce/skins/content/document/content.min.css +10 -0
- package/templates/default/public/tinymce/skins/content/tinymce-5/content.css +70 -0
- package/templates/default/public/tinymce/skins/content/tinymce-5/content.js +10 -0
- package/templates/default/public/tinymce/skins/content/tinymce-5/content.min.css +10 -0
- package/templates/default/public/tinymce/skins/content/tinymce-5-dark/content.css +75 -0
- package/templates/default/public/tinymce/skins/content/tinymce-5-dark/content.js +10 -0
- package/templates/default/public/tinymce/skins/content/tinymce-5-dark/content.min.css +10 -0
- package/templates/default/public/tinymce/skins/content/writer/content.css +71 -0
- package/templates/default/public/tinymce/skins/content/writer/content.js +10 -0
- package/templates/default/public/tinymce/skins/content/writer/content.min.css +10 -0
- package/templates/default/public/tinymce/skins/ui/oxide/content.css +893 -0
- package/templates/default/public/tinymce/skins/ui/oxide/content.inline.css +887 -0
- package/templates/default/public/tinymce/skins/ui/oxide/content.inline.js +10 -0
- package/templates/default/public/tinymce/skins/ui/oxide/content.inline.min.css +10 -0
- package/templates/default/public/tinymce/skins/ui/oxide/content.js +10 -0
- package/templates/default/public/tinymce/skins/ui/oxide/content.min.css +10 -0
- package/templates/default/public/tinymce/skins/ui/oxide/skin.css +5141 -0
- package/templates/default/public/tinymce/skins/ui/oxide/skin.js +1 -0
- package/templates/default/public/tinymce/skins/ui/oxide/skin.min.css +1 -0
- package/templates/default/public/tinymce/skins/ui/oxide/skin.shadowdom.css +30 -0
- package/templates/default/public/tinymce/skins/ui/oxide/skin.shadowdom.js +1 -0
- package/templates/default/public/tinymce/skins/ui/oxide/skin.shadowdom.min.css +1 -0
- package/templates/default/public/tinymce/skins/ui/oxide-dark/content.css +881 -0
- package/templates/default/public/tinymce/skins/ui/oxide-dark/content.inline.css +887 -0
- package/templates/default/public/tinymce/skins/ui/oxide-dark/content.inline.js +10 -0
- package/templates/default/public/tinymce/skins/ui/oxide-dark/content.inline.min.css +10 -0
- package/templates/default/public/tinymce/skins/ui/oxide-dark/content.js +10 -0
- package/templates/default/public/tinymce/skins/ui/oxide-dark/content.min.css +10 -0
- package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.css +5144 -0
- package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.js +1 -0
- package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.min.css +1 -0
- package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.css +30 -0
- package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.js +1 -0
- package/templates/default/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css +1 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5/content.css +893 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5/content.inline.css +887 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5/content.inline.js +10 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5/content.inline.min.css +10 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5/content.js +10 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5/content.min.css +10 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.css +5260 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.js +1 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.min.css +1 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.shadowdom.css +30 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.shadowdom.js +1 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5/skin.shadowdom.min.css +1 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.css +881 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.inline.css +887 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.inline.js +10 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.inline.min.css +10 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.js +10 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/content.min.css +10 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.css +5260 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.js +1 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.min.css +1 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.css +30 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.js +1 -0
- package/templates/default/public/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.min.css +1 -0
- package/templates/default/public/tinymce/themes/silver/index.js +7 -0
- package/templates/default/public/tinymce/themes/silver/theme.js +34798 -0
- package/templates/default/public/tinymce/themes/silver/theme.min.js +1 -0
- package/templates/default/public/tinymce/tinymce.d.ts +3350 -0
- package/templates/default/public/tinymce/tinymce.js +38694 -0
- package/templates/default/public/tinymce/tinymce.min.js +11 -0
|
@@ -0,0 +1,997 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TinyMCE version 7.9.1 (2025-05-29)
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
(function () {
|
|
6
|
+
'use strict';
|
|
7
|
+
|
|
8
|
+
var global$1 = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
|
9
|
+
|
|
10
|
+
const fireInsertCustomChar = (editor, chr) => {
|
|
11
|
+
return editor.dispatch('insertCustomChar', { chr });
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const insertChar = (editor, chr) => {
|
|
15
|
+
const evtChr = fireInsertCustomChar(editor, chr).chr;
|
|
16
|
+
editor.execCommand('mceInsertContent', false, evtChr);
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/* eslint-disable @typescript-eslint/no-wrapper-object-types */
|
|
20
|
+
const hasProto = (v, constructor, predicate) => {
|
|
21
|
+
var _a;
|
|
22
|
+
if (predicate(v, constructor.prototype)) {
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
// String-based fallback time
|
|
27
|
+
return ((_a = v.constructor) === null || _a === void 0 ? void 0 : _a.name) === constructor.name;
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
const typeOf = (x) => {
|
|
31
|
+
const t = typeof x;
|
|
32
|
+
if (x === null) {
|
|
33
|
+
return 'null';
|
|
34
|
+
}
|
|
35
|
+
else if (t === 'object' && Array.isArray(x)) {
|
|
36
|
+
return 'array';
|
|
37
|
+
}
|
|
38
|
+
else if (t === 'object' && hasProto(x, String, (o, proto) => proto.isPrototypeOf(o))) {
|
|
39
|
+
return 'string';
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
return t;
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
const isType = (type) => (value) => typeOf(value) === type;
|
|
46
|
+
const isSimpleType = (type) => (value) => typeof value === type;
|
|
47
|
+
const eq = (t) => (a) => t === a;
|
|
48
|
+
const isArray$1 = isType('array');
|
|
49
|
+
const isNull = eq(null);
|
|
50
|
+
const isUndefined = eq(undefined);
|
|
51
|
+
const isNullable = (a) => a === null || a === undefined;
|
|
52
|
+
const isNonNullable = (a) => !isNullable(a);
|
|
53
|
+
const isFunction = isSimpleType('function');
|
|
54
|
+
|
|
55
|
+
const constant = (value) => {
|
|
56
|
+
return () => {
|
|
57
|
+
return value;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
const never = constant(false);
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* The `Optional` type represents a value (of any type) that potentially does
|
|
64
|
+
* not exist. Any `Optional<T>` can either be a `Some<T>` (in which case the
|
|
65
|
+
* value does exist) or a `None` (in which case the value does not exist). This
|
|
66
|
+
* module defines a whole lot of FP-inspired utility functions for dealing with
|
|
67
|
+
* `Optional` objects.
|
|
68
|
+
*
|
|
69
|
+
* Comparison with null or undefined:
|
|
70
|
+
* - We don't get fancy null coalescing operators with `Optional`
|
|
71
|
+
* - We do get fancy helper functions with `Optional`
|
|
72
|
+
* - `Optional` support nesting, and allow for the type to still be nullable (or
|
|
73
|
+
* another `Optional`)
|
|
74
|
+
* - There is no option to turn off strict-optional-checks like there is for
|
|
75
|
+
* strict-null-checks
|
|
76
|
+
*/
|
|
77
|
+
class Optional {
|
|
78
|
+
// The internal representation has a `tag` and a `value`, but both are
|
|
79
|
+
// private: able to be console.logged, but not able to be accessed by code
|
|
80
|
+
constructor(tag, value) {
|
|
81
|
+
this.tag = tag;
|
|
82
|
+
this.value = value;
|
|
83
|
+
}
|
|
84
|
+
// --- Identities ---
|
|
85
|
+
/**
|
|
86
|
+
* Creates a new `Optional<T>` that **does** contain a value.
|
|
87
|
+
*/
|
|
88
|
+
static some(value) {
|
|
89
|
+
return new Optional(true, value);
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Create a new `Optional<T>` that **does not** contain a value. `T` can be
|
|
93
|
+
* any type because we don't actually have a `T`.
|
|
94
|
+
*/
|
|
95
|
+
static none() {
|
|
96
|
+
return Optional.singletonNone;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Perform a transform on an `Optional` type. Regardless of whether this
|
|
100
|
+
* `Optional` contains a value or not, `fold` will return a value of type `U`.
|
|
101
|
+
* If this `Optional` does not contain a value, the `U` will be created by
|
|
102
|
+
* calling `onNone`. If this `Optional` does contain a value, the `U` will be
|
|
103
|
+
* created by calling `onSome`.
|
|
104
|
+
*
|
|
105
|
+
* For the FP enthusiasts in the room, this function:
|
|
106
|
+
* 1. Could be used to implement all of the functions below
|
|
107
|
+
* 2. Forms a catamorphism
|
|
108
|
+
*/
|
|
109
|
+
fold(onNone, onSome) {
|
|
110
|
+
if (this.tag) {
|
|
111
|
+
return onSome(this.value);
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
return onNone();
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Determine if this `Optional` object contains a value.
|
|
119
|
+
*/
|
|
120
|
+
isSome() {
|
|
121
|
+
return this.tag;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Determine if this `Optional` object **does not** contain a value.
|
|
125
|
+
*/
|
|
126
|
+
isNone() {
|
|
127
|
+
return !this.tag;
|
|
128
|
+
}
|
|
129
|
+
// --- Functor (name stolen from Haskell / maths) ---
|
|
130
|
+
/**
|
|
131
|
+
* Perform a transform on an `Optional` object, **if** there is a value. If
|
|
132
|
+
* you provide a function to turn a T into a U, this is the function you use
|
|
133
|
+
* to turn an `Optional<T>` into an `Optional<U>`. If this **does** contain
|
|
134
|
+
* a value then the output will also contain a value (that value being the
|
|
135
|
+
* output of `mapper(this.value)`), and if this **does not** contain a value
|
|
136
|
+
* then neither will the output.
|
|
137
|
+
*/
|
|
138
|
+
map(mapper) {
|
|
139
|
+
if (this.tag) {
|
|
140
|
+
return Optional.some(mapper(this.value));
|
|
141
|
+
}
|
|
142
|
+
else {
|
|
143
|
+
return Optional.none();
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
// --- Monad (name stolen from Haskell / maths) ---
|
|
147
|
+
/**
|
|
148
|
+
* Perform a transform on an `Optional` object, **if** there is a value.
|
|
149
|
+
* Unlike `map`, here the transform itself also returns an `Optional`.
|
|
150
|
+
*/
|
|
151
|
+
bind(binder) {
|
|
152
|
+
if (this.tag) {
|
|
153
|
+
return binder(this.value);
|
|
154
|
+
}
|
|
155
|
+
else {
|
|
156
|
+
return Optional.none();
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
// --- Traversable (name stolen from Haskell / maths) ---
|
|
160
|
+
/**
|
|
161
|
+
* For a given predicate, this function finds out if there **exists** a value
|
|
162
|
+
* inside this `Optional` object that meets the predicate. In practice, this
|
|
163
|
+
* means that for `Optional`s that do not contain a value it returns false (as
|
|
164
|
+
* no predicate-meeting value exists).
|
|
165
|
+
*/
|
|
166
|
+
exists(predicate) {
|
|
167
|
+
return this.tag && predicate(this.value);
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* For a given predicate, this function finds out if **all** the values inside
|
|
171
|
+
* this `Optional` object meet the predicate. In practice, this means that
|
|
172
|
+
* for `Optional`s that do not contain a value it returns true (as all 0
|
|
173
|
+
* objects do meet the predicate).
|
|
174
|
+
*/
|
|
175
|
+
forall(predicate) {
|
|
176
|
+
return !this.tag || predicate(this.value);
|
|
177
|
+
}
|
|
178
|
+
filter(predicate) {
|
|
179
|
+
if (!this.tag || predicate(this.value)) {
|
|
180
|
+
return this;
|
|
181
|
+
}
|
|
182
|
+
else {
|
|
183
|
+
return Optional.none();
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
// --- Getters ---
|
|
187
|
+
/**
|
|
188
|
+
* Get the value out of the inside of the `Optional` object, using a default
|
|
189
|
+
* `replacement` value if the provided `Optional` object does not contain a
|
|
190
|
+
* value.
|
|
191
|
+
*/
|
|
192
|
+
getOr(replacement) {
|
|
193
|
+
return this.tag ? this.value : replacement;
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Get the value out of the inside of the `Optional` object, using a default
|
|
197
|
+
* `replacement` value if the provided `Optional` object does not contain a
|
|
198
|
+
* value. Unlike `getOr`, in this method the `replacement` object is also
|
|
199
|
+
* `Optional` - meaning that this method will always return an `Optional`.
|
|
200
|
+
*/
|
|
201
|
+
or(replacement) {
|
|
202
|
+
return this.tag ? this : replacement;
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Get the value out of the inside of the `Optional` object, using a default
|
|
206
|
+
* `replacement` value if the provided `Optional` object does not contain a
|
|
207
|
+
* value. Unlike `getOr`, in this method the `replacement` value is
|
|
208
|
+
* "thunked" - that is to say that you don't pass a value to `getOrThunk`, you
|
|
209
|
+
* pass a function which (if called) will **return** the `value` you want to
|
|
210
|
+
* use.
|
|
211
|
+
*/
|
|
212
|
+
getOrThunk(thunk) {
|
|
213
|
+
return this.tag ? this.value : thunk();
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Get the value out of the inside of the `Optional` object, using a default
|
|
217
|
+
* `replacement` value if the provided Optional object does not contain a
|
|
218
|
+
* value.
|
|
219
|
+
*
|
|
220
|
+
* Unlike `or`, in this method the `replacement` value is "thunked" - that is
|
|
221
|
+
* to say that you don't pass a value to `orThunk`, you pass a function which
|
|
222
|
+
* (if called) will **return** the `value` you want to use.
|
|
223
|
+
*
|
|
224
|
+
* Unlike `getOrThunk`, in this method the `replacement` value is also
|
|
225
|
+
* `Optional`, meaning that this method will always return an `Optional`.
|
|
226
|
+
*/
|
|
227
|
+
orThunk(thunk) {
|
|
228
|
+
return this.tag ? this : thunk();
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* Get the value out of the inside of the `Optional` object, throwing an
|
|
232
|
+
* exception if the provided `Optional` object does not contain a value.
|
|
233
|
+
*
|
|
234
|
+
* WARNING:
|
|
235
|
+
* You should only be using this function if you know that the `Optional`
|
|
236
|
+
* object **is not** empty (otherwise you're throwing exceptions in production
|
|
237
|
+
* code, which is bad).
|
|
238
|
+
*
|
|
239
|
+
* In tests this is more acceptable.
|
|
240
|
+
*
|
|
241
|
+
* Prefer other methods to this, such as `.each`.
|
|
242
|
+
*/
|
|
243
|
+
getOrDie(message) {
|
|
244
|
+
if (!this.tag) {
|
|
245
|
+
throw new Error(message !== null && message !== void 0 ? message : 'Called getOrDie on None');
|
|
246
|
+
}
|
|
247
|
+
else {
|
|
248
|
+
return this.value;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
// --- Interop with null and undefined ---
|
|
252
|
+
/**
|
|
253
|
+
* Creates an `Optional` value from a nullable (or undefined-able) input.
|
|
254
|
+
* Null, or undefined, is converted to `None`, and anything else is converted
|
|
255
|
+
* to `Some`.
|
|
256
|
+
*/
|
|
257
|
+
static from(value) {
|
|
258
|
+
return isNonNullable(value) ? Optional.some(value) : Optional.none();
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* Converts an `Optional` to a nullable type, by getting the value if it
|
|
262
|
+
* exists, or returning `null` if it does not.
|
|
263
|
+
*/
|
|
264
|
+
getOrNull() {
|
|
265
|
+
return this.tag ? this.value : null;
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
268
|
+
* Converts an `Optional` to an undefined-able type, by getting the value if
|
|
269
|
+
* it exists, or returning `undefined` if it does not.
|
|
270
|
+
*/
|
|
271
|
+
getOrUndefined() {
|
|
272
|
+
return this.value;
|
|
273
|
+
}
|
|
274
|
+
// --- Utilities ---
|
|
275
|
+
/**
|
|
276
|
+
* If the `Optional` contains a value, perform an action on that value.
|
|
277
|
+
* Unlike the rest of the methods on this type, `.each` has side-effects. If
|
|
278
|
+
* you want to transform an `Optional<T>` **into** something, then this is not
|
|
279
|
+
* the method for you. If you want to use an `Optional<T>` to **do**
|
|
280
|
+
* something, then this is the method for you - provided you're okay with not
|
|
281
|
+
* doing anything in the case where the `Optional` doesn't have a value inside
|
|
282
|
+
* it. If you're not sure whether your use-case fits into transforming
|
|
283
|
+
* **into** something or **doing** something, check whether it has a return
|
|
284
|
+
* value. If it does, you should be performing a transform.
|
|
285
|
+
*/
|
|
286
|
+
each(worker) {
|
|
287
|
+
if (this.tag) {
|
|
288
|
+
worker(this.value);
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* Turn the `Optional` object into an array that contains all of the values
|
|
293
|
+
* stored inside the `Optional`. In practice, this means the output will have
|
|
294
|
+
* either 0 or 1 elements.
|
|
295
|
+
*/
|
|
296
|
+
toArray() {
|
|
297
|
+
return this.tag ? [this.value] : [];
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* Turn the `Optional` object into a string for debugging or printing. Not
|
|
301
|
+
* recommended for production code, but good for debugging. Also note that
|
|
302
|
+
* these days an `Optional` object can be logged to the console directly, and
|
|
303
|
+
* its inner value (if it exists) will be visible.
|
|
304
|
+
*/
|
|
305
|
+
toString() {
|
|
306
|
+
return this.tag ? `some(${this.value})` : 'none()';
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
// Sneaky optimisation: every instance of Optional.none is identical, so just
|
|
310
|
+
// reuse the same object
|
|
311
|
+
Optional.singletonNone = new Optional(false);
|
|
312
|
+
|
|
313
|
+
/* eslint-disable @typescript-eslint/unbound-method */
|
|
314
|
+
const nativeSlice = Array.prototype.slice;
|
|
315
|
+
const nativePush = Array.prototype.push;
|
|
316
|
+
const map = (xs, f) => {
|
|
317
|
+
// pre-allocating array size when it's guaranteed to be known
|
|
318
|
+
// http://jsperf.com/push-allocated-vs-dynamic/22
|
|
319
|
+
const len = xs.length;
|
|
320
|
+
const r = new Array(len);
|
|
321
|
+
for (let i = 0; i < len; i++) {
|
|
322
|
+
const x = xs[i];
|
|
323
|
+
r[i] = f(x, i);
|
|
324
|
+
}
|
|
325
|
+
return r;
|
|
326
|
+
};
|
|
327
|
+
// Unwound implementing other functions in terms of each.
|
|
328
|
+
// The code size is roughly the same, and it should allow for better optimisation.
|
|
329
|
+
// const each = function<T, U>(xs: T[], f: (x: T, i?: number, xs?: T[]) => void): void {
|
|
330
|
+
const each = (xs, f) => {
|
|
331
|
+
for (let i = 0, len = xs.length; i < len; i++) {
|
|
332
|
+
const x = xs[i];
|
|
333
|
+
f(x, i);
|
|
334
|
+
}
|
|
335
|
+
};
|
|
336
|
+
const findUntil = (xs, pred, until) => {
|
|
337
|
+
for (let i = 0, len = xs.length; i < len; i++) {
|
|
338
|
+
const x = xs[i];
|
|
339
|
+
if (pred(x, i)) {
|
|
340
|
+
return Optional.some(x);
|
|
341
|
+
}
|
|
342
|
+
else if (until(x, i)) {
|
|
343
|
+
break;
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
return Optional.none();
|
|
347
|
+
};
|
|
348
|
+
const find = (xs, pred) => {
|
|
349
|
+
return findUntil(xs, pred, never);
|
|
350
|
+
};
|
|
351
|
+
const flatten = (xs) => {
|
|
352
|
+
// Note, this is possible because push supports multiple arguments:
|
|
353
|
+
// http://jsperf.com/concat-push/6
|
|
354
|
+
// Note that in the past, concat() would silently work (very slowly) for array-like objects.
|
|
355
|
+
// With this change it will throw an error.
|
|
356
|
+
const r = [];
|
|
357
|
+
for (let i = 0, len = xs.length; i < len; ++i) {
|
|
358
|
+
// Ensure that each value is an array itself
|
|
359
|
+
if (!isArray$1(xs[i])) {
|
|
360
|
+
throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs);
|
|
361
|
+
}
|
|
362
|
+
nativePush.apply(r, xs[i]);
|
|
363
|
+
}
|
|
364
|
+
return r;
|
|
365
|
+
};
|
|
366
|
+
const bind = (xs, f) => flatten(map(xs, f));
|
|
367
|
+
isFunction(Array.from) ? Array.from : (x) => nativeSlice.call(x);
|
|
368
|
+
|
|
369
|
+
const Cell = (initial) => {
|
|
370
|
+
let value = initial;
|
|
371
|
+
const get = () => {
|
|
372
|
+
return value;
|
|
373
|
+
};
|
|
374
|
+
const set = (v) => {
|
|
375
|
+
value = v;
|
|
376
|
+
};
|
|
377
|
+
return {
|
|
378
|
+
get,
|
|
379
|
+
set
|
|
380
|
+
};
|
|
381
|
+
};
|
|
382
|
+
|
|
383
|
+
const contains = (str, substr, start = 0, end) => {
|
|
384
|
+
const idx = str.indexOf(substr, start);
|
|
385
|
+
if (idx !== -1) {
|
|
386
|
+
return isUndefined(end) ? true : idx + substr.length <= end;
|
|
387
|
+
}
|
|
388
|
+
else {
|
|
389
|
+
return false;
|
|
390
|
+
}
|
|
391
|
+
};
|
|
392
|
+
const fromCodePoint = String.fromCodePoint;
|
|
393
|
+
|
|
394
|
+
// Run a function fn after rate ms. If another invocation occurs
|
|
395
|
+
// during the time it is waiting, reschedule the function again
|
|
396
|
+
// with the new arguments.
|
|
397
|
+
const last = (fn, rate) => {
|
|
398
|
+
let timer = null;
|
|
399
|
+
const cancel = () => {
|
|
400
|
+
if (!isNull(timer)) {
|
|
401
|
+
clearTimeout(timer);
|
|
402
|
+
timer = null;
|
|
403
|
+
}
|
|
404
|
+
};
|
|
405
|
+
const throttle = (...args) => {
|
|
406
|
+
cancel();
|
|
407
|
+
timer = setTimeout(() => {
|
|
408
|
+
timer = null;
|
|
409
|
+
fn.apply(null, args);
|
|
410
|
+
}, rate);
|
|
411
|
+
};
|
|
412
|
+
return {
|
|
413
|
+
cancel,
|
|
414
|
+
throttle
|
|
415
|
+
};
|
|
416
|
+
};
|
|
417
|
+
|
|
418
|
+
var global = tinymce.util.Tools.resolve('tinymce.util.Tools');
|
|
419
|
+
|
|
420
|
+
const option = (name) => (editor) => editor.options.get(name);
|
|
421
|
+
const register$2 = (editor) => {
|
|
422
|
+
const registerOption = editor.options.register;
|
|
423
|
+
const charMapProcessor = (value) => isFunction(value) || isArray$1(value);
|
|
424
|
+
registerOption('charmap', {
|
|
425
|
+
processor: charMapProcessor,
|
|
426
|
+
});
|
|
427
|
+
registerOption('charmap_append', {
|
|
428
|
+
processor: charMapProcessor
|
|
429
|
+
});
|
|
430
|
+
};
|
|
431
|
+
const getCharMap$1 = option('charmap');
|
|
432
|
+
const getCharMapAppend = option('charmap_append');
|
|
433
|
+
|
|
434
|
+
const isArray = global.isArray;
|
|
435
|
+
const UserDefined = 'User Defined';
|
|
436
|
+
const getDefaultCharMap = () => {
|
|
437
|
+
return [
|
|
438
|
+
// TODO: Merge categories with TBIO
|
|
439
|
+
// {
|
|
440
|
+
// name: 'Unknown',
|
|
441
|
+
// characters : [
|
|
442
|
+
// [160, 'no-break space'],
|
|
443
|
+
// [173, 'soft hyphen'],
|
|
444
|
+
// [34, 'quotation mark']
|
|
445
|
+
// ]
|
|
446
|
+
// },
|
|
447
|
+
{ name: 'Currency',
|
|
448
|
+
characters: [
|
|
449
|
+
[36, 'dollar sign'],
|
|
450
|
+
[162, 'cent sign'],
|
|
451
|
+
[8364, 'euro sign'],
|
|
452
|
+
[163, 'pound sign'],
|
|
453
|
+
[165, 'yen sign'],
|
|
454
|
+
[164, 'currency sign'],
|
|
455
|
+
[8352, 'euro-currency sign'],
|
|
456
|
+
[8353, 'colon sign'],
|
|
457
|
+
[8354, 'cruzeiro sign'],
|
|
458
|
+
[8355, 'french franc sign'],
|
|
459
|
+
[8356, 'lira sign'],
|
|
460
|
+
[8357, 'mill sign'],
|
|
461
|
+
[8358, 'naira sign'],
|
|
462
|
+
[8359, 'peseta sign'],
|
|
463
|
+
[8360, 'rupee sign'],
|
|
464
|
+
[8361, 'won sign'],
|
|
465
|
+
[8362, 'new sheqel sign'],
|
|
466
|
+
[8363, 'dong sign'],
|
|
467
|
+
[8365, 'kip sign'],
|
|
468
|
+
[8366, 'tugrik sign'],
|
|
469
|
+
[8367, 'drachma sign'],
|
|
470
|
+
[8368, 'german penny symbol'],
|
|
471
|
+
[8369, 'peso sign'],
|
|
472
|
+
[8370, 'guarani sign'],
|
|
473
|
+
[8371, 'austral sign'],
|
|
474
|
+
[8372, 'hryvnia sign'],
|
|
475
|
+
[8373, 'cedi sign'],
|
|
476
|
+
[8374, 'livre tournois sign'],
|
|
477
|
+
[8375, 'spesmilo sign'],
|
|
478
|
+
[8376, 'tenge sign'],
|
|
479
|
+
[8377, 'indian rupee sign'],
|
|
480
|
+
[8378, 'turkish lira sign'],
|
|
481
|
+
[8379, 'nordic mark sign'],
|
|
482
|
+
[8380, 'manat sign'],
|
|
483
|
+
[8381, 'ruble sign'],
|
|
484
|
+
[20870, 'yen character'],
|
|
485
|
+
[20803, 'yuan character'],
|
|
486
|
+
[22291, 'yuan character, in hong kong and taiwan'],
|
|
487
|
+
[22278, 'yen/yuan character variant one']
|
|
488
|
+
]
|
|
489
|
+
},
|
|
490
|
+
{ name: 'Text',
|
|
491
|
+
characters: [
|
|
492
|
+
[169, 'copyright sign'],
|
|
493
|
+
[174, 'registered sign'],
|
|
494
|
+
[8482, 'trade mark sign'],
|
|
495
|
+
[8240, 'per mille sign'],
|
|
496
|
+
[181, 'micro sign'],
|
|
497
|
+
[183, 'middle dot'],
|
|
498
|
+
[8226, 'bullet'],
|
|
499
|
+
[8230, 'three dot leader'],
|
|
500
|
+
[8242, 'minutes / feet'],
|
|
501
|
+
[8243, 'seconds / inches'],
|
|
502
|
+
[167, 'section sign'],
|
|
503
|
+
[182, 'paragraph sign'],
|
|
504
|
+
[223, 'sharp s / ess-zed']
|
|
505
|
+
]
|
|
506
|
+
},
|
|
507
|
+
{ name: 'Quotations',
|
|
508
|
+
characters: [
|
|
509
|
+
[8249, 'single left-pointing angle quotation mark'],
|
|
510
|
+
[8250, 'single right-pointing angle quotation mark'],
|
|
511
|
+
[171, 'left pointing guillemet'],
|
|
512
|
+
[187, 'right pointing guillemet'],
|
|
513
|
+
[8216, 'left single quotation mark'],
|
|
514
|
+
[8217, 'right single quotation mark'],
|
|
515
|
+
[8220, 'left double quotation mark'],
|
|
516
|
+
[8221, 'right double quotation mark'],
|
|
517
|
+
[8218, 'single low-9 quotation mark'],
|
|
518
|
+
[8222, 'double low-9 quotation mark'],
|
|
519
|
+
[60, 'less-than sign'],
|
|
520
|
+
[62, 'greater-than sign'],
|
|
521
|
+
[8804, 'less-than or equal to'],
|
|
522
|
+
[8805, 'greater-than or equal to'],
|
|
523
|
+
[8211, 'en dash'],
|
|
524
|
+
[8212, 'em dash'],
|
|
525
|
+
[175, 'macron'],
|
|
526
|
+
[8254, 'overline'],
|
|
527
|
+
[164, 'currency sign'],
|
|
528
|
+
[166, 'broken bar'],
|
|
529
|
+
[168, 'diaeresis'],
|
|
530
|
+
[161, 'inverted exclamation mark'],
|
|
531
|
+
[191, 'turned question mark'],
|
|
532
|
+
[710, 'circumflex accent'],
|
|
533
|
+
[732, 'small tilde'],
|
|
534
|
+
[176, 'degree sign'],
|
|
535
|
+
[8722, 'minus sign'],
|
|
536
|
+
[177, 'plus-minus sign'],
|
|
537
|
+
[247, 'division sign'],
|
|
538
|
+
[8260, 'fraction slash'],
|
|
539
|
+
[215, 'multiplication sign'],
|
|
540
|
+
[185, 'superscript one'],
|
|
541
|
+
[178, 'superscript two'],
|
|
542
|
+
[179, 'superscript three'],
|
|
543
|
+
[188, 'fraction one quarter'],
|
|
544
|
+
[189, 'fraction one half'],
|
|
545
|
+
[190, 'fraction three quarters']
|
|
546
|
+
]
|
|
547
|
+
},
|
|
548
|
+
{
|
|
549
|
+
name: 'Mathematical',
|
|
550
|
+
characters: [
|
|
551
|
+
[402, 'function / florin'],
|
|
552
|
+
[8747, 'integral'],
|
|
553
|
+
[8721, 'n-ary sumation'],
|
|
554
|
+
[8734, 'infinity'],
|
|
555
|
+
[8730, 'square root'],
|
|
556
|
+
[8764, 'similar to'],
|
|
557
|
+
[8773, 'approximately equal to'],
|
|
558
|
+
[8776, 'almost equal to'],
|
|
559
|
+
[8800, 'not equal to'],
|
|
560
|
+
[8801, 'identical to'],
|
|
561
|
+
[8712, 'element of'],
|
|
562
|
+
[8713, 'not an element of'],
|
|
563
|
+
[8715, 'contains as member'],
|
|
564
|
+
[8719, 'n-ary product'],
|
|
565
|
+
[8743, 'logical and'],
|
|
566
|
+
[8744, 'logical or'],
|
|
567
|
+
[172, 'not sign'],
|
|
568
|
+
[8745, 'intersection'],
|
|
569
|
+
[8746, 'union'],
|
|
570
|
+
[8706, 'partial differential'],
|
|
571
|
+
[8704, 'for all'],
|
|
572
|
+
[8707, 'there exists'],
|
|
573
|
+
[8709, 'diameter'],
|
|
574
|
+
[8711, 'backward difference'],
|
|
575
|
+
[8727, 'asterisk operator'],
|
|
576
|
+
[8733, 'proportional to'],
|
|
577
|
+
[8736, 'angle']
|
|
578
|
+
]
|
|
579
|
+
},
|
|
580
|
+
// TODO: Merge categories with TBIO
|
|
581
|
+
// {
|
|
582
|
+
// name: 'Undefined',
|
|
583
|
+
// characters: [
|
|
584
|
+
// [180, 'acute accent'],
|
|
585
|
+
// [184, 'cedilla'],
|
|
586
|
+
// [170, 'feminine ordinal indicator'],
|
|
587
|
+
// [186, 'masculine ordinal indicator'],
|
|
588
|
+
// [8224, 'dagger'],
|
|
589
|
+
// [8225, 'double dagger']
|
|
590
|
+
// ]
|
|
591
|
+
// },
|
|
592
|
+
{
|
|
593
|
+
name: 'Extended Latin',
|
|
594
|
+
characters: [
|
|
595
|
+
[192, 'A - grave'],
|
|
596
|
+
[193, 'A - acute'],
|
|
597
|
+
[194, 'A - circumflex'],
|
|
598
|
+
[195, 'A - tilde'],
|
|
599
|
+
[196, 'A - diaeresis'],
|
|
600
|
+
[197, 'A - ring above'],
|
|
601
|
+
[256, 'A - macron'],
|
|
602
|
+
[198, 'ligature AE'],
|
|
603
|
+
[199, 'C - cedilla'],
|
|
604
|
+
[200, 'E - grave'],
|
|
605
|
+
[201, 'E - acute'],
|
|
606
|
+
[202, 'E - circumflex'],
|
|
607
|
+
[203, 'E - diaeresis'],
|
|
608
|
+
[274, 'E - macron'],
|
|
609
|
+
[204, 'I - grave'],
|
|
610
|
+
[205, 'I - acute'],
|
|
611
|
+
[206, 'I - circumflex'],
|
|
612
|
+
[207, 'I - diaeresis'],
|
|
613
|
+
[298, 'I - macron'],
|
|
614
|
+
[208, 'ETH'],
|
|
615
|
+
[209, 'N - tilde'],
|
|
616
|
+
[210, 'O - grave'],
|
|
617
|
+
[211, 'O - acute'],
|
|
618
|
+
[212, 'O - circumflex'],
|
|
619
|
+
[213, 'O - tilde'],
|
|
620
|
+
[214, 'O - diaeresis'],
|
|
621
|
+
[216, 'O - slash'],
|
|
622
|
+
[332, 'O - macron'],
|
|
623
|
+
[338, 'ligature OE'],
|
|
624
|
+
[352, 'S - caron'],
|
|
625
|
+
[217, 'U - grave'],
|
|
626
|
+
[218, 'U - acute'],
|
|
627
|
+
[219, 'U - circumflex'],
|
|
628
|
+
[220, 'U - diaeresis'],
|
|
629
|
+
[362, 'U - macron'],
|
|
630
|
+
[221, 'Y - acute'],
|
|
631
|
+
[376, 'Y - diaeresis'],
|
|
632
|
+
[562, 'Y - macron'],
|
|
633
|
+
[222, 'THORN'],
|
|
634
|
+
[224, 'a - grave'],
|
|
635
|
+
[225, 'a - acute'],
|
|
636
|
+
[226, 'a - circumflex'],
|
|
637
|
+
[227, 'a - tilde'],
|
|
638
|
+
[228, 'a - diaeresis'],
|
|
639
|
+
[229, 'a - ring above'],
|
|
640
|
+
[257, 'a - macron'],
|
|
641
|
+
[230, 'ligature ae'],
|
|
642
|
+
[231, 'c - cedilla'],
|
|
643
|
+
[232, 'e - grave'],
|
|
644
|
+
[233, 'e - acute'],
|
|
645
|
+
[234, 'e - circumflex'],
|
|
646
|
+
[235, 'e - diaeresis'],
|
|
647
|
+
[275, 'e - macron'],
|
|
648
|
+
[236, 'i - grave'],
|
|
649
|
+
[237, 'i - acute'],
|
|
650
|
+
[238, 'i - circumflex'],
|
|
651
|
+
[239, 'i - diaeresis'],
|
|
652
|
+
[299, 'i - macron'],
|
|
653
|
+
[240, 'eth'],
|
|
654
|
+
[241, 'n - tilde'],
|
|
655
|
+
[242, 'o - grave'],
|
|
656
|
+
[243, 'o - acute'],
|
|
657
|
+
[244, 'o - circumflex'],
|
|
658
|
+
[245, 'o - tilde'],
|
|
659
|
+
[246, 'o - diaeresis'],
|
|
660
|
+
[248, 'o slash'],
|
|
661
|
+
[333, 'o macron'],
|
|
662
|
+
[339, 'ligature oe'],
|
|
663
|
+
[353, 's - caron'],
|
|
664
|
+
[249, 'u - grave'],
|
|
665
|
+
[250, 'u - acute'],
|
|
666
|
+
[251, 'u - circumflex'],
|
|
667
|
+
[252, 'u - diaeresis'],
|
|
668
|
+
[363, 'u - macron'],
|
|
669
|
+
[253, 'y - acute'],
|
|
670
|
+
[254, 'thorn'],
|
|
671
|
+
[255, 'y - diaeresis'],
|
|
672
|
+
[563, 'y - macron'],
|
|
673
|
+
[913, 'Alpha'],
|
|
674
|
+
[914, 'Beta'],
|
|
675
|
+
[915, 'Gamma'],
|
|
676
|
+
[916, 'Delta'],
|
|
677
|
+
[917, 'Epsilon'],
|
|
678
|
+
[918, 'Zeta'],
|
|
679
|
+
[919, 'Eta'],
|
|
680
|
+
[920, 'Theta'],
|
|
681
|
+
[921, 'Iota'],
|
|
682
|
+
[922, 'Kappa'],
|
|
683
|
+
[923, 'Lambda'],
|
|
684
|
+
[924, 'Mu'],
|
|
685
|
+
[925, 'Nu'],
|
|
686
|
+
[926, 'Xi'],
|
|
687
|
+
[927, 'Omicron'],
|
|
688
|
+
[928, 'Pi'],
|
|
689
|
+
[929, 'Rho'],
|
|
690
|
+
[931, 'Sigma'],
|
|
691
|
+
[932, 'Tau'],
|
|
692
|
+
[933, 'Upsilon'],
|
|
693
|
+
[934, 'Phi'],
|
|
694
|
+
[935, 'Chi'],
|
|
695
|
+
[936, 'Psi'],
|
|
696
|
+
[937, 'Omega'],
|
|
697
|
+
[945, 'alpha'],
|
|
698
|
+
[946, 'beta'],
|
|
699
|
+
[947, 'gamma'],
|
|
700
|
+
[948, 'delta'],
|
|
701
|
+
[949, 'epsilon'],
|
|
702
|
+
[950, 'zeta'],
|
|
703
|
+
[951, 'eta'],
|
|
704
|
+
[952, 'theta'],
|
|
705
|
+
[953, 'iota'],
|
|
706
|
+
[954, 'kappa'],
|
|
707
|
+
[955, 'lambda'],
|
|
708
|
+
[956, 'mu'],
|
|
709
|
+
[957, 'nu'],
|
|
710
|
+
[958, 'xi'],
|
|
711
|
+
[959, 'omicron'],
|
|
712
|
+
[960, 'pi'],
|
|
713
|
+
[961, 'rho'],
|
|
714
|
+
[962, 'final sigma'],
|
|
715
|
+
[963, 'sigma'],
|
|
716
|
+
[964, 'tau'],
|
|
717
|
+
[965, 'upsilon'],
|
|
718
|
+
[966, 'phi'],
|
|
719
|
+
[967, 'chi'],
|
|
720
|
+
[968, 'psi'],
|
|
721
|
+
[969, 'omega']
|
|
722
|
+
]
|
|
723
|
+
},
|
|
724
|
+
{
|
|
725
|
+
name: 'Symbols',
|
|
726
|
+
characters: [
|
|
727
|
+
[8501, 'alef symbol'],
|
|
728
|
+
[982, 'pi symbol'],
|
|
729
|
+
[8476, 'real part symbol'],
|
|
730
|
+
[978, 'upsilon - hook symbol'],
|
|
731
|
+
[8472, 'Weierstrass p'],
|
|
732
|
+
[8465, 'imaginary part']
|
|
733
|
+
]
|
|
734
|
+
},
|
|
735
|
+
{
|
|
736
|
+
name: 'Arrows',
|
|
737
|
+
characters: [
|
|
738
|
+
[8592, 'leftwards arrow'],
|
|
739
|
+
[8593, 'upwards arrow'],
|
|
740
|
+
[8594, 'rightwards arrow'],
|
|
741
|
+
[8595, 'downwards arrow'],
|
|
742
|
+
[8596, 'left right arrow'],
|
|
743
|
+
[8629, 'carriage return'],
|
|
744
|
+
[8656, 'leftwards double arrow'],
|
|
745
|
+
[8657, 'upwards double arrow'],
|
|
746
|
+
[8658, 'rightwards double arrow'],
|
|
747
|
+
[8659, 'downwards double arrow'],
|
|
748
|
+
[8660, 'left right double arrow'],
|
|
749
|
+
[8756, 'therefore'],
|
|
750
|
+
[8834, 'subset of'],
|
|
751
|
+
[8835, 'superset of'],
|
|
752
|
+
[8836, 'not a subset of'],
|
|
753
|
+
[8838, 'subset of or equal to'],
|
|
754
|
+
[8839, 'superset of or equal to'],
|
|
755
|
+
[8853, 'circled plus'],
|
|
756
|
+
[8855, 'circled times'],
|
|
757
|
+
[8869, 'perpendicular'],
|
|
758
|
+
[8901, 'dot operator'],
|
|
759
|
+
[8968, 'left ceiling'],
|
|
760
|
+
[8969, 'right ceiling'],
|
|
761
|
+
[8970, 'left floor'],
|
|
762
|
+
[8971, 'right floor'],
|
|
763
|
+
[9001, 'left-pointing angle bracket'],
|
|
764
|
+
[9002, 'right-pointing angle bracket'],
|
|
765
|
+
[9674, 'lozenge'],
|
|
766
|
+
[9824, 'black spade suit'],
|
|
767
|
+
[9827, 'black club suit'],
|
|
768
|
+
[9829, 'black heart suit'],
|
|
769
|
+
[9830, 'black diamond suit'],
|
|
770
|
+
[8194, 'en space'],
|
|
771
|
+
[8195, 'em space'],
|
|
772
|
+
[8201, 'thin space'],
|
|
773
|
+
[8204, 'zero width non-joiner'],
|
|
774
|
+
[8205, 'zero width joiner'],
|
|
775
|
+
[8206, 'left-to-right mark'],
|
|
776
|
+
[8207, 'right-to-left mark']
|
|
777
|
+
]
|
|
778
|
+
}
|
|
779
|
+
];
|
|
780
|
+
};
|
|
781
|
+
const charmapFilter = (charmap) => {
|
|
782
|
+
return global.grep(charmap, (item) => {
|
|
783
|
+
return isArray(item) && item.length === 2;
|
|
784
|
+
});
|
|
785
|
+
};
|
|
786
|
+
const getCharsFromOption = (optionValue) => {
|
|
787
|
+
if (isArray(optionValue)) {
|
|
788
|
+
return charmapFilter(optionValue);
|
|
789
|
+
}
|
|
790
|
+
if (typeof optionValue === 'function') {
|
|
791
|
+
return optionValue();
|
|
792
|
+
}
|
|
793
|
+
return [];
|
|
794
|
+
};
|
|
795
|
+
const extendCharMap = (editor, charmap) => {
|
|
796
|
+
const userCharMap = getCharMap$1(editor);
|
|
797
|
+
if (userCharMap) {
|
|
798
|
+
charmap = [{ name: UserDefined, characters: getCharsFromOption(userCharMap) }];
|
|
799
|
+
}
|
|
800
|
+
const userCharMapAppend = getCharMapAppend(editor);
|
|
801
|
+
if (userCharMapAppend) {
|
|
802
|
+
const userDefinedGroup = global.grep(charmap, (cg) => cg.name === UserDefined);
|
|
803
|
+
if (userDefinedGroup.length) {
|
|
804
|
+
userDefinedGroup[0].characters = [...userDefinedGroup[0].characters, ...getCharsFromOption(userCharMapAppend)];
|
|
805
|
+
return charmap;
|
|
806
|
+
}
|
|
807
|
+
return charmap.concat({ name: UserDefined, characters: getCharsFromOption(userCharMapAppend) });
|
|
808
|
+
}
|
|
809
|
+
return charmap;
|
|
810
|
+
};
|
|
811
|
+
const getCharMap = (editor) => {
|
|
812
|
+
const groups = extendCharMap(editor, getDefaultCharMap());
|
|
813
|
+
return groups.length > 1 ? [
|
|
814
|
+
{
|
|
815
|
+
name: 'All',
|
|
816
|
+
characters: bind(groups, (g) => g.characters)
|
|
817
|
+
}
|
|
818
|
+
].concat(groups) : groups;
|
|
819
|
+
};
|
|
820
|
+
|
|
821
|
+
const get = (editor) => {
|
|
822
|
+
const getCharMap$1 = () => {
|
|
823
|
+
return getCharMap(editor);
|
|
824
|
+
};
|
|
825
|
+
const insertChar$1 = (chr) => {
|
|
826
|
+
insertChar(editor, chr);
|
|
827
|
+
};
|
|
828
|
+
return {
|
|
829
|
+
getCharMap: getCharMap$1,
|
|
830
|
+
insertChar: insertChar$1
|
|
831
|
+
};
|
|
832
|
+
};
|
|
833
|
+
|
|
834
|
+
const charMatches = (charCode, name, lowerCasePattern) => {
|
|
835
|
+
if (contains(fromCodePoint(charCode).toLowerCase(), lowerCasePattern)) {
|
|
836
|
+
return true;
|
|
837
|
+
}
|
|
838
|
+
else {
|
|
839
|
+
return contains(name.toLowerCase(), lowerCasePattern) || contains(name.toLowerCase().replace(/\s+/g, ''), lowerCasePattern);
|
|
840
|
+
}
|
|
841
|
+
};
|
|
842
|
+
const scan = (group, pattern) => {
|
|
843
|
+
const matches = [];
|
|
844
|
+
const lowerCasePattern = pattern.toLowerCase();
|
|
845
|
+
each(group.characters, (g) => {
|
|
846
|
+
if (charMatches(g[0], g[1], lowerCasePattern)) {
|
|
847
|
+
matches.push(g);
|
|
848
|
+
}
|
|
849
|
+
});
|
|
850
|
+
return map(matches, (m) => ({
|
|
851
|
+
text: m[1],
|
|
852
|
+
value: fromCodePoint(m[0]),
|
|
853
|
+
icon: fromCodePoint(m[0])
|
|
854
|
+
}));
|
|
855
|
+
};
|
|
856
|
+
|
|
857
|
+
const patternName = 'pattern';
|
|
858
|
+
const open = (editor, charMap) => {
|
|
859
|
+
const makeGroupItems = () => [
|
|
860
|
+
{
|
|
861
|
+
label: 'Search',
|
|
862
|
+
type: 'input',
|
|
863
|
+
name: patternName
|
|
864
|
+
},
|
|
865
|
+
{
|
|
866
|
+
type: 'collection',
|
|
867
|
+
name: 'results'
|
|
868
|
+
// TODO TINY-3229 implement collection columns properly
|
|
869
|
+
// columns: 'auto'
|
|
870
|
+
}
|
|
871
|
+
];
|
|
872
|
+
const makeTabs = () => map(charMap, (charGroup) => ({
|
|
873
|
+
title: charGroup.name,
|
|
874
|
+
name: charGroup.name,
|
|
875
|
+
items: makeGroupItems()
|
|
876
|
+
}));
|
|
877
|
+
const makePanel = () => ({ type: 'panel', items: makeGroupItems() });
|
|
878
|
+
const makeTabPanel = () => ({ type: 'tabpanel', tabs: makeTabs() });
|
|
879
|
+
const currentTab = charMap.length === 1 ? Cell(UserDefined) : Cell('All');
|
|
880
|
+
const scanAndSet = (dialogApi, pattern) => {
|
|
881
|
+
find(charMap, (group) => group.name === currentTab.get()).each((f) => {
|
|
882
|
+
const items = scan(f, pattern);
|
|
883
|
+
dialogApi.setData({
|
|
884
|
+
results: items
|
|
885
|
+
});
|
|
886
|
+
});
|
|
887
|
+
};
|
|
888
|
+
const SEARCH_DELAY = 40;
|
|
889
|
+
const updateFilter = last((dialogApi) => {
|
|
890
|
+
const pattern = dialogApi.getData().pattern;
|
|
891
|
+
scanAndSet(dialogApi, pattern);
|
|
892
|
+
}, SEARCH_DELAY);
|
|
893
|
+
const body = charMap.length === 1 ? makePanel() : makeTabPanel();
|
|
894
|
+
const initialData = {
|
|
895
|
+
pattern: '',
|
|
896
|
+
results: scan(charMap[0], '')
|
|
897
|
+
};
|
|
898
|
+
const bridgeSpec = {
|
|
899
|
+
title: 'Special Character',
|
|
900
|
+
size: 'normal',
|
|
901
|
+
body,
|
|
902
|
+
buttons: [
|
|
903
|
+
{
|
|
904
|
+
type: 'cancel',
|
|
905
|
+
name: 'close',
|
|
906
|
+
text: 'Close',
|
|
907
|
+
primary: true
|
|
908
|
+
}
|
|
909
|
+
],
|
|
910
|
+
initialData,
|
|
911
|
+
onAction: (api, details) => {
|
|
912
|
+
if (details.name === 'results') {
|
|
913
|
+
insertChar(editor, details.value);
|
|
914
|
+
api.close();
|
|
915
|
+
}
|
|
916
|
+
},
|
|
917
|
+
onTabChange: (dialogApi, details) => {
|
|
918
|
+
currentTab.set(details.newTabName);
|
|
919
|
+
updateFilter.throttle(dialogApi);
|
|
920
|
+
},
|
|
921
|
+
onChange: (dialogApi, changeData) => {
|
|
922
|
+
if (changeData.name === patternName) {
|
|
923
|
+
updateFilter.throttle(dialogApi);
|
|
924
|
+
}
|
|
925
|
+
}
|
|
926
|
+
};
|
|
927
|
+
const dialogApi = editor.windowManager.open(bridgeSpec);
|
|
928
|
+
dialogApi.focus(patternName);
|
|
929
|
+
};
|
|
930
|
+
|
|
931
|
+
const register$1 = (editor, charMap) => {
|
|
932
|
+
editor.addCommand('mceShowCharmap', () => {
|
|
933
|
+
open(editor, charMap);
|
|
934
|
+
});
|
|
935
|
+
};
|
|
936
|
+
|
|
937
|
+
const init = (editor, all) => {
|
|
938
|
+
editor.ui.registry.addAutocompleter('charmap', {
|
|
939
|
+
trigger: ':',
|
|
940
|
+
columns: 'auto',
|
|
941
|
+
minChars: 2,
|
|
942
|
+
fetch: (pattern, _maxResults) => new Promise((resolve, _reject) => {
|
|
943
|
+
resolve(scan(all, pattern));
|
|
944
|
+
}),
|
|
945
|
+
onAction: (autocompleteApi, rng, value) => {
|
|
946
|
+
editor.selection.setRng(rng);
|
|
947
|
+
editor.insertContent(value);
|
|
948
|
+
autocompleteApi.hide();
|
|
949
|
+
}
|
|
950
|
+
});
|
|
951
|
+
};
|
|
952
|
+
|
|
953
|
+
const onSetupEditable = (editor) => (api) => {
|
|
954
|
+
const nodeChanged = () => {
|
|
955
|
+
api.setEnabled(editor.selection.isEditable());
|
|
956
|
+
};
|
|
957
|
+
editor.on('NodeChange', nodeChanged);
|
|
958
|
+
nodeChanged();
|
|
959
|
+
return () => {
|
|
960
|
+
editor.off('NodeChange', nodeChanged);
|
|
961
|
+
};
|
|
962
|
+
};
|
|
963
|
+
const register = (editor) => {
|
|
964
|
+
const onAction = () => editor.execCommand('mceShowCharmap');
|
|
965
|
+
editor.ui.registry.addButton('charmap', {
|
|
966
|
+
icon: 'insert-character',
|
|
967
|
+
tooltip: 'Special character',
|
|
968
|
+
onAction,
|
|
969
|
+
onSetup: onSetupEditable(editor)
|
|
970
|
+
});
|
|
971
|
+
editor.ui.registry.addMenuItem('charmap', {
|
|
972
|
+
icon: 'insert-character',
|
|
973
|
+
text: 'Special character...',
|
|
974
|
+
onAction,
|
|
975
|
+
onSetup: onSetupEditable(editor)
|
|
976
|
+
});
|
|
977
|
+
};
|
|
978
|
+
|
|
979
|
+
var Plugin = () => {
|
|
980
|
+
global$1.add('charmap', (editor) => {
|
|
981
|
+
register$2(editor);
|
|
982
|
+
const charMap = getCharMap(editor);
|
|
983
|
+
register$1(editor, charMap);
|
|
984
|
+
register(editor);
|
|
985
|
+
init(editor, charMap[0]);
|
|
986
|
+
return get(editor);
|
|
987
|
+
});
|
|
988
|
+
};
|
|
989
|
+
|
|
990
|
+
Plugin();
|
|
991
|
+
/** *****
|
|
992
|
+
* DO NOT EXPORT ANYTHING
|
|
993
|
+
*
|
|
994
|
+
* IF YOU DO ROLLUP WILL LEAVE A GLOBAL ON THE PAGE
|
|
995
|
+
*******/
|
|
996
|
+
|
|
997
|
+
})();
|