├── .gitignore ├── LICENSE ├── README.md ├── vite ├── use_import │ ├── .browserslistrc │ ├── .eslintrc.js │ ├── .gitignore │ ├── README.md │ ├── babel.config.js │ ├── favicon.ico │ ├── index.html │ ├── jsconfig.json │ ├── package-lock.json │ ├── package.json │ ├── public │ │ └── tinymce │ │ │ └── skins │ │ │ └── ui │ │ │ └── oxide │ │ │ ├── content.css │ │ │ ├── content.inline.css │ │ │ ├── content.inline.min.css │ │ │ ├── content.min.css │ │ │ ├── content.mobile.css │ │ │ ├── content.mobile.min.css │ │ │ ├── fonts │ │ │ └── tinymce-mobile.woff │ │ │ ├── skin.css │ │ │ ├── skin.min.css │ │ │ ├── skin.mobile.css │ │ │ ├── skin.mobile.min.css │ │ │ ├── skin.shadowdom.css │ │ │ └── skin.shadowdom.min.css │ ├── src │ │ ├── App.vue │ │ ├── assets │ │ │ └── logo.png │ │ ├── components │ │ │ └── HelloWorld.vue │ │ ├── main.js │ │ ├── router │ │ │ └── index.js │ │ ├── utils │ │ │ └── tinymce │ │ │ │ └── langs │ │ │ │ └── zh_CN.js │ │ └── views │ │ │ ├── AboutView.vue │ │ │ └── HomeView.vue │ └── vite.config.js └── use_in_global │ ├── .browserslistrc │ ├── .eslintrc.js │ ├── .gitignore │ ├── README.md │ ├── babel.config.js │ ├── favicon.ico │ ├── index.html │ ├── jsconfig.json │ ├── package-lock.json │ ├── package.json │ ├── public │ └── tinymce │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── bower.json │ │ ├── composer.json │ │ ├── icons │ │ └── default │ │ │ ├── icons.js │ │ │ ├── icons.min.js │ │ │ └── index.js │ │ ├── jquery.tinymce.js │ │ ├── jquery.tinymce.min.js │ │ ├── license.txt │ │ ├── package.json │ │ ├── plugins │ │ ├── advlist │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── anchor │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── autolink │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── autoresize │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── autosave │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── bbcode │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── charmap │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── code │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── codesample │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── colorpicker │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── contextmenu │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── directionality │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── emoticons │ │ │ ├── index.js │ │ │ ├── js │ │ │ │ ├── emojiimages.js │ │ │ │ ├── emojiimages.min.js │ │ │ │ ├── emojis.js │ │ │ │ └── emojis.min.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── fullpage │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── fullscreen │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── help │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── hr │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── image │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── imagetools │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── importcss │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── insertdatetime │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── legacyoutput │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── link │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── lists │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── media │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── nonbreaking │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── noneditable │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── pagebreak │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── paste │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── preview │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── print │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── quickbars │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── save │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── searchreplace │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── spellchecker │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── tabfocus │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── table │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── template │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── textcolor │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── textpattern │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── toc │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── visualblocks │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── visualchars │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ └── wordcount │ │ │ ├── index.js │ │ │ ├── plugin.js │ │ │ └── plugin.min.js │ │ ├── skins │ │ ├── content │ │ │ ├── dark │ │ │ │ ├── content.css │ │ │ │ └── content.min.css │ │ │ ├── default │ │ │ │ ├── content.css │ │ │ │ └── content.min.css │ │ │ ├── document │ │ │ │ ├── content.css │ │ │ │ └── content.min.css │ │ │ └── writer │ │ │ │ ├── content.css │ │ │ │ └── content.min.css │ │ └── ui │ │ │ ├── oxide-dark │ │ │ ├── content.css │ │ │ ├── content.inline.css │ │ │ ├── content.inline.min.css │ │ │ ├── content.min.css │ │ │ ├── content.mobile.css │ │ │ ├── content.mobile.min.css │ │ │ ├── fonts │ │ │ │ └── tinymce-mobile.woff │ │ │ ├── skin.css │ │ │ ├── skin.min.css │ │ │ ├── skin.mobile.css │ │ │ ├── skin.mobile.min.css │ │ │ ├── skin.shadowdom.css │ │ │ └── skin.shadowdom.min.css │ │ │ └── oxide │ │ │ ├── content.css │ │ │ ├── content.inline.css │ │ │ ├── content.inline.min.css │ │ │ ├── content.min.css │ │ │ ├── content.mobile.css │ │ │ ├── content.mobile.min.css │ │ │ ├── fonts │ │ │ └── tinymce-mobile.woff │ │ │ ├── skin.css │ │ │ ├── skin.min.css │ │ │ ├── skin.mobile.css │ │ │ ├── skin.mobile.min.css │ │ │ ├── skin.shadowdom.css │ │ │ └── skin.shadowdom.min.css │ │ ├── themes │ │ ├── mobile │ │ │ ├── index.js │ │ │ ├── theme.js │ │ │ └── theme.min.js │ │ └── silver │ │ │ ├── index.js │ │ │ ├── theme.js │ │ │ └── theme.min.js │ │ ├── tinymce.d.ts │ │ ├── tinymce.js │ │ └── tinymce.min.js │ ├── src │ ├── App.vue │ ├── assets │ │ └── logo.png │ ├── components │ │ └── HelloWorld.vue │ ├── main.js │ ├── router │ │ └── index.js │ ├── utils │ │ └── tinymce │ │ │ └── langs │ │ │ └── zh_CN.js │ └── views │ │ ├── AboutView.vue │ │ └── HomeView.vue │ └── vite.config.js └── vue-cli ├── use_import ├── .browserslistrc ├── .gitignore ├── README.md ├── babel.config.js ├── package-lock.json ├── package.json ├── public │ ├── favicon.ico │ ├── index.html │ └── tinymce │ │ └── skins │ │ └── ui │ │ └── oxide │ │ ├── content.css │ │ ├── content.inline.css │ │ ├── content.inline.min.css │ │ ├── content.min.css │ │ ├── content.mobile.css │ │ ├── content.mobile.min.css │ │ ├── fonts │ │ └── tinymce-mobile.woff │ │ ├── skin.css │ │ ├── skin.min.css │ │ ├── skin.mobile.css │ │ ├── skin.mobile.min.css │ │ ├── skin.shadowdom.css │ │ └── skin.shadowdom.min.css ├── src │ ├── App.vue │ ├── assets │ │ └── logo.png │ ├── components │ │ └── HelloWorld.vue │ ├── main.js │ └── utils │ │ └── tinymce │ │ └── langs │ │ └── zh_CN.js └── yarn.lock └── use_in_global ├── .browserslistrc ├── .gitignore ├── README.md ├── babel.config.js ├── package-lock.json ├── package.json ├── public ├── favicon.ico ├── index.html └── tinymce │ ├── bower.json │ ├── changelog.txt │ ├── composer.json │ ├── icons │ └── default │ │ ├── icons.js │ │ ├── icons.min.js │ │ └── index.js │ ├── jquery.tinymce.js │ ├── jquery.tinymce.min.js │ ├── langs │ └── zh_CN.js │ ├── license.txt │ ├── package.json │ ├── plugins │ ├── advlist │ │ ├── index.js │ │ ├── plugin.js │ │ └── plugin.min.js │ ├── anchor │ │ ├── index.js │ │ ├── plugin.js │ │ └── plugin.min.js │ ├── autolink │ │ ├── index.js │ │ ├── plugin.js │ │ └── plugin.min.js │ ├── autoresize │ │ ├── index.js │ │ ├── plugin.js │ │ └── plugin.min.js │ ├── autosave │ │ ├── index.js │ │ ├── plugin.js │ │ └── plugin.min.js │ ├── bbcode │ │ ├── index.js │ │ ├── plugin.js │ │ └── plugin.min.js │ ├── charmap │ │ ├── index.js │ │ ├── plugin.js │ │ └── plugin.min.js │ ├── code │ │ ├── index.js │ │ ├── plugin.js │ │ └── plugin.min.js │ ├── codesample │ │ ├── index.js │ │ ├── plugin.js │ │ └── plugin.min.js │ ├── colorpicker │ │ ├── index.js │ │ ├── plugin.js │ │ └── plugin.min.js │ ├── contextmenu │ │ ├── index.js │ │ ├── plugin.js │ │ └── plugin.min.js │ ├── directionality │ │ ├── index.js │ │ ├── plugin.js │ │ └── plugin.min.js │ ├── emoticons │ │ ├── index.js │ │ ├── js │ │ │ ├── emojis.js │ │ │ └── emojis.min.js │ │ ├── plugin.js │ │ └── plugin.min.js │ ├── fullpage │ │ ├── index.js │ │ ├── plugin.js │ │ └── plugin.min.js │ ├── fullscreen │ │ ├── index.js │ │ ├── plugin.js │ │ └── plugin.min.js │ ├── help │ │ ├── index.js │ │ ├── plugin.js │ │ └── plugin.min.js │ ├── hr │ │ ├── index.js │ │ ├── plugin.js │ │ └── plugin.min.js │ ├── image │ │ ├── index.js │ │ ├── plugin.js │ │ └── plugin.min.js │ ├── imagetools │ │ ├── index.js │ │ ├── plugin.js │ │ └── plugin.min.js │ ├── importcss │ │ ├── index.js │ │ ├── plugin.js │ │ └── plugin.min.js │ ├── insertdatetime │ │ ├── index.js │ │ ├── plugin.js │ │ └── plugin.min.js │ ├── legacyoutput │ │ ├── index.js │ │ ├── plugin.js │ │ └── plugin.min.js │ ├── link │ │ ├── index.js │ │ ├── plugin.js │ │ └── plugin.min.js │ ├── lists │ │ ├── index.js │ │ ├── plugin.js │ │ └── plugin.min.js │ ├── media │ │ ├── index.js │ │ ├── plugin.js │ │ └── plugin.min.js │ ├── nonbreaking │ │ ├── index.js │ │ ├── plugin.js │ │ └── plugin.min.js │ ├── noneditable │ │ ├── index.js │ │ ├── plugin.js │ │ └── plugin.min.js │ ├── pagebreak │ │ ├── index.js │ │ ├── plugin.js │ │ └── plugin.min.js │ ├── paste │ │ ├── index.js │ │ ├── plugin.js │ │ └── plugin.min.js │ ├── preview │ │ ├── index.js │ │ ├── plugin.js │ │ └── plugin.min.js │ ├── print │ │ ├── index.js │ │ ├── plugin.js │ │ └── plugin.min.js │ ├── quickbars │ │ ├── index.js │ │ ├── plugin.js │ │ └── plugin.min.js │ ├── save │ │ ├── index.js │ │ ├── plugin.js │ │ └── plugin.min.js │ ├── searchreplace │ │ ├── index.js │ │ ├── plugin.js │ │ └── plugin.min.js │ ├── spellchecker │ │ ├── index.js │ │ ├── plugin.js │ │ └── plugin.min.js │ ├── tabfocus │ │ ├── index.js │ │ ├── plugin.js │ │ └── plugin.min.js │ ├── table │ │ ├── index.js │ │ ├── plugin.js │ │ └── plugin.min.js │ ├── template │ │ ├── index.js │ │ ├── plugin.js │ │ └── plugin.min.js │ ├── textcolor │ │ ├── index.js │ │ ├── plugin.js │ │ └── plugin.min.js │ ├── textpattern │ │ ├── index.js │ │ ├── plugin.js │ │ └── plugin.min.js │ ├── toc │ │ ├── index.js │ │ ├── plugin.js │ │ └── plugin.min.js │ ├── visualblocks │ │ ├── index.js │ │ ├── plugin.js │ │ └── plugin.min.js │ ├── visualchars │ │ ├── index.js │ │ ├── plugin.js │ │ └── plugin.min.js │ └── wordcount │ │ ├── index.js │ │ ├── plugin.js │ │ └── plugin.min.js │ ├── readme.md │ ├── skins │ ├── content │ │ ├── dark │ │ │ ├── content.css │ │ │ └── content.min.css │ │ ├── default │ │ │ ├── content.css │ │ │ └── content.min.css │ │ ├── document │ │ │ ├── content.css │ │ │ └── content.min.css │ │ └── writer │ │ │ ├── content.css │ │ │ └── content.min.css │ └── ui │ │ ├── oxide-dark │ │ ├── content.css │ │ ├── content.inline.css │ │ ├── content.inline.min.css │ │ ├── content.min.css │ │ ├── content.mobile.css │ │ ├── content.mobile.min.css │ │ ├── fonts │ │ │ └── tinymce-mobile.woff │ │ ├── skin.css │ │ ├── skin.min.css │ │ ├── skin.mobile.css │ │ └── skin.mobile.min.css │ │ └── oxide │ │ ├── content.css │ │ ├── content.inline.css │ │ ├── content.inline.min.css │ │ ├── content.min.css │ │ ├── content.mobile.css │ │ ├── content.mobile.min.css │ │ ├── fonts │ │ └── tinymce-mobile.woff │ │ ├── skin.css │ │ ├── skin.min.css │ │ ├── skin.mobile.css │ │ └── skin.mobile.min.css │ ├── themes │ ├── mobile │ │ ├── index.js │ │ ├── theme.js │ │ └── theme.min.js │ └── silver │ │ ├── index.js │ │ ├── theme.js │ │ └── theme.min.js │ ├── tinymce.js │ └── tinymce.min.js ├── src ├── App.vue ├── assets │ └── logo.png ├── components │ └── HelloWorld.vue └── main.js └── yarn.lock /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | # local env files 6 | .env.local 7 | .env.*.local 8 | 9 | # Log files 10 | npm-debug.log* 11 | yarn-debug.log* 12 | yarn-error.log* 13 | 14 | # Editor directories and files 15 | .idea 16 | .vscode 17 | *.suo 18 | *.ntvs* 19 | *.njsproj 20 | *.sln 21 | *.sw? 22 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 packy 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # vue-tinymce-example 2 | 3 | 在vue中使用tinymce的例子 📖 4 | 5 | ## 🎙 介绍 6 | 7 | 这个例子提供给各位想在项目中使用tinymce的伙计。 8 | 9 | 例子主要分为两个大类: 10 | 11 | 1. 按需引用(use import):使用import的方式引用tinymce项目,最终经过webpack打包至项目内部。 12 | 2. 全局挂载(use in global):使用tinymce优秀的插件懒加载功能,tinymce将会以外挂的方式应用至项目。 13 | 14 | 两种方式任君选择,如何选可以继续阅读下面详情,不想看可以直接下载项目跑起来看看再做选择。 15 | 16 | ### 按需引用 17 | 18 | 按需引用能帮你彻底隐藏tinymce,它将被完整地打包至项目。自然其缺点就是打包后文件巨大的体积将会成为一个问题。 19 | 20 | > 主题和插件请仔细引用,因为少了漏了功能就会缺失。 21 | 22 | 选择你的项目: 23 | 24 | - [vue-cli](./vue-cli/use_import/README.md) 25 | - [vite](./vite/use_import/README.md) 26 | 27 | ### 全局挂载 28 | 29 | 全局挂载的方式可以说是非常便利,一次设置无需管理。当然,后续你将要面对tinymce代码外露和全局作用等风险。 30 | 31 | > 这种方式只推荐内部系统使用,防不了小人提防君子还是要的。 32 | 33 | 选择你的项目: 34 | 35 | - [vue-cli](./vue-cli/use_in_global/README.md) 36 | - [vite](./vite/use_in_global/README.md) 37 | 38 | --- 39 | 40 | ## 💡 学习资料 41 | 42 | 遇到问题建议先看下面网站提供的资料: 43 | 44 | - [tinymce官网 🔗](https://www.tiny.cloud/) 45 | - [tinymce中文文档 🔗](http://tinymce.ax-z.cn/) 46 | 47 | 不行再加群咨询: 48 | 49 | - [TinyMCE 兔 - 🐧QQ:818515594](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=PgGRhqxxZT6m8aYvKYiykAHHDP88YCsO&authKey=8QKYsVBaMhtJMKrTLx2Y8swaz5D5Ne3fa68ZfsiKTA2dQYwxyi8ACvqDCqIu68k3&noverify=0&group_code=818515594) 50 | - [富文本研究交流 - 🐧QQ:835359038](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=5Np7JOEc1NJ0onDCLd1BZH_1jJt5HupL&authKey=KbkiZWricvo%2FsocFaqc33cQHLkfEzcv79L6akK0t1QaY3rgKTqyxnjYp2AVvh0vw&noverify=0&group_code=835359038) 51 | 52 | --- 53 | 54 | 对tinymce的vue封装想深入了解的,可以看我制作的组件源码🔬: 55 | 56 | > [@packy-tang/vue-tinymce](https://github.com/lpreterite/vue-tinymce) 57 | 58 | -------------------------------------------------------------------------------- /vite/use_import/.browserslistrc: -------------------------------------------------------------------------------- 1 | > 1% 2 | last 2 versions 3 | not dead 4 | -------------------------------------------------------------------------------- /vite/use_import/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { 4 | node: true, 5 | es2022: true, 6 | }, 7 | extends: [ 8 | "plugin:vue/essential", 9 | "eslint:recommended", 10 | "plugin:prettier/recommended", 11 | ], 12 | rules: { 13 | "no-console": process.env.NODE_ENV === "production" ? "warn" : "off", 14 | "no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off", 15 | }, 16 | }; 17 | -------------------------------------------------------------------------------- /vite/use_import/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | 6 | # local env files 7 | .env.local 8 | .env.*.local 9 | 10 | # Log files 11 | npm-debug.log* 12 | yarn-debug.log* 13 | yarn-error.log* 14 | pnpm-debug.log* 15 | 16 | # Editor directories and files 17 | .idea 18 | .vscode 19 | *.suo 20 | *.ntvs* 21 | *.njsproj 22 | *.sln 23 | *.sw? 24 | -------------------------------------------------------------------------------- /vite/use_import/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ["@vue/cli-plugin-babel/preset"], 3 | }; 4 | -------------------------------------------------------------------------------- /vite/use_import/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lpreterite/vue-tinymce-example/07e76e9c28dd8bf709e6607beb2fb010182f3359/vite/use_import/favicon.ico -------------------------------------------------------------------------------- /vite/use_import/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Use Import Tinymce 9 | 10 | 11 | 14 |
15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /vite/use_import/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "module": "esnext", 5 | "baseUrl": "./", 6 | "moduleResolution": "node", 7 | "paths": { 8 | "@/*": [ 9 | "src/*" 10 | ] 11 | }, 12 | "lib": [ 13 | "esnext", 14 | "dom", 15 | "dom.iterable", 16 | "scripthost" 17 | ] 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /vite/use_import/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "use_import", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "dev": "vite", 7 | "build": "vite build", 8 | "serve": "vite preview", 9 | "lint": "eslint --ext .js,.vue --ignore-path .gitignore --fix src" 10 | }, 11 | "dependencies": { 12 | "@tinymce/tinymce-vue": "^3.2.8", 13 | "tinymce": "^5.10.7", 14 | "vue": "^2.6.14", 15 | "vue-router": "^3.5.1" 16 | }, 17 | "devDependencies": { 18 | "@babel/core": "^7.12.16", 19 | "@babel/eslint-parser": "^7.12.16", 20 | "@vitejs/plugin-vue": "^4.2.3", 21 | "@vue/cli-plugin-babel": "^5.0.8", 22 | "eslint": "^8.43.0", 23 | "eslint-config-prettier": "^8.3.0", 24 | "eslint-plugin-prettier": "^4.0.0", 25 | "eslint-plugin-vue": "^8.7.1", 26 | "prettier": "^2.4.1", 27 | "sass": "^1.32.7", 28 | "vite": "^4.3.9", 29 | "vite-plugin-vue2": "^2.0.3", 30 | "vue-template-compiler": "^2.7.14" 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /vite/use_import/public/tinymce/skins/ui/oxide/content.mobile.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | */ 7 | .tinymce-mobile-unfocused-selections .tinymce-mobile-unfocused-selection { 8 | /* Note: this file is used inside the content, so isn't part of theming */ 9 | background-color: green; 10 | display: inline-block; 11 | opacity: 0.5; 12 | position: absolute; 13 | } 14 | body { 15 | -webkit-text-size-adjust: none; 16 | } 17 | body img { 18 | /* this is related to the content margin */ 19 | max-width: 96vw; 20 | } 21 | body table img { 22 | max-width: 95%; 23 | } 24 | body { 25 | font-family: sans-serif; 26 | } 27 | table { 28 | border-collapse: collapse; 29 | } 30 | -------------------------------------------------------------------------------- /vite/use_import/public/tinymce/skins/ui/oxide/content.mobile.min.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | */ 7 | .tinymce-mobile-unfocused-selections .tinymce-mobile-unfocused-selection{background-color:green;display:inline-block;opacity:.5;position:absolute}body{-webkit-text-size-adjust:none}body img{max-width:96vw}body table img{max-width:95%}body{font-family:sans-serif}table{border-collapse:collapse} 8 | -------------------------------------------------------------------------------- /vite/use_import/public/tinymce/skins/ui/oxide/fonts/tinymce-mobile.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lpreterite/vue-tinymce-example/07e76e9c28dd8bf709e6607beb2fb010182f3359/vite/use_import/public/tinymce/skins/ui/oxide/fonts/tinymce-mobile.woff -------------------------------------------------------------------------------- /vite/use_import/public/tinymce/skins/ui/oxide/skin.shadowdom.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | */ 7 | body.tox-dialog__disable-scroll { 8 | overflow: hidden; 9 | } 10 | .tox-fullscreen { 11 | border: 0; 12 | height: 100%; 13 | margin: 0; 14 | overflow: hidden; 15 | -ms-scroll-chaining: none; 16 | overscroll-behavior: none; 17 | padding: 0; 18 | touch-action: pinch-zoom; 19 | width: 100%; 20 | } 21 | .tox.tox-tinymce.tox-fullscreen .tox-statusbar__resize-handle { 22 | display: none; 23 | } 24 | .tox.tox-tinymce.tox-fullscreen, 25 | .tox-shadowhost.tox-fullscreen { 26 | left: 0; 27 | position: fixed; 28 | top: 0; 29 | z-index: 1200; 30 | } 31 | .tox.tox-tinymce.tox-fullscreen { 32 | background-color: transparent; 33 | } 34 | .tox-fullscreen .tox.tox-tinymce-aux, 35 | .tox-fullscreen ~ .tox.tox-tinymce-aux { 36 | z-index: 1201; 37 | } 38 | -------------------------------------------------------------------------------- /vite/use_import/public/tinymce/skins/ui/oxide/skin.shadowdom.min.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | */ 7 | body.tox-dialog__disable-scroll{overflow:hidden}.tox-fullscreen{border:0;height:100%;margin:0;overflow:hidden;-ms-scroll-chaining:none;overscroll-behavior:none;padding:0;touch-action:pinch-zoom;width:100%}.tox.tox-tinymce.tox-fullscreen .tox-statusbar__resize-handle{display:none}.tox-shadowhost.tox-fullscreen,.tox.tox-tinymce.tox-fullscreen{left:0;position:fixed;top:0;z-index:1200}.tox.tox-tinymce.tox-fullscreen{background-color:transparent}.tox-fullscreen .tox.tox-tinymce-aux,.tox-fullscreen~.tox.tox-tinymce-aux{z-index:1201} 8 | -------------------------------------------------------------------------------- /vite/use_import/src/App.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 33 | -------------------------------------------------------------------------------- /vite/use_import/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lpreterite/vue-tinymce-example/07e76e9c28dd8bf709e6607beb2fb010182f3359/vite/use_import/src/assets/logo.png -------------------------------------------------------------------------------- /vite/use_import/src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from "vue"; 2 | import App from "./App.vue"; 3 | import router from "./router"; 4 | 5 | import "tinymce"; 6 | //样式 7 | // import "tinymce/skins/content/default/content.min.css"; //默认模式下添加并不会起效果,开启内联模式时,请加上。 8 | import "tinymce/skins/ui/oxide/skin.min.css"; 9 | // import "tinymce/skins/ui/oxide/content.min.css"; //此处引用内容为编辑器文本区域的内部样式,需在编辑器设置中引入。 10 | 11 | //主题 12 | import "tinymce/themes/silver"; 13 | 14 | //插件 15 | import "tinymce/plugins/link"; //链接插件 16 | import "tinymce/plugins/image"; //图片插件 17 | import "tinymce/plugins/media"; //媒体插件 18 | import "tinymce/plugins/table"; //表格插件 19 | import "tinymce/plugins/lists"; //列表插件 20 | import "tinymce/plugins/quickbars"; //快速栏插件 21 | import "tinymce/plugins/fullscreen"; //全屏插件 22 | 23 | /** 24 | * 注: 25 | * 5.3.x版本需要额外引进图标,没有所有按钮就会显示not found 26 | */ 27 | import "tinymce/icons/default/icons"; 28 | 29 | //本地化 30 | import "./utils/tinymce/langs/zh_CN.js"; 31 | 32 | import TinymceVue from "@tinymce/tinymce-vue"; 33 | Vue.component("TinymceVue", TinymceVue); 34 | 35 | Vue.config.productionTip = false; 36 | 37 | new Vue({ 38 | router, 39 | render: (h) => h(App), 40 | }).$mount("#app"); 41 | -------------------------------------------------------------------------------- /vite/use_import/src/router/index.js: -------------------------------------------------------------------------------- 1 | import Vue from "vue"; 2 | import VueRouter from "vue-router"; 3 | import HomeView from "../views/HomeView.vue"; 4 | 5 | Vue.use(VueRouter); 6 | 7 | const routes = [ 8 | { 9 | path: "/", 10 | name: "home", 11 | component: HomeView, 12 | }, 13 | { 14 | path: "/about", 15 | name: "about", 16 | component: () => 17 | import("../views/AboutView.vue"), 18 | }, 19 | ]; 20 | 21 | const router = new VueRouter({ 22 | mode: "history", 23 | base: import.meta.env.BASE_URL, 24 | routes, 25 | }); 26 | 27 | export default router; 28 | -------------------------------------------------------------------------------- /vite/use_import/src/views/AboutView.vue: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /vite/use_import/src/views/HomeView.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 37 | -------------------------------------------------------------------------------- /vite/use_import/vite.config.js: -------------------------------------------------------------------------------- 1 | import { resolve } from "path" 2 | import { defineConfig } from 'vite' 3 | import { createVuePlugin as vue } from "vite-plugin-vue2"; 4 | 5 | export default defineConfig({ 6 | plugins: [vue()], 7 | resolve: { 8 | extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue'], 9 | alias: { 10 | "@": resolve(__dirname, "./src"), 11 | }, 12 | }, 13 | }) -------------------------------------------------------------------------------- /vite/use_in_global/.browserslistrc: -------------------------------------------------------------------------------- 1 | > 1% 2 | last 2 versions 3 | not dead 4 | -------------------------------------------------------------------------------- /vite/use_in_global/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { 4 | node: true, 5 | es2022: true, 6 | }, 7 | extends: [ 8 | "plugin:vue/essential", 9 | "eslint:recommended", 10 | "plugin:prettier/recommended", 11 | ], 12 | rules: { 13 | "no-console": process.env.NODE_ENV === "production" ? "warn" : "off", 14 | "no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off", 15 | }, 16 | }; 17 | -------------------------------------------------------------------------------- /vite/use_in_global/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | 6 | # local env files 7 | .env.local 8 | .env.*.local 9 | 10 | # Log files 11 | npm-debug.log* 12 | yarn-debug.log* 13 | yarn-error.log* 14 | pnpm-debug.log* 15 | 16 | # Editor directories and files 17 | .idea 18 | .vscode 19 | *.suo 20 | *.ntvs* 21 | *.njsproj 22 | *.sln 23 | *.sw? 24 | -------------------------------------------------------------------------------- /vite/use_in_global/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ["@vue/cli-plugin-babel/preset"], 3 | }; 4 | -------------------------------------------------------------------------------- /vite/use_in_global/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lpreterite/vue-tinymce-example/07e76e9c28dd8bf709e6607beb2fb010182f3359/vite/use_in_global/favicon.ico -------------------------------------------------------------------------------- /vite/use_in_global/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Use Import Tinymce 9 | 10 | 11 | 12 | 15 |
16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /vite/use_in_global/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "module": "esnext", 5 | "baseUrl": "./", 6 | "moduleResolution": "node", 7 | "paths": { 8 | "@/*": [ 9 | "src/*" 10 | ] 11 | }, 12 | "lib": [ 13 | "esnext", 14 | "dom", 15 | "dom.iterable", 16 | "scripthost" 17 | ] 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /vite/use_in_global/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "use_import", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "dev": "vite", 7 | "build": "vite build", 8 | "serve": "vite preview", 9 | "lint": "eslint --ext .js,.vue --ignore-path .gitignore --fix src" 10 | }, 11 | "dependencies": { 12 | "@tinymce/tinymce-vue": "^3.2.8", 13 | "tinymce": "^5.10.7", 14 | "vue": "^2.6.14", 15 | "vue-router": "^3.5.1" 16 | }, 17 | "devDependencies": { 18 | "@babel/core": "^7.12.16", 19 | "@babel/eslint-parser": "^7.12.16", 20 | "@vitejs/plugin-vue": "^4.2.3", 21 | "@vue/cli-plugin-babel": "^5.0.8", 22 | "eslint": "^8.43.0", 23 | "eslint-config-prettier": "^8.3.0", 24 | "eslint-plugin-prettier": "^4.0.0", 25 | "eslint-plugin-vue": "^8.7.1", 26 | "prettier": "^2.4.1", 27 | "sass": "^1.32.7", 28 | "vite": "^4.3.9", 29 | "vite-plugin-vue2": "^2.0.3", 30 | "vue-template-compiler": "^2.7.14" 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /vite/use_in_global/public/tinymce/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tinymce", 3 | "description": "Web based JavaScript HTML WYSIWYG editor control.", 4 | "license": "LGPL-2.1", 5 | "keywords": [ 6 | "wysiwyg", 7 | "tinymce", 8 | "richtext", 9 | "javascript", 10 | "html", 11 | "text", 12 | "rich editor", 13 | "rich text editor", 14 | "rte", 15 | "rich text", 16 | "contenteditable", 17 | "editing" 18 | ], 19 | "homepage": "https://www.tiny.cloud/", 20 | "ignore": [ 21 | "README.md", 22 | "composer.json", 23 | "package.json", 24 | ".npmignore", 25 | "CHANGELOG.md" 26 | ] 27 | } -------------------------------------------------------------------------------- /vite/use_in_global/public/tinymce/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tinymce/tinymce", 3 | "version": "5.10.7", 4 | "description": "Web based JavaScript HTML WYSIWYG editor control.", 5 | "license": [ 6 | "LGPL-2.1-only" 7 | ], 8 | "keywords": [ 9 | "wysiwyg", 10 | "tinymce", 11 | "richtext", 12 | "javascript", 13 | "html", 14 | "text", 15 | "rich editor", 16 | "rich text editor", 17 | "rte", 18 | "rich text", 19 | "contenteditable", 20 | "editing" 21 | ], 22 | "homepage": "https://www.tiny.cloud/", 23 | "type": "component", 24 | "extra": { 25 | "component": { 26 | "scripts": [ 27 | "tinymce.js", 28 | "plugins/*/plugin.js", 29 | "themes/*/theme.js", 30 | "themes/*/icons.js" 31 | ], 32 | "files": [ 33 | "tinymce.min.js", 34 | "plugins/*/plugin.min.js", 35 | "themes/*/theme.min.js", 36 | "skins/**", 37 | "icons/*/icons.min.js" 38 | ] 39 | } 40 | }, 41 | "archive": { 42 | "exclude": [ 43 | "README.md", 44 | "bower.js", 45 | "package.json", 46 | ".npmignore", 47 | "CHANGELOG.md" 48 | ] 49 | } 50 | } -------------------------------------------------------------------------------- /vite/use_in_global/public/tinymce/icons/default/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "default" icons for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/icons/default') 5 | // ES2015: 6 | // import 'tinymce/icons/default' 7 | require('./icons.js'); -------------------------------------------------------------------------------- /vite/use_in_global/public/tinymce/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "_from": "tinymce@5.10.x", 3 | "_id": "tinymce@5.10.7", 4 | "_inBundle": false, 5 | "_integrity": "sha512-9UUjaO0R7FxcFo0oxnd1lMs7H+D0Eh+dDVo5hKbVe1a+VB0nit97vOqlinj+YwgoBDt6/DSCUoWqAYlLI8BLYA==", 6 | "_location": "/tinymce", 7 | "_phantomChildren": {}, 8 | "_requested": { 9 | "type": "range", 10 | "registry": true, 11 | "raw": "tinymce@5.10.x", 12 | "name": "tinymce", 13 | "escapedName": "tinymce", 14 | "rawSpec": "5.10.x", 15 | "saveSpec": null, 16 | "fetchSpec": "5.10.x" 17 | }, 18 | "_requiredBy": [ 19 | "#USER", 20 | "/" 21 | ], 22 | "_resolved": "https://registry.npmmirror.com/tinymce/-/tinymce-5.10.7.tgz", 23 | "_shasum": "d89d446f1962f2a1df6b2b70018ce475ec7ffb80", 24 | "_spec": "tinymce@5.10.x", 25 | "_where": "D:\\works\\github\\vue-tinymce-example\\vite\\use_import", 26 | "author": { 27 | "name": "Tiny Technologies, Inc" 28 | }, 29 | "bugs": { 30 | "url": "https://github.com/tinymce/tinymce/issues" 31 | }, 32 | "bundleDependencies": false, 33 | "deprecated": false, 34 | "description": "Web based JavaScript HTML WYSIWYG editor control.", 35 | "homepage": "https://www.tiny.cloud/", 36 | "keywords": [ 37 | "wysiwyg", 38 | "tinymce", 39 | "richtext", 40 | "javascript", 41 | "html", 42 | "text", 43 | "rich editor", 44 | "rich text editor", 45 | "rte", 46 | "rich text", 47 | "contenteditable", 48 | "editing" 49 | ], 50 | "license": "LGPL-2.1", 51 | "main": "tinymce.js", 52 | "name": "tinymce", 53 | "repository": { 54 | "type": "git", 55 | "url": "git+https://github.com/tinymce/tinymce.git", 56 | "directory": "modules/tinymce" 57 | }, 58 | "types": "tinymce.d.ts", 59 | "version": "5.10.7" 60 | } 61 | -------------------------------------------------------------------------------- /vite/use_in_global/public/tinymce/plugins/advlist/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "advlist" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/advlist') 5 | // ES2015: 6 | // import 'tinymce/plugins/advlist' 7 | require('./plugin.js'); -------------------------------------------------------------------------------- /vite/use_in_global/public/tinymce/plugins/anchor/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "anchor" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/anchor') 5 | // ES2015: 6 | // import 'tinymce/plugins/anchor' 7 | require('./plugin.js'); -------------------------------------------------------------------------------- /vite/use_in_global/public/tinymce/plugins/anchor/plugin.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | * 7 | * Version: 5.10.7 (2022-12-06) 8 | */ 9 | !function(){"use strict";function a(e){return e.getAttribute("id")||e.getAttribute("name")||""}function c(e){return e&&"a"===e.nodeName.toLowerCase()&&!e.getAttribute("href")&&""!==a(e)}function d(e){return e.dom.getParent(e.selection.getStart(),l)}function r(e,t){var o,a,n,r,i,l=d(e);l?(n=e,r=t,(i=l).removeAttribute("name"),i.id=r,n.addVisual(),n.undoManager.add()):(a=t,(o=e).undoManager.transact(function(){var e,n;o.getParam("allow_html_in_named_anchor",!1,"boolean")||o.selection.collapse(!0),o.selection.isCollapsed()?o.insertContent(o.dom.createHTML("a",{id:a})):(n=(e=o).dom,u(n).walk(e.selection.getRng(),function(e){s.each(e,function(e){var t;c(t=e)&&!t.firstChild&&n.remove(e,!1)})}),o.formatter.remove("namedAnchor",null,null,!0),o.formatter.apply("namedAnchor",{value:a}),o.addVisual())})),e.focus()}function i(r){return function(e){for(var t,n=0;n=(h="www.").length&&g.substr(0,0+h.length)===h?c=m+"://"+c:-1===c.indexOf("@")||/^([A-Za-z][A-Za-z\d.+-]*:\/\/)|mailto:/.test(c)||(c="mailto:"+c),o=e.selection.getBookmark(),e.selection.setRng(d),e.execCommand("createlink",!1,c),!1!==s&&e.dom.setAttrib(e.selection.getNode(),"target",s),e.selection.moveToBookmark(o),e.nodeChanged())}}var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=tinymce.util.Tools.resolve("tinymce.Env"),A=new RegExp("^"+/(?:[A-Za-z][A-Za-z\d.+-]{0,14}:\/\/(?:[-.~*+=!&;:'%@?^${}(),\w]+@)?|www\.|[-;:&=+$,.\w]+@)[A-Za-z\d-]+(?:\.[A-Za-z\d-]+)*(?::\d+)?(?:\/(?:[-.~*+=!;:'%@$(),\/\w]*[-~*+=%@$()\/\w])?)?(?:\?(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?(?:#(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?/g.source+"$","i");e.add("autolink",function(e){var t,n;(t=e).on("keydown",function(e){if(13===e.keyCode)return r(t,-1)}),a.browser.isIE()?t.on("focus",function(){if(!n){n=!0;try{t.execCommand("AutoUrlDetect",!1,!0)}catch(e){}}}):(t.on("keypress",function(e){if(41===e.keyCode||93===e.keyCode||125===e.keyCode)return r(t,-1)}),t.on("keyup",function(e){if(32===e.keyCode)return r(t,0)}))})}(); -------------------------------------------------------------------------------- /vite/use_in_global/public/tinymce/plugins/autoresize/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "autoresize" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/autoresize') 5 | // ES2015: 6 | // import 'tinymce/plugins/autoresize' 7 | require('./plugin.js'); -------------------------------------------------------------------------------- /vite/use_in_global/public/tinymce/plugins/autoresize/plugin.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | * 7 | * Version: 5.10.7 (2022-12-06) 8 | */ 9 | !function(){"use strict";function y(e){return e.getParam("min_height",e.getElement().offsetHeight,"number")}function p(e,t){var n=e.getBody();n&&(n.style.overflowY=t?"":"hidden",t||(n.scrollTop=0))}function v(e,t,n,i){var o=parseInt(e.getStyle(t,n,i),10);return isNaN(o)?0:o}var l=Object.hasOwnProperty,e=tinymce.util.Tools.resolve("tinymce.PluginManager"),b=tinymce.util.Tools.resolve("tinymce.Env"),r=tinymce.util.Tools.resolve("tinymce.util.Delay"),u=function(e,t,n,i,o){r.setEditorTimeout(e,function(){C(e,t),n--?u(e,t,n,i,o):o&&o()},i)},C=function(e,t,n){var i,o,r,s,a,l,u,g,c,m,f,d=e.dom,h=e.getDoc();h&&(e.plugins.fullscreen&&e.plugins.fullscreen.isFullscreen()?p(e,!0):(i=h.documentElement,o=e.getParam("autoresize_bottom_margin",50,"number"),r=y(e),s=v(d,i,"margin-top",!0),a=v(d,i,"margin-bottom",!0),(l=(l=i.offsetHeight+s+a+o)<0?0:l)+(u=e.getContainer().offsetHeight-e.getContentAreaContainer().offsetHeight)>y(e)&&(r=l+u),(g=e.getParam("max_height",0,"number"))&&go(t.getParam("autosave_retention"),"20m")&&(g(t,!1),1))}function s(t){var e=n(t);!i(t)&&t.isDirty()&&(v.setItem(e+"draft",t.getContent({format:"raw",no_events:!0})),v.setItem(e+"time",(new Date).getTime().toString()),t.fire("StoreDraft"))}function f(t){var e=n(t);u(t)&&(t.setContent(v.getItem(e+"draft"),{format:"raw"}),t.fire("RestoreDraft"))}function c(t){t.undoManager.transact(function(){f(t),g(t)}),t.focus()}function m(r){return function(t){function e(){return t.setDisabled(!u(r))}return t.setDisabled(!u(r)),r.on("StoreDraft RestoreDraft RemoveDraft",e),function(){return r.off("StoreDraft RestoreDraft RemoveDraft",e)}}}var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=function(t){return void 0===t},l=tinymce.util.Tools.resolve("tinymce.util.Delay"),v=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),d=tinymce.util.Tools.resolve("tinymce.util.Tools"),g=function(t,e){var r=n(t);v.removeItem(r+"draft"),v.removeItem(r+"time"),!1!==e&&t.fire("RemoveDraft")},y=tinymce.util.Tools.resolve("tinymce.EditorManager");t.add("autosave",function(t){var e,r,n,a;return t.editorManager.on("BeforeUnload",function(t){var e;d.each(y.get(),function(t){t.plugins.autosave&&t.plugins.autosave.storeDraft(),!e&&t.isDirty()&&t.getParam("autosave_ask_before_unload",!0)&&(e=t.translate("You have unsaved changes are you sure you want to navigate away?"))}),e&&(t.preventDefault(),t.returnValue=e)}),n=e=t,a=o(n.getParam("autosave_interval"),"30s"),l.setEditorInterval(n,function(){s(n)},a),e.ui.registry.addButton("restoredraft",{tooltip:"Restore last draft",icon:"restore-draft",onAction:function(){c(e)},onSetup:m(e)}),e.ui.registry.addMenuItem("restoredraft",{text:"Restore last draft",icon:"restore-draft",onAction:function(){c(e)},onSetup:m(e)}),t.on("init",function(){t.getParam("autosave_restore_when_empty",!1)&&t.dom.isEmpty(t.getBody())&&f(t)}),r=t,{hasDraft:function(){return u(r)},storeDraft:function(){return s(r)},restoreDraft:function(){return f(r)},removeDraft:function(t){return g(r,t)},isEmpty:function(t){return i(r,t)}}})}(); -------------------------------------------------------------------------------- /vite/use_in_global/public/tinymce/plugins/bbcode/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "bbcode" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/bbcode') 5 | // ES2015: 6 | // import 'tinymce/plugins/bbcode' 7 | require('./plugin.js'); -------------------------------------------------------------------------------- /vite/use_in_global/public/tinymce/plugins/bbcode/plugin.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | * 7 | * Version: 5.10.7 (2022-12-06) 8 | */ 9 | !function(){"use strict";function i(t){function o(o,e){t=t.replace(o,e)}return t=n.trim(t),o(/\n/gi,"
"),o(/\[b\]/gi,""),o(/\[\/b\]/gi,""),o(/\[i\]/gi,""),o(/\[\/i\]/gi,""),o(/\[u\]/gi,""),o(/\[\/u\]/gi,""),o(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,'$2'),o(/\[url\](.*?)\[\/url\]/gi,'$1'),o(/\[img\](.*?)\[\/img\]/gi,''),o(/\[color=(.*?)\](.*?)\[\/color\]/gi,'$2'),o(/\[code\](.*?)\[\/code\]/gi,'$1 '),o(/\[quote.*?\](.*?)\[\/quote\]/gi,'$1 '),t}var o=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=tinymce.util.Tools.resolve("tinymce.util.Tools");o.add("bbcode",function(o){o.on("BeforeSetContent",function(o){o.content=i(o.content)}),o.on("PostProcess",function(o){function e(o,e){t=t.replace(o,e)}var t;o.set&&(o.content=i(o.content)),o.get&&(o.content=(t=o.content,t=n.trim(t),e(/(.*?)<\/a>/gi,"[url=$1]$2[/url]"),e(/(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),e(/(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),e(/(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),e(/(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),e(/(.*?)<\/span>/gi,"[color=$1]$2[/color]"),e(/(.*?)<\/font>/gi,"[color=$1]$2[/color]"),e(/(.*?)<\/span>/gi,"[size=$1]$2[/size]"),e(/(.*?)<\/font>/gi,"$1"),e(//gi,"[img]$1[/img]"),e(/(.*?)<\/span>/gi,"[code]$1[/code]"),e(/(.*?)<\/span>/gi,"[quote]$1[/quote]"),e(/(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]"),e(/(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]"),e(/(.*?)<\/em>/gi,"[code][i]$1[/i][/code]"),e(/(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]"),e(/(.*?)<\/u>/gi,"[code][u]$1[/u][/code]"),e(/(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]"),e(/<\/(strong|b)>/gi,"[/b]"),e(/<(strong|b)>/gi,"[b]"),e(/<\/(em|i)>/gi,"[/i]"),e(/<(em|i)>/gi,"[i]"),e(/<\/u>/gi,"[/u]"),e(/(.*?)<\/span>/gi,"[u]$1[/u]"),e(//gi,"[u]"),e(/]*>/gi,"[quote]"),e(/<\/blockquote>/gi,"[/quote]"),e(/
/gi,"\n"),e(//gi,"\n"),e(/
/gi,"\n"),e(/

/gi,""),e(/<\/p>/gi,"\n"),e(/ |\u00a0/gi," "),e(/"/gi,'"'),e(/</gi,"<"),e(/>/gi,">"),e(/&/gi,"&"),t))})})}(); -------------------------------------------------------------------------------- /vite/use_in_global/public/tinymce/plugins/charmap/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "charmap" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/charmap') 5 | // ES2015: 6 | // import 'tinymce/plugins/charmap' 7 | require('./plugin.js'); -------------------------------------------------------------------------------- /vite/use_in_global/public/tinymce/plugins/code/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "code" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/code') 5 | // ES2015: 6 | // import 'tinymce/plugins/code' 7 | require('./plugin.js'); -------------------------------------------------------------------------------- /vite/use_in_global/public/tinymce/plugins/code/plugin.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | * 7 | * Version: 5.10.7 (2022-12-06) 8 | */ 9 | (function () { 10 | 'use strict'; 11 | 12 | var global = tinymce.util.Tools.resolve('tinymce.PluginManager'); 13 | 14 | var setContent = function (editor, html) { 15 | editor.focus(); 16 | editor.undoManager.transact(function () { 17 | editor.setContent(html); 18 | }); 19 | editor.selection.setCursorLocation(); 20 | editor.nodeChanged(); 21 | }; 22 | var getContent = function (editor) { 23 | return editor.getContent({ source_view: true }); 24 | }; 25 | 26 | var open = function (editor) { 27 | var editorContent = getContent(editor); 28 | editor.windowManager.open({ 29 | title: 'Source Code', 30 | size: 'large', 31 | body: { 32 | type: 'panel', 33 | items: [{ 34 | type: 'textarea', 35 | name: 'code' 36 | }] 37 | }, 38 | buttons: [ 39 | { 40 | type: 'cancel', 41 | name: 'cancel', 42 | text: 'Cancel' 43 | }, 44 | { 45 | type: 'submit', 46 | name: 'save', 47 | text: 'Save', 48 | primary: true 49 | } 50 | ], 51 | initialData: { code: editorContent }, 52 | onSubmit: function (api) { 53 | setContent(editor, api.getData().code); 54 | api.close(); 55 | } 56 | }); 57 | }; 58 | 59 | var register$1 = function (editor) { 60 | editor.addCommand('mceCodeEditor', function () { 61 | open(editor); 62 | }); 63 | }; 64 | 65 | var register = function (editor) { 66 | var onAction = function () { 67 | return editor.execCommand('mceCodeEditor'); 68 | }; 69 | editor.ui.registry.addButton('code', { 70 | icon: 'sourcecode', 71 | tooltip: 'Source code', 72 | onAction: onAction 73 | }); 74 | editor.ui.registry.addMenuItem('code', { 75 | icon: 'sourcecode', 76 | text: 'Source code', 77 | onAction: onAction 78 | }); 79 | }; 80 | 81 | function Plugin () { 82 | global.add('code', function (editor) { 83 | register$1(editor); 84 | register(editor); 85 | return {}; 86 | }); 87 | } 88 | 89 | Plugin(); 90 | 91 | }()); 92 | -------------------------------------------------------------------------------- /vite/use_in_global/public/tinymce/plugins/code/plugin.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | * 7 | * Version: 5.10.7 (2022-12-06) 8 | */ 9 | !function(){"use strict";tinymce.util.Tools.resolve("tinymce.PluginManager").add("code",function(e){var t,o;function n(){return o.execCommand("mceCodeEditor")}return(t=e).addCommand("mceCodeEditor",function(){var n,e;e=(n=t).getContent({source_view:!0}),n.windowManager.open({title:"Source Code",size:"large",body:{type:"panel",items:[{type:"textarea",name:"code"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{code:e},onSubmit:function(e){var t=n,o=e.getData().code;t.focus(),t.undoManager.transact(function(){t.setContent(o)}),t.selection.setCursorLocation(),t.nodeChanged(),e.close()}})}),(o=e).ui.registry.addButton("code",{icon:"sourcecode",tooltip:"Source code",onAction:n}),o.ui.registry.addMenuItem("code",{icon:"sourcecode",text:"Source code",onAction:n}),{}})}(); -------------------------------------------------------------------------------- /vite/use_in_global/public/tinymce/plugins/codesample/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "codesample" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/codesample') 5 | // ES2015: 6 | // import 'tinymce/plugins/codesample' 7 | require('./plugin.js'); -------------------------------------------------------------------------------- /vite/use_in_global/public/tinymce/plugins/colorpicker/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "colorpicker" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/colorpicker') 5 | // ES2015: 6 | // import 'tinymce/plugins/colorpicker' 7 | require('./plugin.js'); -------------------------------------------------------------------------------- /vite/use_in_global/public/tinymce/plugins/colorpicker/plugin.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | * 7 | * Version: 5.10.7 (2022-12-06) 8 | */ 9 | (function () { 10 | 'use strict'; 11 | 12 | var global = tinymce.util.Tools.resolve('tinymce.PluginManager'); 13 | 14 | function Plugin () { 15 | global.add('colorpicker', function () { 16 | }); 17 | } 18 | 19 | Plugin(); 20 | 21 | }()); 22 | -------------------------------------------------------------------------------- /vite/use_in_global/public/tinymce/plugins/colorpicker/plugin.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | * 7 | * Version: 5.10.7 (2022-12-06) 8 | */ 9 | !function(){"use strict";tinymce.util.Tools.resolve("tinymce.PluginManager").add("colorpicker",function(){})}(); -------------------------------------------------------------------------------- /vite/use_in_global/public/tinymce/plugins/contextmenu/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "contextmenu" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/contextmenu') 5 | // ES2015: 6 | // import 'tinymce/plugins/contextmenu' 7 | require('./plugin.js'); -------------------------------------------------------------------------------- /vite/use_in_global/public/tinymce/plugins/contextmenu/plugin.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | * 7 | * Version: 5.10.7 (2022-12-06) 8 | */ 9 | (function () { 10 | 'use strict'; 11 | 12 | var global = tinymce.util.Tools.resolve('tinymce.PluginManager'); 13 | 14 | function Plugin () { 15 | global.add('contextmenu', function () { 16 | }); 17 | } 18 | 19 | Plugin(); 20 | 21 | }()); 22 | -------------------------------------------------------------------------------- /vite/use_in_global/public/tinymce/plugins/contextmenu/plugin.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | * 7 | * Version: 5.10.7 (2022-12-06) 8 | */ 9 | !function(){"use strict";tinymce.util.Tools.resolve("tinymce.PluginManager").add("contextmenu",function(){})}(); -------------------------------------------------------------------------------- /vite/use_in_global/public/tinymce/plugins/directionality/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "directionality" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/directionality') 5 | // ES2015: 6 | // import 'tinymce/plugins/directionality' 7 | require('./plugin.js'); -------------------------------------------------------------------------------- /vite/use_in_global/public/tinymce/plugins/emoticons/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "emoticons" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/emoticons') 5 | // ES2015: 6 | // import 'tinymce/plugins/emoticons' 7 | require('./plugin.js'); -------------------------------------------------------------------------------- /vite/use_in_global/public/tinymce/plugins/fullpage/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "fullpage" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/fullpage') 5 | // ES2015: 6 | // import 'tinymce/plugins/fullpage' 7 | require('./plugin.js'); -------------------------------------------------------------------------------- /vite/use_in_global/public/tinymce/plugins/fullscreen/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "fullscreen" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/fullscreen') 5 | // ES2015: 6 | // import 'tinymce/plugins/fullscreen' 7 | require('./plugin.js'); -------------------------------------------------------------------------------- /vite/use_in_global/public/tinymce/plugins/help/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "help" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/help') 5 | // ES2015: 6 | // import 'tinymce/plugins/help' 7 | require('./plugin.js'); -------------------------------------------------------------------------------- /vite/use_in_global/public/tinymce/plugins/hr/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "hr" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/hr') 5 | // ES2015: 6 | // import 'tinymce/plugins/hr' 7 | require('./plugin.js'); -------------------------------------------------------------------------------- /vite/use_in_global/public/tinymce/plugins/hr/plugin.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | * 7 | * Version: 5.10.7 (2022-12-06) 8 | */ 9 | (function () { 10 | 'use strict'; 11 | 12 | var global = tinymce.util.Tools.resolve('tinymce.PluginManager'); 13 | 14 | var register$1 = function (editor) { 15 | editor.addCommand('InsertHorizontalRule', function () { 16 | editor.execCommand('mceInsertContent', false, '


