create-nextjs-cms 0.5.19 → 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 +7 -0
- package/package.json +4 -4
- 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,223 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TinyMCE version 7.9.1 (2025-05-29)
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
(function () {
|
|
6
|
+
'use strict';
|
|
7
|
+
|
|
8
|
+
const Cell = (initial) => {
|
|
9
|
+
let value = initial;
|
|
10
|
+
const get = () => {
|
|
11
|
+
return value;
|
|
12
|
+
};
|
|
13
|
+
const set = (v) => {
|
|
14
|
+
value = v;
|
|
15
|
+
};
|
|
16
|
+
return {
|
|
17
|
+
get,
|
|
18
|
+
set
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
var global$1 = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
|
23
|
+
|
|
24
|
+
var global = tinymce.util.Tools.resolve('tinymce.Env');
|
|
25
|
+
|
|
26
|
+
const fireResizeEditor = (editor) => editor.dispatch('ResizeEditor');
|
|
27
|
+
|
|
28
|
+
const option = (name) => (editor) => editor.options.get(name);
|
|
29
|
+
const register$1 = (editor) => {
|
|
30
|
+
const registerOption = editor.options.register;
|
|
31
|
+
registerOption('autoresize_overflow_padding', {
|
|
32
|
+
processor: 'number',
|
|
33
|
+
default: 1
|
|
34
|
+
});
|
|
35
|
+
registerOption('autoresize_bottom_margin', {
|
|
36
|
+
processor: 'number',
|
|
37
|
+
default: 50
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
const getMinHeight = option('min_height');
|
|
41
|
+
const getMaxHeight = option('max_height');
|
|
42
|
+
const getAutoResizeOverflowPadding = option('autoresize_overflow_padding');
|
|
43
|
+
const getAutoResizeBottomMargin = option('autoresize_bottom_margin');
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* This class contains all core logic for the autoresize plugin.
|
|
47
|
+
*
|
|
48
|
+
* @class tinymce.autoresize.Plugin
|
|
49
|
+
* @private
|
|
50
|
+
*/
|
|
51
|
+
const isFullscreen = (editor) => editor.plugins.fullscreen && editor.plugins.fullscreen.isFullscreen();
|
|
52
|
+
const toggleScrolling = (editor, state) => {
|
|
53
|
+
const body = editor.getBody();
|
|
54
|
+
if (body) {
|
|
55
|
+
body.style.overflowY = state ? '' : 'hidden';
|
|
56
|
+
if (!state) {
|
|
57
|
+
body.scrollTop = 0;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
const parseCssValueToInt = (dom, elm, name, computed) => {
|
|
62
|
+
var _a;
|
|
63
|
+
const value = parseInt((_a = dom.getStyle(elm, name, computed)) !== null && _a !== void 0 ? _a : '', 10);
|
|
64
|
+
// The value maybe be an empty string, so in that case treat it as being 0
|
|
65
|
+
return isNaN(value) ? 0 : value;
|
|
66
|
+
};
|
|
67
|
+
const shouldScrollIntoView = (trigger) => {
|
|
68
|
+
// Only scroll the selection into view when we're inserting content. Any other
|
|
69
|
+
// triggers the selection should already be in view and resizing would only
|
|
70
|
+
// extend the content area.
|
|
71
|
+
if ((trigger === null || trigger === void 0 ? void 0 : trigger.type.toLowerCase()) === 'setcontent') {
|
|
72
|
+
const setContentEvent = trigger;
|
|
73
|
+
return setContentEvent.selection === true || setContentEvent.paste === true;
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
return false;
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* This method gets executed each time the editor needs to resize.
|
|
81
|
+
*/
|
|
82
|
+
const resize = (editor, oldSize, trigger, getExtraMarginBottom) => {
|
|
83
|
+
var _a;
|
|
84
|
+
const dom = editor.dom;
|
|
85
|
+
const doc = editor.getDoc();
|
|
86
|
+
if (!doc) {
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
if (isFullscreen(editor)) {
|
|
90
|
+
toggleScrolling(editor, true);
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
const docEle = doc.documentElement;
|
|
94
|
+
const resizeBottomMargin = getExtraMarginBottom ? getExtraMarginBottom() : getAutoResizeOverflowPadding(editor);
|
|
95
|
+
const minHeight = (_a = getMinHeight(editor)) !== null && _a !== void 0 ? _a : editor.getElement().offsetHeight;
|
|
96
|
+
let resizeHeight = minHeight;
|
|
97
|
+
// Calculate outer height of the doc element using CSS styles
|
|
98
|
+
const marginTop = parseCssValueToInt(dom, docEle, 'margin-top', true);
|
|
99
|
+
const marginBottom = parseCssValueToInt(dom, docEle, 'margin-bottom', true);
|
|
100
|
+
let contentHeight = docEle.offsetHeight + marginTop + marginBottom + resizeBottomMargin;
|
|
101
|
+
// Make sure we have a valid height
|
|
102
|
+
if (contentHeight < 0) {
|
|
103
|
+
contentHeight = 0;
|
|
104
|
+
}
|
|
105
|
+
// Determine the size of the chroming (menubar, toolbar, etc...)
|
|
106
|
+
const containerHeight = editor.getContainer().offsetHeight;
|
|
107
|
+
const contentAreaHeight = editor.getContentAreaContainer().offsetHeight;
|
|
108
|
+
const chromeHeight = containerHeight - contentAreaHeight;
|
|
109
|
+
// Don't make it smaller than the minimum height
|
|
110
|
+
if (contentHeight + chromeHeight > minHeight) {
|
|
111
|
+
resizeHeight = contentHeight + chromeHeight;
|
|
112
|
+
}
|
|
113
|
+
// If a maximum height has been defined don't exceed this height
|
|
114
|
+
const maxHeight = getMaxHeight(editor);
|
|
115
|
+
if (maxHeight && resizeHeight > maxHeight) {
|
|
116
|
+
resizeHeight = maxHeight;
|
|
117
|
+
toggleScrolling(editor, true);
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
toggleScrolling(editor, false);
|
|
121
|
+
}
|
|
122
|
+
const old = oldSize.get();
|
|
123
|
+
if (old.set) {
|
|
124
|
+
editor.dom.setStyles(editor.getDoc().documentElement, { 'min-height': 0 });
|
|
125
|
+
editor.dom.setStyles(editor.getBody(), { 'min-height': 'inherit' });
|
|
126
|
+
}
|
|
127
|
+
// Resize content element
|
|
128
|
+
if (resizeHeight !== old.totalHeight && (contentHeight - resizeBottomMargin !== old.contentHeight || !old.set)) {
|
|
129
|
+
const deltaSize = (resizeHeight - old.totalHeight);
|
|
130
|
+
dom.setStyle(editor.getContainer(), 'height', resizeHeight + 'px');
|
|
131
|
+
oldSize.set({
|
|
132
|
+
totalHeight: resizeHeight,
|
|
133
|
+
contentHeight,
|
|
134
|
+
set: true,
|
|
135
|
+
});
|
|
136
|
+
fireResizeEditor(editor);
|
|
137
|
+
// iPadOS has an issue where it won't rerender the body when the iframe is resized
|
|
138
|
+
// however if we reset the scroll position then it re-renders correctly
|
|
139
|
+
if (global.browser.isSafari() && (global.os.isMacOS() || global.os.isiOS())) {
|
|
140
|
+
const win = editor.getWin();
|
|
141
|
+
win.scrollTo(win.pageXOffset, win.pageYOffset);
|
|
142
|
+
}
|
|
143
|
+
// Ensure the selection is in view, as it's potentially out of view after inserting content into the editor
|
|
144
|
+
if (editor.hasFocus() && shouldScrollIntoView(trigger)) {
|
|
145
|
+
editor.selection.scrollIntoView();
|
|
146
|
+
}
|
|
147
|
+
// WebKit doesn't decrease the size of the body element until the iframe gets resized
|
|
148
|
+
// So we need to continue to resize the iframe down until the size gets fixed
|
|
149
|
+
if ((global.browser.isSafari() || global.browser.isChromium()) && deltaSize < 0) {
|
|
150
|
+
resize(editor, oldSize, trigger, getExtraMarginBottom);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
const setup = (editor, oldSize) => {
|
|
155
|
+
const getExtraMarginBottom = () => getAutoResizeBottomMargin(editor);
|
|
156
|
+
editor.on('init', (e) => {
|
|
157
|
+
const overflowPadding = getAutoResizeOverflowPadding(editor);
|
|
158
|
+
const dom = editor.dom;
|
|
159
|
+
// Disable height 100% on the root document element otherwise we'll end up resizing indefinitely
|
|
160
|
+
dom.setStyles(editor.getDoc().documentElement, {
|
|
161
|
+
height: 'auto'
|
|
162
|
+
});
|
|
163
|
+
if (global.browser.isEdge() || global.browser.isIE()) {
|
|
164
|
+
dom.setStyles(editor.getBody(), {
|
|
165
|
+
'paddingLeft': overflowPadding,
|
|
166
|
+
'paddingRight': overflowPadding,
|
|
167
|
+
// IE & Edge have a min height of 150px by default on the body, so override that
|
|
168
|
+
'min-height': 0
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
else {
|
|
172
|
+
dom.setStyles(editor.getBody(), {
|
|
173
|
+
paddingLeft: overflowPadding,
|
|
174
|
+
paddingRight: overflowPadding
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
resize(editor, oldSize, e, getExtraMarginBottom);
|
|
178
|
+
});
|
|
179
|
+
editor.on('NodeChange SetContent keyup FullscreenStateChanged ResizeContent', (e) => {
|
|
180
|
+
resize(editor, oldSize, e, getExtraMarginBottom);
|
|
181
|
+
});
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
const register = (editor, oldSize) => {
|
|
185
|
+
editor.addCommand('mceAutoResize', () => {
|
|
186
|
+
resize(editor, oldSize);
|
|
187
|
+
});
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* This class contains all core logic for the autoresize plugin.
|
|
192
|
+
*
|
|
193
|
+
* @class tinymce.autoresize.Plugin
|
|
194
|
+
* @private
|
|
195
|
+
*/
|
|
196
|
+
var Plugin = () => {
|
|
197
|
+
global$1.add('autoresize', (editor) => {
|
|
198
|
+
register$1(editor);
|
|
199
|
+
// If autoresize is enabled, disable resize if the user hasn't explicitly enabled it
|
|
200
|
+
// TINY-8288: This currently does nothing because of a bug in the theme
|
|
201
|
+
if (!editor.options.isSet('resize')) {
|
|
202
|
+
editor.options.set('resize', false);
|
|
203
|
+
}
|
|
204
|
+
if (!editor.inline) {
|
|
205
|
+
const oldSize = Cell({
|
|
206
|
+
totalHeight: 0,
|
|
207
|
+
contentHeight: 0,
|
|
208
|
+
set: false,
|
|
209
|
+
});
|
|
210
|
+
register(editor, oldSize);
|
|
211
|
+
setup(editor, oldSize);
|
|
212
|
+
}
|
|
213
|
+
});
|
|
214
|
+
};
|
|
215
|
+
|
|
216
|
+
Plugin();
|
|
217
|
+
/** *****
|
|
218
|
+
* DO NOT EXPORT ANYTHING
|
|
219
|
+
*
|
|
220
|
+
* IF YOU DO ROLLUP WILL LEAVE A GLOBAL ON THE PAGE
|
|
221
|
+
*******/
|
|
222
|
+
|
|
223
|
+
})();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.Env");const o=e=>t=>t.options.get(e),n=o("min_height"),s=o("max_height"),i=o("autoresize_overflow_padding"),r=o("autoresize_bottom_margin"),g=(e,t)=>{const o=e.getBody();o&&(o.style.overflowY=t?"":"hidden",t||(o.scrollTop=0))},l=(e,t,o,n)=>{var s;const i=parseInt(null!==(s=e.getStyle(t,o,n))&&void 0!==s?s:"",10);return isNaN(i)?0:i},a=(e,o,r,c)=>{var d;const u=e.dom,h=e.getDoc();if(!h)return;if((e=>e.plugins.fullscreen&&e.plugins.fullscreen.isFullscreen())(e))return void g(e,!0);const m=h.documentElement,f=c?c():i(e),p=null!==(d=n(e))&&void 0!==d?d:e.getElement().offsetHeight;let y=p;const S=l(u,m,"margin-top",!0),v=l(u,m,"margin-bottom",!0);let C=m.offsetHeight+S+v+f;C<0&&(C=0);const H=e.getContainer().offsetHeight-e.getContentAreaContainer().offsetHeight;C+H>p&&(y=C+H);const b=s(e);b&&y>b?(y=b,g(e,!0)):g(e,!1);const w=o.get();if(w.set&&(e.dom.setStyles(e.getDoc().documentElement,{"min-height":0}),e.dom.setStyles(e.getBody(),{"min-height":"inherit"})),y!==w.totalHeight&&(C-f!==w.contentHeight||!w.set)){const n=y-w.totalHeight;if(u.setStyle(e.getContainer(),"height",y+"px"),o.set({totalHeight:y,contentHeight:C,set:!0}),(e=>{e.dispatch("ResizeEditor")})(e),t.browser.isSafari()&&(t.os.isMacOS()||t.os.isiOS())){const t=e.getWin();t.scrollTo(t.pageXOffset,t.pageYOffset)}e.hasFocus()&&(e=>{if("setcontent"===(null==e?void 0:e.type.toLowerCase())){const t=e;return!0===t.selection||!0===t.paste}return!1})(r)&&e.selection.scrollIntoView(),(t.browser.isSafari()||t.browser.isChromium())&&n<0&&a(e,o,r,c)}};e.add("autoresize",(e=>{if((e=>{const t=e.options.register;t("autoresize_overflow_padding",{processor:"number",default:1}),t("autoresize_bottom_margin",{processor:"number",default:50})})(e),e.options.isSet("resize")||e.options.set("resize",!1),!e.inline){const o=(()=>{let e={totalHeight:0,contentHeight:0,set:!1};return{get:()=>e,set:t=>{e=t}}})();((e,t)=>{e.addCommand("mceAutoResize",(()=>{a(e,t)}))})(e,o),((e,o)=>{const n=()=>r(e);e.on("init",(s=>{const r=i(e),g=e.dom;g.setStyles(e.getDoc().documentElement,{height:"auto"}),t.browser.isEdge()||t.browser.isIE()?g.setStyles(e.getBody(),{paddingLeft:r,paddingRight:r,"min-height":0}):g.setStyles(e.getBody(),{paddingLeft:r,paddingRight:r}),a(e,o,s,n)})),e.on("NodeChange SetContent keyup FullscreenStateChanged ResizeContent",(t=>{a(e,o,t,n)}))})(e,o)}}))}();
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TinyMCE version 7.9.1 (2025-05-29)
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
(function () {
|
|
6
|
+
'use strict';
|
|
7
|
+
|
|
8
|
+
var global$4 = tinymce.util.Tools.resolve('tinymce.PluginManager');
|
|
9
|
+
|
|
10
|
+
/* eslint-disable @typescript-eslint/no-wrapper-object-types */
|
|
11
|
+
const hasProto = (v, constructor, predicate) => {
|
|
12
|
+
var _a;
|
|
13
|
+
if (predicate(v, constructor.prototype)) {
|
|
14
|
+
return true;
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
// String-based fallback time
|
|
18
|
+
return ((_a = v.constructor) === null || _a === void 0 ? void 0 : _a.name) === constructor.name;
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
const typeOf = (x) => {
|
|
22
|
+
const t = typeof x;
|
|
23
|
+
if (x === null) {
|
|
24
|
+
return 'null';
|
|
25
|
+
}
|
|
26
|
+
else if (t === 'object' && Array.isArray(x)) {
|
|
27
|
+
return 'array';
|
|
28
|
+
}
|
|
29
|
+
else if (t === 'object' && hasProto(x, String, (o, proto) => proto.isPrototypeOf(o))) {
|
|
30
|
+
return 'string';
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
return t;
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
const isType = (type) => (value) => typeOf(value) === type;
|
|
37
|
+
const eq = (t) => (a) => t === a;
|
|
38
|
+
const isString = isType('string');
|
|
39
|
+
const isUndefined = eq(undefined);
|
|
40
|
+
|
|
41
|
+
var global$3 = tinymce.util.Tools.resolve('tinymce.util.Delay');
|
|
42
|
+
|
|
43
|
+
var global$2 = tinymce.util.Tools.resolve('tinymce.util.LocalStorage');
|
|
44
|
+
|
|
45
|
+
var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools');
|
|
46
|
+
|
|
47
|
+
const fireRestoreDraft = (editor) => editor.dispatch('RestoreDraft');
|
|
48
|
+
const fireStoreDraft = (editor) => editor.dispatch('StoreDraft');
|
|
49
|
+
const fireRemoveDraft = (editor) => editor.dispatch('RemoveDraft');
|
|
50
|
+
|
|
51
|
+
const parse = (timeString) => {
|
|
52
|
+
const multiples = {
|
|
53
|
+
s: 1000,
|
|
54
|
+
m: 60000
|
|
55
|
+
};
|
|
56
|
+
const parsedTime = /^(\d+)([ms]?)$/.exec(timeString);
|
|
57
|
+
return (parsedTime && parsedTime[2] ? multiples[parsedTime[2]] : 1) * parseInt(timeString, 10);
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
const option = (name) => (editor) => editor.options.get(name);
|
|
61
|
+
const register$1 = (editor) => {
|
|
62
|
+
const registerOption = editor.options.register;
|
|
63
|
+
const timeProcessor = (value) => {
|
|
64
|
+
const valid = isString(value);
|
|
65
|
+
if (valid) {
|
|
66
|
+
return { value: parse(value), valid };
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
return { valid: false, message: 'Must be a string.' };
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
registerOption('autosave_ask_before_unload', {
|
|
73
|
+
processor: 'boolean',
|
|
74
|
+
default: true
|
|
75
|
+
});
|
|
76
|
+
registerOption('autosave_prefix', {
|
|
77
|
+
processor: 'string',
|
|
78
|
+
default: 'tinymce-autosave-{path}{query}{hash}-{id}-'
|
|
79
|
+
});
|
|
80
|
+
registerOption('autosave_restore_when_empty', {
|
|
81
|
+
processor: 'boolean',
|
|
82
|
+
default: false
|
|
83
|
+
});
|
|
84
|
+
registerOption('autosave_interval', {
|
|
85
|
+
processor: timeProcessor,
|
|
86
|
+
default: '30s'
|
|
87
|
+
});
|
|
88
|
+
registerOption('autosave_retention', {
|
|
89
|
+
processor: timeProcessor,
|
|
90
|
+
default: '20m'
|
|
91
|
+
});
|
|
92
|
+
};
|
|
93
|
+
const shouldAskBeforeUnload = option('autosave_ask_before_unload');
|
|
94
|
+
const shouldRestoreWhenEmpty = option('autosave_restore_when_empty');
|
|
95
|
+
const getAutoSaveInterval = option('autosave_interval');
|
|
96
|
+
const getAutoSaveRetention = option('autosave_retention');
|
|
97
|
+
const getAutoSavePrefix = (editor) => {
|
|
98
|
+
const location = document.location;
|
|
99
|
+
return editor.options.get('autosave_prefix').replace(/{path}/g, location.pathname)
|
|
100
|
+
.replace(/{query}/g, location.search)
|
|
101
|
+
.replace(/{hash}/g, location.hash)
|
|
102
|
+
.replace(/{id}/g, editor.id);
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
const isEmpty = (editor, html) => {
|
|
106
|
+
if (isUndefined(html)) {
|
|
107
|
+
return editor.dom.isEmpty(editor.getBody());
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
const trimmedHtml = global$1.trim(html);
|
|
111
|
+
if (trimmedHtml === '') {
|
|
112
|
+
return true;
|
|
113
|
+
}
|
|
114
|
+
else {
|
|
115
|
+
const fragment = new DOMParser().parseFromString(trimmedHtml, 'text/html');
|
|
116
|
+
return editor.dom.isEmpty(fragment);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
const hasDraft = (editor) => {
|
|
121
|
+
var _a;
|
|
122
|
+
const time = parseInt((_a = global$2.getItem(getAutoSavePrefix(editor) + 'time')) !== null && _a !== void 0 ? _a : '0', 10) || 0;
|
|
123
|
+
if (new Date().getTime() - time > getAutoSaveRetention(editor)) {
|
|
124
|
+
removeDraft(editor, false);
|
|
125
|
+
return false;
|
|
126
|
+
}
|
|
127
|
+
return true;
|
|
128
|
+
};
|
|
129
|
+
const removeDraft = (editor, fire) => {
|
|
130
|
+
const prefix = getAutoSavePrefix(editor);
|
|
131
|
+
global$2.removeItem(prefix + 'draft');
|
|
132
|
+
global$2.removeItem(prefix + 'time');
|
|
133
|
+
if (fire !== false) {
|
|
134
|
+
fireRemoveDraft(editor);
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
const storeDraft = (editor) => {
|
|
138
|
+
const prefix = getAutoSavePrefix(editor);
|
|
139
|
+
if (!isEmpty(editor) && editor.isDirty()) {
|
|
140
|
+
global$2.setItem(prefix + 'draft', editor.getContent({ format: 'raw', no_events: true }));
|
|
141
|
+
global$2.setItem(prefix + 'time', new Date().getTime().toString());
|
|
142
|
+
fireStoreDraft(editor);
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
const restoreDraft = (editor) => {
|
|
146
|
+
var _a;
|
|
147
|
+
const prefix = getAutoSavePrefix(editor);
|
|
148
|
+
if (hasDraft(editor)) {
|
|
149
|
+
editor.setContent((_a = global$2.getItem(prefix + 'draft')) !== null && _a !== void 0 ? _a : '', { format: 'raw' });
|
|
150
|
+
fireRestoreDraft(editor);
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
const startStoreDraft = (editor) => {
|
|
154
|
+
const interval = getAutoSaveInterval(editor);
|
|
155
|
+
global$3.setEditorInterval(editor, () => {
|
|
156
|
+
storeDraft(editor);
|
|
157
|
+
}, interval);
|
|
158
|
+
};
|
|
159
|
+
const restoreLastDraft = (editor) => {
|
|
160
|
+
editor.undoManager.transact(() => {
|
|
161
|
+
restoreDraft(editor);
|
|
162
|
+
removeDraft(editor);
|
|
163
|
+
});
|
|
164
|
+
editor.focus();
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
const get = (editor) => ({
|
|
168
|
+
hasDraft: () => hasDraft(editor),
|
|
169
|
+
storeDraft: () => storeDraft(editor),
|
|
170
|
+
restoreDraft: () => restoreDraft(editor),
|
|
171
|
+
removeDraft: (fire) => removeDraft(editor, fire),
|
|
172
|
+
isEmpty: (html) => isEmpty(editor, html)
|
|
173
|
+
});
|
|
174
|
+
|
|
175
|
+
var global = tinymce.util.Tools.resolve('tinymce.EditorManager');
|
|
176
|
+
|
|
177
|
+
const setup = (editor) => {
|
|
178
|
+
editor.editorManager.on('BeforeUnload', (e) => {
|
|
179
|
+
let msg;
|
|
180
|
+
global$1.each(global.get(), (editor) => {
|
|
181
|
+
// Store a draft for each editor instance
|
|
182
|
+
if (editor.plugins.autosave) {
|
|
183
|
+
editor.plugins.autosave.storeDraft();
|
|
184
|
+
}
|
|
185
|
+
// Setup a return message if the editor is dirty
|
|
186
|
+
if (!msg && editor.isDirty() && shouldAskBeforeUnload(editor)) {
|
|
187
|
+
msg = editor.translate('You have unsaved changes are you sure you want to navigate away?');
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
if (msg) {
|
|
191
|
+
e.preventDefault();
|
|
192
|
+
e.returnValue = msg;
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
const makeSetupHandler = (editor) => (api) => {
|
|
198
|
+
const shouldEnable = () => hasDraft(editor) && !editor.mode.isReadOnly();
|
|
199
|
+
api.setEnabled(shouldEnable());
|
|
200
|
+
const editorEventCallback = () => api.setEnabled(shouldEnable());
|
|
201
|
+
editor.on('StoreDraft RestoreDraft RemoveDraft', editorEventCallback);
|
|
202
|
+
return () => editor.off('StoreDraft RestoreDraft RemoveDraft', editorEventCallback);
|
|
203
|
+
};
|
|
204
|
+
const register = (editor) => {
|
|
205
|
+
// TODO: This was moved from makeSetupHandler as it would only be called when the menu item was rendered?
|
|
206
|
+
// Is it safe to start this process when the plugin is registered?
|
|
207
|
+
startStoreDraft(editor);
|
|
208
|
+
const onAction = () => {
|
|
209
|
+
restoreLastDraft(editor);
|
|
210
|
+
};
|
|
211
|
+
editor.ui.registry.addButton('restoredraft', {
|
|
212
|
+
tooltip: 'Restore last draft',
|
|
213
|
+
icon: 'restore-draft',
|
|
214
|
+
onAction,
|
|
215
|
+
onSetup: makeSetupHandler(editor)
|
|
216
|
+
});
|
|
217
|
+
editor.ui.registry.addMenuItem('restoredraft', {
|
|
218
|
+
text: 'Restore last draft',
|
|
219
|
+
icon: 'restore-draft',
|
|
220
|
+
onAction,
|
|
221
|
+
onSetup: makeSetupHandler(editor)
|
|
222
|
+
});
|
|
223
|
+
};
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* This class contains all core logic for the autosave plugin.
|
|
227
|
+
*
|
|
228
|
+
* @class tinymce.autosave.Plugin
|
|
229
|
+
* @private
|
|
230
|
+
*/
|
|
231
|
+
var Plugin = () => {
|
|
232
|
+
global$4.add('autosave', (editor) => {
|
|
233
|
+
register$1(editor);
|
|
234
|
+
setup(editor);
|
|
235
|
+
register(editor);
|
|
236
|
+
editor.on('init', () => {
|
|
237
|
+
if (shouldRestoreWhenEmpty(editor) && editor.dom.isEmpty(editor.getBody())) {
|
|
238
|
+
restoreDraft(editor);
|
|
239
|
+
}
|
|
240
|
+
});
|
|
241
|
+
return get(editor);
|
|
242
|
+
});
|
|
243
|
+
};
|
|
244
|
+
|
|
245
|
+
Plugin();
|
|
246
|
+
/** *****
|
|
247
|
+
* DO NOT EXPORT ANYTHING
|
|
248
|
+
*
|
|
249
|
+
* IF YOU DO ROLLUP WILL LEAVE A GLOBAL ON THE PAGE
|
|
250
|
+
*******/
|
|
251
|
+
|
|
252
|
+
})();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager");const e=t=>"string"===(t=>{const e=typeof t;return null===t?"null":"object"===e&&Array.isArray(t)?"array":"object"===e&&(r=o=t,(a=String).prototype.isPrototypeOf(r)||(null===(s=o.constructor)||void 0===s?void 0:s.name)===a.name)?"string":e;var r,o,a,s})(t);const r=t=>undefined===t;var o=tinymce.util.Tools.resolve("tinymce.util.Delay"),a=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),s=tinymce.util.Tools.resolve("tinymce.util.Tools");const n=t=>{const e=/^(\d+)([ms]?)$/.exec(t);return(e&&e[2]?{s:1e3,m:6e4}[e[2]]:1)*parseInt(t,10)},i=t=>e=>e.options.get(t),u=i("autosave_ask_before_unload"),l=i("autosave_restore_when_empty"),c=i("autosave_interval"),d=i("autosave_retention"),m=t=>{const e=document.location;return t.options.get("autosave_prefix").replace(/{path}/g,e.pathname).replace(/{query}/g,e.search).replace(/{hash}/g,e.hash).replace(/{id}/g,t.id)},v=(t,e)=>{if(r(e))return t.dom.isEmpty(t.getBody());{const r=s.trim(e);if(""===r)return!0;{const e=(new DOMParser).parseFromString(r,"text/html");return t.dom.isEmpty(e)}}},f=t=>{var e;const r=parseInt(null!==(e=a.getItem(m(t)+"time"))&&void 0!==e?e:"0",10)||0;return!((new Date).getTime()-r>d(t)&&(p(t,!1),1))},p=(t,e)=>{const r=m(t);a.removeItem(r+"draft"),a.removeItem(r+"time"),!1!==e&&(t=>{t.dispatch("RemoveDraft")})(t)},y=t=>{const e=m(t);!v(t)&&t.isDirty()&&(a.setItem(e+"draft",t.getContent({format:"raw",no_events:!0})),a.setItem(e+"time",(new Date).getTime().toString()),(t=>{t.dispatch("StoreDraft")})(t))},g=t=>{var e;const r=m(t);f(t)&&(t.setContent(null!==(e=a.getItem(r+"draft"))&&void 0!==e?e:"",{format:"raw"}),(t=>{t.dispatch("RestoreDraft")})(t))};var D=tinymce.util.Tools.resolve("tinymce.EditorManager");const h=t=>e=>{const r=()=>f(t)&&!t.mode.isReadOnly();e.setEnabled(r());const o=()=>e.setEnabled(r());return t.on("StoreDraft RestoreDraft RemoveDraft",o),()=>t.off("StoreDraft RestoreDraft RemoveDraft",o)};t.add("autosave",(t=>((t=>{const r=t.options.register,o=t=>{const r=e(t);return r?{value:n(t),valid:r}:{valid:!1,message:"Must be a string."}};r("autosave_ask_before_unload",{processor:"boolean",default:!0}),r("autosave_prefix",{processor:"string",default:"tinymce-autosave-{path}{query}{hash}-{id}-"}),r("autosave_restore_when_empty",{processor:"boolean",default:!1}),r("autosave_interval",{processor:o,default:"30s"}),r("autosave_retention",{processor:o,default:"20m"})})(t),(t=>{t.editorManager.on("BeforeUnload",(t=>{let e;s.each(D.get(),(t=>{t.plugins.autosave&&t.plugins.autosave.storeDraft(),!e&&t.isDirty()&&u(t)&&(e=t.translate("You have unsaved changes are you sure you want to navigate away?"))})),e&&(t.preventDefault(),t.returnValue=e)}))})(t),(t=>{(t=>{const e=c(t);o.setEditorInterval(t,(()=>{y(t)}),e)})(t);const e=()=>{(t=>{t.undoManager.transact((()=>{g(t),p(t)})),t.focus()})(t)};t.ui.registry.addButton("restoredraft",{tooltip:"Restore last draft",icon:"restore-draft",onAction:e,onSetup:h(t)}),t.ui.registry.addMenuItem("restoredraft",{text:"Restore last draft",icon:"restore-draft",onAction:e,onSetup:h(t)})})(t),t.on("init",(()=>{l(t)&&t.dom.isEmpty(t.getBody())&&g(t)})),(t=>({hasDraft:()=>f(t),storeDraft:()=>y(t),restoreDraft:()=>g(t),removeDraft:e=>p(t,e),isEmpty:e=>v(t,e)}))(t))))}();
|