From 3ec0e9d997b92602da071b25bb5bb2d173110dcc Mon Sep 17 00:00:00 2001 From: Yer <17633066053@163.com> Date: Fri, 1 Dec 2023 10:47:33 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20:sparkles:=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E5=AF=8C=E6=96=87=E6=9C=AC=E6=9C=AC=E5=9C=B0=E5=BC=95=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manager/package.json | 1 - manager/public/index.html | 4 + manager/public/tinymce/CHANGELOG.md | 3163 ++ manager/public/tinymce/README.md | 71 + manager/public/tinymce/bower.json | 27 + manager/public/tinymce/composer.json | 52 + manager/public/tinymce/icons/default/icons.js | 189 + .../public/tinymce/icons/default/icons.min.js | 1 + manager/public/tinymce/icons/default/index.js | 7 + manager/public/tinymce/langs/zh-Hans.js | 1 + manager/public/tinymce/license.txt | 21 + manager/public/tinymce/models/dom/index.js | 7 + manager/public/tinymce/models/dom/model.js | 8035 ++++ .../public/tinymce/models/dom/model.min.js | 4 + manager/public/tinymce/package.json | 35 + .../public/tinymce/plugins/advlist/index.js | 7 + .../public/tinymce/plugins/advlist/plugin.js | 259 + .../tinymce/plugins/advlist/plugin.min.js | 4 + .../public/tinymce/plugins/anchor/index.js | 7 + .../public/tinymce/plugins/anchor/plugin.js | 196 + .../tinymce/plugins/anchor/plugin.min.js | 4 + .../public/tinymce/plugins/autolink/index.js | 7 + .../public/tinymce/plugins/autolink/plugin.js | 228 + .../tinymce/plugins/autolink/plugin.min.js | 4 + .../tinymce/plugins/autoresize/index.js | 7 + .../tinymce/plugins/autoresize/plugin.js | 192 + .../tinymce/plugins/autoresize/plugin.min.js | 4 + .../public/tinymce/plugins/autosave/index.js | 7 + .../public/tinymce/plugins/autosave/plugin.js | 233 + .../tinymce/plugins/autosave/plugin.min.js | 4 + .../public/tinymce/plugins/charmap/index.js | 7 + .../public/tinymce/plugins/charmap/plugin.js | 1646 + .../tinymce/plugins/charmap/plugin.min.js | 4 + manager/public/tinymce/plugins/code/index.js | 7 + manager/public/tinymce/plugins/code/plugin.js | 85 + .../public/tinymce/plugins/code/plugin.min.js | 4 + .../tinymce/plugins/codesample/index.js | 7 + .../tinymce/plugins/codesample/plugin.js | 2449 ++ .../tinymce/plugins/codesample/plugin.min.js | 4 + .../tinymce/plugins/directionality/index.js | 7 + .../tinymce/plugins/directionality/plugin.js | 384 + .../plugins/directionality/plugin.min.js | 4 + .../public/tinymce/plugins/emoticons/index.js | 7 + .../plugins/emoticons/js/emojiimages.js | 1 + .../plugins/emoticons/js/emojiimages.min.js | 3 + .../tinymce/plugins/emoticons/js/emojis.js | 1 + .../plugins/emoticons/js/emojis.min.js | 2 + .../tinymce/plugins/emoticons/plugin.js | 583 + .../tinymce/plugins/emoticons/plugin.min.js | 4 + .../tinymce/plugins/fullscreen/index.js | 7 + .../tinymce/plugins/fullscreen/plugin.js | 1196 + .../tinymce/plugins/fullscreen/plugin.min.js | 4 + manager/public/tinymce/plugins/help/index.js | 7 + manager/public/tinymce/plugins/help/plugin.js | 939 + .../public/tinymce/plugins/help/plugin.min.js | 4 + manager/public/tinymce/plugins/image/index.js | 7 + .../public/tinymce/plugins/image/plugin.js | 1488 + .../tinymce/plugins/image/plugin.min.js | 4 + .../public/tinymce/plugins/importcss/index.js | 7 + .../tinymce/plugins/importcss/plugin.js | 344 + .../tinymce/plugins/importcss/plugin.min.js | 4 + .../tinymce/plugins/insertdatetime/index.js | 7 + .../tinymce/plugins/insertdatetime/plugin.js | 175 + .../plugins/insertdatetime/plugin.min.js | 4 + manager/public/tinymce/plugins/link/index.js | 7 + manager/public/tinymce/plugins/link/plugin.js | 1227 + .../public/tinymce/plugins/link/plugin.min.js | 4 + manager/public/tinymce/plugins/lists/index.js | 7 + .../public/tinymce/plugins/lists/plugin.js | 1948 + .../tinymce/plugins/lists/plugin.min.js | 4 + manager/public/tinymce/plugins/media/index.js | 7 + .../public/tinymce/plugins/media/plugin.js | 1177 + .../tinymce/plugins/media/plugin.min.js | 4 + .../tinymce/plugins/nonbreaking/index.js | 7 + .../tinymce/plugins/nonbreaking/plugin.js | 111 + .../tinymce/plugins/nonbreaking/plugin.min.js | 4 + .../public/tinymce/plugins/pagebreak/index.js | 7 + .../tinymce/plugins/pagebreak/plugin.js | 105 + .../tinymce/plugins/pagebreak/plugin.min.js | 4 + .../public/tinymce/plugins/preview/index.js | 7 + .../public/tinymce/plugins/preview/plugin.js | 97 + .../tinymce/plugins/preview/plugin.min.js | 4 + .../public/tinymce/plugins/quickbars/index.js | 7 + .../tinymce/plugins/quickbars/plugin.js | 437 + .../tinymce/plugins/quickbars/plugin.min.js | 4 + manager/public/tinymce/plugins/save/index.js | 7 + manager/public/tinymce/plugins/save/plugin.js | 118 + .../public/tinymce/plugins/save/plugin.min.js | 4 + .../tinymce/plugins/searchreplace/index.js | 7 + .../tinymce/plugins/searchreplace/plugin.js | 1092 + .../plugins/searchreplace/plugin.min.js | 4 + manager/public/tinymce/plugins/table/index.js | 7 + .../public/tinymce/plugins/table/plugin.js | 3416 ++ .../tinymce/plugins/table/plugin.min.js | 4 + .../public/tinymce/plugins/template/index.js | 7 + .../public/tinymce/plugins/template/plugin.js | 554 + .../tinymce/plugins/template/plugin.min.js | 4 + .../tinymce/plugins/visualblocks/index.js | 7 + .../tinymce/plugins/visualblocks/plugin.js | 98 + .../plugins/visualblocks/plugin.min.js | 4 + .../tinymce/plugins/visualchars/index.js | 7 + .../tinymce/plugins/visualchars/plugin.js | 560 + .../tinymce/plugins/visualchars/plugin.min.js | 4 + .../public/tinymce/plugins/wordcount/index.js | 7 + .../tinymce/plugins/wordcount/plugin.js | 405 + .../tinymce/plugins/wordcount/plugin.min.js | 4 + .../tinymce/skins/content/dark/content.css | 66 + .../skins/content/dark/content.min.css | 1 + .../tinymce/skins/content/default/content.css | 61 + .../skins/content/default/content.min.css | 1 + .../skins/content/document/content.css | 66 + .../skins/content/document/content.min.css | 1 + .../skins/content/tinymce-5-dark/content.css | 66 + .../content/tinymce-5-dark/content.min.css | 1 + .../skins/content/tinymce-5/content.css | 61 + .../skins/content/tinymce-5/content.min.css | 1 + .../tinymce/skins/content/writer/content.css | 62 + .../skins/content/writer/content.min.css | 1 + .../tinymce/skins/ui/oxide-dark/content.css | 759 + .../skins/ui/oxide-dark/content.inline.css | 772 + .../ui/oxide-dark/content.inline.min.css | 1 + .../skins/ui/oxide-dark/content.min.css | 1 + .../tinymce/skins/ui/oxide-dark/skin.css | 3634 ++ .../tinymce/skins/ui/oxide-dark/skin.min.css | 1 + .../skins/ui/oxide-dark/skin.shadowdom.css | 30 + .../ui/oxide-dark/skin.shadowdom.min.css | 1 + .../public/tinymce/skins/ui/oxide/content.css | 778 + .../tinymce/skins/ui/oxide/content.inline.css | 772 + .../skins/ui/oxide/content.inline.min.css | 1 + .../tinymce/skins/ui/oxide/content.min.css | 1 + .../public/tinymce/skins/ui/oxide/skin.css | 3631 ++ .../tinymce/skins/ui/oxide/skin.min.css | 1 + .../tinymce/skins/ui/oxide/skin.shadowdom.css | 30 + .../skins/ui/oxide/skin.shadowdom.min.css | 1 + .../skins/ui/tinymce-5-dark/content.css | 759 + .../ui/tinymce-5-dark/content.inline.css | 772 + .../ui/tinymce-5-dark/content.inline.min.css | 1 + .../skins/ui/tinymce-5-dark/content.min.css | 1 + .../tinymce/skins/ui/tinymce-5-dark/skin.css | 3725 ++ .../skins/ui/tinymce-5-dark/skin.min.css | 1 + .../ui/tinymce-5-dark/skin.shadowdom.css | 30 + .../ui/tinymce-5-dark/skin.shadowdom.min.css | 1 + .../tinymce/skins/ui/tinymce-5/content.css | 778 + .../skins/ui/tinymce-5/content.inline.css | 772 + .../skins/ui/tinymce-5/content.inline.min.css | 1 + .../skins/ui/tinymce-5/content.min.css | 1 + .../tinymce/skins/ui/tinymce-5/skin.css | 3725 ++ .../tinymce/skins/ui/tinymce-5/skin.min.css | 1 + .../skins/ui/tinymce-5/skin.shadowdom.css | 30 + .../skins/ui/tinymce-5/skin.shadowdom.min.css | 1 + manager/public/tinymce/themes/silver/index.js | 7 + manager/public/tinymce/themes/silver/theme.js | 29996 +++++++++++++++ .../public/tinymce/themes/silver/theme.min.js | 4 + manager/public/tinymce/tinymce.d.ts | 3185 ++ manager/public/tinymce/tinymce.js | 30598 ++++++++++++++++ manager/public/tinymce/tinymce.min.js | 4 + manager/src/components/editor/config.js | 29 +- manager/src/components/editor/index.vue | 129 + manager/src/components/editor/plugins.js | 2 +- .../src/components/editor/upload-image.vue | 211 + .../views/page/article-manage/articleList.vue | 19 +- manager/src/views/privacy-content/index.vue | 19 +- .../src/views/sys/oss-manage/ossManage.vue | 1 + 163 files changed, 119248 insertions(+), 43 deletions(-) create mode 100644 manager/public/tinymce/CHANGELOG.md create mode 100644 manager/public/tinymce/README.md create mode 100644 manager/public/tinymce/bower.json create mode 100644 manager/public/tinymce/composer.json create mode 100644 manager/public/tinymce/icons/default/icons.js create mode 100644 manager/public/tinymce/icons/default/icons.min.js create mode 100644 manager/public/tinymce/icons/default/index.js create mode 100644 manager/public/tinymce/langs/zh-Hans.js create mode 100644 manager/public/tinymce/license.txt create mode 100644 manager/public/tinymce/models/dom/index.js create mode 100644 manager/public/tinymce/models/dom/model.js create mode 100644 manager/public/tinymce/models/dom/model.min.js create mode 100644 manager/public/tinymce/package.json create mode 100644 manager/public/tinymce/plugins/advlist/index.js create mode 100644 manager/public/tinymce/plugins/advlist/plugin.js create mode 100644 manager/public/tinymce/plugins/advlist/plugin.min.js create mode 100644 manager/public/tinymce/plugins/anchor/index.js create mode 100644 manager/public/tinymce/plugins/anchor/plugin.js create mode 100644 manager/public/tinymce/plugins/anchor/plugin.min.js create mode 100644 manager/public/tinymce/plugins/autolink/index.js create mode 100644 manager/public/tinymce/plugins/autolink/plugin.js create mode 100644 manager/public/tinymce/plugins/autolink/plugin.min.js create mode 100644 manager/public/tinymce/plugins/autoresize/index.js create mode 100644 manager/public/tinymce/plugins/autoresize/plugin.js create mode 100644 manager/public/tinymce/plugins/autoresize/plugin.min.js create mode 100644 manager/public/tinymce/plugins/autosave/index.js create mode 100644 manager/public/tinymce/plugins/autosave/plugin.js create mode 100644 manager/public/tinymce/plugins/autosave/plugin.min.js create mode 100644 manager/public/tinymce/plugins/charmap/index.js create mode 100644 manager/public/tinymce/plugins/charmap/plugin.js create mode 100644 manager/public/tinymce/plugins/charmap/plugin.min.js create mode 100644 manager/public/tinymce/plugins/code/index.js create mode 100644 manager/public/tinymce/plugins/code/plugin.js create mode 100644 manager/public/tinymce/plugins/code/plugin.min.js create mode 100644 manager/public/tinymce/plugins/codesample/index.js create mode 100644 manager/public/tinymce/plugins/codesample/plugin.js create mode 100644 manager/public/tinymce/plugins/codesample/plugin.min.js create mode 100644 manager/public/tinymce/plugins/directionality/index.js create mode 100644 manager/public/tinymce/plugins/directionality/plugin.js create mode 100644 manager/public/tinymce/plugins/directionality/plugin.min.js create mode 100644 manager/public/tinymce/plugins/emoticons/index.js create mode 100644 manager/public/tinymce/plugins/emoticons/js/emojiimages.js create mode 100644 manager/public/tinymce/plugins/emoticons/js/emojiimages.min.js create mode 100644 manager/public/tinymce/plugins/emoticons/js/emojis.js create mode 100644 manager/public/tinymce/plugins/emoticons/js/emojis.min.js create mode 100644 manager/public/tinymce/plugins/emoticons/plugin.js create mode 100644 manager/public/tinymce/plugins/emoticons/plugin.min.js create mode 100644 manager/public/tinymce/plugins/fullscreen/index.js create mode 100644 manager/public/tinymce/plugins/fullscreen/plugin.js create mode 100644 manager/public/tinymce/plugins/fullscreen/plugin.min.js create mode 100644 manager/public/tinymce/plugins/help/index.js create mode 100644 manager/public/tinymce/plugins/help/plugin.js create mode 100644 manager/public/tinymce/plugins/help/plugin.min.js create mode 100644 manager/public/tinymce/plugins/image/index.js create mode 100644 manager/public/tinymce/plugins/image/plugin.js create mode 100644 manager/public/tinymce/plugins/image/plugin.min.js create mode 100644 manager/public/tinymce/plugins/importcss/index.js create mode 100644 manager/public/tinymce/plugins/importcss/plugin.js create mode 100644 manager/public/tinymce/plugins/importcss/plugin.min.js create mode 100644 manager/public/tinymce/plugins/insertdatetime/index.js create mode 100644 manager/public/tinymce/plugins/insertdatetime/plugin.js create mode 100644 manager/public/tinymce/plugins/insertdatetime/plugin.min.js create mode 100644 manager/public/tinymce/plugins/link/index.js create mode 100644 manager/public/tinymce/plugins/link/plugin.js create mode 100644 manager/public/tinymce/plugins/link/plugin.min.js create mode 100644 manager/public/tinymce/plugins/lists/index.js create mode 100644 manager/public/tinymce/plugins/lists/plugin.js create mode 100644 manager/public/tinymce/plugins/lists/plugin.min.js create mode 100644 manager/public/tinymce/plugins/media/index.js create mode 100644 manager/public/tinymce/plugins/media/plugin.js create mode 100644 manager/public/tinymce/plugins/media/plugin.min.js create mode 100644 manager/public/tinymce/plugins/nonbreaking/index.js create mode 100644 manager/public/tinymce/plugins/nonbreaking/plugin.js create mode 100644 manager/public/tinymce/plugins/nonbreaking/plugin.min.js create mode 100644 manager/public/tinymce/plugins/pagebreak/index.js create mode 100644 manager/public/tinymce/plugins/pagebreak/plugin.js create mode 100644 manager/public/tinymce/plugins/pagebreak/plugin.min.js create mode 100644 manager/public/tinymce/plugins/preview/index.js create mode 100644 manager/public/tinymce/plugins/preview/plugin.js create mode 100644 manager/public/tinymce/plugins/preview/plugin.min.js create mode 100644 manager/public/tinymce/plugins/quickbars/index.js create mode 100644 manager/public/tinymce/plugins/quickbars/plugin.js create mode 100644 manager/public/tinymce/plugins/quickbars/plugin.min.js create mode 100644 manager/public/tinymce/plugins/save/index.js create mode 100644 manager/public/tinymce/plugins/save/plugin.js create mode 100644 manager/public/tinymce/plugins/save/plugin.min.js create mode 100644 manager/public/tinymce/plugins/searchreplace/index.js create mode 100644 manager/public/tinymce/plugins/searchreplace/plugin.js create mode 100644 manager/public/tinymce/plugins/searchreplace/plugin.min.js create mode 100644 manager/public/tinymce/plugins/table/index.js create mode 100644 manager/public/tinymce/plugins/table/plugin.js create mode 100644 manager/public/tinymce/plugins/table/plugin.min.js create mode 100644 manager/public/tinymce/plugins/template/index.js create mode 100644 manager/public/tinymce/plugins/template/plugin.js create mode 100644 manager/public/tinymce/plugins/template/plugin.min.js create mode 100644 manager/public/tinymce/plugins/visualblocks/index.js create mode 100644 manager/public/tinymce/plugins/visualblocks/plugin.js create mode 100644 manager/public/tinymce/plugins/visualblocks/plugin.min.js create mode 100644 manager/public/tinymce/plugins/visualchars/index.js create mode 100644 manager/public/tinymce/plugins/visualchars/plugin.js create mode 100644 manager/public/tinymce/plugins/visualchars/plugin.min.js create mode 100644 manager/public/tinymce/plugins/wordcount/index.js create mode 100644 manager/public/tinymce/plugins/wordcount/plugin.js create mode 100644 manager/public/tinymce/plugins/wordcount/plugin.min.js create mode 100644 manager/public/tinymce/skins/content/dark/content.css create mode 100644 manager/public/tinymce/skins/content/dark/content.min.css create mode 100644 manager/public/tinymce/skins/content/default/content.css create mode 100644 manager/public/tinymce/skins/content/default/content.min.css create mode 100644 manager/public/tinymce/skins/content/document/content.css create mode 100644 manager/public/tinymce/skins/content/document/content.min.css create mode 100644 manager/public/tinymce/skins/content/tinymce-5-dark/content.css create mode 100644 manager/public/tinymce/skins/content/tinymce-5-dark/content.min.css create mode 100644 manager/public/tinymce/skins/content/tinymce-5/content.css create mode 100644 manager/public/tinymce/skins/content/tinymce-5/content.min.css create mode 100644 manager/public/tinymce/skins/content/writer/content.css create mode 100644 manager/public/tinymce/skins/content/writer/content.min.css create mode 100644 manager/public/tinymce/skins/ui/oxide-dark/content.css create mode 100644 manager/public/tinymce/skins/ui/oxide-dark/content.inline.css create mode 100644 manager/public/tinymce/skins/ui/oxide-dark/content.inline.min.css create mode 100644 manager/public/tinymce/skins/ui/oxide-dark/content.min.css create mode 100644 manager/public/tinymce/skins/ui/oxide-dark/skin.css create mode 100644 manager/public/tinymce/skins/ui/oxide-dark/skin.min.css create mode 100644 manager/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.css create mode 100644 manager/public/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css create mode 100644 manager/public/tinymce/skins/ui/oxide/content.css create mode 100644 manager/public/tinymce/skins/ui/oxide/content.inline.css create mode 100644 manager/public/tinymce/skins/ui/oxide/content.inline.min.css create mode 100644 manager/public/tinymce/skins/ui/oxide/content.min.css create mode 100644 manager/public/tinymce/skins/ui/oxide/skin.css create mode 100644 manager/public/tinymce/skins/ui/oxide/skin.min.css create mode 100644 manager/public/tinymce/skins/ui/oxide/skin.shadowdom.css create mode 100644 manager/public/tinymce/skins/ui/oxide/skin.shadowdom.min.css create mode 100644 manager/public/tinymce/skins/ui/tinymce-5-dark/content.css create mode 100644 manager/public/tinymce/skins/ui/tinymce-5-dark/content.inline.css create mode 100644 manager/public/tinymce/skins/ui/tinymce-5-dark/content.inline.min.css create mode 100644 manager/public/tinymce/skins/ui/tinymce-5-dark/content.min.css create mode 100644 manager/public/tinymce/skins/ui/tinymce-5-dark/skin.css create mode 100644 manager/public/tinymce/skins/ui/tinymce-5-dark/skin.min.css create mode 100644 manager/public/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.css create mode 100644 manager/public/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.min.css create mode 100644 manager/public/tinymce/skins/ui/tinymce-5/content.css create mode 100644 manager/public/tinymce/skins/ui/tinymce-5/content.inline.css create mode 100644 manager/public/tinymce/skins/ui/tinymce-5/content.inline.min.css create mode 100644 manager/public/tinymce/skins/ui/tinymce-5/content.min.css create mode 100644 manager/public/tinymce/skins/ui/tinymce-5/skin.css create mode 100644 manager/public/tinymce/skins/ui/tinymce-5/skin.min.css create mode 100644 manager/public/tinymce/skins/ui/tinymce-5/skin.shadowdom.css create mode 100644 manager/public/tinymce/skins/ui/tinymce-5/skin.shadowdom.min.css create mode 100644 manager/public/tinymce/themes/silver/index.js create mode 100644 manager/public/tinymce/themes/silver/theme.js create mode 100644 manager/public/tinymce/themes/silver/theme.min.js create mode 100644 manager/public/tinymce/tinymce.d.ts create mode 100644 manager/public/tinymce/tinymce.js create mode 100644 manager/public/tinymce/tinymce.min.js create mode 100644 manager/src/components/editor/index.vue create mode 100644 manager/src/components/editor/upload-image.vue diff --git a/manager/package.json b/manager/package.json index e7cc6f19..0289587f 100644 --- a/manager/package.json +++ b/manager/package.json @@ -12,7 +12,6 @@ "dependencies": { "@amap/amap-jsapi-loader": "0.0.7", "@antv/g2": "^4.1.12", - "@tinymce/tinymce-vue": "^3.2.0", "axios": "^0.21.1", "core-js": "^3.6.5", "dplayer": "^1.26.0", diff --git a/manager/public/index.html b/manager/public/index.html index f88bd079..8841b671 100644 --- a/manager/public/index.html +++ b/manager/public/index.html @@ -13,6 +13,9 @@ <% } %> '; + } + const bodyId = getBodyId(editor); + const bodyClass = getBodyClass(editor); + const isMetaKeyPressed = global$1.os.isMacOS() || global$1.os.isiOS() ? 'e.metaKey' : 'e.ctrlKey && !e.altKey'; + const preventClicksOnLinksScript = ' '; + const directionality = editor.getBody().dir; + const dirAttr = directionality ? ' dir="' + encode(directionality) + '"' : ''; + const previewHtml = '' + '' + '
' + headHtml + '' + '' + editor.getContent() + preventClicksOnLinksScript + '' + ''; + return previewHtml; + }; + + const open = editor => { + const content = getPreviewHtml(editor); + const dataApi = editor.windowManager.open({ + title: 'Preview', + size: 'large', + body: { + type: 'panel', + items: [{ + name: 'preview', + type: 'iframe', + sandboxed: true, + transparent: false + }] + }, + buttons: [{ + type: 'cancel', + name: 'close', + text: 'Close', + primary: true + }], + initialData: { preview: content } + }); + dataApi.focus('close'); + }; + + const register$1 = editor => { + editor.addCommand('mcePreview', () => { + open(editor); + }); + }; + + const register = editor => { + const onAction = () => editor.execCommand('mcePreview'); + editor.ui.registry.addButton('preview', { + icon: 'preview', + tooltip: 'Preview', + onAction + }); + editor.ui.registry.addMenuItem('preview', { + icon: 'preview', + text: 'Preview', + onAction + }); + }; + + var Plugin = () => { + global$2.add('preview', editor => { + register$1(editor); + register(editor); + }); + }; + + Plugin(); + +})(); diff --git a/manager/public/tinymce/plugins/preview/plugin.min.js b/manager/public/tinymce/plugins/preview/plugin.min.js new file mode 100644 index 00000000..0a99cf37 --- /dev/null +++ b/manager/public/tinymce/plugins/preview/plugin.min.js @@ -0,0 +1,4 @@ +/** + * TinyMCE version 6.4.2 (2023-04-26) + */ +!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.Env"),o=tinymce.util.Tools.resolve("tinymce.util.Tools");const n=e=>t=>t.options.get(e),i=n("content_style"),s=n("content_css_cors"),c=n("body_class"),r=n("body_id");e.add("preview",(e=>{(e=>{e.addCommand("mcePreview",(()=>{(e=>{const n=(e=>{var n;let l="";const a=e.dom.encode,d=null!==(n=i(e))&&void 0!==n?n:"";l+='${ htmlEscape(template.value.description) }
` + }, + { + label: 'Preview', + type: 'iframe', + name: 'preview', + sandboxed: false, + transparent: false + } + ]; + const initialData = { + template: template.text, + preview: content + }; + dialogApi.unblock(); + dialogApi.redial(buildDialogSpec(bodyItems, initialData)); + dialogApi.focus('template'); + }; + const dialogApi = editor.windowManager.open(buildDialogSpec([], { + template: '', + preview: '' + })); + dialogApi.block('Loading...'); + getTemplateContent(templates[0]).then(previewHtml => { + updateDialog(dialogApi, templates[0], previewHtml); + }).catch(() => { + updateDialog(dialogApi, templates[0], ''); + dialogApi.setEnabled('save', false); + loadFailedAlert(dialogApi); + }); + }; + const optTemplates = createTemplates(); + optTemplates.each(openDialog); + }; + + const showDialog = editor => templates => { + open(editor, templates); + }; + const register$1 = editor => { + editor.addCommand('mceInsertTemplate', curry(insertTemplate, editor)); + editor.addCommand('mceTemplate', createTemplateList(editor, showDialog(editor))); + }; + + const setup = editor => { + editor.on('PreProcess', o => { + const dom = editor.dom, dateFormat = getMdateFormat(editor); + global$2.each(dom.select('div', o.node), e => { + if (dom.hasClass(e, 'mceTmpl')) { + global$2.each(dom.select('*', e), e => { + if (hasAnyClasses(dom, e, getModificationDateClasses(editor))) { + e.innerHTML = getDateTime(editor, dateFormat); + } + }); + replaceVals(editor, e); + } + }); + }); + }; + + const register = editor => { + const onAction = () => editor.execCommand('mceTemplate'); + editor.ui.registry.addButton('template', { + icon: 'template', + tooltip: 'Insert template', + onAction + }); + editor.ui.registry.addMenuItem('template', { + icon: 'template', + text: 'Insert template...', + onAction + }); + }; + + var Plugin = () => { + global$3.add('template', editor => { + register$2(editor); + register(editor); + register$1(editor); + setup(editor); + }); + }; + + Plugin(); + +})(); diff --git a/manager/public/tinymce/plugins/template/plugin.min.js b/manager/public/tinymce/plugins/template/plugin.min.js new file mode 100644 index 00000000..343aa7f7 --- /dev/null +++ b/manager/public/tinymce/plugins/template/plugin.min.js @@ -0,0 +1,4 @@ +/** + * TinyMCE version 6.4.2 (2023-04-26) + */ +!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(a=n=e,(r=String).prototype.isPrototypeOf(a)||(null===(s=n.constructor)||void 0===s?void 0:s.name)===r.name)?"string":t;var a,n,r,s})(t)===e,a=t("string"),n=t("object"),r=t("array"),s=("function",e=>"function"==typeof e);const l=(!1,()=>false);var o=tinymce.util.Tools.resolve("tinymce.util.Tools");const c=e=>t=>t.options.get(e),i=c("template_cdate_classes"),u=c("template_mdate_classes"),m=c("template_selected_content_classes"),p=c("template_preview_replace_values"),d=c("template_replace_values"),h=c("templates"),g=c("template_cdate_format"),v=c("template_mdate_format"),y=c("content_style"),f=c("content_css_cors"),_=c("body_class"),b=(e,t)=>{if((e=""+e).length