'); 17 | }); 18 | }; 19 | 20 | var register = function (editor) { 21 | var onAction = function () { 22 | return editor.execCommand('InsertHorizontalRule'); 23 | }; 24 | editor.ui.registry.addButton('hr', { 25 | icon: 'horizontal-rule', 26 | tooltip: 'Horizontal line', 27 | onAction: onAction 28 | }); 29 | editor.ui.registry.addMenuItem('hr', { 30 | icon: 'horizontal-rule', 31 | text: 'Horizontal line', 32 | onAction: onAction 33 | }); 34 | }; 35 | 36 | function Plugin () { 37 | global.add('hr', function (editor) { 38 | register$1(editor); 39 | register(editor); 40 | }); 41 | } 42 | 43 | Plugin(); 44 | 45 | }()); 46 | -------------------------------------------------------------------------------- /vite/use_in_global/public/tinymce/plugins/hr/plugin.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | * 7 | * Version: 5.10.7 (2022-12-06) 8 | */ 9 | !function(){"use strict";tinymce.util.Tools.resolve("tinymce.PluginManager").add("hr",function(n){var o,t;function e(){return t.execCommand("InsertHorizontalRule")}(o=n).addCommand("InsertHorizontalRule",function(){o.execCommand("mceInsertContent",!1,"
")}),(t=n).ui.registry.addButton("hr",{icon:"horizontal-rule",tooltip:"Horizontal line",onAction:e}),t.ui.registry.addMenuItem("hr",{icon:"horizontal-rule",text:"Horizontal line",onAction:e})})}(); -------------------------------------------------------------------------------- /vite/use_in_global/public/tinymce/plugins/image/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "image" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/image') 5 | // ES2015: 6 | // import 'tinymce/plugins/image' 7 | require('./plugin.js'); -------------------------------------------------------------------------------- /vite/use_in_global/public/tinymce/plugins/imagetools/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "imagetools" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/imagetools') 5 | // ES2015: 6 | // import 'tinymce/plugins/imagetools' 7 | require('./plugin.js'); -------------------------------------------------------------------------------- /vite/use_in_global/public/tinymce/plugins/importcss/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "importcss" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/importcss') 5 | // ES2015: 6 | // import 'tinymce/plugins/importcss' 7 | require('./plugin.js'); -------------------------------------------------------------------------------- /vite/use_in_global/public/tinymce/plugins/insertdatetime/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "insertdatetime" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/insertdatetime') 5 | // ES2015: 6 | // import 'tinymce/plugins/insertdatetime' 7 | require('./plugin.js'); -------------------------------------------------------------------------------- /vite/use_in_global/public/tinymce/plugins/insertdatetime/plugin.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | * 7 | * Version: 5.10.7 (2022-12-06) 8 | */ 9 | !function(){"use strict";function l(e){return e.getParam("insertdatetime_timeformat",e.translate("%H:%M:%S"))}function s(e){return e.getParam("insertdatetime_formats",["%H:%M:%S","%Y-%m-%d","%I:%M:%S %p","%D"])}function r(e,t){if((e=""+e).length'+n+"")):e.insertContent(d(e,t))}var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),a="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),i="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),o="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),u="January February March April May June July August September October November December".split(" "),g=tinymce.util.Tools.resolve("tinymce.util.Tools");e.add("insertdatetime",function(e){var n,r,t,a,i,o,u,c;function m(e){return r.execCommand("mceInsertDate",!1,e)}(n=e).addCommand("mceInsertDate",function(e,t){p(n,null!=t?t:n.getParam("insertdatetime_dateformat",n.translate("%Y-%m-%d")))}),n.addCommand("mceInsertTime",function(e,t){p(n,null!=t?t:l(n))}),u=s(r=e),t=0<(o=s(i=r)).length?o[0]:l(i),a=t,c={get:function(){return a},set:function(e){a=e}},r.ui.registry.addSplitButton("insertdatetime",{icon:"insert-time",tooltip:"Insert date/time",select:function(e){return e===c.get()},fetch:function(e){e(g.map(u,function(e){return{type:"choiceitem",text:d(r,e),value:e}}))},onAction:function(e){m(c.get())},onItemAction:function(e,t){c.set(t),m(t)}}),r.ui.registry.addNestedMenuItem("insertdatetime",{icon:"insert-time",text:"Date/time",getSubmenuItems:function(){return g.map(u,function(e){return{type:"menuitem",text:d(r,e),onAction:(t=e,function(){c.set(t),m(t)})};var t})}})})}(); -------------------------------------------------------------------------------- /vite/use_in_global/public/tinymce/plugins/legacyoutput/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "legacyoutput" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/legacyoutput') 5 | // ES2015: 6 | // import 'tinymce/plugins/legacyoutput' 7 | require('./plugin.js'); -------------------------------------------------------------------------------- /vite/use_in_global/public/tinymce/plugins/legacyoutput/plugin.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | * 7 | * Version: 5.10.7 (2022-12-06) 8 | */ 9 | !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),l=tinymce.util.Tools.resolve("tinymce.util.Tools");e.add("legacyoutput",function(e){var s,t;(t=s=e).settings.inline_styles=!1,t.getParam("fontsize_formats")||(t.settings.fontsize_formats="8pt=1 10pt=2 12pt=3 14pt=4 18pt=5 24pt=6 36pt=7"),t.getParam("font_formats")||(t.settings.font_formats="Andale Mono=andale mono,monospace;Arial=arial,helvetica,sans-serif;Arial Black=arial black,sans-serif;Book Antiqua=book antiqua,palatino,serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,palatino,serif;Helvetica=helvetica,arial,sans-serif;Impact=impact,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco,monospace;Times New Roman=times new roman,times,serif;Trebuchet MS=trebuchet ms,geneva,sans-serif;Verdana=verdana,geneva,sans-serif;Webdings=webdings;Wingdings=wingdings,zapf dingbats"),s.on("PreInit",function(){var e=s,t="p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table",i=l.explode(e.getParam("font_size_style_values","xx-small,x-small,small,medium,large,x-large,xx-large")),a=e.schema;e.formatter.register({alignleft:{selector:t,attributes:{align:"left"}},aligncenter:{selector:t,attributes:{align:"center"}},alignright:{selector:t,attributes:{align:"right"}},alignjustify:{selector:t,attributes:{align:"justify"}},bold:[{inline:"b",remove:"all",preserve_attributes:["class","style"]},{inline:"strong",remove:"all",preserve_attributes:["class","style"]},{inline:"span",styles:{fontWeight:"bold"}}],italic:[{inline:"i",remove:"all",preserve_attributes:["class","style"]},{inline:"em",remove:"all",preserve_attributes:["class","style"]},{inline:"span",styles:{fontStyle:"italic"}}],underline:[{inline:"u",remove:"all",preserve_attributes:["class","style"]},{inline:"span",styles:{textDecoration:"underline"},exact:!0}],strikethrough:[{inline:"strike",remove:"all",preserve_attributes:["class","style"]},{inline:"span",styles:{textDecoration:"line-through"},exact:!0}],fontname:{inline:"font",toggle:!1,attributes:{face:"%value"}},fontsize:{inline:"font",toggle:!1,attributes:{size:function(e){return String(l.inArray(i,e.value)+1)}}},forecolor:{inline:"font",attributes:{color:"%value"},links:!0,remove_similar:!0,clear_child_styles:!0},hilitecolor:{inline:"font",styles:{backgroundColor:"%value"},links:!0,remove_similar:!0,clear_child_styles:!0}}),l.each("b,i,u,strike".split(","),function(e){a.addValidElements(e+"[*]")}),a.getElementRule("font")||a.addValidElements("font[face|size|color|style]"),l.each(t.split(","),function(e){var t=a.getElementRule(e);t&&(t.attributes.align||(t.attributes.align={},t.attributesOrder.push("align")))})})})}(); -------------------------------------------------------------------------------- /vite/use_in_global/public/tinymce/plugins/link/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "link" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/link') 5 | // ES2015: 6 | // import 'tinymce/plugins/link' 7 | require('./plugin.js'); -------------------------------------------------------------------------------- /vite/use_in_global/public/tinymce/plugins/lists/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "lists" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/lists') 5 | // ES2015: 6 | // import 'tinymce/plugins/lists' 7 | require('./plugin.js'); -------------------------------------------------------------------------------- /vite/use_in_global/public/tinymce/plugins/media/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "media" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/media') 5 | // ES2015: 6 | // import 'tinymce/plugins/media' 7 | require('./plugin.js'); -------------------------------------------------------------------------------- /vite/use_in_global/public/tinymce/plugins/nonbreaking/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "nonbreaking" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/nonbreaking') 5 | // ES2015: 6 | // import 'tinymce/plugins/nonbreaking' 7 | require('./plugin.js'); -------------------------------------------------------------------------------- /vite/use_in_global/public/tinymce/plugins/nonbreaking/plugin.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | * 7 | * Version: 5.10.7 (2022-12-06) 8 | */ 9 | !function(){"use strict";function o(n,e){for(var a="",o=0;o'+o(" ",e)+"
":o(" ",e);n.undoManager.transact(function(){return n.insertContent(a)})}var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),c=tinymce.util.Tools.resolve("tinymce.util.VK");n.add("nonbreaking",function(n){var e,a,o,t,i;function r(){return a.execCommand("mceNonBreaking")}(e=n).addCommand("mceNonBreaking",function(){s(e,1)}),(a=n).ui.registry.addButton("nonbreaking",{icon:"non-breaking",tooltip:"Nonbreaking space",onAction:r}),a.ui.registry.addMenuItem("nonbreaking",{icon:"non-breaking",text:"Nonbreaking space",onAction:r}),0<(i="boolean"==typeof(t=(o=n).getParam("nonbreaking_force_tab",0))?!0===t?3:0:t)&&o.on("keydown",function(n){n.keyCode!==c.TAB||n.isDefaultPrevented()||n.shiftKey||(n.preventDefault(),n.stopImmediatePropagation(),s(o,i))})})}(); -------------------------------------------------------------------------------- /vite/use_in_global/public/tinymce/plugins/noneditable/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "noneditable" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/noneditable') 5 | // ES2015: 6 | // import 'tinymce/plugins/noneditable' 7 | require('./plugin.js'); -------------------------------------------------------------------------------- /vite/use_in_global/public/tinymce/plugins/noneditable/plugin.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | * 7 | * Version: 5.10.7 (2022-12-06) 8 | */ 9 | !function(){"use strict";function l(t){return t.getParam("noneditable_noneditable_class","mceNonEditable")}function u(e){return function(t){return-1!==(" "+t.attr("class")+" ").indexOf(e)}}function e(e){var t,r="contenteditable",n=" "+f.trim(e.getParam("noneditable_editable_class","mceEditable"))+" ",a=" "+f.trim(l(e))+" ",i=u(n),o=u(a),c=(t=e.getParam("noneditable_regexp",[]))&&t.constructor===RegExp?[t]:t;e.on("PreInit",function(){0"===r){var a=o.lastIndexOf("<",n);if(-1!==a&&-1!==o.substring(a,n).indexOf('contenteditable="false"'))return t}return''+i.dom.encode("string"==typeof e[1]?e[1]:e[0])+""}}(t,a,l(t)));n.content=a}}(e,c,t)}),e.parser.addAttributeFilter("class",function(t){for(var e,n=t.length;n--;)e=t[n],i(e)?e.attr(r,"true"):o(e)&&e.attr(r,"false")}),e.serializer.addAttributeFilter(r,function(t){for(var e,n=t.length;n--;)e=t[n],(i(e)||o(e))&&(0';return e?"

"+a+"

":a}var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=tinymce.util.Tools.resolve("tinymce.Env"),m="mce-pagebreak";e.add("pagebreak",function(e){var a,n,o,i,t,r;function c(){return n.execCommand("mcePageBreak")}function g(){return u(o)}(a=e).addCommand("mcePageBreak",function(){a.insertContent(l(u(a)))}),(n=e).ui.registry.addButton("pagebreak",{icon:"page-break",tooltip:"Page break",onAction:c}),n.ui.registry.addMenuItem("pagebreak",{text:"Page break",icon:"page-break",onAction:c}),i=(o=e).getParam("pagebreak_separator","\x3c!-- pagebreak --\x3e"),t=new RegExp(i.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,function(e){return"\\"+e}),"gi"),o.on("BeforeSetContent",function(e){e.content=e.content.replace(t,l(g()))}),o.on("PreInit",function(){o.serializer.addNodeFilter("img",function(e){for(var a,n,t,r=e.length;r--;)(t=(n=e[r]).attr("class"))&&-1!==t.indexOf(m)&&(a=n.parent,o.schema.getBlockElements()[a.name]&&g()?(a.type=3,a.value=i,a.raw=!0,n.remove()):(n.type=3,n.value=i,n.raw=!0))})}),(r=e).on("ResolveName",function(e){"IMG"===e.target.nodeName&&r.dom.hasClass(e.target,m)&&(e.name="pagebreak")})})}(); -------------------------------------------------------------------------------- /vite/use_in_global/public/tinymce/plugins/paste/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "paste" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/paste') 5 | // ES2015: 6 | // import 'tinymce/plugins/paste' 7 | require('./plugin.js'); -------------------------------------------------------------------------------- /vite/use_in_global/public/tinymce/plugins/preview/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "preview" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/preview') 5 | // ES2015: 6 | // import 'tinymce/plugins/preview' 7 | require('./plugin.js'); -------------------------------------------------------------------------------- /vite/use_in_global/public/tinymce/plugins/preview/plugin.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | * 7 | * Version: 5.10.7 (2022-12-06) 8 | */ 9 | !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),f=tinymce.util.Tools.resolve("tinymce.Env"),w=tinymce.util.Tools.resolve("tinymce.util.Tools");e.add("preview",function(e){var n,t;function i(){return t.execCommand("mcePreview")}(n=e).addCommand("mcePreview",function(){var e,t;t=function(t){var n="",i=t.dom.encode,e=t.getParam("content_style","","string");n+='';var o=t.getParam("content_css_cors",!1,"boolean")?' crossorigin="anonymous"':"";w.each(t.contentCSS,function(e){n+='"}),e&&(n+='");var a,r,s,c,d,l,m,y=-1===(c=(a=t).getParam("body_id","tinymce","string")).indexOf("=")?c:(s=(r=a).getParam("body_id","","hash"))[r.id]||s,u=-1===(m=(d=t).getParam("body_class","","string")).indexOf("=")?m:(l=d).getParam("body_class","","hash")[l.id]||"",v=' 31 | -------------------------------------------------------------------------------- /vite/use_in_global/vite.config.js: -------------------------------------------------------------------------------- 1 | import { resolve } from "path" 2 | import { defineConfig } from 'vite' 3 | import { createVuePlugin as vue } from "vite-plugin-vue2"; 4 | 5 | export default defineConfig({ 6 | plugins: [vue()], 7 | resolve: { 8 | extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue'], 9 | alias: { 10 | "@": resolve(__dirname, "./src"), 11 | }, 12 | }, 13 | }) -------------------------------------------------------------------------------- /vue-cli/use_import/.browserslistrc: -------------------------------------------------------------------------------- 1 | > 1% 2 | last 2 versions 3 | -------------------------------------------------------------------------------- /vue-cli/use_import/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | # local env files 6 | .env.local 7 | .env.*.local 8 | 9 | # Log files 10 | npm-debug.log* 11 | yarn-debug.log* 12 | yarn-error.log* 13 | 14 | # Editor directories and files 15 | .idea 16 | .vscode 17 | *.suo 18 | *.ntvs* 19 | *.njsproj 20 | *.sln 21 | *.sw? 22 | -------------------------------------------------------------------------------- /vue-cli/use_import/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/cli-plugin-babel/preset' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /vue-cli/use_import/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vue", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "serve": "vue-cli-service serve", 7 | "build": "vue-cli-service build" 8 | }, 9 | "dependencies": { 10 | "@packy-tang/vue-tinymce": "^1.1.2", 11 | "core-js": "^3.4.4", 12 | "tinymce": "^5.10.2", 13 | "vue": "^2.6.10" 14 | }, 15 | "devDependencies": { 16 | "@vue/cli-plugin-babel": "^4.1.0", 17 | "@vue/cli-service": "^4.1.0", 18 | "node-sass": "^4.12.0", 19 | "sass-loader": "^8.0.0", 20 | "vue-template-compiler": "^2.6.10" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /vue-cli/use_import/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lpreterite/vue-tinymce-example/07e76e9c28dd8bf709e6607beb2fb010182f3359/vue-cli/use_import/public/favicon.ico -------------------------------------------------------------------------------- /vue-cli/use_import/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | vue 9 | 10 | 11 | 14 |
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /vue-cli/use_import/public/tinymce/skins/ui/oxide/content.mobile.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | */ 7 | .tinymce-mobile-unfocused-selections .tinymce-mobile-unfocused-selection { 8 | /* Note: this file is used inside the content, so isn't part of theming */ 9 | background-color: green; 10 | display: inline-block; 11 | opacity: 0.5; 12 | position: absolute; 13 | } 14 | body { 15 | -webkit-text-size-adjust: none; 16 | } 17 | body img { 18 | /* this is related to the content margin */ 19 | max-width: 96vw; 20 | } 21 | body table img { 22 | max-width: 95%; 23 | } 24 | body { 25 | font-family: sans-serif; 26 | } 27 | table { 28 | border-collapse: collapse; 29 | } 30 | -------------------------------------------------------------------------------- /vue-cli/use_import/public/tinymce/skins/ui/oxide/content.mobile.min.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | */ 7 | .tinymce-mobile-unfocused-selections .tinymce-mobile-unfocused-selection{background-color:green;display:inline-block;opacity:.5;position:absolute}body{-webkit-text-size-adjust:none}body img{max-width:96vw}body table img{max-width:95%}body{font-family:sans-serif}table{border-collapse:collapse} 8 | -------------------------------------------------------------------------------- /vue-cli/use_import/public/tinymce/skins/ui/oxide/fonts/tinymce-mobile.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lpreterite/vue-tinymce-example/07e76e9c28dd8bf709e6607beb2fb010182f3359/vue-cli/use_import/public/tinymce/skins/ui/oxide/fonts/tinymce-mobile.woff -------------------------------------------------------------------------------- /vue-cli/use_import/public/tinymce/skins/ui/oxide/skin.shadowdom.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | */ 7 | body.tox-dialog__disable-scroll { 8 | overflow: hidden; 9 | } 10 | .tox-fullscreen { 11 | border: 0; 12 | height: 100%; 13 | margin: 0; 14 | overflow: hidden; 15 | -ms-scroll-chaining: none; 16 | overscroll-behavior: none; 17 | padding: 0; 18 | touch-action: pinch-zoom; 19 | width: 100%; 20 | } 21 | .tox.tox-tinymce.tox-fullscreen .tox-statusbar__resize-handle { 22 | display: none; 23 | } 24 | .tox.tox-tinymce.tox-fullscreen, 25 | .tox-shadowhost.tox-fullscreen { 26 | left: 0; 27 | position: fixed; 28 | top: 0; 29 | z-index: 1200; 30 | } 31 | .tox.tox-tinymce.tox-fullscreen { 32 | background-color: transparent; 33 | } 34 | .tox-fullscreen .tox.tox-tinymce-aux, 35 | .tox-fullscreen ~ .tox.tox-tinymce-aux { 36 | z-index: 1201; 37 | } 38 | -------------------------------------------------------------------------------- /vue-cli/use_import/public/tinymce/skins/ui/oxide/skin.shadowdom.min.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | */ 7 | body.tox-dialog__disable-scroll{overflow:hidden}.tox-fullscreen{border:0;height:100%;margin:0;overflow:hidden;-ms-scroll-chaining:none;overscroll-behavior:none;padding:0;touch-action:pinch-zoom;width:100%}.tox.tox-tinymce.tox-fullscreen .tox-statusbar__resize-handle{display:none}.tox-shadowhost.tox-fullscreen,.tox.tox-tinymce.tox-fullscreen{left:0;position:fixed;top:0;z-index:1200}.tox.tox-tinymce.tox-fullscreen{background-color:transparent}.tox-fullscreen .tox.tox-tinymce-aux,.tox-fullscreen~.tox.tox-tinymce-aux{z-index:1201} 8 | -------------------------------------------------------------------------------- /vue-cli/use_import/src/App.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 33 | 34 | -------------------------------------------------------------------------------- /vue-cli/use_import/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lpreterite/vue-tinymce-example/07e76e9c28dd8bf709e6607beb2fb010182f3359/vue-cli/use_import/src/assets/logo.png -------------------------------------------------------------------------------- /vue-cli/use_import/src/components/HelloWorld.vue: -------------------------------------------------------------------------------- 1 | 31 | 32 | 40 | 41 | 42 | 58 | -------------------------------------------------------------------------------- /vue-cli/use_import/src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './App.vue' 3 | import tinymce from 'tinymce' 4 | import VueTinymce from '@packy-tang/vue-tinymce' 5 | 6 | //样式 7 | // import "tinymce/skins/content/default/content.min.css"; //默认模式下添加并不会起效果,开启内联模式时,请加上。 8 | import 'tinymce/skins/ui/oxide/skin.min.css' 9 | // import 'tinymce/skins/ui/oxide/content.min.css' //此处引用内容为编辑器文本区域的内部样式,需在编辑器设置中引入。 10 | 11 | //主题 12 | import 'tinymce/themes/silver' 13 | 14 | //插件 15 | import 'tinymce/plugins/link' //链接插件 16 | import 'tinymce/plugins/image' //图片插件 17 | import 'tinymce/plugins/media' //媒体插件 18 | import 'tinymce/plugins/table' //表格插件 19 | import 'tinymce/plugins/lists' //列表插件 20 | import 'tinymce/plugins/quickbars' //快速栏插件 21 | import 'tinymce/plugins/fullscreen' //全屏插件 22 | 23 | /** 24 | * 注: 25 | * 5.3.x版本需要额外引进图标,没有所有按钮就会显示not found 26 | */ 27 | import 'tinymce/icons/default/icons' 28 | 29 | //本地化 30 | import './utils/tinymce/langs/zh_CN.js' 31 | 32 | Vue.prototype.$tinymce = tinymce 33 | Vue.use(VueTinymce) 34 | 35 | Vue.config.productionTip = false 36 | 37 | new Vue({ 38 | render: h => h(App), 39 | }).$mount('#app') 40 | -------------------------------------------------------------------------------- /vue-cli/use_in_global/.browserslistrc: -------------------------------------------------------------------------------- 1 | > 1% 2 | last 2 versions 3 | -------------------------------------------------------------------------------- /vue-cli/use_in_global/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | # local env files 6 | .env.local 7 | .env.*.local 8 | 9 | # Log files 10 | npm-debug.log* 11 | yarn-debug.log* 12 | yarn-error.log* 13 | 14 | # Editor directories and files 15 | .idea 16 | .vscode 17 | *.suo 18 | *.ntvs* 19 | *.njsproj 20 | *.sln 21 | *.sw? 22 | -------------------------------------------------------------------------------- /vue-cli/use_in_global/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/cli-plugin-babel/preset' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /vue-cli/use_in_global/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vue", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "serve": "vue-cli-service serve", 7 | "build": "vue-cli-service build" 8 | }, 9 | "dependencies": { 10 | "@packy-tang/vue-tinymce": "^1.1.2", 11 | "core-js": "^3.4.4", 12 | "tinymce": "^5.10.2", 13 | "vue": "^2.6.10" 14 | }, 15 | "devDependencies": { 16 | "@vue/cli-plugin-babel": "^4.1.0", 17 | "@vue/cli-service": "^4.1.0", 18 | "node-sass": "^4.12.0", 19 | "sass-loader": "^8.0.0", 20 | "vue-template-compiler": "^2.6.10" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /vue-cli/use_in_global/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lpreterite/vue-tinymce-example/07e76e9c28dd8bf709e6607beb2fb010182f3359/vue-cli/use_in_global/public/favicon.ico -------------------------------------------------------------------------------- /vue-cli/use_in_global/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | vue 9 | 10 | 11 | 14 |
15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /vue-cli/use_in_global/public/tinymce/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tinymce", 3 | "description": "Web based JavaScript HTML WYSIWYG editor control.", 4 | "license": "LGPL-2.1", 5 | "keywords": [ 6 | "editor", 7 | "wysiwyg", 8 | "tinymce", 9 | "richtext", 10 | "javascript", 11 | "html" 12 | ], 13 | "homepage": "http://www.tinymce.com", 14 | "ignore": [ 15 | "readme.md", 16 | "composer.json", 17 | "package.json", 18 | ".npmignore", 19 | "changelog.txt" 20 | ] 21 | } -------------------------------------------------------------------------------- /vue-cli/use_in_global/public/tinymce/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tinymce/tinymce", 3 | "version": "5.3.1", 4 | "description": "Web based JavaScript HTML WYSIWYG editor control.", 5 | "license": [ 6 | "LGPL-2.1-only" 7 | ], 8 | "keywords": [ 9 | "editor", 10 | "wysiwyg", 11 | "tinymce", 12 | "richtext", 13 | "javascript", 14 | "html" 15 | ], 16 | "homepage": "http://www.tinymce.com", 17 | "type": "component", 18 | "extra": { 19 | "component": { 20 | "scripts": [ 21 | "tinymce.js", 22 | "plugins/*/plugin.js", 23 | "themes/*/theme.js", 24 | "themes/*/icons.js" 25 | ], 26 | "files": [ 27 | "tinymce.min.js", 28 | "plugins/*/plugin.min.js", 29 | "themes/*/theme.min.js", 30 | "skins/**", 31 | "icons/*/icons.min.js" 32 | ] 33 | } 34 | }, 35 | "archive": { 36 | "exclude": [ 37 | "readme.md", 38 | "bower.js", 39 | "package.json", 40 | ".npmignore", 41 | "changelog.txt" 42 | ] 43 | } 44 | } -------------------------------------------------------------------------------- /vue-cli/use_in_global/public/tinymce/icons/default/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "default" icons for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/icons/default') 5 | // ES2015: 6 | // import 'tinymce/icons/default' 7 | require('./icons.js'); -------------------------------------------------------------------------------- /vue-cli/use_in_global/public/tinymce/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tinymce", 3 | "version": "5.1.5", 4 | "repository": { 5 | "type": "git", 6 | "url": "https://github.com/tinymce/tinymce-dist.git" 7 | }, 8 | "description": "Web based JavaScript HTML WYSIWYG editor control.", 9 | "author": "Ephox Corporation", 10 | "main": "tinymce.js", 11 | "license": "LGPL-2.1", 12 | "keywords": [ 13 | "editor", 14 | "wysiwyg", 15 | "tinymce", 16 | "richtext", 17 | "javascript", 18 | "html" 19 | ], 20 | "bugs": { 21 | "url": "https://github.com/tinymce/tinymce/issues" 22 | } 23 | } -------------------------------------------------------------------------------- /vue-cli/use_in_global/public/tinymce/plugins/advlist/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "advlist" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/advlist') 5 | // ES2015: 6 | // import 'tinymce/plugins/advlist' 7 | require('./plugin.js'); -------------------------------------------------------------------------------- /vue-cli/use_in_global/public/tinymce/plugins/anchor/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "anchor" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/anchor') 5 | // ES2015: 6 | // import 'tinymce/plugins/anchor' 7 | require('./plugin.js'); -------------------------------------------------------------------------------- /vue-cli/use_in_global/public/tinymce/plugins/anchor/plugin.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | * 7 | * Version: 5.3.1 (2020-05-27) 8 | */ 9 | !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=function(e,t){return"A"===t.tagName&&""===e.dom.getAttrib(t,"href")},r=function(e,t){return/^[A-Za-z][A-Za-z0-9\-:._]*$/.test(t)?(o=t,r=(n=e).selection.getNode(),a(n,r)?(r.removeAttribute("name"),r.id=o,n.undoManager.add()):(n.focus(),n.selection.collapse(!0),n.insertContent(n.dom.createHTML("a",{id:o}))),!0):(e.windowManager.alert("Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores."),!1);var n,o,r},i=function(t){var e,n,o=(n=(e=t).selection.getNode(),a(e,n)?n.getAttribute("id")||n.getAttribute("name"):"");t.windowManager.open({title:"Anchor",size:"normal",body:{type:"panel",items:[{name:"id",type:"input",label:"ID",placeholder:"example"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{id:o},onSubmit:function(e){r(t,e.getData().id)&&e.close()}})},c=function(o){return function(e){for(var t=0;tv(e)&&(i=o+c);var m=e.getParam("max_height",0,"number");if(m&&m]*>((\xa0| |[ \t]|]*>)+?|)|
$","i").test(e)},f=function(t){var e=parseInt(o.getItem(u(t)+"time"),10)||0;return!((new Date).getTime()-e>i(t.settings.autosave_retention,"20m"))||(c(t,!1),!1)},c=function(t,e){var r=u(t);o.removeItem(r+"draft"),o.removeItem(r+"time"),!1!==e&&t.fire("RemoveDraft")},m=function(t){var e=u(t);!s(t)&&t.isDirty()&&(o.setItem(e+"draft",t.getContent({format:"raw",no_events:!0})),o.setItem(e+"time",(new Date).getTime().toString()),t.fire("StoreDraft"))},l=function(t){var e=u(t);f(t)&&(t.setContent(o.getItem(e+"draft"),{format:"raw"}),t.fire("RestoreDraft"))},v=function(t){var e=i(t.settings.autosave_interval,"30s");n.setInterval(function(){t.removed||m(t)},e)},d=function(t){t.undoManager.transact(function(){l(t),c(t)}),t.focus()},g=tinymce.util.Tools.resolve("tinymce.EditorManager"),y=function(r){return function(t){t.setDisabled(!f(r));var e=function(){return t.setDisabled(!f(r))};return r.on("StoreDraft RestoreDraft RemoveDraft",e),function(){return r.off("StoreDraft RestoreDraft RemoveDraft",e)}}};!function e(){t.add("autosave",function(t){var e,r;return t.editorManager.on("BeforeUnload",function(t){var e;a.each(g.get(),function(t){t.plugins.autosave&&t.plugins.autosave.storeDraft(),!e&&t.isDirty()&&t.getParam("autosave_ask_before_unload",!0)&&(e=t.translate("You have unsaved changes are you sure you want to navigate away?"))}),e&&(t.preventDefault(),t.returnValue=e)}),v(e=t),e.ui.registry.addButton("restoredraft",{tooltip:"Restore last draft",icon:"restore-draft",onAction:function(){d(e)},onSetup:y(e)}),e.ui.registry.addMenuItem("restoredraft",{text:"Restore last draft",icon:"restore-draft",onAction:function(){d(e)},onSetup:y(e)}),t.on("init",function(){t.getParam("autosave_restore_when_empty",!1)&&t.dom.isEmpty(t.getBody())&&l(t)}),r=t,{hasDraft:function(){return f(r)},storeDraft:function(){return m(r)},restoreDraft:function(){return l(r)},removeDraft:function(t){return c(r,t)},isEmpty:function(t){return s(r,t)}}})}()}(window); -------------------------------------------------------------------------------- /vue-cli/use_in_global/public/tinymce/plugins/bbcode/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "bbcode" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/bbcode') 5 | // ES2015: 6 | // import 'tinymce/plugins/bbcode' 7 | require('./plugin.js'); -------------------------------------------------------------------------------- /vue-cli/use_in_global/public/tinymce/plugins/charmap/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "charmap" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/charmap') 5 | // ES2015: 6 | // import 'tinymce/plugins/charmap' 7 | require('./plugin.js'); -------------------------------------------------------------------------------- /vue-cli/use_in_global/public/tinymce/plugins/code/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "code" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/code') 5 | // ES2015: 6 | // import 'tinymce/plugins/code' 7 | require('./plugin.js'); -------------------------------------------------------------------------------- /vue-cli/use_in_global/public/tinymce/plugins/code/plugin.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | * 7 | * Version: 5.3.1 (2020-05-27) 8 | */ 9 | (function () { 10 | 'use strict'; 11 | 12 | var global = tinymce.util.Tools.resolve('tinymce.PluginManager'); 13 | 14 | var setContent = function (editor, html) { 15 | editor.focus(); 16 | editor.undoManager.transact(function () { 17 | editor.setContent(html); 18 | }); 19 | editor.selection.setCursorLocation(); 20 | editor.nodeChanged(); 21 | }; 22 | var getContent = function (editor) { 23 | return editor.getContent({ source_view: true }); 24 | }; 25 | 26 | var open = function (editor) { 27 | var editorContent = getContent(editor); 28 | editor.windowManager.open({ 29 | title: 'Source Code', 30 | size: 'large', 31 | body: { 32 | type: 'panel', 33 | items: [{ 34 | type: 'textarea', 35 | name: 'code' 36 | }] 37 | }, 38 | buttons: [ 39 | { 40 | type: 'cancel', 41 | name: 'cancel', 42 | text: 'Cancel' 43 | }, 44 | { 45 | type: 'submit', 46 | name: 'save', 47 | text: 'Save', 48 | primary: true 49 | } 50 | ], 51 | initialData: { code: editorContent }, 52 | onSubmit: function (api) { 53 | setContent(editor, api.getData().code); 54 | api.close(); 55 | } 56 | }); 57 | }; 58 | 59 | var register = function (editor) { 60 | editor.addCommand('mceCodeEditor', function () { 61 | open(editor); 62 | }); 63 | }; 64 | 65 | var register$1 = function (editor) { 66 | editor.ui.registry.addButton('code', { 67 | icon: 'sourcecode', 68 | tooltip: 'Source code', 69 | onAction: function () { 70 | return open(editor); 71 | } 72 | }); 73 | editor.ui.registry.addMenuItem('code', { 74 | icon: 'sourcecode', 75 | text: 'Source code', 76 | onAction: function () { 77 | return open(editor); 78 | } 79 | }); 80 | }; 81 | 82 | function Plugin () { 83 | global.add('code', function (editor) { 84 | register(editor); 85 | register$1(editor); 86 | return {}; 87 | }); 88 | } 89 | 90 | Plugin(); 91 | 92 | }()); 93 | -------------------------------------------------------------------------------- /vue-cli/use_in_global/public/tinymce/plugins/code/plugin.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | * 7 | * Version: 5.3.1 (2020-05-27) 8 | */ 9 | !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=function(o){var e=o.getContent({source_view:!0});o.windowManager.open({title:"Source Code",size:"large",body:{type:"panel",items:[{type:"textarea",name:"code"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{code:e},onSubmit:function(e){var t,n;t=o,n=e.getData().code,t.focus(),t.undoManager.transact(function(){t.setContent(n)}),t.selection.setCursorLocation(),t.nodeChanged(),e.close()}})};!function t(){e.add("code",function(e){var t,n;return(t=e).addCommand("mceCodeEditor",function(){o(t)}),(n=e).ui.registry.addButton("code",{icon:"sourcecode",tooltip:"Source code",onAction:function(){return o(n)}}),n.ui.registry.addMenuItem("code",{icon:"sourcecode",text:"Source code",onAction:function(){return o(n)}}),{}})}()}(); -------------------------------------------------------------------------------- /vue-cli/use_in_global/public/tinymce/plugins/codesample/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "codesample" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/codesample') 5 | // ES2015: 6 | // import 'tinymce/plugins/codesample' 7 | require('./plugin.js'); -------------------------------------------------------------------------------- /vue-cli/use_in_global/public/tinymce/plugins/colorpicker/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "colorpicker" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/colorpicker') 5 | // ES2015: 6 | // import 'tinymce/plugins/colorpicker' 7 | require('./plugin.js'); -------------------------------------------------------------------------------- /vue-cli/use_in_global/public/tinymce/plugins/colorpicker/plugin.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | * 7 | * Version: 5.1.5 (2019-12-19) 8 | */ 9 | (function (domGlobals) { 10 | 'use strict'; 11 | 12 | var global = tinymce.util.Tools.resolve('tinymce.PluginManager'); 13 | 14 | function Plugin () { 15 | global.add('colorpicker', function () { 16 | domGlobals.console.warn('Color picker plugin is now built in to the core editor, please remove it from your editor configuration'); 17 | }); 18 | } 19 | 20 | Plugin(); 21 | 22 | }(window)); 23 | -------------------------------------------------------------------------------- /vue-cli/use_in_global/public/tinymce/plugins/colorpicker/plugin.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | * 7 | * Version: 5.1.5 (2019-12-19) 8 | */ 9 | !function(o){"use strict";var i=tinymce.util.Tools.resolve("tinymce.PluginManager");!function n(){i.add("colorpicker",function(){o.console.warn("Color picker plugin is now built in to the core editor, please remove it from your editor configuration")})}()}(window); -------------------------------------------------------------------------------- /vue-cli/use_in_global/public/tinymce/plugins/contextmenu/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "contextmenu" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/contextmenu') 5 | // ES2015: 6 | // import 'tinymce/plugins/contextmenu' 7 | require('./plugin.js'); -------------------------------------------------------------------------------- /vue-cli/use_in_global/public/tinymce/plugins/contextmenu/plugin.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | * 7 | * Version: 5.1.5 (2019-12-19) 8 | */ 9 | (function (domGlobals) { 10 | 'use strict'; 11 | 12 | var global = tinymce.util.Tools.resolve('tinymce.PluginManager'); 13 | 14 | function Plugin () { 15 | global.add('contextmenu', function () { 16 | domGlobals.console.warn('Context menu plugin is now built in to the core editor, please remove it from your editor configuration'); 17 | }); 18 | } 19 | 20 | Plugin(); 21 | 22 | }(window)); 23 | -------------------------------------------------------------------------------- /vue-cli/use_in_global/public/tinymce/plugins/contextmenu/plugin.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | * 7 | * Version: 5.1.5 (2019-12-19) 8 | */ 9 | !function(n){"use strict";var o=tinymce.util.Tools.resolve("tinymce.PluginManager");!function e(){o.add("contextmenu",function(){n.console.warn("Context menu plugin is now built in to the core editor, please remove it from your editor configuration")})}()}(window); -------------------------------------------------------------------------------- /vue-cli/use_in_global/public/tinymce/plugins/directionality/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "directionality" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/directionality') 5 | // ES2015: 6 | // import 'tinymce/plugins/directionality' 7 | require('./plugin.js'); -------------------------------------------------------------------------------- /vue-cli/use_in_global/public/tinymce/plugins/emoticons/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "emoticons" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/emoticons') 5 | // ES2015: 6 | // import 'tinymce/plugins/emoticons' 7 | require('./plugin.js'); -------------------------------------------------------------------------------- /vue-cli/use_in_global/public/tinymce/plugins/fullpage/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "fullpage" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/fullpage') 5 | // ES2015: 6 | // import 'tinymce/plugins/fullpage' 7 | require('./plugin.js'); -------------------------------------------------------------------------------- /vue-cli/use_in_global/public/tinymce/plugins/fullscreen/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "fullscreen" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/fullscreen') 5 | // ES2015: 6 | // import 'tinymce/plugins/fullscreen' 7 | require('./plugin.js'); -------------------------------------------------------------------------------- /vue-cli/use_in_global/public/tinymce/plugins/help/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "help" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/help') 5 | // ES2015: 6 | // import 'tinymce/plugins/help' 7 | require('./plugin.js'); -------------------------------------------------------------------------------- /vue-cli/use_in_global/public/tinymce/plugins/hr/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "hr" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/hr') 5 | // ES2015: 6 | // import 'tinymce/plugins/hr' 7 | require('./plugin.js'); -------------------------------------------------------------------------------- /vue-cli/use_in_global/public/tinymce/plugins/hr/plugin.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | * 7 | * Version: 5.3.1 (2020-05-27) 8 | */ 9 | (function () { 10 | 'use strict'; 11 | 12 | var global = tinymce.util.Tools.resolve('tinymce.PluginManager'); 13 | 14 | var register = function (editor) { 15 | editor.addCommand('InsertHorizontalRule', function () { 16 | editor.execCommand('mceInsertContent', false, '
'); 17 | }); 18 | }; 19 | 20 | var register$1 = function (editor) { 21 | editor.ui.registry.addButton('hr', { 22 | icon: 'horizontal-rule', 23 | tooltip: 'Horizontal line', 24 | onAction: function () { 25 | return editor.execCommand('InsertHorizontalRule'); 26 | } 27 | }); 28 | editor.ui.registry.addMenuItem('hr', { 29 | icon: 'horizontal-rule', 30 | text: 'Horizontal line', 31 | onAction: function () { 32 | return editor.execCommand('InsertHorizontalRule'); 33 | } 34 | }); 35 | }; 36 | 37 | function Plugin () { 38 | global.add('hr', function (editor) { 39 | register(editor); 40 | register$1(editor); 41 | }); 42 | } 43 | 44 | Plugin(); 45 | 46 | }()); 47 | -------------------------------------------------------------------------------- /vue-cli/use_in_global/public/tinymce/plugins/hr/plugin.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | * 7 | * Version: 5.3.1 (2020-05-27) 8 | */ 9 | !function(){"use strict";var n=tinymce.util.Tools.resolve("tinymce.PluginManager");!function o(){n.add("hr",function(n){var o,t;(o=n).addCommand("InsertHorizontalRule",function(){o.execCommand("mceInsertContent",!1,"
")}),(t=n).ui.registry.addButton("hr",{icon:"horizontal-rule",tooltip:"Horizontal line",onAction:function(){return t.execCommand("InsertHorizontalRule")}}),t.ui.registry.addMenuItem("hr",{icon:"horizontal-rule",text:"Horizontal line",onAction:function(){return t.execCommand("InsertHorizontalRule")}})})}()}(); -------------------------------------------------------------------------------- /vue-cli/use_in_global/public/tinymce/plugins/image/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "image" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/image') 5 | // ES2015: 6 | // import 'tinymce/plugins/image' 7 | require('./plugin.js'); -------------------------------------------------------------------------------- /vue-cli/use_in_global/public/tinymce/plugins/imagetools/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "imagetools" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/imagetools') 5 | // ES2015: 6 | // import 'tinymce/plugins/imagetools' 7 | require('./plugin.js'); -------------------------------------------------------------------------------- /vue-cli/use_in_global/public/tinymce/plugins/importcss/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "importcss" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/importcss') 5 | // ES2015: 6 | // import 'tinymce/plugins/importcss' 7 | require('./plugin.js'); -------------------------------------------------------------------------------- /vue-cli/use_in_global/public/tinymce/plugins/insertdatetime/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "insertdatetime" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/insertdatetime') 5 | // ES2015: 6 | // import 'tinymce/plugins/insertdatetime' 7 | require('./plugin.js'); -------------------------------------------------------------------------------- /vue-cli/use_in_global/public/tinymce/plugins/insertdatetime/plugin.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | * 7 | * Version: 5.3.1 (2020-05-27) 8 | */ 9 | !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),u=function(e){return e.getParam("insertdatetime_timeformat",e.translate("%H:%M:%S"))},c=function(e){return e.getParam("insertdatetime_formats",["%H:%M:%S","%Y-%m-%d","%I:%M:%S %p","%D"])},r="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),a="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),i="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),o="January February March April May June July August September October November December".split(" "),m=function(e,t){if((e=""+e).length'+n+"")}else e.insertContent(s(e,t));var i,o,u,c,m},t=function(t){t.addCommand("mceInsertDate",function(){var e;l(t,(e=t).getParam("insertdatetime_dateformat",e.translate("%Y-%m-%d")))}),t.addCommand("mceInsertTime",function(){l(t,u(t))})},d=tinymce.util.Tools.resolve("tinymce.util.Tools"),n=function(n){var e,t,r,a,i=c(n),o=(a=c(r=n),e=0'+i(" ",e)+"
":i(" ",e);n.undoManager.transact(function(){return n.insertContent(o)})},c=tinymce.util.Tools.resolve("tinymce.util.VK");!function e(){n.add("nonbreaking",function(n){var e,a,o,i,t;(e=n).addCommand("mceNonBreaking",function(){r(e,1)}),(a=n).ui.registry.addButton("nonbreaking",{icon:"non-breaking",tooltip:"Nonbreaking space",onAction:function(){return a.execCommand("mceNonBreaking")}}),a.ui.registry.addMenuItem("nonbreaking",{icon:"non-breaking",text:"Nonbreaking space",onAction:function(){return a.execCommand("mceNonBreaking")}}),0<(t="boolean"==typeof(i=(o=n).getParam("nonbreaking_force_tab",0))?!0===i?3:0:i)&&o.on("keydown",function(n){if(n.keyCode===c.TAB&&!n.isDefaultPrevented()){if(n.shiftKey)return;n.preventDefault(),n.stopImmediatePropagation(),r(o,t)}})})}()}(); -------------------------------------------------------------------------------- /vue-cli/use_in_global/public/tinymce/plugins/noneditable/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "noneditable" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/noneditable') 5 | // ES2015: 6 | // import 'tinymce/plugins/noneditable' 7 | require('./plugin.js'); -------------------------------------------------------------------------------- /vue-cli/use_in_global/public/tinymce/plugins/noneditable/plugin.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | * 7 | * Version: 5.3.1 (2020-05-27) 8 | */ 9 | !function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),l=tinymce.util.Tools.resolve("tinymce.util.Tools"),u=function(t){return t.getParam("noneditable_noneditable_class","mceNonEditable")},f=function(n){return function(t){return-1!==(" "+t.attr("class")+" ").indexOf(n)}},s=function(i,o,c){return function(t){var n=arguments,e=n[n.length-2],r=0"===r){var a=o.lastIndexOf("<",e);if(-1!==a)if(-1!==o.substring(a,e).indexOf('contenteditable="false"'))return t}return''+i.dom.encode("string"==typeof n[1]?n[1]:n[0])+""}},n=function(n){var t,e,r="contenteditable";t=" "+l.trim(n.getParam("noneditable_editable_class","mceEditable"))+" ",e=" "+l.trim(u(n))+" ";var a,i=f(t),o=f(e),c=(a=n.getParam("noneditable_regexp",[]))&&a.constructor===RegExp?[a]:a;n.on("PreInit",function(){0'};!function n(){e.add("pagebreak",function(e){var a,n,o,i,t,r;(a=e).addCommand("mcePageBreak",function(){a.settings.pagebreak_split_block?a.insertContent("

"+g()+"

"):a.insertContent(g())}),(n=e).ui.registry.addButton("pagebreak",{icon:"page-break",tooltip:"Page break",onAction:function(){return n.execCommand("mcePageBreak")}}),n.ui.registry.addMenuItem("pagebreak",{text:"Page break",icon:"page-break",onAction:function(){return n.execCommand("mcePageBreak")}}),i=(o=e).getParam("pagebreak_separator","\x3c!-- pagebreak --\x3e"),t=new RegExp(i.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,function(e){return"\\"+e}),"gi"),o.on("BeforeSetContent",function(e){e.content=e.content.replace(t,g())}),o.on("PreInit",function(){o.serializer.addNodeFilter("img",function(e){for(var a,n,t=e.length;t--;)if((n=(a=e[t]).attr("class"))&&-1!==n.indexOf("mce-pagebreak")){var r=a.parent;if(o.schema.getBlockElements()[r.name]&&o.getParam("pagebreak_split_block",!1)){r.type=3,r.value=i,r.raw=!0,a.remove();continue}a.type=3,a.value=i,a.raw=!0}})}),(r=e).on("ResolveName",function(e){"IMG"===e.target.nodeName&&r.dom.hasClass(e.target,c())&&(e.name="pagebreak")})})}()}(); -------------------------------------------------------------------------------- /vue-cli/use_in_global/public/tinymce/plugins/paste/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "paste" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/paste') 5 | // ES2015: 6 | // import 'tinymce/plugins/paste' 7 | require('./plugin.js'); -------------------------------------------------------------------------------- /vue-cli/use_in_global/public/tinymce/plugins/preview/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "preview" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/preview') 5 | // ES2015: 6 | // import 'tinymce/plugins/preview' 7 | require('./plugin.js'); -------------------------------------------------------------------------------- /vue-cli/use_in_global/public/tinymce/plugins/preview/plugin.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Tiny Technologies, Inc. All rights reserved. 3 | * Licensed under the LGPL or a commercial license. 4 | * For LGPL see License.txt in the project root for license information. 5 | * For commercial licenses see https://www.tiny.cloud/ 6 | * 7 | * Version: 5.3.1 (2020-05-27) 8 | */ 9 | !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),l=tinymce.util.Tools.resolve("tinymce.util.Tools"),m=tinymce.util.Tools.resolve("tinymce.Env"),i=function(e){var t=function(t){var n="",i=t.dom.encode,e=t.getParam("content_style","");n+='',e&&(n+='");var o=t.getParam("content_css_cors",!1,"boolean")?' crossorigin="anonymous"':"";l.each(t.contentCSS,function(e){n+='"});var r=t.settings.body_id||"tinymce";-1!==r.indexOf("=")&&(r=(r=t.getParam("body_id","","hash"))[t.id]||r);var a=t.settings.body_class||"";-1!==a.indexOf("=")&&(a=(a=t.getParam("body_class","","hash"))[t.id]||"");var c=' 31 | 32 | -------------------------------------------------------------------------------- /vue-cli/use_in_global/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lpreterite/vue-tinymce-example/07e76e9c28dd8bf709e6607beb2fb010182f3359/vue-cli/use_in_global/src/assets/logo.png -------------------------------------------------------------------------------- /vue-cli/use_in_global/src/components/HelloWorld.vue: -------------------------------------------------------------------------------- 1 | 31 | 32 | 40 | 41 | 42 | 58 | -------------------------------------------------------------------------------- /vue-cli/use_in_global/src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './App.vue' 3 | import tinymce from 'tinymce' 4 | import VueTinymce from '@packy-tang/vue-tinymce' 5 | 6 | Vue.prototype.$tinymce = tinymce 7 | Vue.use(VueTinymce) 8 | 9 | Vue.config.productionTip = false 10 | 11 | new Vue({ 12 | render: h => h(App), 13 | }).$mount('#app') 14 | --------------------------------------------------------------------------------