├── static └── .gitkeep ├── config ├── prod.env.js ├── dev.env.js └── index.js ├── src ├── assets │ └── logo.png ├── components │ └── tinymce │ │ ├── plugins │ │ ├── help │ │ │ ├── img │ │ │ │ └── logo.png │ │ │ └── index.js │ │ ├── emoticons │ │ │ ├── img │ │ │ │ ├── smiley-cool.gif │ │ │ │ ├── smiley-cry.gif │ │ │ │ ├── smiley-frown.gif │ │ │ │ ├── smiley-kiss.gif │ │ │ │ ├── smiley-smile.gif │ │ │ │ ├── smiley-wink.gif │ │ │ │ ├── smiley-yell.gif │ │ │ │ ├── smiley-sealed.gif │ │ │ │ ├── smiley-embarassed.gif │ │ │ │ ├── smiley-innocent.gif │ │ │ │ ├── smiley-laughing.gif │ │ │ │ ├── smiley-surprised.gif │ │ │ │ ├── smiley-tongue-out.gif │ │ │ │ ├── smiley-undecided.gif │ │ │ │ ├── smiley-money-mouth.gif │ │ │ │ └── smiley-foot-in-mouth.gif │ │ │ ├── index.js │ │ │ ├── plugin.min.js │ │ │ └── plugin.js │ │ ├── hr │ │ │ ├── index.js │ │ │ ├── plugin.min.js │ │ │ └── plugin.js │ │ ├── toc │ │ │ ├── index.js │ │ │ └── plugin.min.js │ │ ├── code │ │ │ ├── index.js │ │ │ └── plugin.min.js │ │ ├── image │ │ │ └── index.js │ │ ├── link │ │ │ └── index.js │ │ ├── lists │ │ │ └── index.js │ │ ├── media │ │ │ └── index.js │ │ ├── paste │ │ │ └── index.js │ │ ├── print │ │ │ ├── index.js │ │ │ ├── plugin.min.js │ │ │ └── plugin.js │ │ ├── save │ │ │ ├── index.js │ │ │ └── plugin.min.js │ │ ├── table │ │ │ └── index.js │ │ ├── anchor │ │ │ ├── index.js │ │ │ └── plugin.min.js │ │ ├── bbcode │ │ │ ├── index.js │ │ │ └── plugin.min.js │ │ ├── advlist │ │ │ ├── index.js │ │ │ └── plugin.min.js │ │ ├── charmap │ │ │ └── index.js │ │ ├── preview │ │ │ ├── index.js │ │ │ └── plugin.min.js │ │ ├── autolink │ │ │ ├── index.js │ │ │ └── plugin.min.js │ │ ├── autosave │ │ │ ├── index.js │ │ │ └── plugin.min.js │ │ ├── fullpage │ │ │ └── index.js │ │ ├── tabfocus │ │ │ ├── index.js │ │ │ └── plugin.min.js │ │ ├── template │ │ │ ├── index.js │ │ │ └── plugin.min.js │ │ ├── autoresize │ │ │ ├── index.js │ │ │ └── plugin.min.js │ │ ├── codesample │ │ │ ├── index.js │ │ │ └── css │ │ │ │ └── prism.css │ │ ├── fullscreen │ │ │ ├── index.js │ │ │ └── plugin.min.js │ │ ├── imagetools │ │ │ └── index.js │ │ ├── importcss │ │ │ ├── index.js │ │ │ └── plugin.min.js │ │ ├── pagebreak │ │ │ ├── index.js │ │ │ └── plugin.min.js │ │ ├── textcolor │ │ │ ├── index.js │ │ │ └── plugin.min.js │ │ ├── wordcount │ │ │ └── index.js │ │ ├── colorpicker │ │ │ ├── index.js │ │ │ ├── plugin.min.js │ │ │ └── plugin.js │ │ ├── contextmenu │ │ │ ├── index.js │ │ │ └── plugin.min.js │ │ ├── nonbreaking │ │ │ ├── index.js │ │ │ └── plugin.min.js │ │ ├── noneditable │ │ │ ├── index.js │ │ │ └── plugin.min.js │ │ ├── textpattern │ │ │ ├── index.js │ │ │ └── plugin.min.js │ │ ├── visualchars │ │ │ └── index.js │ │ ├── legacyoutput │ │ │ ├── index.js │ │ │ └── plugin.min.js │ │ ├── spellchecker │ │ │ └── index.js │ │ ├── visualblocks │ │ │ ├── index.js │ │ │ ├── plugin.min.js │ │ │ └── css │ │ │ │ └── visualblocks.css │ │ ├── searchreplace │ │ │ └── index.js │ │ ├── directionality │ │ │ ├── index.js │ │ │ ├── plugin.min.js │ │ │ └── plugin.js │ │ └── insertdatetime │ │ │ ├── index.js │ │ │ └── plugin.min.js │ │ ├── skins │ │ └── lightgray │ │ │ ├── img │ │ │ ├── anchor.gif │ │ │ ├── loader.gif │ │ │ ├── object.gif │ │ │ └── trans.gif │ │ │ ├── fonts │ │ │ ├── tinymce.eot │ │ │ ├── tinymce.ttf │ │ │ ├── tinymce.woff │ │ │ ├── tinymce-small.eot │ │ │ ├── tinymce-small.ttf │ │ │ ├── tinymce-small.woff │ │ │ └── tinymce-mobile.woff │ │ │ ├── content.mobile.min.css │ │ │ ├── content.inline.min.css │ │ │ └── content.min.css │ │ ├── themes │ │ ├── inlite │ │ │ └── index.js │ │ └── modern │ │ │ └── index.js │ │ └── langs │ │ └── en_GB.js ├── router │ └── index.js ├── App.vue ├── main.js ├── libs │ └── util.js └── views │ └── index.vue ├── .editorconfig ├── .gitignore ├── .babelrc ├── .postcssrc.js ├── index.html ├── package.json └── README.md /static/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /config/prod.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | module.exports = { 3 | NODE_ENV: '"production"' 4 | } 5 | -------------------------------------------------------------------------------- /src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haoxiaoyong1014/editor-ui/HEAD/src/assets/logo.png -------------------------------------------------------------------------------- /src/components/tinymce/plugins/help/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haoxiaoyong1014/editor-ui/HEAD/src/components/tinymce/plugins/help/img/logo.png -------------------------------------------------------------------------------- /src/components/tinymce/skins/lightgray/img/anchor.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haoxiaoyong1014/editor-ui/HEAD/src/components/tinymce/skins/lightgray/img/anchor.gif -------------------------------------------------------------------------------- /src/components/tinymce/skins/lightgray/img/loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haoxiaoyong1014/editor-ui/HEAD/src/components/tinymce/skins/lightgray/img/loader.gif -------------------------------------------------------------------------------- /src/components/tinymce/skins/lightgray/img/object.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haoxiaoyong1014/editor-ui/HEAD/src/components/tinymce/skins/lightgray/img/object.gif -------------------------------------------------------------------------------- /src/components/tinymce/skins/lightgray/img/trans.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haoxiaoyong1014/editor-ui/HEAD/src/components/tinymce/skins/lightgray/img/trans.gif -------------------------------------------------------------------------------- /src/components/tinymce/skins/lightgray/fonts/tinymce.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haoxiaoyong1014/editor-ui/HEAD/src/components/tinymce/skins/lightgray/fonts/tinymce.eot -------------------------------------------------------------------------------- /src/components/tinymce/skins/lightgray/fonts/tinymce.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haoxiaoyong1014/editor-ui/HEAD/src/components/tinymce/skins/lightgray/fonts/tinymce.ttf -------------------------------------------------------------------------------- /src/components/tinymce/skins/lightgray/fonts/tinymce.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haoxiaoyong1014/editor-ui/HEAD/src/components/tinymce/skins/lightgray/fonts/tinymce.woff -------------------------------------------------------------------------------- /src/components/tinymce/plugins/emoticons/img/smiley-cool.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haoxiaoyong1014/editor-ui/HEAD/src/components/tinymce/plugins/emoticons/img/smiley-cool.gif -------------------------------------------------------------------------------- /src/components/tinymce/plugins/emoticons/img/smiley-cry.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haoxiaoyong1014/editor-ui/HEAD/src/components/tinymce/plugins/emoticons/img/smiley-cry.gif -------------------------------------------------------------------------------- /src/components/tinymce/plugins/emoticons/img/smiley-frown.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haoxiaoyong1014/editor-ui/HEAD/src/components/tinymce/plugins/emoticons/img/smiley-frown.gif -------------------------------------------------------------------------------- /src/components/tinymce/plugins/emoticons/img/smiley-kiss.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haoxiaoyong1014/editor-ui/HEAD/src/components/tinymce/plugins/emoticons/img/smiley-kiss.gif -------------------------------------------------------------------------------- /src/components/tinymce/plugins/emoticons/img/smiley-smile.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haoxiaoyong1014/editor-ui/HEAD/src/components/tinymce/plugins/emoticons/img/smiley-smile.gif -------------------------------------------------------------------------------- /src/components/tinymce/plugins/emoticons/img/smiley-wink.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haoxiaoyong1014/editor-ui/HEAD/src/components/tinymce/plugins/emoticons/img/smiley-wink.gif -------------------------------------------------------------------------------- /src/components/tinymce/plugins/emoticons/img/smiley-yell.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haoxiaoyong1014/editor-ui/HEAD/src/components/tinymce/plugins/emoticons/img/smiley-yell.gif -------------------------------------------------------------------------------- /src/components/tinymce/plugins/emoticons/img/smiley-sealed.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haoxiaoyong1014/editor-ui/HEAD/src/components/tinymce/plugins/emoticons/img/smiley-sealed.gif -------------------------------------------------------------------------------- /src/components/tinymce/skins/lightgray/fonts/tinymce-small.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haoxiaoyong1014/editor-ui/HEAD/src/components/tinymce/skins/lightgray/fonts/tinymce-small.eot -------------------------------------------------------------------------------- /src/components/tinymce/skins/lightgray/fonts/tinymce-small.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haoxiaoyong1014/editor-ui/HEAD/src/components/tinymce/skins/lightgray/fonts/tinymce-small.ttf -------------------------------------------------------------------------------- /src/components/tinymce/skins/lightgray/fonts/tinymce-small.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haoxiaoyong1014/editor-ui/HEAD/src/components/tinymce/skins/lightgray/fonts/tinymce-small.woff -------------------------------------------------------------------------------- /src/components/tinymce/plugins/emoticons/img/smiley-embarassed.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haoxiaoyong1014/editor-ui/HEAD/src/components/tinymce/plugins/emoticons/img/smiley-embarassed.gif -------------------------------------------------------------------------------- /src/components/tinymce/plugins/emoticons/img/smiley-innocent.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haoxiaoyong1014/editor-ui/HEAD/src/components/tinymce/plugins/emoticons/img/smiley-innocent.gif -------------------------------------------------------------------------------- /src/components/tinymce/plugins/emoticons/img/smiley-laughing.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haoxiaoyong1014/editor-ui/HEAD/src/components/tinymce/plugins/emoticons/img/smiley-laughing.gif -------------------------------------------------------------------------------- /src/components/tinymce/plugins/emoticons/img/smiley-surprised.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haoxiaoyong1014/editor-ui/HEAD/src/components/tinymce/plugins/emoticons/img/smiley-surprised.gif -------------------------------------------------------------------------------- /src/components/tinymce/plugins/emoticons/img/smiley-tongue-out.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haoxiaoyong1014/editor-ui/HEAD/src/components/tinymce/plugins/emoticons/img/smiley-tongue-out.gif -------------------------------------------------------------------------------- /src/components/tinymce/plugins/emoticons/img/smiley-undecided.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haoxiaoyong1014/editor-ui/HEAD/src/components/tinymce/plugins/emoticons/img/smiley-undecided.gif -------------------------------------------------------------------------------- /src/components/tinymce/skins/lightgray/fonts/tinymce-mobile.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haoxiaoyong1014/editor-ui/HEAD/src/components/tinymce/skins/lightgray/fonts/tinymce-mobile.woff -------------------------------------------------------------------------------- /src/components/tinymce/plugins/emoticons/img/smiley-money-mouth.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haoxiaoyong1014/editor-ui/HEAD/src/components/tinymce/plugins/emoticons/img/smiley-money-mouth.gif -------------------------------------------------------------------------------- /config/dev.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const merge = require('webpack-merge') 3 | const prodEnv = require('./prod.env') 4 | 5 | module.exports = merge(prodEnv, { 6 | NODE_ENV: '"development"' 7 | }) 8 | -------------------------------------------------------------------------------- /src/components/tinymce/plugins/emoticons/img/smiley-foot-in-mouth.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haoxiaoyong1014/editor-ui/HEAD/src/components/tinymce/plugins/emoticons/img/smiley-foot-in-mouth.gif -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | /dist/ 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | 8 | # Editor directories and files 9 | .idea 10 | .vscode 11 | *.suo 12 | *.ntvs* 13 | *.njsproj 14 | *.sln 15 | -------------------------------------------------------------------------------- /src/components/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'); 8 | -------------------------------------------------------------------------------- /src/components/tinymce/plugins/toc/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "toc" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/toc') 5 | // ES2015: 6 | // import 'tinymce/plugins/toc' 7 | require('./plugin.js'); 8 | -------------------------------------------------------------------------------- /src/components/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'); 8 | -------------------------------------------------------------------------------- /src/components/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'); 8 | -------------------------------------------------------------------------------- /src/components/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'); 8 | -------------------------------------------------------------------------------- /src/components/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'); 8 | -------------------------------------------------------------------------------- /src/components/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'); 8 | -------------------------------------------------------------------------------- /src/components/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'); 8 | -------------------------------------------------------------------------------- /src/components/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'); 8 | -------------------------------------------------------------------------------- /src/components/tinymce/plugins/print/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "print" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/print') 5 | // ES2015: 6 | // import 'tinymce/plugins/print' 7 | require('./plugin.js'); 8 | -------------------------------------------------------------------------------- /src/components/tinymce/plugins/save/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "save" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/save') 5 | // ES2015: 6 | // import 'tinymce/plugins/save' 7 | require('./plugin.js'); 8 | -------------------------------------------------------------------------------- /src/components/tinymce/plugins/table/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "table" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/table') 5 | // ES2015: 6 | // import 'tinymce/plugins/table' 7 | require('./plugin.js'); 8 | -------------------------------------------------------------------------------- /src/components/tinymce/themes/inlite/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "inlite" theme for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/themes/inlite') 5 | // ES2015: 6 | // import 'tinymce/themes/inlite' 7 | require('./theme.js'); 8 | -------------------------------------------------------------------------------- /src/components/tinymce/themes/modern/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "modern" theme for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/themes/modern') 5 | // ES2015: 6 | // import 'tinymce/themes/modern' 7 | require('./theme.js'); 8 | -------------------------------------------------------------------------------- /src/components/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'); 8 | -------------------------------------------------------------------------------- /src/components/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'); 8 | -------------------------------------------------------------------------------- /src/components/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'); 8 | -------------------------------------------------------------------------------- /src/components/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'); 8 | -------------------------------------------------------------------------------- /src/components/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'); 8 | -------------------------------------------------------------------------------- /src/components/tinymce/plugins/autolink/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "autolink" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/autolink') 5 | // ES2015: 6 | // import 'tinymce/plugins/autolink' 7 | require('./plugin.js'); 8 | -------------------------------------------------------------------------------- /src/components/tinymce/plugins/autosave/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "autosave" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/autosave') 5 | // ES2015: 6 | // import 'tinymce/plugins/autosave' 7 | require('./plugin.js'); 8 | -------------------------------------------------------------------------------- /src/components/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'); 8 | -------------------------------------------------------------------------------- /src/components/tinymce/plugins/tabfocus/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "tabfocus" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/tabfocus') 5 | // ES2015: 6 | // import 'tinymce/plugins/tabfocus' 7 | require('./plugin.js'); 8 | -------------------------------------------------------------------------------- /src/components/tinymce/plugins/template/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "template" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/template') 5 | // ES2015: 6 | // import 'tinymce/plugins/template' 7 | require('./plugin.js'); 8 | -------------------------------------------------------------------------------- /src/components/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'); 8 | -------------------------------------------------------------------------------- /src/components/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'); 8 | -------------------------------------------------------------------------------- /src/components/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'); 8 | -------------------------------------------------------------------------------- /src/components/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'); 8 | -------------------------------------------------------------------------------- /src/components/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'); 8 | -------------------------------------------------------------------------------- /src/components/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'); 8 | -------------------------------------------------------------------------------- /src/components/tinymce/plugins/pagebreak/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "pagebreak" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/pagebreak') 5 | // ES2015: 6 | // import 'tinymce/plugins/pagebreak' 7 | require('./plugin.js'); 8 | -------------------------------------------------------------------------------- /src/components/tinymce/plugins/textcolor/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "textcolor" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/textcolor') 5 | // ES2015: 6 | // import 'tinymce/plugins/textcolor' 7 | require('./plugin.js'); 8 | -------------------------------------------------------------------------------- /src/components/tinymce/plugins/wordcount/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "wordcount" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/wordcount') 5 | // ES2015: 6 | // import 'tinymce/plugins/wordcount' 7 | require('./plugin.js'); 8 | -------------------------------------------------------------------------------- /src/components/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'); 8 | -------------------------------------------------------------------------------- /src/components/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'); 8 | -------------------------------------------------------------------------------- /src/components/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'); 8 | -------------------------------------------------------------------------------- /src/components/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'); 8 | -------------------------------------------------------------------------------- /src/components/tinymce/plugins/textpattern/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "textpattern" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/textpattern') 5 | // ES2015: 6 | // import 'tinymce/plugins/textpattern' 7 | require('./plugin.js'); 8 | -------------------------------------------------------------------------------- /src/components/tinymce/plugins/visualchars/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "visualchars" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/visualchars') 5 | // ES2015: 6 | // import 'tinymce/plugins/visualchars' 7 | require('./plugin.js'); 8 | -------------------------------------------------------------------------------- /src/components/tinymce/skins/lightgray/content.mobile.min.css: -------------------------------------------------------------------------------- 1 | .tinymce-mobile-unfocused-selections .tinymce-mobile-unfocused-selection{position:absolute;display:inline-block;background-color:green;opacity:.5}body{-webkit-text-size-adjust:none}body img{max-width:96vw}body table img{max-width:95%} -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | ["env", { 4 | "modules": false, 5 | "targets": { 6 | "browsers": ["> 1%", "last 2 versions", "not ie <= 8"] 7 | } 8 | }], 9 | "stage-2" 10 | ], 11 | "plugins": ["transform-vue-jsx", "transform-runtime"] 12 | } 13 | -------------------------------------------------------------------------------- /src/components/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'); 8 | -------------------------------------------------------------------------------- /src/components/tinymce/plugins/spellchecker/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "spellchecker" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/spellchecker') 5 | // ES2015: 6 | // import 'tinymce/plugins/spellchecker' 7 | require('./plugin.js'); 8 | -------------------------------------------------------------------------------- /src/components/tinymce/plugins/visualblocks/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "visualblocks" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/visualblocks') 5 | // ES2015: 6 | // import 'tinymce/plugins/visualblocks' 7 | require('./plugin.js'); 8 | -------------------------------------------------------------------------------- /src/components/tinymce/plugins/searchreplace/index.js: -------------------------------------------------------------------------------- 1 | // Exports the "searchreplace" plugin for usage with module loaders 2 | // Usage: 3 | // CommonJS: 4 | // require('tinymce/plugins/searchreplace') 5 | // ES2015: 6 | // import 'tinymce/plugins/searchreplace' 7 | require('./plugin.js'); 8 | -------------------------------------------------------------------------------- /.postcssrc.js: -------------------------------------------------------------------------------- 1 | // https://github.com/michael-ciniawsky/postcss-load-config 2 | 3 | module.exports = { 4 | "plugins": { 5 | "postcss-import": {}, 6 | "postcss-url": {}, 7 | // to edit target browsers: use "browserslist" field in package.json 8 | "autoprefixer": {} 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/components/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'); 8 | -------------------------------------------------------------------------------- /src/components/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'); 8 | -------------------------------------------------------------------------------- /src/router/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Router from 'vue-router' 3 | import index from '@/views/index' 4 | 5 | Vue.use(Router) 6 | 7 | export default new Router({ 8 | routes: [ 9 | { 10 | path: '/', 11 | name: 'index', 12 | component: index 13 | } 14 | ] 15 | }) 16 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | editor-ui 7 | 8 | 9 |
10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 12 | 13 | 22 | -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | // The Vue build version to load with the `import` command 2 | // (runtime-only or standalone) has been set in webpack.base.conf with an alias. 3 | import Vue from 'vue' 4 | import App from './App' 5 | import router from './router' 6 | import iView from 'iview' 7 | import 'iview/dist/styles/iview.css' 8 | 9 | Vue.config.productionTip = false 10 | Vue.use(iView) 11 | /* eslint-disable no-new */ 12 | new Vue({ 13 | el: '#app', 14 | router, 15 | render: h => h(App), 16 | components: { App }, 17 | template: '' 18 | }) 19 | -------------------------------------------------------------------------------- /src/components/tinymce/plugins/print/plugin.min.js: -------------------------------------------------------------------------------- 1 | !(function () { var a = {}, b = function (b) { for (var c = a[b], e = c.deps, f = c.defn, g = e.length, h = new Array(g), i = 0; i < g; ++i)h[i] = d(e[i]); var j = f.apply(null, h); if (void 0 === j) throw 'module [' + b + '] returned undefined'; c.instance = j; }, c = function (b, c, d) { if (typeof b !== 'string') throw 'module id must be a string'; if (void 0 === c) throw 'no dependencies for ' + b; if (void 0 === d) throw 'no definition function for ' + b; a[b] = {deps: c, defn: d, instance: void 0}; }, d = function (c) { var d = a[c]; if (void 0 === d) throw 'module [' + c + '] was undefined'; return void 0 === d.instance && b(c), d.instance; }, e = function (a, b) { for (var c = a.length, e = new Array(c), f = 0; f < c; ++f)e[f] = d(a[f]); b.apply(null, e); }, f = {}; f.bolt = {module: {api: {define: c, require: e, demand: d}}}; var g = c, h = function (a, b) { g(a, [], function () { return b; }); }; h('4', tinymce.util.Tools.resolve), g('1', ['4'], function (a) { return a('tinymce.PluginManager'); }), g('2', [], function () { var a = function (a) { a.addCommand('mcePrint', function () { a.getWin().print(); }); }; return {register: a}; }), g('3', [], function () { var a = function (a) { a.addButton('print', {title: 'Print', cmd: 'mcePrint'}), a.addMenuItem('print', {text: 'Print', cmd: 'mcePrint', icon: 'print'}); }; return {register: a}; }), g('0', ['1', '2', '3'], function (a, b, c) { return a.add('print', function (a) { b.register(a), c.register(a), a.addShortcut('Meta+P', '', 'mcePrint'); }), function () {}; }), d('0')(); }()); 2 | -------------------------------------------------------------------------------- /src/components/tinymce/plugins/hr/plugin.min.js: -------------------------------------------------------------------------------- 1 | !(function () { var a = {}, b = function (b) { for (var c = a[b], e = c.deps, f = c.defn, g = e.length, h = new Array(g), i = 0; i < g; ++i)h[i] = d(e[i]); var j = f.apply(null, h); if (void 0 === j) throw 'module [' + b + '] returned undefined'; c.instance = j; }, c = function (b, c, d) { if (typeof b !== 'string') throw 'module id must be a string'; if (void 0 === c) throw 'no dependencies for ' + b; if (void 0 === d) throw 'no definition function for ' + b; a[b] = {deps: c, defn: d, instance: void 0}; }, d = function (c) { var d = a[c]; if (void 0 === d) throw 'module [' + c + '] was undefined'; return void 0 === d.instance && b(c), d.instance; }, e = function (a, b) { for (var c = a.length, e = new Array(c), f = 0; f < c; ++f)e[f] = d(a[f]); b.apply(null, e); }, f = {}; f.bolt = {module: {api: {define: c, require: e, demand: d}}}; var g = c, h = function (a, b) { g(a, [], function () { return b; }); }; h('4', tinymce.util.Tools.resolve), g('1', ['4'], function (a) { return a('tinymce.PluginManager'); }), g('2', [], function () { var a = function (a) { a.addCommand('InsertHorizontalRule', function () { a.execCommand('mceInsertContent', !1, '
'); }); }; return {register: a}; }), g('3', [], function () { var a = function (a) { a.addButton('hr', {icon: 'hr', tooltip: 'Horizontal line', cmd: 'InsertHorizontalRule'}), a.addMenuItem('hr', {icon: 'hr', text: 'Horizontal line', cmd: 'InsertHorizontalRule', context: 'insert'}); }; return {register: a}; }), g('0', ['1', '2', '3'], function (a, b, c) { return a.add('hr', function (a) { b.register(a), c.register(a); }), function () {}; }), d('0')(); }()); 2 | -------------------------------------------------------------------------------- /src/libs/util.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @file util.js 3 | * @author liumapp 4 | * @email liumapp.com@gmail.com 5 | * @homepage http://www.liumapp.com 6 | * @date 6/11/18 7 | */ 8 | 9 | 10 | import axios from 'axios'; 11 | import Cookies from 'js-cookie'; 12 | import { Message } from 'iview'; 13 | 14 | let util = { 15 | 16 | }; 17 | util.title = function (title) { 18 | title = title || 'editor demo'; 19 | window.document.title = title; 20 | }; 21 | 22 | const ajaxUrl = 'http://localhost:2020/'; 23 | 24 | util.ajaxUrl = ajaxUrl; 25 | 26 | util.ajax = axios.create({ 27 | baseURL: ajaxUrl, 28 | timeout: 30000 29 | }); 30 | 31 | util.post = function (url, data) { 32 | const token = Cookies.get('userInfo') ? JSON.parse(Cookies.get('userInfo')).token : ''; 33 | if (!data) { 34 | data = { token: token }; 35 | } else { 36 | data.token = token; 37 | } 38 | return axios({ 39 | method: 'post', 40 | baseURL: ajaxUrl, 41 | url, 42 | data: data, 43 | timeout: 10000, 44 | headers: { 45 | 'X-Requested-With': 'XMLHttpRequest', 46 | 'Content-Type': 'application/json; charset=UTF-8', 47 | 'Authorization': 'Bearer ' + token 48 | } 49 | }).then( 50 | (response) => { 51 | return this.checkStatus(response); 52 | } 53 | ) 54 | }; 55 | 56 | util.checkStatus = function checkStatus (response) { 57 | // loading 58 | // 如果http状态码正常,则直接返回数据 59 | // console.log(response) 60 | if (response && (response.status === 200 || response.status === 304 || response.status === 400)) { 61 | return response; 62 | // 如果不需要除了data之外的数据,可以直接 return response.data 63 | } 64 | Message.warning('网络异常'); 65 | // 异常状态下,把错误信息返回去 66 | return { 67 | status: -404, 68 | msg: '网络异常' 69 | }; 70 | }; 71 | 72 | export default util; 73 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "editor-ui", 3 | "version": "1.0.0", 4 | "description": "A Vue.js project", 5 | "author": "liumapp ", 6 | "private": true, 7 | "scripts": { 8 | "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", 9 | "start": "npm run dev", 10 | "build": "node build/build.js" 11 | }, 12 | "dependencies": { 13 | "iview": "^2.8.0", 14 | "vue": "^2.5.2", 15 | "vue-router": "^3.0.1" 16 | }, 17 | "devDependencies": { 18 | "tinymce": "^4.7.4", 19 | "js-cookie": "^2.2.0", 20 | "axios": "^0.17.1", 21 | "autoprefixer": "^7.1.2", 22 | "babel-core": "^6.22.1", 23 | "babel-helper-vue-jsx-merge-props": "^2.0.3", 24 | "babel-loader": "^7.1.1", 25 | "babel-plugin-syntax-jsx": "^6.18.0", 26 | "babel-plugin-transform-runtime": "^6.22.0", 27 | "babel-plugin-transform-vue-jsx": "^3.5.0", 28 | "babel-preset-env": "^1.3.2", 29 | "babel-preset-stage-2": "^6.22.0", 30 | "chalk": "^2.0.1", 31 | "copy-webpack-plugin": "^4.0.1", 32 | "css-loader": "^0.28.0", 33 | "extract-text-webpack-plugin": "^3.0.0", 34 | "file-loader": "^1.1.4", 35 | "friendly-errors-webpack-plugin": "^1.6.1", 36 | "html-webpack-plugin": "^2.30.1", 37 | "node-notifier": "^5.1.2", 38 | "optimize-css-assets-webpack-plugin": "^3.2.0", 39 | "ora": "^1.2.0", 40 | "portfinder": "^1.0.13", 41 | "postcss-import": "^11.0.0", 42 | "postcss-loader": "^2.0.8", 43 | "postcss-url": "^7.2.1", 44 | "rimraf": "^2.6.0", 45 | "semver": "^5.3.0", 46 | "shelljs": "^0.7.6", 47 | "uglifyjs-webpack-plugin": "^1.1.1", 48 | "url-loader": "^0.5.8", 49 | "vue-loader": "^13.3.0", 50 | "vue-style-loader": "^3.0.1", 51 | "vue-template-compiler": "^2.5.2", 52 | "webpack": "^3.6.0", 53 | "webpack-bundle-analyzer": "^2.9.0", 54 | "webpack-dev-server": "^2.9.1", 55 | "webpack-merge": "^4.1.0" 56 | }, 57 | "engines": { 58 | "node": ">= 6.0.0", 59 | "npm": ">= 3.0.0" 60 | }, 61 | "browserslist": [ 62 | "> 1%", 63 | "last 2 versions", 64 | "not ie <= 8" 65 | ] 66 | } 67 | -------------------------------------------------------------------------------- /src/components/tinymce/plugins/directionality/plugin.min.js: -------------------------------------------------------------------------------- 1 | !(function () { var a = {}, b = function (b) { for (var c = a[b], e = c.deps, f = c.defn, g = e.length, h = new Array(g), i = 0; i < g; ++i)h[i] = d(e[i]); var j = f.apply(null, h); if (void 0 === j) throw 'module [' + b + '] returned undefined'; c.instance = j; }, c = function (b, c, d) { if (typeof b !== 'string') throw 'module id must be a string'; if (void 0 === c) throw 'no dependencies for ' + b; if (void 0 === d) throw 'no definition function for ' + b; a[b] = {deps: c, defn: d, instance: void 0}; }, d = function (c) { var d = a[c]; if (void 0 === d) throw 'module [' + c + '] was undefined'; return void 0 === d.instance && b(c), d.instance; }, e = function (a, b) { for (var c = a.length, e = new Array(c), f = 0; f < c; ++f)e[f] = d(a[f]); b.apply(null, e); }, f = {}; f.bolt = {module: {api: {define: c, require: e, demand: d}}}; var g = c, h = function (a, b) { g(a, [], function () { return b; }); }; h('4', tinymce.util.Tools.resolve), g('1', ['4'], function (a) { return a('tinymce.PluginManager'); }), g('6', ['4'], function (a) { return a('tinymce.util.Tools'); }), g('5', ['6'], function (a) { var b = function (b, c) { var d, e = b.dom, f = b.selection.getSelectedBlocks(); f.length && (d = e.getAttrib(f[0], 'dir'), a.each(f, function (a) { e.getParent(a.parentNode, '*[dir="' + c + '"]', e.getRoot()) || e.setAttrib(a, 'dir', d !== c ? c : null); }), b.nodeChanged()); }; return {setDir: b}; }), g('2', ['5'], function (a) { var b = function (b) { b.addCommand('mceDirectionLTR', function () { a.setDir(b, 'ltr'); }), b.addCommand('mceDirectionRTL', function () { a.setDir(b, 'rtl'); }); }; return {register: b}; }), g('3', ['6'], function (a) { var b = function (b) { var c = []; return a.each('h1 h2 h3 h4 h5 h6 div p'.split(' '), function (a) { c.push(a + '[dir=' + b + ']'); }), c.join(','); }, c = function (a) { a.addButton('ltr', {title: 'Left to right', cmd: 'mceDirectionLTR', stateSelector: b('ltr')}), a.addButton('rtl', {title: 'Right to left', cmd: 'mceDirectionRTL', stateSelector: b('rtl')}); }; return {register: c}; }), g('0', ['1', '2', '3'], function (a, b, c) { return a.add('directionality', function (a) { b.register(a), c.register(a); }), function () {}; }), d('0')(); }()); 2 | -------------------------------------------------------------------------------- /config/index.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | // Template version: 1.3.1 3 | // see http://vuejs-templates.github.io/webpack for documentation. 4 | 5 | const path = require('path') 6 | 7 | module.exports = { 8 | dev: { 9 | 10 | // Paths 11 | assetsSubDirectory: 'static', 12 | assetsPublicPath: '/', 13 | proxyTable: {}, 14 | 15 | // Various Dev Server settings 16 | host: 'localhost', // can be overwritten by process.env.HOST 17 | port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined 18 | autoOpenBrowser: false, 19 | errorOverlay: true, 20 | notifyOnErrors: true, 21 | poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions- 22 | 23 | 24 | /** 25 | * Source Maps 26 | */ 27 | 28 | // https://webpack.js.org/configuration/devtool/#development 29 | devtool: 'cheap-module-eval-source-map', 30 | 31 | // If you have problems debugging vue-files in devtools, 32 | // set this to false - it *may* help 33 | // https://vue-loader.vuejs.org/en/options.html#cachebusting 34 | cacheBusting: true, 35 | 36 | cssSourceMap: true 37 | }, 38 | 39 | build: { 40 | // Template for index.html 41 | index: path.resolve(__dirname, '../dist/index.html'), 42 | 43 | // Paths 44 | assetsRoot: path.resolve(__dirname, '../dist'), 45 | assetsSubDirectory: 'static', 46 | assetsPublicPath: '/', 47 | 48 | /** 49 | * Source Maps 50 | */ 51 | 52 | productionSourceMap: true, 53 | // https://webpack.js.org/configuration/devtool/#production 54 | devtool: '#source-map', 55 | 56 | // Gzip off by default as many popular static hosts such as 57 | // Surge or Netlify already gzip all static assets for you. 58 | // Before setting to `true`, make sure to: 59 | // npm install --save-dev compression-webpack-plugin 60 | productionGzip: false, 61 | productionGzipExtensions: ['js', 'css'], 62 | 63 | // Run the build command with an extra argument to 64 | // View the bundle analyzer report after build finishes: 65 | // `npm run build --report` 66 | // Set to `true` or `false` to always turn it on or off 67 | bundleAnalyzerReport: process.env.npm_config_report 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /src/components/tinymce/plugins/emoticons/plugin.min.js: -------------------------------------------------------------------------------- 1 | !(function () { var a = {}, b = function (b) { for (var c = a[b], e = c.deps, f = c.defn, g = e.length, h = new Array(g), i = 0; i < g; ++i)h[i] = d(e[i]); var j = f.apply(null, h); if (void 0 === j) throw 'module [' + b + '] returned undefined'; c.instance = j; }, c = function (b, c, d) { if (typeof b !== 'string') throw 'module id must be a string'; if (void 0 === c) throw 'no dependencies for ' + b; if (void 0 === d) throw 'no definition function for ' + b; a[b] = {deps: c, defn: d, instance: void 0}; }, d = function (c) { var d = a[c]; if (void 0 === d) throw 'module [' + c + '] was undefined'; return void 0 === d.instance && b(c), d.instance; }, e = function (a, b) { for (var c = a.length, e = new Array(c), f = 0; f < c; ++f)e[f] = d(a[f]); b.apply(null, e); }, f = {}; f.bolt = {module: {api: {define: c, require: e, demand: d}}}; var g = c, h = function (a, b) { g(a, [], function () { return b; }); }; h('3', tinymce.util.Tools.resolve), g('1', ['3'], function (a) { return a('tinymce.PluginManager'); }), g('5', ['3'], function (a) { return a('tinymce.util.Tools'); }), g('4', ['5'], function (a) { var b = [['cool', 'cry', 'embarassed', 'foot-in-mouth'], ['frown', 'innocent', 'kiss', 'laughing'], ['money-mouth', 'sealed', 'smile', 'surprised'], ['tongue-out', 'undecided', 'wink', 'yell']], c = function (c) { var d; return d = '', a.each(b, function (b) { d += '', a.each(b, function (a) { var b = c + '/img/smiley-' + a + '.gif'; d += ''; }), d += ''; }), d += '
'; }; return {getHtml: c}; }), g('2', ['4'], function (a) { var b = function (a, b, c) { a.insertContent(a.dom.createHTML('img', {src: b, alt: c})); }, c = function (c, d) { var e = a.getHtml(d); c.addButton('emoticons', {type: 'panelbutton', panel: {role: 'application', autohide: !0, html: e, onclick: function (a) { var d = c.dom.getParent(a.target, 'a'); d && (b(c, d.getAttribute('data-mce-url'), d.getAttribute('data-mce-alt')), this.hide()); }}, tooltip: 'Emoticons'}); }; return {register: c}; }), g('0', ['1', '2'], function (a, b) { return a.add('emoticons', function (a, c) { b.register(a, c); }), function () {}; }), d('0')(); }()); 2 | -------------------------------------------------------------------------------- /src/components/tinymce/plugins/nonbreaking/plugin.min.js: -------------------------------------------------------------------------------- 1 | !(function () { var a = {}, b = function (b) { for (var c = a[b], e = c.deps, f = c.defn, g = e.length, h = new Array(g), i = 0; i < g; ++i)h[i] = d(e[i]); var j = f.apply(null, h); if (void 0 === j) throw 'module [' + b + '] returned undefined'; c.instance = j; }, c = function (b, c, d) { if (typeof b !== 'string') throw 'module id must be a string'; if (void 0 === c) throw 'no dependencies for ' + b; if (void 0 === d) throw 'no definition function for ' + b; a[b] = {deps: c, defn: d, instance: void 0}; }, d = function (c) { var d = a[c]; if (void 0 === d) throw 'module [' + c + '] was undefined'; return void 0 === d.instance && b(c), d.instance; }, e = function (a, b) { for (var c = a.length, e = new Array(c), f = 0; f < c; ++f)e[f] = d(a[f]); b.apply(null, e); }, f = {}; f.bolt = {module: {api: {define: c, require: e, demand: d}}}; var g = c, h = function (a, b) { g(a, [], function () { return b; }); }; h('5', tinymce.util.Tools.resolve), g('1', ['5'], function (a) { return a('tinymce.PluginManager'); }), g('6', [], function () { var a = function (a, b) { for (var c = '', d = 0; d < b; d++)c += a; return c; }, b = function (a) { return !!a.plugins.visualchars && a.plugins.visualchars.isEnabled(); }, c = function (c, d) { var e = b(c) ? ' ' : ' '; c.insertContent(a(e, d)), c.dom.setAttrib(c.dom.select('span.mce-nbsp'), 'data-mce-bogus', '1'); }; return {insertNbsp: c}; }), g('2', ['6'], function (a) { var b = function (b) { b.addCommand('mceNonBreaking', function () { a.insertNbsp(b, 1); }); }; return {register: b}; }), g('7', [], function () { var a = function (a) { var b = a.getParam('nonbreaking_force_tab', 0); return typeof tabs === 'boolean' ? b === !0 ? 3 : 0 : b; }; return {getKeyboardSpaces: a}; }), g('3', ['7', '6'], function (a, b) { var c = function (c) { var d = a.getKeyboardSpaces(c); d > 0 && c.on('keydown', function (a) { if (a.keyCode === 9) { if (a.shiftKey) return; a.preventDefault(), b.insertNbsp(c, d); } }); }; return {setup: c}; }), g('4', [], function () { var a = function (a) { a.addButton('nonbreaking', {title: 'Nonbreaking space', cmd: 'mceNonBreaking'}), a.addMenuItem('nonbreaking', {text: 'Nonbreaking space', cmd: 'mceNonBreaking', context: 'insert'}); }; return {register: a}; }), g('0', ['1', '2', '3', '4'], function (a, b, c, d) { return a.add('nonbreaking', function (a) { b.register(a), d.register(a), c.setup(a); }), function () {}; }), d('0')(); }()); 2 | -------------------------------------------------------------------------------- /src/components/tinymce/plugins/code/plugin.min.js: -------------------------------------------------------------------------------- 1 | !(function () { var a = {}, b = function (b) { for (var c = a[b], e = c.deps, f = c.defn, g = e.length, h = new Array(g), i = 0; i < g; ++i)h[i] = d(e[i]); var j = f.apply(null, h); if (void 0 === j) throw 'module [' + b + '] returned undefined'; c.instance = j; }, c = function (b, c, d) { if (typeof b !== 'string') throw 'module id must be a string'; if (void 0 === c) throw 'no dependencies for ' + b; if (void 0 === d) throw 'no definition function for ' + b; a[b] = {deps: c, defn: d, instance: void 0}; }, d = function (c) { var d = a[c]; if (void 0 === d) throw 'module [' + c + '] was undefined'; return void 0 === d.instance && b(c), d.instance; }, e = function (a, b) { for (var c = a.length, e = new Array(c), f = 0; f < c; ++f)e[f] = d(a[f]); b.apply(null, e); }, f = {}; f.bolt = {module: {api: {define: c, require: e, demand: d}}}; var g = c, h = function (a, b) { g(a, [], function () { return b; }); }; h('4', tinymce.util.Tools.resolve), g('1', ['4'], function (a) { return a('tinymce.PluginManager'); }), g('8', ['4'], function (a) { return a('tinymce.dom.DOMUtils'); }), g('6', ['8'], function (a) { var b = function (a) { return a.getParam('code_dialog_width', 600); }, c = function (b) { return b.getParam('code_dialog_height', Math.min(a.DOM.getViewPort().h - 200, 500)); }; return {getMinWidth: b, getMinHeight: c}; }), g('7', [], function () { var a = function (a, b) { a.focus(), a.undoManager.transact(function () { a.setContent(b); }), a.selection.setCursorLocation(), a.nodeChanged(); }, b = function (a) { return a.getContent({source_view: !0}); }; return {setContent: a, getContent: b}; }), g('5', ['6', '7'], function (a, b) { var c = function (c) { var d = a.getMinWidth(c), e = a.getMinHeight(c), f = c.windowManager.open({title: 'Source code', body: {type: 'textbox', name: 'code', multiline: !0, minWidth: d, minHeight: e, spellcheck: !1, style: 'direction: ltr; text-align: left'}, onSubmit: function (a) { b.setContent(c, a.data.code); }}); f.find('#code').value(b.getContent(c)); }; return {open: c}; }), g('2', ['5'], function (a) { var b = function (b) { b.addCommand('mceCodeEditor', function () { a.open(b); }); }; return {register: b}; }), g('3', ['5'], function (a) { var b = function (b) { b.addButton('code', {icon: 'code', tooltip: 'Source code', onclick: function () { a.open(b); }}), b.addMenuItem('code', {icon: 'code', text: 'Source code', onclick: function () { a.open(b); }}); }; return {register: b}; }), g('0', ['1', '2', '3'], function (a, b, c) { return a.add('code', function (a) { return b.register(a), c.register(a), {}; }), function () {}; }), d('0')(); }()); 2 | -------------------------------------------------------------------------------- /src/components/tinymce/plugins/colorpicker/plugin.min.js: -------------------------------------------------------------------------------- 1 | !(function () { var a = {}, b = function (b) { for (var c = a[b], e = c.deps, f = c.defn, g = e.length, h = new Array(g), i = 0; i < g; ++i)h[i] = d(e[i]); var j = f.apply(null, h); if (void 0 === j) throw 'module [' + b + '] returned undefined'; c.instance = j; }, c = function (b, c, d) { if (typeof b !== 'string') throw 'module id must be a string'; if (void 0 === c) throw 'no dependencies for ' + b; if (void 0 === d) throw 'no definition function for ' + b; a[b] = {deps: c, defn: d, instance: void 0}; }, d = function (c) { var d = a[c]; if (void 0 === d) throw 'module [' + c + '] was undefined'; return void 0 === d.instance && b(c), d.instance; }, e = function (a, b) { for (var c = a.length, e = new Array(c), f = 0; f < c; ++f)e[f] = d(a[f]); b.apply(null, e); }, f = {}; f.bolt = {module: {api: {define: c, require: e, demand: d}}}; var g = c, h = function (a, b) { g(a, [], function () { return b; }); }; h('3', tinymce.util.Tools.resolve), g('1', ['3'], function (a) { return a('tinymce.PluginManager'); }), g('4', ['3'], function (a) { return a('tinymce.util.Color'); }), g('2', ['4'], function (a) { var b = function (a, b) { a.find('#preview')[0].getEl().style.background = b; }, c = function (c, d) { var e = new a(d), f = e.toRgb(); c.fromJSON({r: f.r, g: f.g, b: f.b, hex: e.toHex().substr(1)}), b(c, e.toHex()); }, d = function (a, d, e) { var f = a.windowManager.open({title: 'Color', items: {type: 'container', layout: 'flex', direction: 'row', align: 'stretch', padding: 5, spacing: 10, items: [{type: 'colorpicker', value: e, onchange: function () { var a = this.rgb(); f && (f.find('#r').value(a.r), f.find('#g').value(a.g), f.find('#b').value(a.b), f.find('#hex').value(this.value().substr(1)), b(f, this.value())); }}, {type: 'form', padding: 0, labelGap: 5, defaults: {type: 'textbox', size: 7, value: '0', flex: 1, spellcheck: !1, onchange: function () { var a, b, d = f.find('colorpicker')[0]; return a = this.name(), b = this.value(), a === 'hex' ? (b = '#' + b, c(f, b), void d.value(b)) : (b = {r: f.find('#r').value(), g: f.find('#g').value(), b: f.find('#b').value()}, d.value(b), void c(f, b)); }}, items: [{name: 'r', label: 'R', autofocus: 1}, {name: 'g', label: 'G'}, {name: 'b', label: 'B'}, {name: 'hex', label: '#', value: '000000'}, {name: 'preview', type: 'container', border: 1}]}]}, onSubmit: function () { d('#' + f.toJSON().hex); }}); c(f, e); }; return {open: d}; }), g('0', ['1', '2'], function (a, b) { return a.add('colorpicker', function (a) { a.settings.color_picker_callback || (a.settings.color_picker_callback = function (c, d) { b.open(a, c, d); }); }), function () {}; }), d('0')(); }()); 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | ### editor-ui 3 | 4 | **vue 集成 tinymce 富文本编辑器** 5 | 6 | 7 | 怎么集成参考: https://segmentfault.com/a/1190000012791569 8 | 9 | 10 | 自定义 tinymce 富文本编辑器, 11 | 12 | 在原来的编辑器中增加上传 word 模板 13 | 14 | 最终展示效果: 15 | 16 | ![image](https://github.com/haoxiaoyong1014/editor-service/raw/master/src/main/java/com/liumapp/demo/docker/editor/image/editor.gif) 17 | 18 | **主要代码:** 19 | 20 | index.vue 21 | 22 | **整体思路:** 23 | 24 | 1,在编辑器原来的基础上增加上传模板按钮 25 | 26 | 2, 前端上传 word 模板 27 | 28 | 3, 服务端接收将 word 转换为html 返回前端 29 | 30 | 4, 前端拿到服务端返回的值,将其放到富文本编辑器中 31 | 32 | 4.1, 在 data 的中定义个 customEditor 变量,值可以为空 33 | 34 | 4.2, 填充值的方式: 拿到服务端上传成功之后的返回参数,将其填充到 41 | 42 | ``` 43 | 44 | 45 | ``` 46 | this.customEditor=res.content; 47 | console.log('haoxy'+this.customEditor) 48 | tinymce.get('tinymceEditer').setContent(this.customEditor); 49 | ``` 50 | 51 | 5, 前端点击submit,服务端将其转换成 pdf文件 52 | 53 | 服务端代码: editor-service 54 | 55 | 56 | #### 放到项目中遇到的问题修复 57 | 58 | * 问题描述1: 59 | 60 | 当上传模板之后点击浏览器刷新编辑框中的内容会变为之前上传的内容 61 | 62 | * 解决方法: 63 | ```html 64 | 65 | if (localStorage.editorContent) { 66 | tinymce.get('tinymceEditer').setContent(localStorage.editorContent); 67 | } 68 | 69 | ``` 70 | 将这段代码注释掉即可,因为编辑器会自动的将内容保存到本地,当你去点击浏览器刷新的时候他会去本地取出并赋值到编辑框中 71 | 72 | * 问题描述2: 73 | 74 | 当你在编辑框中进行编辑的时候tinymce编辑器监听了键盘按下的事件,但是键盘按下的前一个字符没有保存,例如: 75 | 76 | 你在编辑框中输入4个字符 `aaaa` 你再点击submit生成pdf文件,但是 pdf文件中就只有3个字符`aaa` 77 | 78 | * 解决方法: 79 | 80 | 因为编辑器只监听了`keydown`事件,并没有去监听`keyup`事件 81 | 所以加上如下代码即可 82 | 83 | ```html 84 | editor.on('keyup', function (e) { 85 | localStorage.editorContent = tinymce.get('tinymceEditer').getContent(); 86 | vm.editorModel.content = tinymce.get('tinymceEditer').getContent(); 87 | }); 88 | 89 | ``` 90 | 91 | * 问题描述3: 92 | 93 | 当点击submit 生成pdf文件时,生成的 pdf 文件样式改变了 94 | 95 | * 解决方法: 96 | 97 | 这是因为将 word 文档转换成 html 的时候自动的加上了这段样式 98 | 99 | `
` 100 | 101 | 解决方法可以在前端解决也可以在后端去解决,这里我选择了在后端解决 102 | 103 | 后端在返回给前端html 的时候,在返回的内容上加上 104 | 105 | `respInfo.setContent("
"+content+"
")` 106 | 107 | **更详细内容见博客:** https://blog.csdn.net/haoxiaoyong1014/article/details/82683428 108 | 109 | -------------------------------------------------------------------------------- /src/components/tinymce/plugins/anchor/plugin.min.js: -------------------------------------------------------------------------------- 1 | !(function () { var a = {}, b = function (b) { for (var c = a[b], e = c.deps, f = c.defn, g = e.length, h = new Array(g), i = 0; i < g; ++i)h[i] = d(e[i]); var j = f.apply(null, h); if (void 0 === j) throw 'module [' + b + '] returned undefined'; c.instance = j; }, c = function (b, c, d) { if (typeof b !== 'string') throw 'module id must be a string'; if (void 0 === c) throw 'no dependencies for ' + b; if (void 0 === d) throw 'no definition function for ' + b; a[b] = {deps: c, defn: d, instance: void 0}; }, d = function (c) { var d = a[c]; if (void 0 === d) throw 'module [' + c + '] was undefined'; return void 0 === d.instance && b(c), d.instance; }, e = function (a, b) { for (var c = a.length, e = new Array(c), f = 0; f < c; ++f)e[f] = d(a[f]); b.apply(null, e); }, f = {}; f.bolt = {module: {api: {define: c, require: e, demand: d}}}; var g = c, h = function (a, b) { g(a, [], function () { return b; }); }; h('5', tinymce.util.Tools.resolve), g('1', ['5'], function (a) { return a('tinymce.PluginManager'); }), g('7', [], function () { var a = function (a) { return /^[A-Za-z][A-Za-z0-9\-:._]*$/.test(a); }, b = function (a) { var b = a.selection.getNode(), c = b.tagName === 'A' && a.dom.getAttrib(b, 'href') === ''; return c ? b.id || b.name : ''; }, c = function (a, b) { var c = a.selection.getNode(), d = c.tagName === 'A' && a.dom.getAttrib(c, 'href') === ''; d ? (c.removeAttribute('name'), c.id = b) : (a.focus(), a.selection.collapse(!0), a.execCommand('mceInsertContent', !1, a.dom.createHTML('a', {id: b}))); }; return {isValidId: a, getId: b, insert: c}; }), g('6', ['7'], function (a) { var b = function (b, c) { return a.isValidId(c) ? (a.insert(b, c), !1) : (b.windowManager.alert('Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.'), !0); }, c = function (c) { var d = a.getId(c); c.windowManager.open({title: 'Anchor', body: {type: 'textbox', name: 'id', size: 40, label: 'Id', value: d}, onsubmit: function (a) { var d = a.data.id; b(c, d) && a.preventDefault(); }}); }; return {open: c}; }), g('2', ['6'], function (a) { var b = function (b) { b.addCommand('mceAnchor', function () { a.open(b); }); }; return {register: b}; }), g('3', [], function () { var a = function (a) { return !a.attr('href') && (a.attr('id') || a.attr('name')) && !a.firstChild; }, b = function (b) { return function (c) { for (var d = 0; d < c.length; d++)a(c[d]) && c[d].attr('contenteditable', b); }; }, c = function (a) { a.on('PreInit', function () { a.parser.addNodeFilter('a', b('false')), a.serializer.addNodeFilter('a', b(null)); }); }; return {setup: c}; }), g('4', [], function () { var a = function (a) { a.addButton('anchor', {icon: 'anchor', tooltip: 'Anchor', cmd: 'mceAnchor', stateSelector: 'a:not([href])'}), a.addMenuItem('anchor', {icon: 'anchor', text: 'Anchor', context: 'insert', cmd: 'mceAnchor'}); }; return {register: a}; }), g('0', ['1', '2', '3', '4'], function (a, b, c, d) { return a.add('anchor', function (a) { c.setup(a), b.register(a), d.register(a); }), function () {}; }), d('0')(); }()); 2 | -------------------------------------------------------------------------------- /src/components/tinymce/plugins/save/plugin.min.js: -------------------------------------------------------------------------------- 1 | !(function () { var a = {}, b = function (b) { for (var c = a[b], e = c.deps, f = c.defn, g = e.length, h = new Array(g), i = 0; i < g; ++i)h[i] = d(e[i]); var j = f.apply(null, h); if (void 0 === j) throw 'module [' + b + '] returned undefined'; c.instance = j; }, c = function (b, c, d) { if (typeof b !== 'string') throw 'module id must be a string'; if (void 0 === c) throw 'no dependencies for ' + b; if (void 0 === d) throw 'no definition function for ' + b; a[b] = {deps: c, defn: d, instance: void 0}; }, d = function (c) { var d = a[c]; if (void 0 === d) throw 'module [' + c + '] was undefined'; return void 0 === d.instance && b(c), d.instance; }, e = function (a, b) { for (var c = a.length, e = new Array(c), f = 0; f < c; ++f)e[f] = d(a[f]); b.apply(null, e); }, f = {}; f.bolt = {module: {api: {define: c, require: e, demand: d}}}; var g = c, h = function (a, b) { g(a, [], function () { return b; }); }; h('4', tinymce.util.Tools.resolve), g('1', ['4'], function (a) { return a('tinymce.PluginManager'); }), g('7', ['4'], function (a) { return a('tinymce.dom.DOMUtils'); }), g('8', ['4'], function (a) { return a('tinymce.util.Tools'); }), g('6', [], function () { var a = function (a) { return a.getParam('save_enablewhendirty', !0); }, b = function (a) { return !!a.getParam('save_onsavecallback'); }, c = function (a) { return !!a.getParam('save_oncancelcallback'); }; return {enableWhenDirty: a, hasOnSaveCallback: b, hasOnCancelCallback: c}; }), g('5', ['7', '8', '6'], function (a, b, c) { var d = function (a, b) { a.notificationManager.open({text: a.translate(b), type: 'error'}); }, e = function (b) { var e; if (e = a.DOM.getParent(b.id, 'form'), !c.enableWhenDirty(b) || b.isDirty()) return b.save(), c.hasOnSaveCallback(b) ? (b.execCallback('save_onsavecallback', b), void b.nodeChanged()) : void (e ? (b.setDirty(!1), e.onsubmit && !e.onsubmit() || (typeof e.submit === 'function' ? e.submit() : d(b, 'Error: Form submit field collision.')), b.nodeChanged()) : d(b, 'Error: No form element found.')); }, f = function (a) { var d = b.trim(a.startContent); return c.hasOnCancelCallback(a) ? void a.execCallback('save_oncancelcallback', a) : (a.setContent(d), a.undoManager.clear(), void a.nodeChanged()); }; return {save: e, cancel: f}; }), g('2', ['5'], function (a) { var b = function (b) { b.addCommand('mceSave', function () { a.save(b); }), b.addCommand('mceCancel', function () { a.cancel(b); }); }; return {register: b}; }), g('3', ['6'], function (a) { var b = function (b) { return function (c) { var d = c.control; b.on('nodeChange dirty', function () { d.disabled(a.enableWhenDirty(b) && !b.isDirty()); }); }; }, c = function (a) { a.addButton('save', {icon: 'save', text: 'Save', cmd: 'mceSave', disabled: !0, onPostRender: b(a)}), a.addButton('cancel', {text: 'Cancel', icon: !1, cmd: 'mceCancel', disabled: !0, onPostRender: b(a)}), a.addShortcut('Meta+S', '', 'mceSave'); }; return {register: c}; }), g('0', ['1', '2', '3'], function (a, b, c) { return a.add('save', function (a) { c.register(a), b.register(a); }), function () {}; }), d('0')(); }()); 2 | -------------------------------------------------------------------------------- /src/components/tinymce/plugins/noneditable/plugin.min.js: -------------------------------------------------------------------------------- 1 | !(function () { var a = {}, b = function (b) { for (var c = a[b], e = c.deps, f = c.defn, g = e.length, h = new Array(g), i = 0; i < g; ++i)h[i] = d(e[i]); var j = f.apply(null, h); if (void 0 === j) throw 'module [' + b + '] returned undefined'; c.instance = j; }, c = function (b, c, d) { if (typeof b !== 'string') throw 'module id must be a string'; if (void 0 === c) throw 'no dependencies for ' + b; if (void 0 === d) throw 'no definition function for ' + b; a[b] = {deps: c, defn: d, instance: void 0}; }, d = function (c) { var d = a[c]; if (void 0 === d) throw 'module [' + c + '] was undefined'; return void 0 === d.instance && b(c), d.instance; }, e = function (a, b) { for (var c = a.length, e = new Array(c), f = 0; f < c; ++f)e[f] = d(a[f]); b.apply(null, e); }, f = {}; f.bolt = {module: {api: {define: c, require: e, demand: d}}}; var g = c, h = function (a, b) { g(a, [], function () { return b; }); }; h('3', tinymce.util.Tools.resolve), g('1', ['3'], function (a) { return a('tinymce.PluginManager'); }), g('4', ['3'], function (a) { return a('tinymce.util.Tools'); }), g('5', [], function () { var a = function (a) { return a.getParam('noneditable_noneditable_class', 'mceNonEditable'); }, b = function (a) { return a.getParam('noneditable_editable_class', 'mceEditable'); }, c = function (a) { var b = a.getParam('noneditable_regexp', []); return b && b.constructor === RegExp ? [b] : b; }; return {getNonEditableClass: a, getEditableClass: b, getNonEditableRegExps: c}; }), g('2', ['4', '5'], function (a, b) { var c = function (a) { return function (b) { return (' ' + b.attr('class') + ' ').indexOf(a) !== -1; }; }, d = function (a, b, c) { return function (d) { var e = arguments, f = e[e.length - 2], g = f > 0 ? b.charAt(f - 1) : ''; if (g === '"') return d; if (g === '>') { var h = b.lastIndexOf('<', f); if (h !== -1) { var i = b.substring(h, f); if (i.indexOf('contenteditable="false"') !== -1) return d; } } return '' + a.dom.encode(typeof e[1] === 'string' ? e[1] : e[0]) + ''; }; }, e = function (a, c, e) { var f = c.length, g = e.content; if (e.format !== 'raw') { for (;f--;)g = g.replace(c[f], d(a, g, b.getNonEditableClass(a))); e.content = g; } }, f = function (d) { var f, g, h = 'contenteditable'; f = ' ' + a.trim(b.getEditableClass(d)) + ' ', g = ' ' + a.trim(b.getNonEditableClass(d)) + ' '; var i = c(f), j = c(g), k = b.getNonEditableRegExps(d); d.on('PreInit', function () { k.length > 0 && d.on('BeforeSetContent', function (a) { e(d, k, a); }), d.parser.addAttributeFilter('class', function (a) { for (var b, c = a.length; c--;)b = a[c], i(b) ? b.attr(h, 'true') : j(b) && b.attr(h, 'false'); }), d.serializer.addAttributeFilter(h, function (a) { for (var b, c = a.length; c--;)b = a[c], (i(b) || j(b)) && (k.length > 0 && b.attr('data-mce-content') ? (b.name = '#text', b.type = 3, b.raw = !0, b.value = b.attr('data-mce-content')) : b.attr(h, null)); }); }); }; return {setup: f}; }), g('0', ['1', '2'], function (a, b) { return a.add('noneditable', function (a) { b.setup(a); }), function () {}; }), d('0')(); }()); 2 | -------------------------------------------------------------------------------- /src/components/tinymce/plugins/codesample/css/prism.css: -------------------------------------------------------------------------------- 1 | /* http://prismjs.com/download.html?themes=prism&languages=markup+css+clike+javascript */ 2 | /** 3 | * prism.js default theme for JavaScript, CSS and HTML 4 | * Based on dabblet (http://dabblet.com) 5 | * @author Lea Verou 6 | */ 7 | 8 | code[class*="language-"], 9 | pre[class*="language-"] { 10 | color: black; 11 | text-shadow: 0 1px white; 12 | font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; 13 | direction: ltr; 14 | text-align: left; 15 | white-space: pre; 16 | word-spacing: normal; 17 | word-break: normal; 18 | word-wrap: normal; 19 | line-height: 1.5; 20 | 21 | -moz-tab-size: 4; 22 | -o-tab-size: 4; 23 | tab-size: 4; 24 | 25 | -webkit-hyphens: none; 26 | -moz-hyphens: none; 27 | -ms-hyphens: none; 28 | hyphens: none; 29 | } 30 | 31 | pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection, 32 | code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection { 33 | text-shadow: none; 34 | background: #b3d4fc; 35 | } 36 | 37 | pre[class*="language-"]::selection, pre[class*="language-"] ::selection, 38 | code[class*="language-"]::selection, code[class*="language-"] ::selection { 39 | text-shadow: none; 40 | background: #b3d4fc; 41 | } 42 | 43 | @media print { 44 | code[class*="language-"], 45 | pre[class*="language-"] { 46 | text-shadow: none; 47 | } 48 | } 49 | 50 | /* Code blocks */ 51 | pre[class*="language-"] { 52 | padding: 1em; 53 | margin: .5em 0; 54 | overflow: auto; 55 | } 56 | 57 | :not(pre) > code[class*="language-"], 58 | pre[class*="language-"] { 59 | background: #f5f2f0; 60 | } 61 | 62 | /* Inline code */ 63 | :not(pre) > code[class*="language-"] { 64 | padding: .1em; 65 | border-radius: .3em; 66 | } 67 | 68 | .token.comment, 69 | .token.prolog, 70 | .token.doctype, 71 | .token.cdata { 72 | color: slategray; 73 | } 74 | 75 | .token.punctuation { 76 | color: #999; 77 | } 78 | 79 | .namespace { 80 | opacity: .7; 81 | } 82 | 83 | .token.property, 84 | .token.tag, 85 | .token.boolean, 86 | .token.number, 87 | .token.constant, 88 | .token.symbol, 89 | .token.deleted { 90 | color: #905; 91 | } 92 | 93 | .token.selector, 94 | .token.attr-name, 95 | .token.string, 96 | .token.char, 97 | .token.builtin, 98 | .token.inserted { 99 | color: #690; 100 | } 101 | 102 | .token.operator, 103 | .token.entity, 104 | .token.url, 105 | .language-css .token.string, 106 | .style .token.string { 107 | color: #a67f59; 108 | background: hsla(0, 0%, 100%, .5); 109 | } 110 | 111 | .token.atrule, 112 | .token.attr-value, 113 | .token.keyword { 114 | color: #07a; 115 | } 116 | 117 | .token.function { 118 | color: #DD4A68; 119 | } 120 | 121 | .token.regex, 122 | .token.important, 123 | .token.variable { 124 | color: #e90; 125 | } 126 | 127 | .token.important, 128 | .token.bold { 129 | font-weight: bold; 130 | } 131 | .token.italic { 132 | font-style: italic; 133 | } 134 | 135 | .token.entity { 136 | cursor: help; 137 | } 138 | 139 | -------------------------------------------------------------------------------- /src/components/tinymce/plugins/pagebreak/plugin.min.js: -------------------------------------------------------------------------------- 1 | !(function () { var a = {}, b = function (b) { for (var c = a[b], e = c.deps, f = c.defn, g = e.length, h = new Array(g), i = 0; i < g; ++i)h[i] = d(e[i]); var j = f.apply(null, h); if (void 0 === j) throw 'module [' + b + '] returned undefined'; c.instance = j; }, c = function (b, c, d) { if (typeof b !== 'string') throw 'module id must be a string'; if (void 0 === c) throw 'no dependencies for ' + b; if (void 0 === d) throw 'no definition function for ' + b; a[b] = {deps: c, defn: d, instance: void 0}; }, d = function (c) { var d = a[c]; if (void 0 === d) throw 'module [' + c + '] was undefined'; return void 0 === d.instance && b(c), d.instance; }, e = function (a, b) { for (var c = a.length, e = new Array(c), f = 0; f < c; ++f)e[f] = d(a[f]); b.apply(null, e); }, f = {}; f.bolt = {module: {api: {define: c, require: e, demand: d}}}; var g = c, h = function (a, b) { g(a, [], function () { return b; }); }; h('7', tinymce.util.Tools.resolve), g('1', ['7'], function (a) { return a('tinymce.Env'); }), g('2', ['7'], function (a) { return a('tinymce.PluginManager'); }), g('8', [], function () { var a = function (a) { return a.getParam('pagebreak_separator', ''); }, b = function (a) { return a.getParam('pagebreak_split_block', !1); }; return {getSeparatorHtml: a, shouldSplitBlock: b}; }), g('4', ['1', '8'], function (a, b) { var c = function () { return 'mce-pagebreak'; }, d = function () { return ''; }, e = function (a) { var c = b.getSeparatorHtml(a), e = new RegExp(c.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g, function (a) { return '\\' + a; }), 'gi'); a.on('BeforeSetContent', function (a) { a.content = a.content.replace(e, d()); }), a.on('PreInit', function () { a.serializer.addNodeFilter('img', function (d) { for (var e, f, g = d.length; g--;) if (e = d[g], f = e.attr('class'), f && f.indexOf('mce-pagebreak') !== -1) { var h = e.parent; if (a.schema.getBlockElements()[h.name] && b.shouldSplitBlock(a)) { h.type = 3, h.value = c, h.raw = !0, e.remove(); continue; }e.type = 3, e.value = c, e.raw = !0; } }); }); }; return {setup: e, getPlaceholderHtml: d, getPageBreakClass: c}; }), g('3', ['4'], function (a) { var b = function (b) { b.addCommand('mcePageBreak', function () { b.settings.pagebreak_split_block ? b.insertContent('

' + a.getPlaceholderHtml() + '

') : b.insertContent(a.getPlaceholderHtml()); }); }; return {register: b}; }), g('5', ['4'], function (a) { var b = function (b) { b.on('ResolveName', function (c) { c.target.nodeName === 'IMG' && b.dom.hasClass(c.target, a.getPageBreakClass()) && (c.name = 'pagebreak'); }); }; return {setup: b}; }), g('6', [], function () { var a = function (a) { a.addButton('pagebreak', {title: 'Page break', cmd: 'mcePageBreak'}), a.addMenuItem('pagebreak', {text: 'Page break', icon: 'pagebreak', cmd: 'mcePageBreak', context: 'insert'}); }; return {register: a}; }), g('0', ['1', '2', '3', '4', '5', '6'], function (a, b, c, d, e, f) { return b.add('pagebreak', function (a) { c.register(a), f.register(a), d.setup(a), e.setup(a); }), function () {}; }), d('0')(); }()); 2 | -------------------------------------------------------------------------------- /src/components/tinymce/plugins/tabfocus/plugin.min.js: -------------------------------------------------------------------------------- 1 | !(function () { var a = {}, b = function (b) { for (var c = a[b], e = c.deps, f = c.defn, g = e.length, h = new Array(g), i = 0; i < g; ++i)h[i] = d(e[i]); var j = f.apply(null, h); if (void 0 === j) throw 'module [' + b + '] returned undefined'; c.instance = j; }, c = function (b, c, d) { if (typeof b !== 'string') throw 'module id must be a string'; if (void 0 === c) throw 'no dependencies for ' + b; if (void 0 === d) throw 'no definition function for ' + b; a[b] = {deps: c, defn: d, instance: void 0}; }, d = function (c) { var d = a[c]; if (void 0 === d) throw 'module [' + c + '] was undefined'; return void 0 === d.instance && b(c), d.instance; }, e = function (a, b) { for (var c = a.length, e = new Array(c), f = 0; f < c; ++f)e[f] = d(a[f]); b.apply(null, e); }, f = {}; f.bolt = {module: {api: {define: c, require: e, demand: d}}}; var g = c, h = function (a, b) { g(a, [], function () { return b; }); }; h('3', tinymce.util.Tools.resolve), g('1', ['3'], function (a) { return a('tinymce.PluginManager'); }), h('4', window), g('5', ['3'], function (a) { return a('tinymce.dom.DOMUtils'); }), g('6', ['3'], function (a) { return a('tinymce.EditorManager'); }), g('7', ['3'], function (a) { return a('tinymce.Env'); }), g('8', ['3'], function (a) { return a('tinymce.util.Delay'); }), g('9', ['3'], function (a) { return a('tinymce.util.Tools'); }), g('a', ['3'], function (a) { return a('tinymce.util.VK'); }), g('b', [], function () { var a = function (a) { return a.getParam('tabfocus_elements', ':prev,:next'); }, b = function (b) { return b.getParam('tab_focus', a(b)); }; return {getTabFocus: b}; }), g('2', ['4', '5', '6', '7', '8', '9', 'a', 'b'], function (a, b, c, d, e, f, g, h) { var i = b.DOM, j = function (a) { a.keyCode !== g.TAB || a.ctrlKey || a.altKey || a.metaKey || a.preventDefault(); }, k = function (b) { function k (j) { function k (a) { function d (a) { return a.nodeName === 'BODY' || a.type !== 'hidden' && a.style.display !== 'none' && a.style.visibility !== 'hidden' && d(a.parentNode); } function e (a) { return /INPUT|TEXTAREA|BUTTON/.test(a.tagName) && c.get(j.id) && a.tabIndex !== -1 && d(a); } if (m = i.select(':input:enabled,*[tabindex]:not(iframe)'), f.each(m, function (a, c) { if (a.id === b.id) return l = c, !1; }), a > 0) { for (o = l + 1; o < m.length; o++) if (e(m[o])) return m[o]; } else for (o = l - 1; o >= 0; o--) if (e(m[o])) return m[o]; return null; } var l, m, n, o; if (!(j.keyCode !== g.TAB || j.ctrlKey || j.altKey || j.metaKey || j.isDefaultPrevented()) && (n = f.explode(h.getTabFocus(b)), n.length === 1 && (n[1] = n[0], n[0] = ':prev'), m = j.shiftKey ? n[0] === ':prev' ? k(-1) : i.get(n[0]) : n[1] === ':next' ? k(1) : i.get(n[1]))) { var p = c.get(m.id || m.name); m.id && p ? p.focus() : e.setTimeout(function () { d.webkit || a.focus(), m.focus(); }, 10), j.preventDefault(); } }b.on('init', function () { b.inline && i.setAttrib(b.getBody(), 'tabIndex', null), b.on('keyup', j), d.gecko ? b.on('keypress keydown', k) : b.on('keydown', k); }); }; return {setup: k}; }), g('0', ['1', '2'], function (a, b) { return a.add('tabfocus', function (a) { b.setup(a); }), function () {}; }), d('0')(); }()); 2 | -------------------------------------------------------------------------------- /src/components/tinymce/skins/lightgray/content.inline.min.css: -------------------------------------------------------------------------------- 1 | .word-wrap{word-wrap:break-word;-ms-word-break:break-all;word-break:break-all;word-break:break-word;-ms-hyphens:auto;-moz-hyphens:auto;-webkit-hyphens:auto;hyphens:auto}.mce-content-body .mce-reset{margin:0;padding:0;border:0;outline:0;vertical-align:top;background:transparent;text-decoration:none;color:black;font-family:Arial;font-size:11px;text-shadow:none;float:none;position:static;width:auto;height:auto;white-space:nowrap;cursor:inherit;line-height:normal;font-weight:normal;text-align:left;-webkit-tap-highlight-color:transparent;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;direction:ltr;max-width:none}.mce-object{border:1px dotted #3A3A3A;background:#D5D5D5 url(img/object.gif) no-repeat center}.mce-preview-object{display:inline-block;position:relative;margin:0 2px 0 2px;line-height:0;border:1px solid gray}.mce-preview-object[data-mce-selected="2"] .mce-shim{display:none}.mce-preview-object .mce-shim{position:absolute;top:0;left:0;width:100%;height:100%;background:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)}figure.align-left{float:left}figure.align-right{float:right}figure.image.align-center{display:table;margin-left:auto;margin-right:auto}figure.image{display:inline-block;border:1px solid gray;margin:0 2px 0 1px;background:#f5f2f0}figure.image img{margin:8px 8px 0 8px}figure.image figcaption{margin:6px 8px 6px 8px;text-align:center}.mce-toc{border:1px solid gray}.mce-toc h2{margin:4px}.mce-toc li{list-style-type:none}.mce-pagebreak{cursor:default;display:block;border:0;width:100%;height:5px;border:1px dashed #666;margin-top:15px;page-break-before:always}@media print{.mce-pagebreak{border:0}}.mce-item-anchor{cursor:default;display:inline-block;-webkit-user-select:all;-webkit-user-modify:read-only;-moz-user-select:all;-moz-user-modify:read-only;user-select:all;user-modify:read-only;width:9px !important;height:9px !important;border:1px dotted #3A3A3A;background:#D5D5D5 url(img/anchor.gif) no-repeat center}.mce-nbsp,.mce-shy{background:#AAA}.mce-shy::after{content:'-'}.mce-match-marker{background:#AAA;color:#fff}.mce-match-marker-selected{background:#3399ff;color:#fff}.mce-spellchecker-word{border-bottom:2px solid rgba(208,2,27,0.5);cursor:default}.mce-spellchecker-grammar{border-bottom:2px solid #008000;cursor:default}.mce-item-table,.mce-item-table td,.mce-item-table th,.mce-item-table caption{border:1px dashed #BBB}td[data-mce-selected],th[data-mce-selected]{background-color:#2276d2 !important}.mce-edit-focus{outline:1px dotted #333}.mce-resize-bar-dragging{background-color:#2276d2;opacity:.25;filter:alpha(opacity=25);zoom:1}.mce-content-body *[contentEditable=false] *[contentEditable=true]:focus{outline:2px solid #2276d2}.mce-content-body *[contentEditable=false] *[contentEditable=true]:hover{outline:2px solid #2276d2}.mce-content-body *[contentEditable=false][data-mce-selected]{outline:2px solid #2276d2}.mce-content-body a[data-mce-selected],.mce-content-body code[data-mce-selected],.mce-content-body b[data-mce-selected],.mce-content-body i[data-mce-selected],.mce-content-body em[data-mce-selected],.mce-content-body strong[data-mce-selected],.mce-content-body sup[data-mce-selected],.mce-content-body sub[data-mce-selected]{background:#bfe6ff}.mce-content-body .mce-item-anchor[data-mce-selected]{background:#D5D5D5 url(img/anchor.gif) no-repeat center}.mce-content-body hr{cursor:default}.mce-content-body{line-height:1.3} -------------------------------------------------------------------------------- /src/components/tinymce/plugins/preview/plugin.min.js: -------------------------------------------------------------------------------- 1 | !(function () { var a = {}, b = function (b) { for (var c = a[b], e = c.deps, f = c.defn, g = e.length, h = new Array(g), i = 0; i < g; ++i)h[i] = d(e[i]); var j = f.apply(null, h); if (void 0 === j) throw 'module [' + b + '] returned undefined'; c.instance = j; }, c = function (b, c, d) { if (typeof b !== 'string') throw 'module id must be a string'; if (void 0 === c) throw 'no dependencies for ' + b; if (void 0 === d) throw 'no definition function for ' + b; a[b] = {deps: c, defn: d, instance: void 0}; }, d = function (c) { var d = a[c]; if (void 0 === d) throw 'module [' + c + '] was undefined'; return void 0 === d.instance && b(c), d.instance; }, e = function (a, b) { for (var c = a.length, e = new Array(c), f = 0; f < c; ++f)e[f] = d(a[f]); b.apply(null, e); }, f = {}; f.bolt = {module: {api: {define: c, require: e, demand: d}}}; var g = c, h = function (a, b) { g(a, [], function () { return b; }); }; h('4', tinymce.util.Tools.resolve), g('1', ['4'], function (a) { return a('tinymce.PluginManager'); }), g('6', ['4'], function (a) { return a('tinymce.Env'); }), g('7', ['4'], function (a) { return a('tinymce.util.Tools'); }), g('8', [], function () { var a = function (a) { return parseInt(a.getParam('plugin_preview_width', '650'), 10); }, b = function (a) { return parseInt(a.getParam('plugin_preview_height', '500'), 10); }; return {getPreviewDialogWidth: a, getPreviewDialogHeight: b}; }), g('9', ['7'], function (a) { var b = function (b, c, d) { var e, f = '', g = b.dom.encode; f += '', a.each(b.contentCSS, function (a) { f += ''; }); var h = b.settings.body_id || 'tinymce'; h.indexOf('=') !== -1 && (h = b.getParam('body_id', '', 'hash'), h = h[b.id] || h); var i = b.settings.body_class || ''; i.indexOf('=') !== -1 && (i = b.getParam('body_class', '', 'hash'), i = i[b.id] || ''); var j = ' ', k = b.settings.directionality ? ' dir="' + b.settings.directionality + '"' : ''; if (e = '' + f + '' + b.getContent() + j + '', d)c.src = 'data:text/html;charset=utf-8,' + encodeURIComponent(e); else { var l = c.contentWindow.document; l.open(), l.write(e), l.close(); } }; return {injectIframeContent: b}; }), g('5', ['6', '7', '8', '9'], function (a, b, c, d) { var e = function (b) { var e = !a.ie, f = '', g = c.getPreviewDialogWidth(b), h = c.getPreviewDialogHeight(b); b.windowManager.open({title: 'Preview', width: g, height: h, html: f, buttons: {text: 'Close', onclick: function (a) { a.control.parent().parent().close(); }}, onPostRender: function (a) { var c = a.control.getEl('body').firstChild; d.injectIframeContent(b, c, e); }}); }; return {open: e}; }), g('2', ['5'], function (a) { var b = function (b) { b.addCommand('mcePreview', function () { a.open(b); }); }; return {register: b}; }), g('3', [], function () { var a = function (a) { a.addButton('preview', {title: 'Preview', cmd: 'mcePreview'}), a.addMenuItem('preview', {text: 'Preview', cmd: 'mcePreview', context: 'view'}); }; return {register: a}; }), g('0', ['1', '2', '3'], function (a, b, c) { return a.add('preview', function (a) { b.register(a), c.register(a); }), function () {}; }), d('0')(); }()); 2 | -------------------------------------------------------------------------------- /src/components/tinymce/plugins/visualblocks/plugin.min.js: -------------------------------------------------------------------------------- 1 | !(function () { var a = {}, b = function (b) { for (var c = a[b], e = c.deps, f = c.defn, g = e.length, h = new Array(g), i = 0; i < g; ++i)h[i] = d(e[i]); var j = f.apply(null, h); if (void 0 === j) throw 'module [' + b + '] returned undefined'; c.instance = j; }, c = function (b, c, d) { if (typeof b !== 'string') throw 'module id must be a string'; if (void 0 === c) throw 'no dependencies for ' + b; if (void 0 === d) throw 'no definition function for ' + b; a[b] = {deps: c, defn: d, instance: void 0}; }, d = function (c) { var d = a[c]; if (void 0 === d) throw 'module [' + c + '] was undefined'; return void 0 === d.instance && b(c), d.instance; }, e = function (a, b) { for (var c = a.length, e = new Array(c), f = 0; f < c; ++f)e[f] = d(a[f]); b.apply(null, e); }, f = {}; f.bolt = {module: {api: {define: c, require: e, demand: d}}}; var g = c, h = function (a, b) { g(a, [], function () { return b; }); }; g('1', [], function () { var a = function (b) { var c = b, d = function () { return c; }, e = function (a) { c = a; }, f = function () { return a(d()); }; return {get: d, set: e, clone: f}; }; return a; }), h('6', tinymce.util.Tools.resolve), g('2', ['6'], function (a) { return a('tinymce.PluginManager'); }), g('9', [], function () { var a = function (a, b) { a.fire('VisualBlocks', {state: b}); }; return {fireVisualBlocks: a}; }), g('8', [], function () { var a = function (a) { return a.getParam('visualblocks_default_state', !1); }, b = function (a) { return a.settings.visualblocks_content_css; }; return {isEnabledByDefault: a, getContentCss: b}; }), g('b', ['6'], function (a) { return a('tinymce.dom.DOMUtils'); }), g('c', ['6'], function (a) { return a('tinymce.util.Tools'); }), g('a', ['b', 'c'], function (a, b) { var c = a.DOM.uniqueId(), d = function (d, e) { var f = b.toArray(d.getElementsByTagName('link')), g = b.grep(f, function (a) { return a.id === c; }); if (g.length === 0) { var h = a.DOM.create('link', {id: c, rel: 'stylesheet', href: e}); d.getElementsByTagName('head')[0].appendChild(h); } }; return {load: d}; }), g('7', ['9', '8', 'a'], function (a, b, c) { var d = function (d, e, f) { var g = d.dom, h = b.getContentCss(d); c.load(d.getDoc(), h || e + '/css/visualblocks.css'), g.toggleClass(d.getBody(), 'mce-visualblocks'), f.set(!f.get()), a.fireVisualBlocks(d, f.get()); }; return {toggleVisualBlocks: d}; }), g('3', ['7'], function (a) { var b = function (b, c, d) { b.addCommand('mceVisualBlocks', function () { a.toggleVisualBlocks(b, c, d); }); }; return {register: b}; }), g('4', ['8', '7'], function (a, b) { var c = function (c, d, e) { c.on('PreviewFormats AfterPreviewFormats', function (a) { e.get() && c.dom.toggleClass(c.getBody(), 'mce-visualblocks', a.type === 'afterpreviewformats'); }), c.on('init', function () { a.isEnabledByDefault(c) && b.toggleVisualBlocks(c, d, e); }), c.on('remove', function () { c.dom.removeClass(c.getBody(), 'mce-visualblocks'); }); }; return {setup: c}; }), g('5', ['7'], function (a) { var b = function (a, b) { return function (c) { var d = c.control; d.active(b.get()), a.on('VisualBlocks', function (a) { d.active(a.state); }); }; }, c = function (a, c) { a.addButton('visualblocks', {title: 'Show blocks', cmd: 'mceVisualBlocks', onPostRender: b(a, c)}), a.addMenuItem('visualblocks', {text: 'Show blocks', cmd: 'mceVisualBlocks', onPostRender: b(a, c), selectable: !0, context: 'view', prependToContext: !0}); }; return {register: c}; }), g('0', ['1', '2', '3', '4', '5'], function (a, b, c, d, e) { return b.add('visualblocks', function (b, f) { var g = a(!1); c.register(b, f, g), e.register(b, g), d.setup(b, f, g); }), function () {}; }), d('0')(); }()); 2 | -------------------------------------------------------------------------------- /src/components/tinymce/skins/lightgray/content.min.css: -------------------------------------------------------------------------------- 1 | body{background-color:#FFFFFF;color:#000000;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:14px;line-height:1.3;scrollbar-3dlight-color:#F0F0EE;scrollbar-arrow-color:#676662;scrollbar-base-color:#F0F0EE;scrollbar-darkshadow-color:#DDDDDD;scrollbar-face-color:#E0E0DD;scrollbar-highlight-color:#F0F0EE;scrollbar-shadow-color:#F0F0EE;scrollbar-track-color:#F5F5F5}td,th{font-family:Verdana,Arial,Helvetica,sans-serif;font-size:14px}.word-wrap{word-wrap:break-word;-ms-word-break:break-all;word-break:break-all;word-break:break-word;-ms-hyphens:auto;-moz-hyphens:auto;-webkit-hyphens:auto;hyphens:auto}.mce-content-body .mce-reset{margin:0;padding:0;border:0;outline:0;vertical-align:top;background:transparent;text-decoration:none;color:black;font-family:Arial;font-size:11px;text-shadow:none;float:none;position:static;width:auto;height:auto;white-space:nowrap;cursor:inherit;line-height:normal;font-weight:normal;text-align:left;-webkit-tap-highlight-color:transparent;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;direction:ltr;max-width:none}.mce-object{border:1px dotted #3A3A3A;background:#D5D5D5 url(img/object.gif) no-repeat center}.mce-preview-object{display:inline-block;position:relative;margin:0 2px 0 2px;line-height:0;border:1px solid gray}.mce-preview-object[data-mce-selected="2"] .mce-shim{display:none}.mce-preview-object .mce-shim{position:absolute;top:0;left:0;width:100%;height:100%;background:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)}figure.align-left{float:left}figure.align-right{float:right}figure.image.align-center{display:table;margin-left:auto;margin-right:auto}figure.image{display:inline-block;border:1px solid gray;margin:0 2px 0 1px;background:#f5f2f0}figure.image img{margin:8px 8px 0 8px}figure.image figcaption{margin:6px 8px 6px 8px;text-align:center}.mce-toc{border:1px solid gray}.mce-toc h2{margin:4px}.mce-toc li{list-style-type:none}.mce-pagebreak{cursor:default;display:block;border:0;width:100%;height:5px;border:1px dashed #666;margin-top:15px;page-break-before:always}@media print{.mce-pagebreak{border:0}}.mce-item-anchor{cursor:default;display:inline-block;-webkit-user-select:all;-webkit-user-modify:read-only;-moz-user-select:all;-moz-user-modify:read-only;user-select:all;user-modify:read-only;width:9px !important;height:9px !important;border:1px dotted #3A3A3A;background:#D5D5D5 url(img/anchor.gif) no-repeat center}.mce-nbsp,.mce-shy{background:#AAA}.mce-shy::after{content:'-'}.mce-match-marker{background:#AAA;color:#fff}.mce-match-marker-selected{background:#3399ff;color:#fff}.mce-spellchecker-word{border-bottom:2px solid rgba(208,2,27,0.5);cursor:default}.mce-spellchecker-grammar{border-bottom:2px solid #008000;cursor:default}.mce-item-table,.mce-item-table td,.mce-item-table th,.mce-item-table caption{border:1px dashed #BBB}td[data-mce-selected],th[data-mce-selected]{background-color:#2276d2 !important}.mce-edit-focus{outline:1px dotted #333}.mce-resize-bar-dragging{background-color:#2276d2;opacity:.25;filter:alpha(opacity=25);zoom:1}.mce-content-body *[contentEditable=false] *[contentEditable=true]:focus{outline:2px solid #2276d2}.mce-content-body *[contentEditable=false] *[contentEditable=true]:hover{outline:2px solid #2276d2}.mce-content-body *[contentEditable=false][data-mce-selected]{outline:2px solid #2276d2}.mce-content-body a[data-mce-selected],.mce-content-body code[data-mce-selected],.mce-content-body b[data-mce-selected],.mce-content-body i[data-mce-selected],.mce-content-body em[data-mce-selected],.mce-content-body strong[data-mce-selected],.mce-content-body sup[data-mce-selected],.mce-content-body sub[data-mce-selected]{background:#bfe6ff}.mce-content-body .mce-item-anchor[data-mce-selected]{background:#D5D5D5 url(img/anchor.gif) no-repeat center}.mce-content-body hr{cursor:default} -------------------------------------------------------------------------------- /src/components/tinymce/plugins/autolink/plugin.min.js: -------------------------------------------------------------------------------- 1 | !(function () { var a = {}, b = function (b) { for (var c = a[b], e = c.deps, f = c.defn, g = e.length, h = new Array(g), i = 0; i < g; ++i)h[i] = d(e[i]); var j = f.apply(null, h); if (void 0 === j) throw 'module [' + b + '] returned undefined'; c.instance = j; }, c = function (b, c, d) { if (typeof b !== 'string') throw 'module id must be a string'; if (void 0 === c) throw 'no dependencies for ' + b; if (void 0 === d) throw 'no definition function for ' + b; a[b] = {deps: c, defn: d, instance: void 0}; }, d = function (c) { var d = a[c]; if (void 0 === d) throw 'module [' + c + '] was undefined'; return void 0 === d.instance && b(c), d.instance; }, e = function (a, b) { for (var c = a.length, e = new Array(c), f = 0; f < c; ++f)e[f] = d(a[f]); b.apply(null, e); }, f = {}; f.bolt = {module: {api: {define: c, require: e, demand: d}}}; var g = c, h = function (a, b) { g(a, [], function () { return b; }); }; h('4', tinymce.util.Tools.resolve), g('1', ['4'], function (a) { return a('tinymce.Env'); }), g('2', ['4'], function (a) { return a('tinymce.PluginManager'); }), g('5', [], function () { var a = function (a) { return a.getParam('autolink_pattern', /^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+\-]+@)(.+)$/i); }, b = function (a) { return a.getParam('default_link_target', ''); }; return {getAutoLinkPattern: a, getDefaultLinkTarget: b}; }), g('3', ['1', '2', '5'], function (a, b, c) { var d = function (a, b) { return a === b || a === ' ' || a.charCodeAt(0) === 160; }, e = function (a) { k(a, -1, '(', !0); }, f = function (a) { k(a, 0, '', !0); }, g = function (a) { k(a, -1, '', !1); }, h = function (a, b) { if (b < 0 && (b = 0), a.nodeType === 3) { var c = a.data.length; b > c && (b = c); } return b; }, i = function (a, b, c) { b.nodeType !== 1 || b.hasChildNodes() ? a.setStart(b, h(b, c)) : a.setStartBefore(b); }, j = function (a, b, c) { b.nodeType !== 1 || b.hasChildNodes() ? a.setEnd(b, h(b, c)) : a.setEndAfter(b); }, k = function (a, b, e) { var f, g, h, k, l, m, n, o, p, q, r = c.getAutoLinkPattern(a), s = c.getDefaultLinkTarget(a); if (a.selection.getNode().tagName !== 'A') { if (f = a.selection.getRng(!0).cloneRange(), f.startOffset < 5) { if (o = f.endContainer.previousSibling, !o) { if (!f.endContainer.firstChild || !f.endContainer.firstChild.nextSibling) return; o = f.endContainer.firstChild.nextSibling; } if (p = o.length, i(f, o, p), j(f, o, p), f.endOffset < 5) return; g = f.endOffset, k = o; } else { if (k = f.endContainer, k.nodeType !== 3 && k.firstChild) { for (;k.nodeType !== 3 && k.firstChild;)k = k.firstChild; k.nodeType === 3 && (i(f, k, 0), j(f, k, k.nodeValue.length)); }g = f.endOffset === 1 ? 2 : f.endOffset - 1 - b; }h = g; do i(f, k, g >= 2 ? g - 2 : 0), j(f, k, g >= 1 ? g - 1 : 0), g -= 1, q = f.toString(); while (q !== ' ' && q !== '' && q.charCodeAt(0) !== 160 && g - 2 >= 0 && q !== e);d(f.toString(), e) ? (i(f, k, g), j(f, k, h), g += 1) : f.startOffset === 0 ? (i(f, k, 0), j(f, k, h)) : (i(f, k, g), j(f, k, h)), m = f.toString(), m.charAt(m.length - 1) === '.' && j(f, k, h - 1), m = f.toString().trim(), n = m.match(r), n && (n[1] === 'www.' ? n[1] = 'http://www.' : /@$/.test(n[1]) && !/^mailto:/.test(n[1]) && (n[1] = 'mailto:' + n[1]), l = a.selection.getBookmark(), a.selection.setRng(f), a.execCommand('createlink', !1, n[1] + n[2]), s && a.dom.setAttrib(a.selection.getNode(), 'target', s), a.selection.moveToBookmark(l), a.nodeChanged()); } }, l = function (b) { var c; return b.on('keydown', function (a) { if (a.keyCode === 13) return g(b); }), a.ie ? void b.on('focus', function () { if (!c) { c = !0; try { b.execCommand('AutoUrlDetect', !1, !0); } catch (a) {} } }) : (b.on('keypress', function (a) { if (a.keyCode === 41) return e(b); }), void b.on('keyup', function (a) { if (a.keyCode === 32) return f(b); })); }; return {setup: l}; }), g('0', ['1', '2', '3'], function (a, b, c) { return b.add('autolink', function (a) { c.setup(a); }), function () {}; }), d('0')(); }()); 2 | -------------------------------------------------------------------------------- /src/components/tinymce/plugins/fullscreen/plugin.min.js: -------------------------------------------------------------------------------- 1 | !(function () { var a = {}, b = function (b) { for (var c = a[b], e = c.deps, f = c.defn, g = e.length, h = new Array(g), i = 0; i < g; ++i)h[i] = d(e[i]); var j = f.apply(null, h); if (void 0 === j) throw 'module [' + b + '] returned undefined'; c.instance = j; }, c = function (b, c, d) { if (typeof b !== 'string') throw 'module id must be a string'; if (void 0 === c) throw 'no dependencies for ' + b; if (void 0 === d) throw 'no definition function for ' + b; a[b] = {deps: c, defn: d, instance: void 0}; }, d = function (c) { var d = a[c]; if (void 0 === d) throw 'module [' + c + '] was undefined'; return void 0 === d.instance && b(c), d.instance; }, e = function (a, b) { for (var c = a.length, e = new Array(c), f = 0; f < c; ++f)e[f] = d(a[f]); b.apply(null, e); }, f = {}; f.bolt = {module: {api: {define: c, require: e, demand: d}}}; var g = c, h = function (a, b) { g(a, [], function () { return b; }); }; g('1', [], function () { var a = function (b) { var c = b, d = function () { return c; }, e = function (a) { c = a; }, f = function () { return a(d()); }; return {get: d, set: e, clone: f}; }; return a; }), h('6', tinymce.util.Tools.resolve), g('2', ['6'], function (a) { return a('tinymce.PluginManager'); }), g('3', [], function () { var a = function (a) { return {isFullscreen: function () { return a.get() !== null; }}; }; return {get: a}; }), h('8', document), h('9', window), g('a', ['6'], function (a) { return a('tinymce.dom.DOMUtils'); }), g('b', [], function () { var a = function (a, b) { a.fire('FullscreenStateChanged', {state: b}); }; return {fireFullscreenStateChanged: a}; }), g('7', ['8', '9', 'a', 'b'], function (a, b, c, d) { var e = c.DOM, f = function () { var c, d, e = b, f = a, g = f.body; return g.offsetWidth && (c = g.offsetWidth, d = g.offsetHeight), e.innerWidth && e.innerHeight && (c = e.innerWidth, d = e.innerHeight), {w: c, h: d}; }, g = function () { var a = e.getViewPort(); return {x: a.x, y: a.y}; }, h = function (a) { b.scrollTo(a.x, a.y); }, i = function (c, i) { var j, k, l, m, n = a.body, o = a.documentElement, p = function () { e.setStyle(l, 'height', f().h - (k.clientHeight - l.clientHeight)); }, q = function () { e.unbind(b, 'resize', p); }; if (k = c.getContainer(), j = k.style, l = c.getContentAreaContainer().firstChild, m = l.style, i) return m.width = i.iframeWidth, m.height = i.iframeHeight, i.containerWidth && (j.width = i.containerWidth), i.containerHeight && (j.height = i.containerHeight), e.removeClass(n, 'mce-fullscreen'), e.removeClass(o, 'mce-fullscreen'), e.removeClass(k, 'mce-fullscreen'), h(i.scrollPos), e.unbind(b, 'resize', i.resizeHandler), c.off('remove', i.removeHandler), d.fireFullscreenStateChanged(c, !1), null; var r = {scrollPos: g(), containerWidth: j.width, containerHeight: j.height, iframeWidth: m.width, iframeHeight: m.height, resizeHandler: p, removeHandler: q}; return m.width = m.height = '100%', j.width = j.height = '', e.addClass(n, 'mce-fullscreen'), e.addClass(o, 'mce-fullscreen'), e.addClass(k, 'mce-fullscreen'), e.bind(b, 'resize', p), c.on('remove', q), p(), d.fireFullscreenStateChanged(c, !0), r; }; return {toggleFullscreen: i}; }), g('4', ['7'], function (a) { var b = function (b, c) { b.addCommand('mceFullScreen', function () { c.set(a.toggleFullscreen(b, c.get())); }); }; return {register: b}; }), g('5', [], function () { var a = function (a) { return function (b) { var c = b.control; a.on('FullscreenStateChanged', function (a) { c.active(a.state); }); }; }, b = function (b) { b.addMenuItem('fullscreen', {text: 'Fullscreen', shortcut: 'Ctrl+Shift+F', selectable: !0, cmd: 'mceFullScreen', onPostRender: a(b), context: 'view'}), b.addButton('fullscreen', {tooltip: 'Fullscreen', shortcut: 'Ctrl+Shift+F', cmd: 'mceFullScreen', onPostRender: a(b)}); }; return {register: b}; }), g('0', ['1', '2', '3', '4', '5'], function (a, b, c, d, e) { return b.add('fullscreen', function (b) { var f = a(null); return d.register(b, f), e.register(b), b.addShortcut('Ctrl+Shift+F', '', 'mceFullScreen'), c.get(f); }), function () {}; }), d('0')(); }()); 2 | -------------------------------------------------------------------------------- /src/components/tinymce/plugins/autoresize/plugin.min.js: -------------------------------------------------------------------------------- 1 | !(function () { var a = {}, b = function (b) { for (var c = a[b], e = c.deps, f = c.defn, g = e.length, h = new Array(g), i = 0; i < g; ++i)h[i] = d(e[i]); var j = f.apply(null, h); if (void 0 === j) throw 'module [' + b + '] returned undefined'; c.instance = j; }, c = function (b, c, d) { if (typeof b !== 'string') throw 'module id must be a string'; if (void 0 === c) throw 'no dependencies for ' + b; if (void 0 === d) throw 'no definition function for ' + b; a[b] = {deps: c, defn: d, instance: void 0}; }, d = function (c) { var d = a[c]; if (void 0 === d) throw 'module [' + c + '] was undefined'; return void 0 === d.instance && b(c), d.instance; }, e = function (a, b) { for (var c = a.length, e = new Array(c), f = 0; f < c; ++f)e[f] = d(a[f]); b.apply(null, e); }, f = {}; f.bolt = {module: {api: {define: c, require: e, demand: d}}}; var g = c, h = function (a, b) { g(a, [], function () { return b; }); }; g('1', [], function () { var a = function (b) { var c = b, d = function () { return c; }, e = function (a) { c = a; }, f = function () { return a(d()); }; return {get: d, set: e, clone: f}; }; return a; }), h('5', tinymce.util.Tools.resolve), g('2', ['5'], function (a) { return a('tinymce.PluginManager'); }), g('6', ['5'], function (a) { return a('tinymce.Env'); }), g('7', ['5'], function (a) { return a('tinymce.util.Delay'); }), g('8', [], function () { var a = function (a) { return parseInt(a.getParam('autoresize_min_height', a.getElement().offsetHeight), 10); }, b = function (a) { return parseInt(a.getParam('autoresize_max_height', 0), 10); }, c = function (a) { return a.getParam('autoresize_overflow_padding', 1); }, d = function (a) { return a.getParam('autoresize_bottom_margin', 50); }, e = function (a) { return a.getParam('autoresize_on_init', !0); }; return {getAutoResizeMinHeight: a, getAutoResizeMaxHeight: b, getAutoResizeOverflowPadding: c, getAutoResizeBottomMargin: d, shouldAutoResizeOnInit: e}; }), g('4', ['6', '7', '8'], function (a, b, c) { var d = function (a) { return a.plugins.fullscreen && a.plugins.fullscreen.isFullscreen(); }, e = function (a, c, d, g, h) { b.setEditorTimeout(a, function () { f(a, c), d-- ? e(a, c, d, g, h) : h && h(); }, g); }, f = function (b, e) { var g, h, i, j, k, l, m, n, o, p, q, r, s = b.dom; if (h = b.getDoc(), h && !d(b)) { i = h.body, j = h.documentElement, k = c.getAutoResizeMinHeight(b), m = s.getStyle(i, 'margin-top', !0), n = s.getStyle(i, 'margin-bottom', !0), o = s.getStyle(i, 'padding-top', !0), p = s.getStyle(i, 'padding-bottom', !0), q = s.getStyle(i, 'border-top-width', !0), r = s.getStyle(i, 'border-bottom-width', !0), l = i.offsetHeight + parseInt(m, 10) + parseInt(n, 10) + parseInt(o, 10) + parseInt(p, 10) + parseInt(q, 10) + parseInt(r, 10), (isNaN(l) || l <= 0) && (l = a.ie ? i.scrollHeight : a.webkit && i.clientHeight === 0 ? 0 : i.offsetHeight), l > c.getAutoResizeMinHeight(b) && (k = l); var t = c.getAutoResizeMaxHeight(b); t && l > t ? (k = t, i.style.overflowY = 'auto', j.style.overflowY = 'auto') : (i.style.overflowY = 'hidden', j.style.overflowY = 'hidden', i.scrollTop = 0), k !== e.get() && (g = k - e.get(), s.setStyle(b.iframeElement, 'height', k + 'px'), e.set(k), a.webKit && g < 0 && f(b)); } }, g = function (a, b) { a.on('init', function () { var b, d, e = a.dom; b = c.getAutoResizeOverflowPadding(a), d = c.getAutoResizeBottomMargin(a), b !== !1 && e.setStyles(a.getBody(), {paddingLeft: b, paddingRight: b}), d !== !1 && e.setStyles(a.getBody(), {paddingBottom: d}); }), a.on('nodechange setcontent keyup FullscreenStateChanged', function () { f(a, b); }), c.shouldAutoResizeOnInit(a) && a.on('init', function () { e(a, b, 20, 100, function () { e(a, b, 5, 1e3); }); }); }; return {setup: g, resize: f}; }), g('3', ['4'], function (a) { var b = function (b, c) { b.addCommand('mceAutoResize', function () { a.resize(b, c); }); }; return {register: b}; }), g('0', ['1', '2', '3', '4'], function (a, b, c, d) { return b.add('autoresize', function (b) { if (!b.inline) { var e = a(0); c.register(b, e), d.setup(b, e); } }), function () {}; }), d('0')(); }()); 2 | -------------------------------------------------------------------------------- /src/components/tinymce/plugins/advlist/plugin.min.js: -------------------------------------------------------------------------------- 1 | !(function () { var a = {}, b = function (b) { for (var c = a[b], e = c.deps, f = c.defn, g = e.length, h = new Array(g), i = 0; i < g; ++i)h[i] = d(e[i]); var j = f.apply(null, h); if (void 0 === j) throw 'module [' + b + '] returned undefined'; c.instance = j; }, c = function (b, c, d) { if (typeof b !== 'string') throw 'module id must be a string'; if (void 0 === c) throw 'no dependencies for ' + b; if (void 0 === d) throw 'no definition function for ' + b; a[b] = {deps: c, defn: d, instance: void 0}; }, d = function (c) { var d = a[c]; if (void 0 === d) throw 'module [' + c + '] was undefined'; return void 0 === d.instance && b(c), d.instance; }, e = function (a, b) { for (var c = a.length, e = new Array(c), f = 0; f < c; ++f)e[f] = d(a[f]); b.apply(null, e); }, f = {}; f.bolt = {module: {api: {define: c, require: e, demand: d}}}; var g = c, h = function (a, b) { g(a, [], function () { return b; }); }; h('5', tinymce.util.Tools.resolve), g('1', ['5'], function (a) { return a('tinymce.PluginManager'); }), g('2', ['5'], function (a) { return a('tinymce.util.Tools'); }), g('6', [], function () { var a = function (a, b, c) { var d = b === 'UL' ? 'InsertUnorderedList' : 'InsertOrderedList'; a.execCommand(d, !1, c === !1 ? null : {'list-style-type': c}); }; return {applyListFormat: a}; }), g('3', ['6'], function (a) { var b = function (b) { b.addCommand('ApplyUnorderedListStyle', function (c, d) { a.applyListFormat(b, 'UL', d['list-style-type']); }), b.addCommand('ApplyOrderedListStyle', function (c, d) { a.applyListFormat(b, 'OL', d['list-style-type']); }); }; return {register: b}; }), g('7', [], function () { var a = function (a) { var b = a.getParam('advlist_number_styles', 'default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman'); return b ? b.split(/[ ,]/) : []; }, b = function (a) { var b = a.getParam('advlist_bullet_styles', 'default,circle,disc,square'); return b ? b.split(/[ ,]/) : []; }; return {getNumberStyles: a, getBulletStyles: b}; }), g('8', [], function () { var a = function (a, b) { return a.$.contains(a.getBody(), b); }, b = function (b) { return function (c) { return c && /^(OL|UL|DL)$/.test(c.nodeName) && a(b, c); }; }, c = function (a) { var b = a.dom.getParent(a.selection.getNode(), 'ol,ul'); return a.dom.getStyle(b, 'listStyleType') || ''; }; return {isListNode: b, getSelectedStyleType: c}; }), g('9', ['2'], function (a) { var b = function (a) { return a.replace(/\-/g, ' ').replace(/\b\w/g, function (a) { return a.toUpperCase(); }); }, c = function (c) { return a.map(c, function (a) { var c = b(a), d = a === 'default' ? '' : a; return {text: c, data: d}; }); }; return {toMenuItems: c}; }), g('4', ['2', '7', '6', '8', '9'], function (a, b, c, d, e) { var f = function (b, c) { return function (e) { var f = e.control; b.on('NodeChange', function (e) { var g = a.grep(e.parents, d.isListNode(b)); f.active(g.length > 0 && g[0].nodeName === c); }); }; }, g = function (a) { return function (b) { var c = d.getSelectedStyleType(a); b.control.items().each(function (a) { a.active(a.settings.data === c); }); }; }, h = function (a, b, d, h, i, j) { a.addButton(b, {type: 'splitbutton', tooltip: d, menu: e.toMenuItems(j), onPostRender: f(a, i), onshow: g(a), onselect: function (b) { c.applyListFormat(a, i, b.control.settings.data); }, onclick: function () { a.execCommand(h); }}); }, i = function (a, b, c, d, e, g) { a.addButton(b, {type: 'button', tooltip: c, onPostRender: f(a, e), onclick: function () { a.execCommand(d); }}); }, j = function (a, b, c, d, e, f) { f.length > 0 ? h(a, b, c, d, e, f) : i(a, b, c, d, e, f); }, k = function (a) { j(a, 'numlist', 'Numbered list', 'InsertOrderedList', 'OL', b.getNumberStyles(a)), j(a, 'bullist', 'Bullet list', 'InsertUnorderedList', 'UL', b.getBulletStyles(a)); }; return {register: k}; }), g('0', ['1', '2', '3', '4'], function (a, b, c, d) { return a.add('advlist', function (a) { var e = function (a, c) { var d = a.settings.plugins ? a.settings.plugins : ''; return b.inArray(d.split(/[ ,]/), c) !== -1; }; e(a, 'lists') && (d.register(a), c.register(a)); }), function () {}; }), d('0')(); }()); 2 | -------------------------------------------------------------------------------- /src/components/tinymce/plugins/bbcode/plugin.min.js: -------------------------------------------------------------------------------- 1 | !(function () { var a = {}, b = function (b) { for (var c = a[b], e = c.deps, f = c.defn, g = e.length, h = new Array(g), i = 0; i < g; ++i)h[i] = d(e[i]); var j = f.apply(null, h); if (void 0 === j) throw 'module [' + b + '] returned undefined'; c.instance = j; }, c = function (b, c, d) { if (typeof b !== 'string') throw 'module id must be a string'; if (void 0 === c) throw 'no dependencies for ' + b; if (void 0 === d) throw 'no definition function for ' + b; a[b] = {deps: c, defn: d, instance: void 0}; }, d = function (c) { var d = a[c]; if (void 0 === d) throw 'module [' + c + '] was undefined'; return void 0 === d.instance && b(c), d.instance; }, e = function (a, b) { for (var c = a.length, e = new Array(c), f = 0; f < c; ++f)e[f] = d(a[f]); b.apply(null, e); }, f = {}; f.bolt = {module: {api: {define: c, require: e, demand: d}}}; var g = c, h = function (a, b) { g(a, [], function () { return b; }); }; h('3', tinymce.util.Tools.resolve), g('1', ['3'], function (a) { return a('tinymce.PluginManager'); }), g('4', ['3'], function (a) { return a('tinymce.util.Tools'); }), g('2', ['4'], function (a) { var b = function (b) { b = a.trim(b); var c = function (a, c) { b = b.replace(a, c); }; return c(/(.*?)<\/a>/gi, '[url=$1]$2[/url]'), c(/(.*?)<\/font>/gi, '[code][color=$1]$2[/color][/code]'), c(/(.*?)<\/font>/gi, '[quote][color=$1]$2[/color][/quote]'), c(/(.*?)<\/font>/gi, '[code][color=$1]$2[/color][/code]'), c(/(.*?)<\/font>/gi, '[quote][color=$1]$2[/color][/quote]'), c(/(.*?)<\/span>/gi, '[color=$1]$2[/color]'), c(/(.*?)<\/font>/gi, '[color=$1]$2[/color]'), c(/(.*?)<\/span>/gi, '[size=$1]$2[/size]'), c(/(.*?)<\/font>/gi, '$1'), c(//gi, '[img]$1[/img]'), c(/(.*?)<\/span>/gi, '[code]$1[/code]'), c(/(.*?)<\/span>/gi, '[quote]$1[/quote]'), c(/(.*?)<\/strong>/gi, '[code][b]$1[/b][/code]'), c(/(.*?)<\/strong>/gi, '[quote][b]$1[/b][/quote]'), c(/(.*?)<\/em>/gi, '[code][i]$1[/i][/code]'), c(/(.*?)<\/em>/gi, '[quote][i]$1[/i][/quote]'), c(/(.*?)<\/u>/gi, '[code][u]$1[/u][/code]'), c(/(.*?)<\/u>/gi, '[quote][u]$1[/u][/quote]'), c(/<\/(strong|b)>/gi, '[/b]'), c(/<(strong|b)>/gi, '[b]'), c(/<\/(em|i)>/gi, '[/i]'), c(/<(em|i)>/gi, '[i]'), c(/<\/u>/gi, '[/u]'), c(/(.*?)<\/span>/gi, '[u]$1[/u]'), c(//gi, '[u]'), c(/]*>/gi, '[quote]'), c(/<\/blockquote>/gi, '[/quote]'), c(/
/gi, '\n'), c(//gi, '\n'), c(/
/gi, '\n'), c(/

/gi, ''), c(/<\/p>/gi, '\n'), c(/ |\u00a0/gi, ' '), c(/"/gi, '"'), c(/</gi, '<'), c(/>/gi, '>'), c(/&/gi, '&'), b; }, c = function (b) { b = a.trim(b); var c = function (a, c) { b = b.replace(a, c); }; return c(/\n/gi, '
'), c(/\[b\]/gi, ''), c(/\[\/b\]/gi, ''), c(/\[i\]/gi, ''), c(/\[\/i\]/gi, ''), c(/\[u\]/gi, ''), c(/\[\/u\]/gi, ''), c(/\[url=([^\]]+)\](.*?)\[\/url\]/gi, '$2'), c(/\[url\](.*?)\[\/url\]/gi, '$1'), c(/\[img\](.*?)\[\/img\]/gi, ''), c(/\[color=(.*?)\](.*?)\[\/color\]/gi, '$2'), c(/\[code\](.*?)\[\/code\]/gi, '$1 '), c(/\[quote.*?\](.*?)\[\/quote\]/gi, '$1 '), b; }; return {html2bbcode: b, bbcode2html: c}; }), g('0', ['1', '2'], function (a, b) { return a.add('bbcode', function () { return {init: function (a) { a.on('beforeSetContent', function (a) { a.content = b.bbcode2html(a.content); }), a.on('postProcess', function (a) { a.set && (a.content = b.bbcode2html(a.content)), a.get && (a.content = b.html2bbcode(a.content)); }); }}; }), function () {}; }), d('0')(); }()); 2 | -------------------------------------------------------------------------------- /src/components/tinymce/plugins/legacyoutput/plugin.min.js: -------------------------------------------------------------------------------- 1 | !(function () { var a = {}, b = function (b) { for (var c = a[b], e = c.deps, f = c.defn, g = e.length, h = new Array(g), i = 0; i < g; ++i)h[i] = d(e[i]); var j = f.apply(null, h); if (void 0 === j) throw 'module [' + b + '] returned undefined'; c.instance = j; }, c = function (b, c, d) { if (typeof b !== 'string') throw 'module id must be a string'; if (void 0 === c) throw 'no dependencies for ' + b; if (void 0 === d) throw 'no definition function for ' + b; a[b] = {deps: c, defn: d, instance: void 0}; }, d = function (c) { var d = a[c]; if (void 0 === d) throw 'module [' + c + '] was undefined'; return void 0 === d.instance && b(c), d.instance; }, e = function (a, b) { for (var c = a.length, e = new Array(c), f = 0; f < c; ++f)e[f] = d(a[f]); b.apply(null, e); }, f = {}; f.bolt = {module: {api: {define: c, require: e, demand: d}}}; var g = c, h = function (a, b) { g(a, [], function () { return b; }); }; h('4', tinymce.util.Tools.resolve), g('1', ['4'], function (a) { return a('tinymce.PluginManager'); }), g('5', ['4'], function (a) { return a('tinymce.util.Tools'); }), g('2', ['5'], function (a) { var b = function (b) { var c = 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img', d = a.explode(b.settings.font_size_style_values), e = b.schema; b.formatter.register({alignleft: {selector: c, attributes: {align: 'left'}}, aligncenter: {selector: c, attributes: {align: 'center'}}, alignright: {selector: c, attributes: {align: 'right'}}, alignjustify: {selector: c, attributes: {align: 'justify'}}, bold: [{inline: 'b', remove: 'all'}, {inline: 'strong', remove: 'all'}, {inline: 'span', styles: {fontWeight: 'bold'}}], italic: [{inline: 'i', remove: 'all'}, {inline: 'em', remove: 'all'}, {inline: 'span', styles: {fontStyle: 'italic'}}], underline: [{inline: 'u', remove: 'all'}, {inline: 'span', styles: {textDecoration: 'underline'}, exact: !0}], strikethrough: [{inline: 'strike', remove: 'all'}, {inline: 'span', styles: {textDecoration: 'line-through'}, exact: !0}], fontname: {inline: 'font', attributes: {face: '%value'}}, fontsize: {inline: 'font', attributes: {size: function (b) { return a.inArray(d, b.value) + 1; }}}, forecolor: {inline: 'font', attributes: {color: '%value'}}, hilitecolor: {inline: 'font', styles: {backgroundColor: '%value'}}}), a.each('b,i,u,strike'.split(','), function (a) { e.addValidElements(a + '[*]'); }), e.getElementRule('font') || e.addValidElements('font[face|size|color|style]'), a.each(c.split(','), function (a) { var b = e.getElementRule(a); b && (b.attributes.align || (b.attributes.align = {}, b.attributesOrder.push('align'))); }); }, c = function (a) { a.settings.inline_styles = !1, a.on('init', function () { b(a); }); }; return {setup: c}; }), g('3', [], function () { var a = function (a) { a.addButton('fontsizeselect', function () { var b = [], c = '8pt=1 10pt=2 12pt=3 14pt=4 18pt=5 24pt=6 36pt=7', d = a.settings.fontsizeFormats || c; return a.$.each(d.split(' '), function (a, c) { var d = c, e = c, f = c.split('='); f.length > 1 && (d = f[0], e = f[1]), b.push({text: d, value: e}); }), {type: 'listbox', text: 'Font Sizes', tooltip: 'Font Sizes', values: b, fixedWidth: !0, onPostRender: function () { var b = this; a.on('NodeChange', function () { var c; c = a.dom.getParent(a.selection.getNode(), 'font'), c ? b.value(c.size) : b.value(''); }); }, onclick: function (b) { b.control.settings.value && a.execCommand('FontSize', !1, b.control.settings.value); }}; }), a.addButton('fontselect', function () { function b (a) { a = a.replace(/;$/, '').split(';'); for (var b = a.length; b--;)a[b] = a[b].split('='); return a; } var c = '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', d = [], e = b(a.settings.font_formats || c); return a.$.each(e, function (a, b) { d.push({text: {raw: b[0]}, value: b[1], textStyle: b[1].indexOf('dings') === -1 ? 'font-family:' + b[1] : ''}); }), {type: 'listbox', text: 'Font Family', tooltip: 'Font Family', values: d, fixedWidth: !0, onPostRender: function () { var b = this; a.on('NodeChange', function () { var c; c = a.dom.getParent(a.selection.getNode(), 'font'), c ? b.value(c.face) : b.value(''); }); }, onselect: function (b) { b.control.settings.value && a.execCommand('FontName', !1, b.control.settings.value); }}; }); }; return {register: a}; }), g('0', ['1', '2', '3'], function (a, b, c) { return a.add('legacyoutput', function (a) { b.setup(a), c.register(a); }), function () {}; }), d('0')(); }()); 2 | -------------------------------------------------------------------------------- /src/components/tinymce/plugins/toc/plugin.min.js: -------------------------------------------------------------------------------- 1 | !(function () { var a = {}, b = function (b) { for (var c = a[b], e = c.deps, f = c.defn, g = e.length, h = new Array(g), i = 0; i < g; ++i)h[i] = d(e[i]); var j = f.apply(null, h); if (void 0 === j) throw 'module [' + b + '] returned undefined'; c.instance = j; }, c = function (b, c, d) { if (typeof b !== 'string') throw 'module id must be a string'; if (void 0 === c) throw 'no dependencies for ' + b; if (void 0 === d) throw 'no definition function for ' + b; a[b] = {deps: c, defn: d, instance: void 0}; }, d = function (c) { var d = a[c]; if (void 0 === d) throw 'module [' + c + '] was undefined'; return void 0 === d.instance && b(c), d.instance; }, e = function (a, b) { for (var c = a.length, e = new Array(c), f = 0; f < c; ++f)e[f] = d(a[f]); b.apply(null, e); }, f = {}; f.bolt = {module: {api: {define: c, require: e, demand: d}}}; var g = c, h = function (a, b) { g(a, [], function () { return b; }); }; h('6', tinymce.util.Tools.resolve), g('1', ['6'], function (a) { return a('tinymce.PluginManager'); }), g('8', ['6'], function (a) { return a('tinymce.dom.DOMUtils'); }), g('9', ['6'], function (a) { return a('tinymce.util.I18n'); }), g('a', ['6'], function (a) { return a('tinymce.util.Tools'); }), g('3', [], function () { var a = function (a) { return a.getParam('toc_class', 'mce-toc'); }, b = function (a) { var b = a.getParam('toc_header', 'h2'); return /^h[1-6]$/.test(b) ? b : 'h2'; }, c = function (a) { var b = parseInt(a.getParam('toc_depth', '3'), 10); return b >= 1 && b <= 9 ? b : 3; }; return {getTocClass: a, getTocHeader: b, getTocDepth: c}; }), g('b', [], function () { var a = function (a) { var b = 0; return function () { var c = (new Date()).getTime().toString(32); return a + c + (b++).toString(32); }; }; return {create: a}; }), g('7', ['8', '9', 'a', '3', 'b'], function (a, b, c, d, e) { var f = e.create('mcetoc_'), g = function (a) { var b, c = []; for (b = 1; b <= a; b++)c.push('h' + b); return c.join(','); }, h = function (a) { return i(a).length > 0; }, i = function (a) { var b = d.getTocClass(a), e = d.getTocHeader(a), h = g(d.getTocDepth(a)), i = a.$(h); return i.length && /^h[1-9]$/i.test(e) && (i = i.filter(function (c, d) { return !a.dom.hasClass(d.parentNode, b); })), c.map(i, function (b) { return {id: b.id ? b.id : f(), level: parseInt(b.nodeName.replace(/^H/i, ''), 10), title: a.$.text(b), element: b}; }); }, j = function (a) { var b, c = 9; for (b = 0; b < a.length; b++) if (a[b].level < c && (c = a[b].level), c === 1) return c; return c; }, k = function (b, c) { var d = '<' + b + ' contenteditable="true">', e = ''; return d + a.DOM.encode(c) + e; }, l = function (a) { var b = m(a); return '

' + b + '
'; }, m = function (a) { var c, e, f, g, h = '', l = i(a), m = j(l) - 1; if (!l.length) return ''; for (h += k(d.getTocHeader(a), b.translate('Table of Contents')), c = 0; c < l.length; c++) { if (f = l[c], f.element.id = f.id, g = l[c + 1] && l[c + 1].level, m === f.level)h += '
  • '; else for (e = m; e < f.level; e++)h += '
    • '; if (h += '' + f.title + '', g !== f.level && g) for (e = f.level; e > g; e--)h += '
  • '; else h += '
  • ', g || (h += ''); m = f.level; } return h; }, n = function (a, b) { return !b.length || a.dom.getParents(b[0], '.mce-offscreen-selection').length > 0; }, o = function (a) { var b = d.getTocClass(a), c = a.$('.' + b); n(a, c) ? a.insertContent(l(a)) : p(a); }, p = function (a) { var b = d.getTocClass(a), c = a.$('.' + b); c.length && a.undoManager.transact(function () { c.html(m(a)); }); }; return {hasHeaders: h, insertToc: o, updateToc: p}; }), g('2', ['7'], function (a) { var b = function (b) { b.addCommand('mceInsertToc', function () { a.insertToc(b); }), b.addCommand('mceUpdateToc', function () { a.updateToc(b); }); }; return {register: b}; }), g('4', ['3'], function (a) { var b = function (b) { var c = b.$, d = a.getTocClass(b); b.on('PreProcess', function (a) { var b = c('.' + d, a.node); b.length && (b.removeAttr('contentEditable'), b.find('[contenteditable]').removeAttr('contentEditable')); }), b.on('SetContent', function () { var a = c('.' + d); a.length && (a.attr('contentEditable', !1), a.children(':first-child').attr('contentEditable', !0)); }); }; return {setup: b}; }), g('5', ['3', '7'], function (a, b) { var c = function (a) { return function (c) { var d = c.control; a.on('LoadContent SetContent change', function () { d.disabled(a.readonly || !b.hasHeaders(a)); }); }; }, d = function (b) { return function (c) { return c && b.dom.is(c, '.' + a.getTocClass(b)) && b.getBody().contains(c); }; }, e = function (a) { a.addButton('toc', {tooltip: 'Table of Contents', cmd: 'mceInsertToc', icon: 'toc', onPostRender: c(a)}), a.addButton('tocupdate', {tooltip: 'Update', cmd: 'mceUpdateToc', icon: 'reload'}), a.addMenuItem('toc', {text: 'Table of Contents', context: 'insert', cmd: 'mceInsertToc', onPostRender: c(a)}), a.addContextToolbar(d(a), 'tocupdate'); }; return {register: e}; }), g('0', ['1', '2', '3', '4', '5'], function (a, b, c, d, e) { return a.add('toc', function (a) { b.register(a), e.register(a), d.setup(a); }), function () {}; }), d('0')(); }()); 2 | -------------------------------------------------------------------------------- /src/components/tinymce/plugins/insertdatetime/plugin.min.js: -------------------------------------------------------------------------------- 1 | !(function () { var a = {}, b = function (b) { for (var c = a[b], e = c.deps, f = c.defn, g = e.length, h = new Array(g), i = 0; i < g; ++i)h[i] = d(e[i]); var j = f.apply(null, h); if (void 0 === j) throw 'module [' + b + '] returned undefined'; c.instance = j; }, c = function (b, c, d) { if (typeof b !== 'string') throw 'module id must be a string'; if (void 0 === c) throw 'no dependencies for ' + b; if (void 0 === d) throw 'no definition function for ' + b; a[b] = {deps: c, defn: d, instance: void 0}; }, d = function (c) { var d = a[c]; if (void 0 === d) throw 'module [' + c + '] was undefined'; return void 0 === d.instance && b(c), d.instance; }, e = function (a, b) { for (var c = a.length, e = new Array(c), f = 0; f < c; ++f)e[f] = d(a[f]); b.apply(null, e); }, f = {}; f.bolt = {module: {api: {define: c, require: e, demand: d}}}; var g = c, h = function (a, b) { g(a, [], function () { return b; }); }; g('1', [], function () { var a = function (b) { var c = b, d = function () { return c; }, e = function (a) { c = a; }, f = function () { return a(d()); }; return {get: d, set: e, clone: f}; }; return a; }), h('5', tinymce.util.Tools.resolve), g('2', ['5'], function (a) { return a('tinymce.PluginManager'); }), g('6', [], function () { var a = function (a) { return a.getParam('fullpage_hide_in_source_view'); }, b = function (a) { return a.getParam('fullpage_default_xml_pi'); }, c = function (a) { return a.getParam('fullpage_default_encoding'); }, d = function (a) { return a.getParam('fullpage_default_font_family'); }, e = function (a) { return a.getParam('fullpage_default_font_size'); }, f = function (a) { return a.getParam('fullpage_default_text_color'); }, g = function (a) { return a.getParam('fullpage_default_title'); }, h = function (a) { return a.getParam('fullpage_default_doctype', ''); }; return {shouldHideInSourceView: a, getDefaultXmlPi: b, getDefaultEncoding: c, getDefaultFontFamily: d, getDefaultFontSize: e, getDefaultTextColor: f, getDefaultTitle: g, getDefaultDocType: h}; }), g('8', ['5'], function (a) { return a('tinymce.util.Tools'); }), g('9', [], function () { var a = function (a) { return a.getParam('insertdatetime_dateformat', a.translate('%Y-%m-%d')); }, b = function (a) { return a.getParam('insertdatetime_timeformat', a.translate('%H:%M:%S')); }, c = function (a) { return a.getParam('insertdatetime_formats', ['%H:%M:%S', '%Y-%m-%d', '%I:%M:%S %p', '%D']); }, d = function (a) { var d = c(a); return d.length > 0 ? d[0] : b(a); }, e = function (a) { return a.getParam('insertdatetime_element', !1); }; return {getDateFormat: a, getTimeFormat: b, getFormats: c, getDefaultDateTime: d, shouldInsertTimeElement: e}; }), g('7', ['8', '9'], function (a, b) { var c = 'Sun Mon Tue Wed Thu Fri Sat Sun'.split(' '), d = 'Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday'.split(' '), e = 'Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec'.split(' '), f = 'January February March April May June July August September October November December'.split(' '), g = function (a, b) { if (a = '' + a, a.length < b) for (var c = 0; c < b - a.length; c++)a = '0' + a; return a; }, h = function (a, b, h) { return h = h || new Date(), b = b.replace('%D', '%m/%d/%Y'), b = b.replace('%r', '%I:%M:%S %p'), b = b.replace('%Y', '' + h.getFullYear()), b = b.replace('%y', '' + h.getYear()), b = b.replace('%m', g(h.getMonth() + 1, 2)), b = b.replace('%d', g(h.getDate(), 2)), b = b.replace('%H', '' + g(h.getHours(), 2)), b = b.replace('%M', '' + g(h.getMinutes(), 2)), b = b.replace('%S', '' + g(h.getSeconds(), 2)), b = b.replace('%I', '' + ((h.getHours() + 11) % 12 + 1)), b = b.replace('%p', '' + (h.getHours() < 12 ? 'AM' : 'PM')), b = b.replace('%B', '' + a.translate(f[h.getMonth()])), b = b.replace('%b', '' + a.translate(e[h.getMonth()])), b = b.replace('%A', '' + a.translate(d[h.getDay()])), b = b.replace('%a', '' + a.translate(c[h.getDay()])), b = b.replace('%%', '%'); }, i = function (a, b, c, d) { var e = a.dom.create('time', {datetime: c}, d); b.parentNode.insertBefore(e, b), a.dom.remove(b), a.selection.select(e, !0), a.selection.collapse(!1); }, j = function (a, c) { if (b.shouldInsertTimeElement(a)) { var d, e = h(a, c); d = /%[HMSIp]/.test(c) ? h(a, '%Y-%m-%dT%H:%M') : h(a, '%Y-%m-%d'); var f = a.dom.getParent(a.selection.getStart(), 'time'); f ? i(a, f, d, e) : a.insertContent(''); } else a.insertContent(h(a, c)); }; return {insertDateTime: j, getDateTime: h}; }), g('3', ['6', '7'], function (a, b) { var c = function (c) { c.addCommand('mceInsertDate', function () { b.insertDateTime(c, a.getDateFormat()); }), c.addCommand('mceInsertTime', function () { b.insertDateTime(c, a.getTimeFormat()); }); }; return {register: c}; }), g('4', ['8', '9', '7'], function (a, b, c) { var d = function (d, e) { var f = b.getFormats(d); return a.map(f, function (a) { return {text: c.getDateTime(d, a), onclick: function () { e.set(a), c.insertDateTime(d, a); }}; }); }, e = function (a, e) { var f = d(a, e); a.addButton('insertdatetime', {type: 'splitbutton', title: 'Insert date/time', menu: f, onclick: function () { var d = e.get(); c.insertDateTime(a, d || b.getDefaultDateTime(a)); }}), a.addMenuItem('insertdatetime', {icon: 'date', text: 'Date/time', menu: f, context: 'insert'}); }; return {register: e}; }), g('0', ['1', '2', '3', '4'], function (a, b, c, d) { return b.add('insertdatetime', function (b) { var e = a(null); c.register(b), d.register(b, e); }), function () {}; }), d('0')(); }()); 2 | -------------------------------------------------------------------------------- /src/components/tinymce/plugins/importcss/plugin.min.js: -------------------------------------------------------------------------------- 1 | !(function () { var a = {}, b = function (b) { for (var c = a[b], e = c.deps, f = c.defn, g = e.length, h = new Array(g), i = 0; i < g; ++i)h[i] = d(e[i]); var j = f.apply(null, h); if (void 0 === j) throw 'module [' + b + '] returned undefined'; c.instance = j; }, c = function (b, c, d) { if (typeof b !== 'string') throw 'module id must be a string'; if (void 0 === c) throw 'no dependencies for ' + b; if (void 0 === d) throw 'no definition function for ' + b; a[b] = {deps: c, defn: d, instance: void 0}; }, d = function (c) { var d = a[c]; if (void 0 === d) throw 'module [' + c + '] was undefined'; return void 0 === d.instance && b(c), d.instance; }, e = function (a, b) { for (var c = a.length, e = new Array(c), f = 0; f < c; ++f)e[f] = d(a[f]); b.apply(null, e); }, f = {}; f.bolt = {module: {api: {define: c, require: e, demand: d}}}; var g = c, h = function (a, b) { g(a, [], function () { return b; }); }; h('4', tinymce.util.Tools.resolve), g('1', ['4'], function (a) { return a('tinymce.PluginManager'); }), g('5', ['4'], function (a) { return a('tinymce.dom.DOMUtils'); }), g('6', ['4'], function (a) { return a('tinymce.EditorManager'); }), g('7', ['4'], function (a) { return a('tinymce.Env'); }), g('8', ['4'], function (a) { return a('tinymce.util.Tools'); }), g('9', [], function () { var a = function (a) { return a.getParam('importcss_merge_classes'); }, b = function (a) { return a.getParam('importcss_exclusive'); }, c = function (a) { return a.getParam('importcss_selector_converter'); }, d = function (a) { return a.getParam('importcss_selector_filter'); }, e = function (a) { return a.getParam('importcss_groups'); }, f = function (a) { return a.getParam('importcss_append'); }, g = function (a) { return a.getParam('importcss_file_filter'); }; return {shouldMergeClasses: a, shouldImportExclusive: b, getSelectorConverter: c, getSelectorFilter: d, getCssGroups: e, shouldAppend: f, getFileFilter: g}; }), g('3', ['5', '6', '7', '8', '9'], function (a, b, c, d, e) { var f = function (a) { var b = c.cacheSuffix; return typeof a === 'string' && (a = a.replace('?' + b, '').replace('&' + b, '')), a; }, g = function (a, c) { var d = a.settings, e = d.skin !== !1 && (d.skin || 'lightgray'); if (e) { var f = d.skin_url ? a.documentBaseURI.toAbsolute(d.skin_url) : b.baseURL + '/skins/' + e; return c === f + '/content' + (a.inline ? '.inline' : '') + '.min.css'; } return !1; }, h = function (a) { return typeof a === 'string' ? function (b) { return b.indexOf(a) !== -1; } : a instanceof RegExp ? function (b) { return a.test(b); } : a; }, i = function (a, b, c) { function e (b, i) { var j, k = b.href; if (k = f(k), k && c(k, i) && !g(a, k)) { d.each(b.imports, function (a) { e(a, !0); }); try { j = b.cssRules || b.rules; } catch (a) {}d.each(j, function (a) { a.styleSheet ? e(a.styleSheet, !0) : a.selectorText && d.each(a.selectorText.split(','), function (a) { h.push(d.trim(a)); }); }); } } var h = [], i = {}; d.each(a.contentCSS, function (a) { i[a] = !0; }), c || (c = function (a, b) { return b || i[a]; }); try { d.each(b.styleSheets, function (a) { e(a); }); } catch (a) {} return h; }, j = function (a, b) { var c, f = /^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(b); if (f) { var g = f[1], h = f[2].substr(1).split('.').join(' '), i = d.makeMap('a,img'); return f[1] ? (c = {title: b}, a.schema.getTextBlockElements()[g] ? c.block = g : a.schema.getBlockElements()[g] || i[g.toLowerCase()] ? c.selector = g : c.inline = g) : f[2] && (c = {inline: 'span', title: b.substr(1), classes: h}), e.shouldMergeClasses(a) !== !1 ? c.classes = h : c.attributes = {'class': h}, c; } }, k = function (a, b) { return d.grep(a, function (a) { return !a.filter || a.filter(b); }); }, l = function (a) { return d.map(a, function (a) { return d.extend({}, a, {original: a, selectors: {}, filter: h(a.filter), item: {text: a.title, menu: []}}); }); }, m = function (a, b) { return b === null || e.shouldImportExclusive(a) !== !1; }, n = function (a, b, c, d) { return !(m(a, c) ? b in d : b in c.selectors); }, o = function (a, b, c, d) { m(a, c) ? d[b] = !0 : c.selectors[b] = !0; }, p = function (a, b, c, d) { var f; return f = d && d.selector_converter ? d.selector_converter : e.getSelectorConverter(a) ? e.getSelectorConverter(a) : function () { return j(a, c, d); }, f.call(b, c, d); }, q = function (b) { b.on('renderFormatsMenu', function (c) { var f = {}, g = h(e.getSelectorFilter(b)), j = c.control, m = l(e.getCssGroups(b)), q = function (c, e) { if (n(b, c, e, f)) { o(b, c, e, f); var g = p(b, b.plugins.importcss, c, e); if (g) { var h = g.name || a.DOM.uniqueId(); return b.formatter.register(h, g), d.extend({}, j.settings.itemDefaults, {text: g.title, format: h}); } } return null; }; e.shouldAppend(b) || j.items().remove(), d.each(i(b, c.doc || b.getDoc(), h(e.getFileFilter(b))), function (a) { if (a.indexOf('.mce-') === -1 && (!g || g(a))) { var b = k(m, a); if (b.length > 0)d.each(b, function (b) { var c = q(a, b); c && b.item.menu.push(c); }); else { var c = q(a, null); c && j.add(c); } } }), d.each(m, function (a) { a.item.menu.length > 0 && j.add(a.item); }), c.control.renderNew(); }); }; return {defaultConvertSelectorToFormat: j, setup: q}; }), g('2', ['3'], function (a) { var b = function (b) { var c = function (c) { return a.defaultConvertSelectorToFormat(b, c); }; return {convertSelectorToFormat: c}; }; return {get: b}; }), g('0', ['1', '2', '3'], function (a, b, c) { return a.add('importcss', function (a) { return c.setup(a), b.get(a); }), function () {}; }), d('0')(); }()); 2 | -------------------------------------------------------------------------------- /src/components/tinymce/plugins/autosave/plugin.min.js: -------------------------------------------------------------------------------- 1 | !(function () { var a = {}, b = function (b) { for (var c = a[b], e = c.deps, f = c.defn, g = e.length, h = new Array(g), i = 0; i < g; ++i)h[i] = d(e[i]); var j = f.apply(null, h); if (void 0 === j) throw 'module [' + b + '] returned undefined'; c.instance = j; }, c = function (b, c, d) { if (typeof b !== 'string') throw 'module id must be a string'; if (void 0 === c) throw 'no dependencies for ' + b; if (void 0 === d) throw 'no definition function for ' + b; a[b] = {deps: c, defn: d, instance: void 0}; }, d = function (c) { var d = a[c]; if (void 0 === d) throw 'module [' + c + '] was undefined'; return void 0 === d.instance && b(c), d.instance; }, e = function (a, b) { for (var c = a.length, e = new Array(c), f = 0; f < c; ++f)e[f] = d(a[f]); b.apply(null, e); }, f = {}; f.bolt = {module: {api: {define: c, require: e, demand: d}}}; var g = c, h = function (a, b) { g(a, [], function () { return b; }); }; g('1', [], function () { var a = function (b) { var c = b, d = function () { return c; }, e = function (a) { c = a; }, f = function () { return a(d()); }; return {get: d, set: e, clone: f}; }; return a; }), h('6', tinymce.util.Tools.resolve), g('2', ['6'], function (a) { return a('tinymce.PluginManager'); }), h('c', setInterval), g('d', ['6'], function (a) { return a('tinymce.util.LocalStorage'); }), g('a', ['6'], function (a) { return a('tinymce.util.Tools'); }), g('e', [], function () { var a = function (a) { return a.fire('RestoreDraft'); }, b = function (a) { return a.fire('StoreDraft'); }, c = function (a) { return a.fire('RemoveDraft'); }; return {fireRestoreDraft: a, fireStoreDraft: b, fireRemoveDraft: c}; }), h('f', document), g('g', [], function () { var a = function (a, b) { var c = {s: 1e3, m: 6e4}; return a = /^(\d+)([ms]?)$/.exec('' + (a || b)), (a[2] ? c[a[2]] : 1) * parseInt(a, 10); }; return {parse: a}; }), g('b', ['f', 'g'], function (a, b) { var c = function (a) { return a.getParam('autosave_ask_before_unload', !0); }, d = function (b) { var c = b.getParam('autosave_prefix', 'tinymce-autosave-{path}{query}-{id}-'); return c = c.replace(/\{path\}/g, a.location.pathname), c = c.replace(/\{query\}/g, a.location.search), c = c.replace(/\{id\}/g, b.id); }, e = function (a) { return a.getParam('autosave_restore_when_empty', !1); }, f = function (a) { return b.parse(a.settings.autosave_interval, '30s'); }, g = function (a) { return b.parse(a.settings.autosave_retention, '20m'); }; return {shouldAskBeforeUnload: c, getAutoSavePrefix: d, shouldRestoreWhenEmpty: e, getAutoSaveInterval: f, getAutoSaveRetention: g}; }), g('7', ['c', 'd', 'a', 'e', 'b'], function (a, b, c, d, e) { var f = function (a, b) { var d = a.settings.forced_root_block; return b = c.trim(typeof b === 'undefined' ? a.getBody().innerHTML : b), b === '' || new RegExp('^<' + d + '[^>]*>((\xa0| |[ \t]|]*>)+?|)|
    $', 'i').test(b); }, g = function (a) { var c = parseInt(b.getItem(e.getAutoSavePrefix(a) + 'time'), 10) || 0; return !((new Date()).getTime() - c > e.getAutoSaveRetention(a)) || (h(a, !1), !1); }, h = function (a, c) { var f = e.getAutoSavePrefix(a); b.removeItem(f + 'draft'), b.removeItem(f + 'time'), c !== !1 && d.fireRemoveDraft(a); }, i = function (a) { var c = e.getAutoSavePrefix(a); !f(a) && a.isDirty() && (b.setItem(c + 'draft', a.getContent({format: 'raw', no_events: !0})), b.setItem(c + 'time', (new Date()).getTime()), d.fireStoreDraft(a)); }, j = function (a) { var c = e.getAutoSavePrefix(a); g(a) && (a.setContent(b.getItem(c + 'draft'), {format: 'raw'}), d.fireRestoreDraft(a)); }, k = function (b, c) { var d = e.getAutoSaveInterval(b); c.get() || (a(function () { b.removed || i(b); }, d), c.set(!0)); }, l = function (a) { a.undoManager.transact(function () { j(a), h(a); }), a.focus(); }; return {isEmpty: f, hasDraft: g, removeDraft: h, storeDraft: i, restoreDraft: j, startStoreDraft: k, restoreLastDraft: l}; }), g('3', ['7'], function (a) { var b = function (a, b) { return function () { var c = Array.prototype.slice.call(arguments); return a.apply(null, [b].concat(c)); }; }, c = function (c) { return {hasDraft: b(a.hasDraft, c), storeDraft: b(a.storeDraft, c), restoreDraft: b(a.restoreDraft, c), removeDraft: b(a.removeDraft, c), isEmpty: b(a.isEmpty, c)}; }; return {get: c}; }), h('8', window), g('9', ['6'], function (a) { return a('tinymce.EditorManager'); }), g('4', ['8', '9', 'a', 'b'], function (a, b, c, d) { b._beforeUnloadHandler = function () { var a; return c.each(b.get(), function (b) { b.plugins.autosave && b.plugins.autosave.storeDraft(), !a && b.isDirty() && d.shouldAskBeforeUnload(b) && (a = b.translate('You have unsaved changes are you sure you want to navigate away?')); }), a; }; var e = function (c) { a.onbeforeunload = b._beforeUnloadHandler; }; return {setup: e}; }), g('5', ['7'], function (a) { var b = function (b, c) { return function (d) { var e = d.control; e.disabled(!a.hasDraft(b)), b.on('StoreDraft RestoreDraft RemoveDraft', function () { e.disabled(!a.hasDraft(b)); }), a.startStoreDraft(b, c); }; }, c = function (c, d) { c.addButton('restoredraft', {title: 'Restore last draft', onclick: function () { a.restoreLastDraft(c); }, onPostRender: b(c, d)}), c.addMenuItem('restoredraft', {text: 'Restore last draft', onclick: function () { a.restoreLastDraft(c); }, onPostRender: b(c, d), context: 'file'}); }; return {register: c}; }), g('0', ['1', '2', '3', '4', '5'], function (a, b, c, d, e) { return b.add('autosave', function (b) { var f = a(!1); return d.setup(b), e.register(b, f), c.get(b); }), function () {}; }), d('0')(); }()); 2 | -------------------------------------------------------------------------------- /src/views/index.vue: -------------------------------------------------------------------------------- 1 | 29 | 145 | -------------------------------------------------------------------------------- /src/components/tinymce/plugins/print/plugin.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | var defs = {}; // id -> {dependencies, definition, instance (possibly undefined)} 3 | 4 | // Used when there is no 'main' module. 5 | // The name is probably (hopefully) unique so minification removes for releases. 6 | var register_3795 = function (id) { 7 | var module = dem(id); 8 | var fragments = id.split('.'); 9 | var target = Function('return this;')(); 10 | for (var i = 0; i < fragments.length - 1; ++i) { 11 | if (target[fragments[i]] === undefined) { target[fragments[i]] = {}; } 12 | target = target[fragments[i]]; 13 | } 14 | target[fragments[fragments.length - 1]] = module; 15 | }; 16 | 17 | var instantiate = function (id) { 18 | var actual = defs[id]; 19 | var dependencies = actual.deps; 20 | var definition = actual.defn; 21 | var len = dependencies.length; 22 | var instances = new Array(len); 23 | for (var i = 0; i < len; ++i) { instances[i] = dem(dependencies[i]); } 24 | var defResult = definition.apply(null, instances); 25 | if (defResult === undefined) { throw 'module [' + id + '] returned undefined'; } 26 | actual.instance = defResult; 27 | }; 28 | 29 | var def = function (id, dependencies, definition) { 30 | if (typeof id !== 'string') { throw 'module id must be a string'; } else if (dependencies === undefined) { throw 'no dependencies for ' + id; } else if (definition === undefined) { throw 'no definition function for ' + id; } 31 | defs[id] = { 32 | deps: dependencies, 33 | defn: definition, 34 | instance: undefined 35 | }; 36 | }; 37 | 38 | var dem = function (id) { 39 | var actual = defs[id]; 40 | if (actual === undefined) { throw 'module [' + id + '] was undefined'; } else if (actual.instance === undefined) { instantiate(id); } 41 | return actual.instance; 42 | }; 43 | 44 | var req = function (ids, callback) { 45 | var len = ids.length; 46 | var instances = new Array(len); 47 | for (var i = 0; i < len; ++i) { instances[i] = dem(ids[i]); } 48 | callback.apply(null, instances); 49 | }; 50 | 51 | var ephox = {}; 52 | 53 | ephox.bolt = { 54 | module: { 55 | api: { 56 | define: def, 57 | require: req, 58 | demand: dem 59 | } 60 | } 61 | }; 62 | 63 | var define = def; 64 | var require = req; 65 | var demand = dem; 66 | // this helps with minification when using a lot of global references 67 | var defineGlobal = function (id, ref) { 68 | define(id, [], function () { return ref; }); 69 | }; 70 | /* jsc 71 | ["tinymce.plugins.print.Plugin","tinymce.core.PluginManager","tinymce.plugins.print.api.Commands","tinymce.plugins.print.ui.Buttons","global!tinymce.util.Tools.resolve"] 72 | jsc */ 73 | defineGlobal('global!tinymce.util.Tools.resolve', tinymce.util.Tools.resolve); 74 | /** 75 | * ResolveGlobal.js 76 | * 77 | * Released under LGPL License. 78 | * Copyright (c) 1999-2017 Ephox Corp. All rights reserved 79 | * 80 | * License: http://www.tinymce.com/license 81 | * Contributing: http://www.tinymce.com/contributing 82 | */ 83 | 84 | define( 85 | 'tinymce.core.PluginManager', 86 | [ 87 | 'global!tinymce.util.Tools.resolve' 88 | ], 89 | function (resolve) { 90 | return resolve('tinymce.PluginManager'); 91 | } 92 | ); 93 | 94 | /** 95 | * Commands.js 96 | * 97 | * Released under LGPL License. 98 | * Copyright (c) 1999-2017 Ephox Corp. All rights reserved 99 | * 100 | * License: http://www.tinymce.com/license 101 | * Contributing: http://www.tinymce.com/contributing 102 | */ 103 | 104 | define( 105 | 'tinymce.plugins.print.api.Commands', 106 | [ 107 | ], 108 | function () { 109 | var register = function (editor) { 110 | editor.addCommand('mcePrint', function () { 111 | editor.getWin().print(); 112 | }); 113 | }; 114 | 115 | return { 116 | register: register 117 | }; 118 | } 119 | ); 120 | /** 121 | * Buttons.js 122 | * 123 | * Released under LGPL License. 124 | * Copyright (c) 1999-2017 Ephox Corp. All rights reserved 125 | * 126 | * License: http://www.tinymce.com/license 127 | * Contributing: http://www.tinymce.com/contributing 128 | */ 129 | 130 | define( 131 | 'tinymce.plugins.print.ui.Buttons', 132 | [ 133 | ], 134 | function () { 135 | var register = function (editor) { 136 | editor.addButton('print', { 137 | title: 'Print', 138 | cmd: 'mcePrint' 139 | }); 140 | 141 | editor.addMenuItem('print', { 142 | text: 'Print', 143 | cmd: 'mcePrint', 144 | icon: 'print' 145 | }); 146 | }; 147 | 148 | return { 149 | register: register 150 | }; 151 | } 152 | ); 153 | /** 154 | * Plugin.js 155 | * 156 | * Released under LGPL License. 157 | * Copyright (c) 1999-2017 Ephox Corp. All rights reserved 158 | * 159 | * License: http://www.tinymce.com/license 160 | * Contributing: http://www.tinymce.com/contributing 161 | */ 162 | 163 | define( 164 | 'tinymce.plugins.print.Plugin', 165 | [ 166 | 'tinymce.core.PluginManager', 167 | 'tinymce.plugins.print.api.Commands', 168 | 'tinymce.plugins.print.ui.Buttons' 169 | ], 170 | function (PluginManager, Commands, Buttons) { 171 | PluginManager.add('print', function (editor) { 172 | Commands.register(editor); 173 | Buttons.register(editor); 174 | editor.addShortcut('Meta+P', '', 'mcePrint'); 175 | }); 176 | 177 | return function () { }; 178 | } 179 | ); 180 | dem('tinymce.plugins.print.Plugin')(); 181 | })(); 182 | -------------------------------------------------------------------------------- /src/components/tinymce/plugins/hr/plugin.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | var defs = {}; // id -> {dependencies, definition, instance (possibly undefined)} 3 | 4 | // Used when there is no 'main' module. 5 | // The name is probably (hopefully) unique so minification removes for releases. 6 | var register_3795 = function (id) { 7 | var module = dem(id); 8 | var fragments = id.split('.'); 9 | var target = Function('return this;')(); 10 | for (var i = 0; i < fragments.length - 1; ++i) { 11 | if (target[fragments[i]] === undefined) { target[fragments[i]] = {}; } 12 | target = target[fragments[i]]; 13 | } 14 | target[fragments[fragments.length - 1]] = module; 15 | }; 16 | 17 | var instantiate = function (id) { 18 | var actual = defs[id]; 19 | var dependencies = actual.deps; 20 | var definition = actual.defn; 21 | var len = dependencies.length; 22 | var instances = new Array(len); 23 | for (var i = 0; i < len; ++i) { instances[i] = dem(dependencies[i]); } 24 | var defResult = definition.apply(null, instances); 25 | if (defResult === undefined) { throw 'module [' + id + '] returned undefined'; } 26 | actual.instance = defResult; 27 | }; 28 | 29 | var def = function (id, dependencies, definition) { 30 | if (typeof id !== 'string') { throw 'module id must be a string'; } else if (dependencies === undefined) { throw 'no dependencies for ' + id; } else if (definition === undefined) { throw 'no definition function for ' + id; } 31 | defs[id] = { 32 | deps: dependencies, 33 | defn: definition, 34 | instance: undefined 35 | }; 36 | }; 37 | 38 | var dem = function (id) { 39 | var actual = defs[id]; 40 | if (actual === undefined) { throw 'module [' + id + '] was undefined'; } else if (actual.instance === undefined) { instantiate(id); } 41 | return actual.instance; 42 | }; 43 | 44 | var req = function (ids, callback) { 45 | var len = ids.length; 46 | var instances = new Array(len); 47 | for (var i = 0; i < len; ++i) { instances[i] = dem(ids[i]); } 48 | callback.apply(null, instances); 49 | }; 50 | 51 | var ephox = {}; 52 | 53 | ephox.bolt = { 54 | module: { 55 | api: { 56 | define: def, 57 | require: req, 58 | demand: dem 59 | } 60 | } 61 | }; 62 | 63 | var define = def; 64 | var require = req; 65 | var demand = dem; 66 | // this helps with minification when using a lot of global references 67 | var defineGlobal = function (id, ref) { 68 | define(id, [], function () { return ref; }); 69 | }; 70 | /* jsc 71 | ["tinymce.plugins.hr.Plugin","tinymce.core.PluginManager","tinymce.plugins.hr.api.Commands","tinymce.plugins.hr.ui.Buttons","global!tinymce.util.Tools.resolve"] 72 | jsc */ 73 | defineGlobal('global!tinymce.util.Tools.resolve', tinymce.util.Tools.resolve); 74 | /** 75 | * ResolveGlobal.js 76 | * 77 | * Released under LGPL License. 78 | * Copyright (c) 1999-2017 Ephox Corp. All rights reserved 79 | * 80 | * License: http://www.tinymce.com/license 81 | * Contributing: http://www.tinymce.com/contributing 82 | */ 83 | 84 | define( 85 | 'tinymce.core.PluginManager', 86 | [ 87 | 'global!tinymce.util.Tools.resolve' 88 | ], 89 | function (resolve) { 90 | return resolve('tinymce.PluginManager'); 91 | } 92 | ); 93 | 94 | /** 95 | * Commands.js 96 | * 97 | * Released under LGPL License. 98 | * Copyright (c) 1999-2017 Ephox Corp. All rights reserved 99 | * 100 | * License: http://www.tinymce.com/license 101 | * Contributing: http://www.tinymce.com/contributing 102 | */ 103 | 104 | define( 105 | 'tinymce.plugins.hr.api.Commands', 106 | [ 107 | ], 108 | function () { 109 | var register = function (editor) { 110 | editor.addCommand('InsertHorizontalRule', function () { 111 | editor.execCommand('mceInsertContent', false, '
    '); 112 | }); 113 | }; 114 | 115 | return { 116 | register: register 117 | }; 118 | } 119 | ); 120 | /** 121 | * Buttons.js 122 | * 123 | * Released under LGPL License. 124 | * Copyright (c) 1999-2017 Ephox Corp. All rights reserved 125 | * 126 | * License: http://www.tinymce.com/license 127 | * Contributing: http://www.tinymce.com/contributing 128 | */ 129 | 130 | define( 131 | 'tinymce.plugins.hr.ui.Buttons', 132 | [ 133 | ], 134 | function () { 135 | var register = function (editor) { 136 | editor.addButton('hr', { 137 | icon: 'hr', 138 | tooltip: 'Horizontal line', 139 | cmd: 'InsertHorizontalRule' 140 | }); 141 | 142 | editor.addMenuItem('hr', { 143 | icon: 'hr', 144 | text: 'Horizontal line', 145 | cmd: 'InsertHorizontalRule', 146 | context: 'insert' 147 | }); 148 | }; 149 | 150 | return { 151 | register: register 152 | }; 153 | } 154 | ); 155 | /** 156 | * Plugin.js 157 | * 158 | * Released under LGPL License. 159 | * Copyright (c) 1999-2017 Ephox Corp. All rights reserved 160 | * 161 | * License: http://www.tinymce.com/license 162 | * Contributing: http://www.tinymce.com/contributing 163 | */ 164 | 165 | define( 166 | 'tinymce.plugins.hr.Plugin', 167 | [ 168 | 'tinymce.core.PluginManager', 169 | 'tinymce.plugins.hr.api.Commands', 170 | 'tinymce.plugins.hr.ui.Buttons' 171 | ], 172 | function (PluginManager, Commands, Buttons) { 173 | PluginManager.add('hr', function (editor) { 174 | Commands.register(editor); 175 | Buttons.register(editor); 176 | }); 177 | 178 | return function () { }; 179 | } 180 | ); 181 | dem('tinymce.plugins.hr.Plugin')(); 182 | })(); 183 | -------------------------------------------------------------------------------- /src/components/tinymce/plugins/visualblocks/css/visualblocks.css: -------------------------------------------------------------------------------- 1 | .mce-visualblocks p { 2 | padding-top: 10px; 3 | border: 1px dashed #BBB; 4 | margin-left: 3px; 5 | background-image: url(data:image/gif;base64,R0lGODlhCQAJAJEAAAAAAP///7u7u////yH5BAEAAAMALAAAAAAJAAkAAAIQnG+CqCN/mlyvsRUpThG6AgA7); 6 | background-repeat: no-repeat; 7 | } 8 | 9 | .mce-visualblocks h1 { 10 | padding-top: 10px; 11 | border: 1px dashed #BBB; 12 | margin-left: 3px; 13 | background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGu1JuxHoAfRNRW3TWXyF2YiRUAOw==); 14 | background-repeat: no-repeat; 15 | } 16 | 17 | .mce-visualblocks h2 { 18 | padding-top: 10px; 19 | border: 1px dashed #BBB; 20 | margin-left: 3px; 21 | background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8Hybbx4oOuqgTynJd6bGlWg3DkJzoaUAAAOw==); 22 | background-repeat: no-repeat; 23 | } 24 | 25 | .mce-visualblocks h3 { 26 | padding-top: 10px; 27 | border: 1px dashed #BBB; 28 | margin-left: 3px; 29 | background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIZjI8Hybbx4oOuqgTynJf2Ln2NOHpQpmhAAQA7); 30 | background-repeat: no-repeat; 31 | } 32 | 33 | .mce-visualblocks h4 { 34 | padding-top: 10px; 35 | border: 1px dashed #BBB; 36 | margin-left: 3px; 37 | background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxInR0zqeAdhtJlXwV1oCll2HaWgAAOw==); 38 | background-repeat: no-repeat; 39 | } 40 | 41 | .mce-visualblocks h5 { 42 | padding-top: 10px; 43 | border: 1px dashed #BBB; 44 | margin-left: 3px; 45 | background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjane4iq5GlW05GgIkIZUAAAOw==); 46 | background-repeat: no-repeat; 47 | } 48 | 49 | .mce-visualblocks h6 { 50 | padding-top: 10px; 51 | border: 1px dashed #BBB; 52 | margin-left: 3px; 53 | background-image: url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjan04jep1iZ1XRlAo5bVgAAOw==); 54 | background-repeat: no-repeat; 55 | } 56 | 57 | .mce-visualblocks div:not([data-mce-bogus]) { 58 | padding-top: 10px; 59 | border: 1px dashed #BBB; 60 | margin-left: 3px; 61 | background-image: url(data:image/gif;base64,R0lGODlhEgAKAIABALu7u////yH5BAEAAAEALAAAAAASAAoAAAIfjI9poI0cgDywrhuxfbrzDEbQM2Ei5aRjmoySW4pAAQA7); 62 | background-repeat: no-repeat; 63 | } 64 | 65 | .mce-visualblocks section { 66 | padding-top: 10px; 67 | border: 1px dashed #BBB; 68 | margin: 0 0 1em 3px; 69 | background-image: url(data:image/gif;base64,R0lGODlhKAAKAIABALu7u////yH5BAEAAAEALAAAAAAoAAoAAAI5jI+pywcNY3sBWHdNrplytD2ellDeSVbp+GmWqaDqDMepc8t17Y4vBsK5hDyJMcI6KkuYU+jpjLoKADs=); 70 | background-repeat: no-repeat; 71 | } 72 | 73 | .mce-visualblocks article { 74 | padding-top: 10px; 75 | border: 1px dashed #BBB; 76 | margin: 0 0 1em 3px; 77 | background-image: url(data:image/gif;base64,R0lGODlhKgAKAIABALu7u////yH5BAEAAAEALAAAAAAqAAoAAAI6jI+pywkNY3wG0GBvrsd2tXGYSGnfiF7ikpXemTpOiJScasYoDJJrjsG9gkCJ0ag6KhmaIe3pjDYBBQA7); 78 | background-repeat: no-repeat; 79 | } 80 | 81 | .mce-visualblocks blockquote { 82 | padding-top: 10px; 83 | border: 1px dashed #BBB; 84 | background-image: url(data:image/gif;base64,R0lGODlhPgAKAIABALu7u////yH5BAEAAAEALAAAAAA+AAoAAAJPjI+py+0Knpz0xQDyuUhvfoGgIX5iSKZYgq5uNL5q69asZ8s5rrf0yZmpNkJZzFesBTu8TOlDVAabUyatguVhWduud3EyiUk45xhTTgMBBQA7); 85 | background-repeat: no-repeat; 86 | } 87 | 88 | .mce-visualblocks address { 89 | padding-top: 10px; 90 | border: 1px dashed #BBB; 91 | margin: 0 0 1em 3px; 92 | background-image: url(data:image/gif;base64,R0lGODlhLQAKAIABALu7u////yH5BAEAAAEALAAAAAAtAAoAAAI/jI+pywwNozSP1gDyyZcjb3UaRpXkWaXmZW4OqKLhBmLs+K263DkJK7OJeifh7FicKD9A1/IpGdKkyFpNmCkAADs=); 93 | background-repeat: no-repeat; 94 | } 95 | 96 | .mce-visualblocks pre { 97 | padding-top: 10px; 98 | border: 1px dashed #BBB; 99 | margin-left: 3px; 100 | background-image: url(data:image/gif;base64,R0lGODlhFQAKAIABALu7uwAAACH5BAEAAAEALAAAAAAVAAoAAAIjjI+ZoN0cgDwSmnpz1NCueYERhnibZVKLNnbOq8IvKpJtVQAAOw==); 101 | background-repeat: no-repeat; 102 | } 103 | 104 | .mce-visualblocks figure { 105 | padding-top: 10px; 106 | border: 1px dashed #BBB; 107 | margin: 0 0 1em 3px; 108 | background-image: url(data:image/gif;base64,R0lGODlhJAAKAIAAALu7u////yH5BAEAAAEALAAAAAAkAAoAAAI0jI+py+2fwAHUSFvD3RlvG4HIp4nX5JFSpnZUJ6LlrM52OE7uSWosBHScgkSZj7dDKnWAAgA7); 109 | background-repeat: no-repeat; 110 | } 111 | 112 | .mce-visualblocks hgroup { 113 | padding-top: 10px; 114 | border: 1px dashed #BBB; 115 | margin: 0 0 1em 3px; 116 | background-image: url(data:image/gif;base64,R0lGODlhJwAKAIABALu7uwAAACH5BAEAAAEALAAAAAAnAAoAAAI3jI+pywYNI3uB0gpsRtt5fFnfNZaVSYJil4Wo03Hv6Z62uOCgiXH1kZIIJ8NiIxRrAZNMZAtQAAA7); 117 | background-repeat: no-repeat; 118 | } 119 | 120 | .mce-visualblocks aside { 121 | padding-top: 10px; 122 | border: 1px dashed #BBB; 123 | margin: 0 0 1em 3px; 124 | background-image: url(data:image/gif;base64,R0lGODlhHgAKAIABAKqqqv///yH5BAEAAAEALAAAAAAeAAoAAAItjI+pG8APjZOTzgtqy7I3f1yehmQcFY4WKZbqByutmW4aHUd6vfcVbgudgpYCADs=); 125 | background-repeat: no-repeat; 126 | } 127 | 128 | .mce-visualblocks figcaption { 129 | border: 1px dashed #BBB; 130 | } 131 | 132 | .mce-visualblocks ul { 133 | padding-top: 10px; 134 | border: 1px dashed #BBB; 135 | margin: 0 0 1em 3px; 136 | background-image: url(data:image/gif;base64,R0lGODlhDQAKAIAAALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGuYnqUVSjvw26DzzXiqIDlVwAAOw==); 137 | background-repeat: no-repeat; 138 | } 139 | 140 | .mce-visualblocks ol { 141 | padding-top: 10px; 142 | border: 1px dashed #BBB; 143 | margin: 0 0 1em 3px; 144 | background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybH6HHt0qourxC6CvzXieHyeWQAAOw==); 145 | background-repeat: no-repeat; 146 | } 147 | 148 | .mce-visualblocks dl { 149 | padding-top: 10px; 150 | border: 1px dashed #BBB; 151 | margin: 0 0 1em 3px; 152 | background-image: url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybEOnmOvUoWznTqeuEjNSCqeGRUAOw==); 153 | background-repeat: no-repeat; 154 | } 155 | -------------------------------------------------------------------------------- /src/components/tinymce/plugins/textpattern/plugin.min.js: -------------------------------------------------------------------------------- 1 | !(function () { var a = {}, b = function (b) { for (var c = a[b], e = c.deps, f = c.defn, g = e.length, h = new Array(g), i = 0; i < g; ++i)h[i] = d(e[i]); var j = f.apply(null, h); if (void 0 === j) throw 'module [' + b + '] returned undefined'; c.instance = j; }, c = function (b, c, d) { if (typeof b !== 'string') throw 'module id must be a string'; if (void 0 === c) throw 'no dependencies for ' + b; if (void 0 === d) throw 'no definition function for ' + b; a[b] = {deps: c, defn: d, instance: void 0}; }, d = function (c) { var d = a[c]; if (void 0 === d) throw 'module [' + c + '] was undefined'; return void 0 === d.instance && b(c), d.instance; }, e = function (a, b) { for (var c = a.length, e = new Array(c), f = 0; f < c; ++f)e[f] = d(a[f]); b.apply(null, e); }, f = {}; f.bolt = {module: {api: {define: c, require: e, demand: d}}}; var g = c, h = function (a, b) { g(a, [], function () { return b; }); }; g('1', [], function () { var a = function (b) { var c = b, d = function () { return c; }, e = function (a) { c = a; }, f = function () { return a(d()); }; return {get: d, set: e, clone: f}; }; return a; }), h('6', tinymce.util.Tools.resolve), g('2', ['6'], function (a) { return a('tinymce.PluginManager'); }), g('3', [], function () { var a = function (a) { var b = function (b) { a.set(b); }, c = function () { return a.get(); }; return {setPatterns: b, getPatterns: c}; }; return {get: a}; }), g('4', [], function () { var a = [{start: '*', end: '*', format: 'italic'}, {start: '**', end: '**', format: 'bold'}, {start: '***', end: '***', format: ['bold', 'italic']}, {start: '#', format: 'h1'}, {start: '##', format: 'h2'}, {start: '###', format: 'h3'}, {start: '####', format: 'h4'}, {start: '#####', format: 'h5'}, {start: '######', format: 'h6'}, {start: '1. ', cmd: 'InsertOrderedList'}, {start: '* ', cmd: 'InsertUnorderedList'}, {start: '- ', cmd: 'InsertUnorderedList'}], b = function (b) { return void 0 !== b.textpattern_patterns ? b.textpattern_patterns : a; }; return {getPatterns: b}; }), g('7', ['6'], function (a) { return a('tinymce.util.Delay'); }), g('8', ['6'], function (a) { return a('tinymce.util.VK'); }), h('b', document), g('c', ['6'], function (a) { return a('tinymce.dom.TreeWalker'); }), g('d', ['6'], function (a) { return a('tinymce.util.Tools'); }), g('e', [], function () { var a = function (a) { return a.sort(function (a, b) { return a.start.length > b.start.length ? -1 : a.start.length < b.start.length ? 1 : 0; }); }, b = function (a, b) { for (var c = 0; c < a.length; c++) if (b.indexOf(a[c].start) === 0 && (!a[c].end || b.lastIndexOf(a[c].end) === b.length - a[c].end.length)) return a[c]; }, c = function (a, b, c, d) { var e = b.substr(c - a.end.length - d, a.end.length); return e === a.end; }, d = function (a, b, c) { return a - b - c.end.length - c.start.length > 0; }, e = function (b, e, f, g) { var h, i, j = a(b); for (i = 0; i < j.length; i++) if (h = j[i], void 0 !== h.end && c(h, e, f, g) && d(f, g, h)) return h; }; return {findPattern: b, findEndPattern: e}; }), g('a', ['b', 'c', 'd', 'e'], function (a, b, c, d) { var e = function (a, b, c, d, e) { return a = d > 0 ? a.splitText(d) : a, a.splitText(c - d + b.end.length), a.deleteData(0, b.start.length), a.deleteData(a.data.length - b.end.length, b.end.length), a; }, f = function (b, c, e) { if (c.collapsed !== !1) { var f = c.startContainer, g = f.data, h = e === !0 ? 1 : 0; if (f.nodeType === 3) { var i = d.findEndPattern(b, g, c.startOffset, h); if (void 0 !== i) { var j = g.lastIndexOf(i.end, c.startOffset - h), k = g.lastIndexOf(i.start, j - i.end.length); if (j = g.indexOf(i.end, k + i.start.length), k !== -1) { var l = a.createRange(); l.setStart(f, k), l.setEnd(f, j + i.end.length); var m = d.findPattern(b, l.toString()); if (!(void 0 === i || m !== i || f.data.length <= i.start.length + i.end.length)) return {pattern: i, startOffset: k, endOffset: j}; } } } } }, g = function (a, b, d, f) { var g = c.isArray(d.pattern.format) ? d.pattern.format : [d.pattern.format], h = c.grep(g, function (b) { var c = a.formatter.get(b); return c && c[0].inline; }); if (h.length !== 0) return a.undoManager.transact(function () { b = e(b, d.pattern, d.endOffset, d.startOffset, f), g.forEach(function (c) { a.formatter.apply(c, {}, b); }); }), b; }, h = function (a, b, c) { var d = a.selection.getRng(!0), e = f(b, d, c); if (e) return g(a, d.startContainer, e, c); }, i = function (a, b) { return h(a, b, !0); }, j = function (a, b) { return h(a, b, !1); }, k = function (a, e) { var f, g, h, i, j, k, l, m, n, o, p; if (f = a.selection, g = a.dom, f.isCollapsed() && (l = g.getParent(f.getStart(), 'p'))) { for (n = new b(l, l); j = n.next();) if (j.nodeType === 3) { i = j; break; } if (i) { if (m = d.findPattern(e, i.data), !m) return; if (o = f.getRng(!0), h = o.startContainer, p = o.startOffset, i === h && (p = Math.max(0, p - m.start.length)), c.trim(i.data).length === m.start.length) return; m.format && (k = a.formatter.get(m.format), k && k[0].block && (i.deleteData(0, m.start.length), a.formatter.apply(m.format, {}, i), o.setStart(h, p), o.collapse(!0), f.setRng(o))), m.cmd && a.undoManager.transact(function () { i.deleteData(0, m.start.length), a.execCommand(m.cmd); }); } } }; return {patternFromRng: f, applyInlineFormatSpace: i, applyInlineFormatEnter: j, applyBlockFormat: k}; }), g('9', ['8', 'a'], function (a, b) { function c (a, c) { var d, e; d = b.applyInlineFormatEnter(a, c), d && (e = a.dom.createRng(), e.setStart(d, d.data.length), e.setEnd(d, d.data.length), a.selection.setRng(e)), b.applyBlockFormat(a, c); } function d (a, c) { var d, e, f, g, h; d = b.applyInlineFormatSpace(a, c), d && (h = a.dom, e = d.data.slice(-1), /[\u00a0 ]/.test(e) && (d.deleteData(d.data.length - 1, 1), f = h.doc.createTextNode(e), h.insertAfter(f, d.parentNode), g = h.createRng(), g.setStart(f, 1), g.setEnd(f, 1), a.selection.setRng(g))); } var e = function (a, b, c) { for (var d = 0; d < a.length; d++) if (c(a[d], b)) return !0; }, f = function (b, c) { return e(b, c, function (b, c) { return b === c.keyCode && a.modifierPressed(c) === !1; }); }, g = function (a, b) { return e(a, b, function (a, b) { return a.charCodeAt(0) === b.charCode; }); }; return {handleEnter: c, handleInlineKey: d, checkCharCode: g, checkKeyCode: f}; }), g('5', ['7', '8', '9'], function (a, b, c) { var d = function (d, e) { var f = [',', '.', ';', ':', '!', '?'], g = [32]; d.on('keydown', function (a) { a.keyCode !== 13 || b.modifierPressed(a) || c.handleEnter(d, e.get()); }, !0), d.on('keyup', function (a) { c.checkKeyCode(g, a) && c.handleInlineKey(d, e.get()); }), d.on('keypress', function (b) { c.checkCharCode(f, b) && a.setEditorTimeout(d, function () { c.handleInlineKey(d, e.get()); }); }); }; return {setup: d}; }), g('0', ['1', '2', '3', '4', '5'], function (a, b, c, d, e) { return b.add('textpattern', function (b) { var f = a(d.getPatterns(b.settings)); return e.setup(b, f), c.get(f); }), function () {}; }), d('0')(); }()); 2 | -------------------------------------------------------------------------------- /src/components/tinymce/plugins/textcolor/plugin.min.js: -------------------------------------------------------------------------------- 1 | !(function () { var a = {}, b = function (b) { for (var c = a[b], e = c.deps, f = c.defn, g = e.length, h = new Array(g), i = 0; i < g; ++i)h[i] = d(e[i]); var j = f.apply(null, h); if (void 0 === j) throw 'module [' + b + '] returned undefined'; c.instance = j; }, c = function (b, c, d) { if (typeof b !== 'string') throw 'module id must be a string'; if (void 0 === c) throw 'no dependencies for ' + b; if (void 0 === d) throw 'no definition function for ' + b; a[b] = {deps: c, defn: d, instance: void 0}; }, d = function (c) { var d = a[c]; if (void 0 === d) throw 'module [' + c + '] was undefined'; return void 0 === d.instance && b(c), d.instance; }, e = function (a, b) { for (var c = a.length, e = new Array(c), f = 0; f < c; ++f)e[f] = d(a[f]); b.apply(null, e); }, f = {}; f.bolt = {module: {api: {define: c, require: e, demand: d}}}; var g = c, h = function (a, b) { g(a, [], function () { return b; }); }; h('3', tinymce.util.Tools.resolve), g('1', ['3'], function (a) { return a('tinymce.PluginManager'); }), g('4', ['3'], function (a) { return a('tinymce.dom.DOMUtils'); }), g('5', ['3'], function (a) { return a('tinymce.util.Tools'); }), g('6', [], function () { var a = ['000000', 'Black', '993300', 'Burnt orange', '333300', 'Dark olive', '003300', 'Dark green', '003366', 'Dark azure', '000080', 'Navy Blue', '333399', 'Indigo', '333333', 'Very dark gray', '800000', 'Maroon', 'FF6600', 'Orange', '808000', 'Olive', '008000', 'Green', '008080', 'Teal', '0000FF', 'Blue', '666699', 'Grayish blue', '808080', 'Gray', 'FF0000', 'Red', 'FF9900', 'Amber', '99CC00', 'Yellow green', '339966', 'Sea green', '33CCCC', 'Turquoise', '3366FF', 'Royal blue', '800080', 'Purple', '999999', 'Medium gray', 'FF00FF', 'Magenta', 'FFCC00', 'Gold', 'FFFF00', 'Yellow', '00FF00', 'Lime', '00FFFF', 'Aqua', '00CCFF', 'Sky blue', '993366', 'Red violet', 'FFFFFF', 'White', 'FF99CC', 'Pink', 'FFCC99', 'Peach', 'FFFF99', 'Light yellow', 'CCFFCC', 'Pale green', 'CCFFFF', 'Pale cyan', '99CCFF', 'Light sky blue', 'CC99FF', 'Plum'], b = function (b) { return b.getParam('textcolor_map', a); }, c = function (a) { return a.getParam('forecolor_map', b(a)); }, d = function (a) { return a.getParam('backcolor_map', b(a)); }, e = function (a) { return a.getParam('textcolor_rows', 5); }, f = function (a) { return a.getParam('textcolor_cols', 8); }, g = function (a) { return a.getParam('forecolor_rows', e(a)); }, h = function (a) { return a.getParam('backcolor_rows', e(a)); }, i = function (a) { return a.getParam('forecolor_cols', f(a)); }, j = function (a) { return a.getParam('backcolor_cols', f(a)); }, k = function (a) { return a.getParam('color_picker_callback', null); }, l = function (a) { return typeof k(a) === 'function'; }; return {getForeColorMap: c, getBackColorMap: d, getForeColorRows: g, getBackColorRows: h, getForeColorCols: i, getBackColorCols: j, getColorPickerCallback: k, hasColorPicker: l}; }), g('7', [], function () { var a = function (a, b) { var c; return a.dom.getParents(a.selection.getStart(), function (a) { var d; (d = a.style[b === 'forecolor' ? 'color' : 'background-color']) && (c = d); }), c; }, b = function (a) { var b, c = []; for (b = 0; b < a.length; b += 2)c.push({text: a[b + 1], color: '#' + a[b]}); return c; }, c = function (a, b, c) { a.undoManager.transact(function () { a.focus(), a.formatter.apply(b, {value: c}), a.nodeChanged(); }); }, d = function (a, b) { a.undoManager.transact(function () { a.focus(), a.formatter.remove(b, {value: null}, null, !0), a.nodeChanged(); }); }; return {getCurrentColor: a, mapColors: b, applyFormat: c, removeFormat: d}; }), g('9', ['3'], function (a) { return a('tinymce.util.I18n'); }), g('8', ['4', '9', '6', '7'], function (a, b, c, d) { var e = function (c, e, f, g) { var h, i, j, k, l, m, n, o = 0, p = a.DOM.uniqueId('mcearia'), q = function (a, c) { var d = a === 'transparent'; return '
    ' + (d ? '×' : '') + '
    '; }; for (h = d.mapColors(f), h.push({text: b.translate('No color'), color: 'transparent'}), j = '', k = h.length - 1, m = 0; m < e; m++) { for (j += '', l = 0; l < c; l++)n = m * c + l, n > k ? j += '' : (i = h[n], j += q(i.color, i.text)); j += ''; } if (g) { for (j += '', j += '', l = 0; l < c; l++)j += q('', 'Custom color'); j += ''; } return j += '
    '; }; return {getHtml: e}; }), g('2', ['4', '5', '6', '7', '8'], function (a, b, c, d, e) { var f = function (a, b) { a.style.background = b, a.setAttribute('data-mce-color', b); }, g = function (a) { return function (b) { var c = b.control; c._color ? d.applyFormat(a, c.settings.format, c._color) : d.removeFormat(a, c.settings.format); }; }, h = function (e, g) { return function (h) { var i, j = this.parent(), k = d.getCurrentColor(e, j.settings.format), l = function (a) { j.hidePanel(), j.color(a), d.applyFormat(e, j.settings.format, a); }, m = function () { j.hidePanel(), j.resetColor(), d.removeFormat(e, j.settings.format); }; if (a.DOM.getParent(h.target, '.mce-custom-color-btn')) { j.hidePanel(); var n = c.getColorPickerCallback(e); n.call(e, function (a) { var c, d, e, h = j.panel.getEl().getElementsByTagName('table')[0]; for (c = b.map(h.rows[h.rows.length - 1].childNodes, function (a) { return a.firstChild; }), e = 0; e < c.length && (d = c[e], d.getAttribute('data-mce-color')); e++);if (e === g) for (e = 0; e < g - 1; e++)f(c[e], c[e + 1].getAttribute('data-mce-color')); f(d, a), l(a); }, k); }i = h.target.getAttribute('data-mce-color'), i ? (this.lastId && a.DOM.get(this.lastId).setAttribute('aria-selected', !1), h.target.setAttribute('aria-selected', !0), this.lastId = h.target.id, i === 'transparent' ? m() : l(i)) : i !== null && j.hidePanel(); }; }, i = function (a, b) { return function () { var d = b ? c.getForeColorCols(a) : c.getBackColorCols(a), f = b ? c.getForeColorRows(a) : c.getBackColorRows(a), g = b ? c.getForeColorMap(a) : c.getBackColorMap(a), h = c.hasColorPicker(a); return e.getHtml(d, f, g, h); }; }, j = function (a) { a.addButton('forecolor', {type: 'colorbutton', tooltip: 'Text color', format: 'forecolor', panel: {role: 'application', ariaRemember: !0, html: i(a, !0), onclick: h(a, c.getForeColorCols(a))}, onclick: g(a)}), a.addButton('backcolor', {type: 'colorbutton', tooltip: 'Background color', format: 'hilitecolor', panel: {role: 'application', ariaRemember: !0, html: i(a, !1), onclick: h(a, c.getBackColorCols(a))}, onclick: g(a)}); }; return {register: j}; }), g('0', ['1', '2'], function (a, b) { return a.add('textcolor', function (a) { b.register(a); }), function () {}; }), d('0')(); }()); 2 | -------------------------------------------------------------------------------- /src/components/tinymce/plugins/emoticons/plugin.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | var defs = {}; // id -> {dependencies, definition, instance (possibly undefined)} 3 | 4 | // Used when there is no 'main' module. 5 | // The name is probably (hopefully) unique so minification removes for releases. 6 | var register_3795 = function (id) { 7 | var module = dem(id); 8 | var fragments = id.split('.'); 9 | var target = Function('return this;')(); 10 | for (var i = 0; i < fragments.length - 1; ++i) { 11 | if (target[fragments[i]] === undefined) { target[fragments[i]] = {}; } 12 | target = target[fragments[i]]; 13 | } 14 | target[fragments[fragments.length - 1]] = module; 15 | }; 16 | 17 | var instantiate = function (id) { 18 | var actual = defs[id]; 19 | var dependencies = actual.deps; 20 | var definition = actual.defn; 21 | var len = dependencies.length; 22 | var instances = new Array(len); 23 | for (var i = 0; i < len; ++i) { instances[i] = dem(dependencies[i]); } 24 | var defResult = definition.apply(null, instances); 25 | if (defResult === undefined) { throw 'module [' + id + '] returned undefined'; } 26 | actual.instance = defResult; 27 | }; 28 | 29 | var def = function (id, dependencies, definition) { 30 | if (typeof id !== 'string') { throw 'module id must be a string'; } else if (dependencies === undefined) { throw 'no dependencies for ' + id; } else if (definition === undefined) { throw 'no definition function for ' + id; } 31 | defs[id] = { 32 | deps: dependencies, 33 | defn: definition, 34 | instance: undefined 35 | }; 36 | }; 37 | 38 | var dem = function (id) { 39 | var actual = defs[id]; 40 | if (actual === undefined) { throw 'module [' + id + '] was undefined'; } else if (actual.instance === undefined) { instantiate(id); } 41 | return actual.instance; 42 | }; 43 | 44 | var req = function (ids, callback) { 45 | var len = ids.length; 46 | var instances = new Array(len); 47 | for (var i = 0; i < len; ++i) { instances[i] = dem(ids[i]); } 48 | callback.apply(null, instances); 49 | }; 50 | 51 | var ephox = {}; 52 | 53 | ephox.bolt = { 54 | module: { 55 | api: { 56 | define: def, 57 | require: req, 58 | demand: dem 59 | } 60 | } 61 | }; 62 | 63 | var define = def; 64 | var require = req; 65 | var demand = dem; 66 | // this helps with minification when using a lot of global references 67 | var defineGlobal = function (id, ref) { 68 | define(id, [], function () { return ref; }); 69 | }; 70 | /* jsc 71 | ["tinymce.plugins.emoticons.Plugin","tinymce.core.PluginManager","tinymce.plugins.emoticons.ui.Buttons","global!tinymce.util.Tools.resolve","tinymce.plugins.emoticons.ui.PanelHtml","tinymce.core.util.Tools"] 72 | jsc */ 73 | defineGlobal('global!tinymce.util.Tools.resolve', tinymce.util.Tools.resolve); 74 | /** 75 | * ResolveGlobal.js 76 | * 77 | * Released under LGPL License. 78 | * Copyright (c) 1999-2017 Ephox Corp. All rights reserved 79 | * 80 | * License: http://www.tinymce.com/license 81 | * Contributing: http://www.tinymce.com/contributing 82 | */ 83 | 84 | define( 85 | 'tinymce.core.PluginManager', 86 | [ 87 | 'global!tinymce.util.Tools.resolve' 88 | ], 89 | function (resolve) { 90 | return resolve('tinymce.PluginManager'); 91 | } 92 | ); 93 | 94 | /** 95 | * ResolveGlobal.js 96 | * 97 | * Released under LGPL License. 98 | * Copyright (c) 1999-2017 Ephox Corp. All rights reserved 99 | * 100 | * License: http://www.tinymce.com/license 101 | * Contributing: http://www.tinymce.com/contributing 102 | */ 103 | 104 | define( 105 | 'tinymce.core.util.Tools', 106 | [ 107 | 'global!tinymce.util.Tools.resolve' 108 | ], 109 | function (resolve) { 110 | return resolve('tinymce.util.Tools'); 111 | } 112 | ); 113 | 114 | /** 115 | * PanelHtml.js 116 | * 117 | * Released under LGPL License. 118 | * Copyright (c) 1999-2017 Ephox Corp. All rights reserved 119 | * 120 | * License: http://www.tinymce.com/license 121 | * Contributing: http://www.tinymce.com/contributing 122 | */ 123 | 124 | define( 125 | 'tinymce.plugins.emoticons.ui.PanelHtml', 126 | [ 127 | 'tinymce.core.util.Tools' 128 | ], 129 | function (Tools) { 130 | var emoticons = [ 131 | ['cool', 'cry', 'embarassed', 'foot-in-mouth'], 132 | ['frown', 'innocent', 'kiss', 'laughing'], 133 | ['money-mouth', 'sealed', 'smile', 'surprised'], 134 | ['tongue-out', 'undecided', 'wink', 'yell'] 135 | ]; 136 | 137 | var getHtml = function (pluginUrl) { 138 | var emoticonsHtml; 139 | 140 | emoticonsHtml = ''; 141 | 142 | Tools.each(emoticons, function (row) { 143 | emoticonsHtml += ''; 144 | 145 | Tools.each(row, function (icon) { 146 | var emoticonUrl = pluginUrl + '/img/smiley-' + icon + '.gif'; 147 | 148 | emoticonsHtml += ''; 151 | }); 152 | 153 | emoticonsHtml += ''; 154 | }); 155 | 156 | emoticonsHtml += '
    '; 157 | 158 | return emoticonsHtml; 159 | }; 160 | 161 | return { 162 | getHtml: getHtml 163 | }; 164 | } 165 | ); 166 | /** 167 | * Buttons.js 168 | * 169 | * Released under LGPL License. 170 | * Copyright (c) 1999-2017 Ephox Corp. All rights reserved 171 | * 172 | * License: http://www.tinymce.com/license 173 | * Contributing: http://www.tinymce.com/contributing 174 | */ 175 | 176 | define( 177 | 'tinymce.plugins.emoticons.ui.Buttons', 178 | [ 179 | 'tinymce.plugins.emoticons.ui.PanelHtml' 180 | ], 181 | function (PanelHtml) { 182 | var insertEmoticon = function (editor, src, alt) { 183 | editor.insertContent(editor.dom.createHTML('img', { src: src, alt: alt })); 184 | }; 185 | 186 | var register = function (editor, pluginUrl) { 187 | var panelHtml = PanelHtml.getHtml(pluginUrl); 188 | 189 | editor.addButton('emoticons', { 190 | type: 'panelbutton', 191 | panel: { 192 | role: 'application', 193 | autohide: true, 194 | html: panelHtml, 195 | onclick: function (e) { 196 | var linkElm = editor.dom.getParent(e.target, 'a'); 197 | if (linkElm) { 198 | insertEmoticon(editor, linkElm.getAttribute('data-mce-url'), linkElm.getAttribute('data-mce-alt')); 199 | this.hide(); 200 | } 201 | } 202 | }, 203 | tooltip: 'Emoticons' 204 | }); 205 | }; 206 | 207 | return { 208 | register: register 209 | }; 210 | } 211 | ); 212 | /** 213 | * Plugin.js 214 | * 215 | * Released under LGPL License. 216 | * Copyright (c) 1999-2017 Ephox Corp. All rights reserved 217 | * 218 | * License: http://www.tinymce.com/license 219 | * Contributing: http://www.tinymce.com/contributing 220 | */ 221 | 222 | /** 223 | * This class contains all core logic for the emoticons plugin. 224 | * 225 | * @class tinymce.emoticons.Plugin 226 | * @private 227 | */ 228 | define( 229 | 'tinymce.plugins.emoticons.Plugin', 230 | [ 231 | 'tinymce.core.PluginManager', 232 | 'tinymce.plugins.emoticons.ui.Buttons' 233 | ], 234 | function (PluginManager, Buttons) { 235 | PluginManager.add('emoticons', function (editor, pluginUrl) { 236 | Buttons.register(editor, pluginUrl); 237 | }); 238 | 239 | return function () { }; 240 | } 241 | ); 242 | dem('tinymce.plugins.emoticons.Plugin')(); 243 | })(); 244 | -------------------------------------------------------------------------------- /src/components/tinymce/plugins/directionality/plugin.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | var defs = {}; // id -> {dependencies, definition, instance (possibly undefined)} 3 | 4 | // Used when there is no 'main' module. 5 | // The name is probably (hopefully) unique so minification removes for releases. 6 | var register_3795 = function (id) { 7 | var module = dem(id); 8 | var fragments = id.split('.'); 9 | var target = Function('return this;')(); 10 | for (var i = 0; i < fragments.length - 1; ++i) { 11 | if (target[fragments[i]] === undefined) { target[fragments[i]] = {}; } 12 | target = target[fragments[i]]; 13 | } 14 | target[fragments[fragments.length - 1]] = module; 15 | }; 16 | 17 | var instantiate = function (id) { 18 | var actual = defs[id]; 19 | var dependencies = actual.deps; 20 | var definition = actual.defn; 21 | var len = dependencies.length; 22 | var instances = new Array(len); 23 | for (var i = 0; i < len; ++i) { instances[i] = dem(dependencies[i]); } 24 | var defResult = definition.apply(null, instances); 25 | if (defResult === undefined) { throw 'module [' + id + '] returned undefined'; } 26 | actual.instance = defResult; 27 | }; 28 | 29 | var def = function (id, dependencies, definition) { 30 | if (typeof id !== 'string') { throw 'module id must be a string'; } else if (dependencies === undefined) { throw 'no dependencies for ' + id; } else if (definition === undefined) { throw 'no definition function for ' + id; } 31 | defs[id] = { 32 | deps: dependencies, 33 | defn: definition, 34 | instance: undefined 35 | }; 36 | }; 37 | 38 | var dem = function (id) { 39 | var actual = defs[id]; 40 | if (actual === undefined) { throw 'module [' + id + '] was undefined'; } else if (actual.instance === undefined) { instantiate(id); } 41 | return actual.instance; 42 | }; 43 | 44 | var req = function (ids, callback) { 45 | var len = ids.length; 46 | var instances = new Array(len); 47 | for (var i = 0; i < len; ++i) { instances[i] = dem(ids[i]); } 48 | callback.apply(null, instances); 49 | }; 50 | 51 | var ephox = {}; 52 | 53 | ephox.bolt = { 54 | module: { 55 | api: { 56 | define: def, 57 | require: req, 58 | demand: dem 59 | } 60 | } 61 | }; 62 | 63 | var define = def; 64 | var require = req; 65 | var demand = dem; 66 | // this helps with minification when using a lot of global references 67 | var defineGlobal = function (id, ref) { 68 | define(id, [], function () { return ref; }); 69 | }; 70 | /* jsc 71 | ["tinymce.plugins.directionality.Plugin","tinymce.core.PluginManager","tinymce.plugins.directionality.api.Commands","tinymce.plugins.directionality.ui.Buttons","global!tinymce.util.Tools.resolve","tinymce.plugins.directionality.core.Direction","tinymce.core.util.Tools"] 72 | jsc */ 73 | defineGlobal('global!tinymce.util.Tools.resolve', tinymce.util.Tools.resolve); 74 | /** 75 | * ResolveGlobal.js 76 | * 77 | * Released under LGPL License. 78 | * Copyright (c) 1999-2017 Ephox Corp. All rights reserved 79 | * 80 | * License: http://www.tinymce.com/license 81 | * Contributing: http://www.tinymce.com/contributing 82 | */ 83 | 84 | define( 85 | 'tinymce.core.PluginManager', 86 | [ 87 | 'global!tinymce.util.Tools.resolve' 88 | ], 89 | function (resolve) { 90 | return resolve('tinymce.PluginManager'); 91 | } 92 | ); 93 | 94 | /** 95 | * ResolveGlobal.js 96 | * 97 | * Released under LGPL License. 98 | * Copyright (c) 1999-2017 Ephox Corp. All rights reserved 99 | * 100 | * License: http://www.tinymce.com/license 101 | * Contributing: http://www.tinymce.com/contributing 102 | */ 103 | 104 | define( 105 | 'tinymce.core.util.Tools', 106 | [ 107 | 'global!tinymce.util.Tools.resolve' 108 | ], 109 | function (resolve) { 110 | return resolve('tinymce.util.Tools'); 111 | } 112 | ); 113 | 114 | /** 115 | * Direction.js 116 | * 117 | * Released under LGPL License. 118 | * Copyright (c) 1999-2017 Ephox Corp. All rights reserved 119 | * 120 | * License: http://www.tinymce.com/license 121 | * Contributing: http://www.tinymce.com/contributing 122 | */ 123 | 124 | define( 125 | 'tinymce.plugins.directionality.core.Direction', 126 | [ 127 | 'tinymce.core.util.Tools' 128 | ], 129 | function (Tools) { 130 | var setDir = function (editor, dir) { 131 | var dom = editor.dom, curDir, blocks = editor.selection.getSelectedBlocks(); 132 | 133 | if (blocks.length) { 134 | curDir = dom.getAttrib(blocks[0], 'dir'); 135 | 136 | Tools.each(blocks, function (block) { 137 | // Add dir to block if the parent block doesn't already have that dir 138 | if (!dom.getParent(block.parentNode, '*[dir="' + dir + '"]', dom.getRoot())) { 139 | dom.setAttrib(block, 'dir', curDir !== dir ? dir : null); 140 | } 141 | }); 142 | 143 | editor.nodeChanged(); 144 | } 145 | }; 146 | 147 | return { 148 | setDir: setDir 149 | }; 150 | } 151 | ); 152 | 153 | /** 154 | * Commands.js 155 | * 156 | * Released under LGPL License. 157 | * Copyright (c) 1999-2017 Ephox Corp. All rights reserved 158 | * 159 | * License: http://www.tinymce.com/license 160 | * Contributing: http://www.tinymce.com/contributing 161 | */ 162 | 163 | define( 164 | 'tinymce.plugins.directionality.api.Commands', 165 | [ 166 | 'tinymce.plugins.directionality.core.Direction' 167 | ], 168 | function (Direction) { 169 | var register = function (editor) { 170 | editor.addCommand('mceDirectionLTR', function () { 171 | Direction.setDir(editor, 'ltr'); 172 | }); 173 | 174 | editor.addCommand('mceDirectionRTL', function () { 175 | Direction.setDir(editor, 'rtl'); 176 | }); 177 | }; 178 | 179 | return { 180 | register: register 181 | }; 182 | } 183 | ); 184 | /** 185 | * Buttons.js 186 | * 187 | * Released under LGPL License. 188 | * Copyright (c) 1999-2017 Ephox Corp. All rights reserved 189 | * 190 | * License: http://www.tinymce.com/license 191 | * Contributing: http://www.tinymce.com/contributing 192 | */ 193 | 194 | define( 195 | 'tinymce.plugins.directionality.ui.Buttons', 196 | [ 197 | 'tinymce.core.util.Tools' 198 | ], 199 | function (Tools) { 200 | var generateSelector = function (dir) { 201 | var selector = []; 202 | 203 | Tools.each('h1 h2 h3 h4 h5 h6 div p'.split(' '), function (name) { 204 | selector.push(name + '[dir=' + dir + ']'); 205 | }); 206 | 207 | return selector.join(','); 208 | }; 209 | 210 | var register = function (editor) { 211 | editor.addButton('ltr', { 212 | title: 'Left to right', 213 | cmd: 'mceDirectionLTR', 214 | stateSelector: generateSelector('ltr') 215 | }); 216 | 217 | editor.addButton('rtl', { 218 | title: 'Right to left', 219 | cmd: 'mceDirectionRTL', 220 | stateSelector: generateSelector('rtl') 221 | }); 222 | }; 223 | 224 | return { 225 | register: register 226 | }; 227 | } 228 | ); 229 | /** 230 | * Plugin.js 231 | * 232 | * Released under LGPL License. 233 | * Copyright (c) 1999-2017 Ephox Corp. All rights reserved 234 | * 235 | * License: http://www.tinymce.com/license 236 | * Contributing: http://www.tinymce.com/contributing 237 | */ 238 | 239 | define( 240 | 'tinymce.plugins.directionality.Plugin', 241 | [ 242 | 'tinymce.core.PluginManager', 243 | 'tinymce.plugins.directionality.api.Commands', 244 | 'tinymce.plugins.directionality.ui.Buttons' 245 | ], 246 | function (PluginManager, Commands, Buttons) { 247 | PluginManager.add('directionality', function (editor) { 248 | Commands.register(editor); 249 | Buttons.register(editor); 250 | }); 251 | 252 | return function () { }; 253 | } 254 | ); 255 | dem('tinymce.plugins.directionality.Plugin')(); 256 | })(); 257 | -------------------------------------------------------------------------------- /src/components/tinymce/plugins/template/plugin.min.js: -------------------------------------------------------------------------------- 1 | !(function () { var a = {}, b = function (b) { for (var c = a[b], e = c.deps, f = c.defn, g = e.length, h = new Array(g), i = 0; i < g; ++i)h[i] = d(e[i]); var j = f.apply(null, h); if (void 0 === j) throw 'module [' + b + '] returned undefined'; c.instance = j; }, c = function (b, c, d) { if (typeof b !== 'string') throw 'module id must be a string'; if (void 0 === c) throw 'no dependencies for ' + b; if (void 0 === d) throw 'no definition function for ' + b; a[b] = {deps: c, defn: d, instance: void 0}; }, d = function (c) { var d = a[c]; if (void 0 === d) throw 'module [' + c + '] was undefined'; return void 0 === d.instance && b(c), d.instance; }, e = function (a, b) { for (var c = a.length, e = new Array(c), f = 0; f < c; ++f)e[f] = d(a[f]); b.apply(null, e); }, f = {}; f.bolt = {module: {api: {define: c, require: e, demand: d}}}; var g = c, h = function (a, b) { g(a, [], function () { return b; }); }; h('5', tinymce.util.Tools.resolve), g('1', ['5'], function (a) { return a('tinymce.PluginManager'); }), h('c', Array), h('d', Error), g('6', ['c', 'd'], function (a, b) { var c = function () {}, d = function (a, b) { return function () { return a(b.apply(null, arguments)); }; }, e = function (a) { return function () { return a; }; }, f = function (a) { return a; }, g = function (a, b) { return a === b; }, h = function (b) { for (var c = new a(arguments.length - 1), d = 1; d < arguments.length; d++)c[d - 1] = arguments[d]; return function () { for (var d = new a(arguments.length), e = 0; e < d.length; e++)d[e] = arguments[e]; var f = c.concat(d); return b.apply(null, f); }; }, i = function (a) { return function () { return !a.apply(null, arguments); }; }, j = function (a) { return function () { throw new b(a); }; }, k = function (a) { return a(); }, l = function (a) { a(); }, m = e(!1), n = e(!0); return {noop: c, compose: d, constant: e, identity: f, tripleEquals: g, curry: h, not: i, die: j, apply: k, call: l, never: m, always: n}; }), g('8', ['5'], function (a) { return a('tinymce.util.Tools'); }), g('e', ['5'], function (a) { return a('tinymce.util.XHR'); }), g('f', ['5'], function (a) { return a('tinymce.dom.DOMUtils'); }), g('9', ['f'], function (a) { var b = function (a) { return a.getParam('template_cdate_classes', 'cdate'); }, c = function (a) { return a.getParam('template_mdate_classes', 'mdate'); }, d = function (a) { return a.getParam('template_selected_content_classes', 'selcontent'); }, e = function (a) { return a.getParam('template_preview_replace_values'); }, f = function (a) { return a.getParam('template_replace_values'); }, g = function (a) { return a.templates; }, h = function (a) { return a.getParam('template_cdate_format', a.getLang('template.cdate_format')); }, i = function (a) { return a.getParam('template_mdate_format', a.getLang('template.mdate_format')); }, j = function (a) { return a.getParam('template_popup_width', 600); }, k = function (b) { return Math.min(a.DOM.getViewPort().h, b.getParam('template_popup_height', 500)); }; return {getCreationDateClasses: b, getModificationDateClasses: c, getSelectedContentClasses: d, getPreviewReplaceValues: e, getTemplateReplaceValues: f, getTemplates: g, getCdateFormat: h, getMdateFormat: i, getDialogWidth: j, getDialogHeight: k}; }), g('a', [], function () { var a = function (a, b) { if (a = '' + a, a.length < b) for (var c = 0; c < b - a.length; c++)a = '0' + a; return a; }, b = function (b, c, d) { var e = 'Sun Mon Tue Wed Thu Fri Sat Sun'.split(' '), f = 'Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday'.split(' '), g = 'Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec'.split(' '), h = 'January February March April May June July August September October November December'.split(' '); return d = d || new Date(), c = c.replace('%D', '%m/%d/%Y'), c = c.replace('%r', '%I:%M:%S %p'), c = c.replace('%Y', '' + d.getFullYear()), c = c.replace('%y', '' + d.getYear()), c = c.replace('%m', a(d.getMonth() + 1, 2)), c = c.replace('%d', a(d.getDate(), 2)), c = c.replace('%H', '' + a(d.getHours(), 2)), c = c.replace('%M', '' + a(d.getMinutes(), 2)), c = c.replace('%S', '' + a(d.getSeconds(), 2)), c = c.replace('%I', '' + ((d.getHours() + 11) % 12 + 1)), c = c.replace('%p', '' + (d.getHours() < 12 ? 'AM' : 'PM')), c = c.replace('%B', '' + b.translate(h[d.getMonth()])), c = c.replace('%b', '' + b.translate(g[d.getMonth()])), c = c.replace('%A', '' + b.translate(f[d.getDay()])), c = c.replace('%a', '' + b.translate(e[d.getDay()])), c = c.replace('%%', '%'); }; return {getDateTime: b}; }), g('7', ['8', 'e', '9', 'a'], function (a, b, c, d) { var e = function (a, d) { return function () { var e = c.getTemplates(a); return typeof e === 'function' ? void e(d) : void (typeof e === 'string' ? b.send({url: e, success: function (a) { d(JSON.parse(a)); }}) : d(e)); }; }, f = function (b, c, d) { return a.each(d, function (a, b) { typeof a === 'function' && (a = a(b)), c = c.replace(new RegExp('\\{\\$' + b + '\\}', 'g'), a); }), c; }, g = function (b, d) { var e = b.dom, f = c.getTemplateReplaceValues(b); a.each(e.select('*', d), function (b) { a.each(f, function (a, c) { e.hasClass(b, c) && typeof f[c] === 'function' && f[c](b); }); }); }, h = function (a, b) { return new RegExp('\\b' + b + '\\b', 'g').test(a.className); }, i = function (b, e, i) { var j, k, l = b.dom, m = b.selection.getContent(); i = f(b, i, c.getTemplateReplaceValues(b)), j = l.create('div', null, i), k = l.select('.mceTmpl', j), k && k.length > 0 && (j = l.create('div', null), j.appendChild(k[0].cloneNode(!0))), a.each(l.select('*', j), function (a) { h(a, c.getCreationDateClasses(b).replace(/\s+/g, '|')) && (a.innerHTML = d.getDateTime(b, c.getCdateFormat(b))), h(a, c.getModificationDateClasses(b).replace(/\s+/g, '|')) && (a.innerHTML = d.getDateTime(b, c.getMdateFormat(b))), h(a, c.getSelectedContentClasses(b).replace(/\s+/g, '|')) && (a.innerHTML = m); }), g(b, j), b.execCommand('mceInsertContent', !1, j.innerHTML), b.addVisual(); }; return {createTemplateList: e, replaceTemplateValues: f, replaceVals: g, insertTemplate: i}; }), g('2', ['6', '7'], function (a, b) { var c = function (c) { c.addCommand('mceInsertTemplate', a.curry(b.insertTemplate, c)); }; return {register: c}; }), g('3', ['8', '9', 'a', '7'], function (a, b, c, d) { var e = function (e) { e.on('PreProcess', function (f) { var g = e.dom, h = b.getMdateFormat(e); a.each(g.select('div', f.node), function (b) { g.hasClass(b, 'mceTmpl') && (a.each(g.select('*', b), function (a) { g.hasClass(a, e.getParam('template_mdate_classes', 'mdate').replace(/\s+/g, '|')) && (a.innerHTML = c.getDateTime(e, h)); }), d.replaceVals(e, b)); }); }); }; return {setup: e}; }), g('b', ['f', '8', 'e', '9', '7'], function (a, b, c, d, e) { var f = function (a, c, f) { if (f.indexOf('') === -1) { var g = ''; b.each(a.contentCSS, function (b) { g += ''; }); var h = a.settings.body_class || ''; h.indexOf('=') !== -1 && (h = a.getParam('body_class', '', 'hash'), h = h[a.id] || ''), f = '' + g + '' + f + ''; }f = e.replaceTemplateValues(a, f, d.getPreviewReplaceValues(a)); var i = c.find('iframe')[0].getEl().contentWindow.document; i.open(), i.write(f), i.close(); }, g = function (a, g) { var h, i, j = []; if (!g || g.length === 0) { var k = a.translate('No templates defined.'); return void a.notificationManager.open({text: k, type: 'info'}); }b.each(g, function (a) { j.push({selected: !j.length, text: a.title, value: {url: a.url, content: a.content, description: a.description}}); }); var l = function (b) { var d = b.control.value(); d.url ? c.send({url: d.url, success: function (b) { i = b, f(a, h, i); }}) : (i = d.content, f(a, h, i)), h.find('#description')[0].text(b.control.value().description); }; h = a.windowManager.open({title: 'Insert template', layout: 'flex', direction: 'column', align: 'stretch', padding: 15, spacing: 10, items: [{type: 'form', flex: 0, padding: 0, items: [{type: 'container', label: 'Templates', items: {type: 'listbox', label: 'Templates', name: 'template', values: j, onselect: l}}]}, {type: 'label', name: 'description', label: 'Description', text: '\xa0'}, {type: 'iframe', flex: 1, border: 1}], onsubmit: function () { e.insertTemplate(a, !1, i); }, minWidth: d.getDialogWidth(a), minHeight: d.getDialogHeight(a)}), h.find('listbox')[0].fire('select'); }; return {open: g}; }), g('4', ['7', 'b'], function (a, b) { var c = function (a) { return function (c) { b.open(a, c); }; }, d = function (b) { b.addButton('template', {title: 'Insert template', onclick: a.createTemplateList(b.settings, c(b))}), b.addMenuItem('template', {text: 'Template', onclick: a.createTemplateList(b.settings, c(b)), icon: 'template', context: 'insert'}); }; return {register: d}; }), g('0', ['1', '2', '3', '4'], function (a, b, c, d) { return a.add('template', function (a) { d.register(a), b.register(a), c.setup(a); }), function () {}; }), d('0')(); }()); 2 | -------------------------------------------------------------------------------- /src/components/tinymce/langs/en_GB.js: -------------------------------------------------------------------------------- 1 | tinymce.addI18n('en_GB', { 2 | 'Cut': 'Cut', 3 | 'Heading 5': 'Heading 5', 4 | 'Header 2': 'Header 2', 5 | 'Your browser doesn\'t support direct access to the clipboard. Please use the Ctrl+X\/C\/V keyboard shortcuts instead.': 'Your browser doesn\'t support direct access to the clipboard. Please use the Ctrl+X\/C\/V keyboard shortcuts instead.', 6 | 'Heading 4': 'Heading 4', 7 | 'Div': 'Div', 8 | 'Heading 2': 'Heading 2', 9 | 'Paste': 'Paste', 10 | 'Close': 'Close', 11 | 'Font Family': 'Font Family', 12 | 'Pre': 'Pre', 13 | 'Align right': 'Align right', 14 | 'New document': 'New document', 15 | 'Blockquote': 'Blockquote', 16 | 'Numbered list': 'Numbered list', 17 | 'Heading 1': 'Heading 1', 18 | 'Headings': 'Headings', 19 | 'Increase indent': 'Increase indent', 20 | 'Formats': 'Formats', 21 | 'Headers': 'Headers', 22 | 'Select all': 'Select all', 23 | 'Header 3': 'Header 3', 24 | 'Blocks': 'Blocks', 25 | 'Undo': 'Undo', 26 | 'Strikethrough': 'Strike-through', 27 | 'Bullet list': 'Bullet list', 28 | 'Header 1': 'Header 1', 29 | 'Superscript': 'Superscript', 30 | 'Clear formatting': 'Clear formatting', 31 | 'Font Sizes': 'Font Sizes', 32 | 'Subscript': 'Subscript', 33 | 'Header 6': 'Header 6', 34 | 'Redo': 'Redo', 35 | 'Paragraph': 'Paragraph', 36 | 'Ok': 'Ok', 37 | 'Bold': 'Bold', 38 | 'Code': 'Code', 39 | 'Italic': 'Italic', 40 | 'Align center': 'Align centre', 41 | 'Header 5': 'Header 5', 42 | 'Heading 6': 'Heading 6', 43 | 'Heading 3': 'Heading 3', 44 | 'Decrease indent': 'Decrease indent', 45 | 'Header 4': 'Header 4', 46 | 'Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.': 'Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.', 47 | 'Underline': 'Underline', 48 | 'Cancel': 'Cancel', 49 | 'Justify': 'Justify', 50 | 'Inline': 'Inline', 51 | 'Copy': 'Copy', 52 | 'Align left': 'Align left', 53 | 'Visual aids': 'Visual aids', 54 | 'Lower Greek': 'Lower Greek', 55 | 'Square': 'Square', 56 | 'Default': 'Default', 57 | 'Lower Alpha': 'Lower Alpha', 58 | 'Circle': 'Circle', 59 | 'Disc': 'Disc', 60 | 'Upper Alpha': 'Upper Alpha', 61 | 'Upper Roman': 'Upper Roman', 62 | 'Lower Roman': 'Lower Roman', 63 | 'Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.': 'ID should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.', 64 | 'Name': 'Name', 65 | 'Anchor': 'Anchor', 66 | 'Id': 'ID', 67 | 'You have unsaved changes are you sure you want to navigate away?': 'You have unsaved changes are you sure you want to navigate away?', 68 | 'Restore last draft': 'Restore last draft', 69 | 'Special character': 'Special character', 70 | 'Source code': 'Source code', 71 | 'Language': 'Language', 72 | 'Insert\/Edit code sample': 'Insert\/Edit code sample', 73 | 'B': 'B', 74 | 'R': 'R', 75 | 'G': 'G', 76 | 'Color': 'Colour', 77 | 'Right to left': 'Right to left', 78 | 'Left to right': 'Left to right', 79 | 'Emoticons': 'Emoticons', 80 | 'Robots': 'Robots', 81 | 'Document properties': 'Document properties', 82 | 'Title': 'Title', 83 | 'Keywords': 'Keywords', 84 | 'Encoding': 'Encoding', 85 | 'Description': 'Description', 86 | 'Author': 'Author', 87 | 'Fullscreen': 'Full-screen', 88 | 'Horizontal line': 'Horizontal line', 89 | 'Horizontal space': 'Horizontal space', 90 | 'Insert\/edit image': 'Insert\/edit image', 91 | 'General': 'General', 92 | 'Advanced': 'Advanced', 93 | 'Source': 'Source', 94 | 'Border': 'Border', 95 | 'Constrain proportions': 'Constrain proportions', 96 | 'Vertical space': 'Vertical space', 97 | 'Image description': 'Image description', 98 | 'Style': 'Style', 99 | 'Dimensions': 'Dimensions', 100 | 'Insert image': 'Insert image', 101 | 'Image': 'Image', 102 | 'Zoom in': 'Zoom in', 103 | 'Contrast': 'Contrast', 104 | 'Back': 'Back', 105 | 'Gamma': 'Gamma', 106 | 'Flip horizontally': 'Flip horizontally', 107 | 'Resize': 'Resize', 108 | 'Sharpen': 'Sharpen', 109 | 'Zoom out': 'Zoom out', 110 | 'Image options': 'Image options', 111 | 'Apply': 'Apply', 112 | 'Brightness': 'Brightness', 113 | 'Rotate clockwise': 'Rotate clockwise', 114 | 'Rotate counterclockwise': 'Rotate counterclockwise', 115 | 'Edit image': 'Edit image', 116 | 'Color levels': 'Colour levels', 117 | 'Crop': 'Crop', 118 | 'Orientation': 'Orientation', 119 | 'Flip vertically': 'Flip vertically', 120 | 'Invert': 'Invert', 121 | 'Date\/time': 'Date\/time', 122 | 'Insert date\/time': 'Insert date\/time', 123 | 'Remove link': 'Remove link', 124 | 'Url': 'URL', 125 | 'Text to display': 'Text to display', 126 | 'Anchors': 'Anchors', 127 | 'Insert link': 'Insert link', 128 | 'Link': 'Link', 129 | 'New window': 'New window', 130 | 'None': 'None', 131 | 'The URL you entered seems to be an external link. Do you want to add the required http:\/\/ prefix?': 'The URL you entered seems to be an external link. Do you want to add the required http:\/\/ prefix?', 132 | 'Paste or type a link': 'Paste or type a link', 133 | 'Target': 'Target', 134 | 'The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?': 'The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?', 135 | 'Insert\/edit link': 'Insert\/edit link', 136 | 'Insert\/edit video': 'Insert\/edit video', 137 | 'Media': 'Media', 138 | 'Alternative source': 'Alternative source', 139 | 'Paste your embed code below:': 'Paste your embed code below:', 140 | 'Insert video': 'Insert video', 141 | 'Poster': 'Poster', 142 | 'Insert\/edit media': 'Insert\/edit media', 143 | 'Embed': 'Embed', 144 | 'Nonbreaking space': 'Non-breaking space', 145 | 'Page break': 'Page break', 146 | 'Paste as text': 'Paste as text', 147 | 'Preview': 'Preview', 148 | 'Print': 'Print', 149 | 'Save': 'Save', 150 | 'Could not find the specified string.': 'Could not find the specified string.', 151 | 'Replace': 'Replace', 152 | 'Next': 'Next', 153 | 'Whole words': 'Whole words', 154 | 'Find and replace': 'Find and replace', 155 | 'Replace with': 'Replace with', 156 | 'Find': 'Find', 157 | 'Replace all': 'Replace all', 158 | 'Match case': 'Match case', 159 | 'Prev': 'Prev', 160 | 'Spellcheck': 'Spell-check', 161 | 'Finish': 'Finish', 162 | 'Ignore all': 'Ignore all', 163 | 'Ignore': 'Ignore', 164 | 'Add to Dictionary': 'Add to Dictionary', 165 | 'Insert row before': 'Insert row before', 166 | 'Rows': 'Rows', 167 | 'Height': 'Height', 168 | 'Paste row after': 'Paste row after', 169 | 'Alignment': 'Alignment', 170 | 'Border color': 'Border colour', 171 | 'Column group': 'Column group', 172 | 'Row': 'Row', 173 | 'Insert column before': 'Insert column before', 174 | 'Split cell': 'Split cell', 175 | 'Cell padding': 'Cell padding', 176 | 'Cell spacing': 'Cell spacing', 177 | 'Row type': 'Row type', 178 | 'Insert table': 'Insert table', 179 | 'Body': 'Body', 180 | 'Caption': 'Caption', 181 | 'Footer': 'Footer', 182 | 'Delete row': 'Delete row', 183 | 'Paste row before': 'Paste row before', 184 | 'Scope': 'Scope', 185 | 'Delete table': 'Delete table', 186 | 'H Align': 'H Align', 187 | 'Top': 'Top', 188 | 'Header cell': 'Header cell', 189 | 'Column': 'Column', 190 | 'Row group': 'Row group', 191 | 'Cell': 'Cell', 192 | 'Middle': 'Middle', 193 | 'Cell type': 'Cell type', 194 | 'Copy row': 'Copy row', 195 | 'Row properties': 'Row properties', 196 | 'Table properties': 'Table properties', 197 | 'Bottom': 'Bottom', 198 | 'V Align': 'V Align', 199 | 'Header': 'Header', 200 | 'Right': 'Right', 201 | 'Insert column after': 'Insert column after', 202 | 'Cols': 'Cols', 203 | 'Insert row after': 'Insert row after', 204 | 'Width': 'Width', 205 | 'Cell properties': 'Cell properties', 206 | 'Left': 'Left', 207 | 'Cut row': 'Cut row', 208 | 'Delete column': 'Delete column', 209 | 'Center': 'Centre', 210 | 'Merge cells': 'Merge cells', 211 | 'Insert template': 'Insert template', 212 | 'Templates': 'Templates', 213 | 'Background color': 'Background colour', 214 | 'Custom...': 'Custom...', 215 | 'Custom color': 'Custom colour', 216 | 'No color': 'No colour', 217 | 'Text color': 'Text colour', 218 | 'Table of Contents': 'Table of Contents', 219 | 'Show blocks': 'Show blocks', 220 | 'Show invisible characters': 'Show invisible characters', 221 | 'Words: {0}': 'Words: {0}', 222 | 'Insert': 'Insert', 223 | 'File': 'File', 224 | 'Edit': 'Edit', 225 | 'Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help': 'Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help', 226 | 'Tools': 'Tools', 227 | 'View': 'View', 228 | 'Table': 'Table', 229 | 'Format': 'Format' 230 | }); 231 | -------------------------------------------------------------------------------- /src/components/tinymce/plugins/colorpicker/plugin.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | var defs = {}; // id -> {dependencies, definition, instance (possibly undefined)} 3 | 4 | // Used when there is no 'main' module. 5 | // The name is probably (hopefully) unique so minification removes for releases. 6 | var register_3795 = function (id) { 7 | var module = dem(id); 8 | var fragments = id.split('.'); 9 | var target = Function('return this;')(); 10 | for (var i = 0; i < fragments.length - 1; ++i) { 11 | if (target[fragments[i]] === undefined) { target[fragments[i]] = {}; } 12 | target = target[fragments[i]]; 13 | } 14 | target[fragments[fragments.length - 1]] = module; 15 | }; 16 | 17 | var instantiate = function (id) { 18 | var actual = defs[id]; 19 | var dependencies = actual.deps; 20 | var definition = actual.defn; 21 | var len = dependencies.length; 22 | var instances = new Array(len); 23 | for (var i = 0; i < len; ++i) { instances[i] = dem(dependencies[i]); } 24 | var defResult = definition.apply(null, instances); 25 | if (defResult === undefined) { throw 'module [' + id + '] returned undefined'; } 26 | actual.instance = defResult; 27 | }; 28 | 29 | var def = function (id, dependencies, definition) { 30 | if (typeof id !== 'string') { throw 'module id must be a string'; } else if (dependencies === undefined) { throw 'no dependencies for ' + id; } else if (definition === undefined) { throw 'no definition function for ' + id; } 31 | defs[id] = { 32 | deps: dependencies, 33 | defn: definition, 34 | instance: undefined 35 | }; 36 | }; 37 | 38 | var dem = function (id) { 39 | var actual = defs[id]; 40 | if (actual === undefined) { throw 'module [' + id + '] was undefined'; } else if (actual.instance === undefined) { instantiate(id); } 41 | return actual.instance; 42 | }; 43 | 44 | var req = function (ids, callback) { 45 | var len = ids.length; 46 | var instances = new Array(len); 47 | for (var i = 0; i < len; ++i) { instances[i] = dem(ids[i]); } 48 | callback.apply(null, instances); 49 | }; 50 | 51 | var ephox = {}; 52 | 53 | ephox.bolt = { 54 | module: { 55 | api: { 56 | define: def, 57 | require: req, 58 | demand: dem 59 | } 60 | } 61 | }; 62 | 63 | var define = def; 64 | var require = req; 65 | var demand = dem; 66 | // this helps with minification when using a lot of global references 67 | var defineGlobal = function (id, ref) { 68 | define(id, [], function () { return ref; }); 69 | }; 70 | /* jsc 71 | ["tinymce.plugins.colorpicker.Plugin","tinymce.core.PluginManager","tinymce.plugins.colorpicker.ui.Dialog","global!tinymce.util.Tools.resolve","tinymce.core.util.Color"] 72 | jsc */ 73 | defineGlobal('global!tinymce.util.Tools.resolve', tinymce.util.Tools.resolve); 74 | /** 75 | * ResolveGlobal.js 76 | * 77 | * Released under LGPL License. 78 | * Copyright (c) 1999-2017 Ephox Corp. All rights reserved 79 | * 80 | * License: http://www.tinymce.com/license 81 | * Contributing: http://www.tinymce.com/contributing 82 | */ 83 | 84 | define( 85 | 'tinymce.core.PluginManager', 86 | [ 87 | 'global!tinymce.util.Tools.resolve' 88 | ], 89 | function (resolve) { 90 | return resolve('tinymce.PluginManager'); 91 | } 92 | ); 93 | 94 | /** 95 | * ResolveGlobal.js 96 | * 97 | * Released under LGPL License. 98 | * Copyright (c) 1999-2017 Ephox Corp. All rights reserved 99 | * 100 | * License: http://www.tinymce.com/license 101 | * Contributing: http://www.tinymce.com/contributing 102 | */ 103 | 104 | define( 105 | 'tinymce.core.util.Color', 106 | [ 107 | 'global!tinymce.util.Tools.resolve' 108 | ], 109 | function (resolve) { 110 | return resolve('tinymce.util.Color'); 111 | } 112 | ); 113 | 114 | /** 115 | * Dialog.js 116 | * 117 | * Released under LGPL License. 118 | * Copyright (c) 1999-2017 Ephox Corp. All rights reserved 119 | * 120 | * License: http://www.tinymce.com/license 121 | * Contributing: http://www.tinymce.com/contributing 122 | */ 123 | 124 | define( 125 | 'tinymce.plugins.colorpicker.ui.Dialog', 126 | [ 127 | 'tinymce.core.util.Color' 128 | ], 129 | function (Color) { 130 | var showPreview = function (win, hexColor) { 131 | win.find('#preview')[0].getEl().style.background = hexColor; 132 | }; 133 | 134 | var setColor = function (win, value) { 135 | var color = new Color(value), rgb = color.toRgb(); 136 | 137 | win.fromJSON({ 138 | r: rgb.r, 139 | g: rgb.g, 140 | b: rgb.b, 141 | hex: color.toHex().substr(1) 142 | }); 143 | 144 | showPreview(win, color.toHex()); 145 | }; 146 | 147 | var open = function (editor, callback, value) { 148 | var win = editor.windowManager.open({ 149 | title: 'Color', 150 | items: { 151 | type: 'container', 152 | layout: 'flex', 153 | direction: 'row', 154 | align: 'stretch', 155 | padding: 5, 156 | spacing: 10, 157 | items: [ 158 | { 159 | type: 'colorpicker', 160 | value: value, 161 | onchange: function () { 162 | var rgb = this.rgb(); 163 | 164 | if (win) { 165 | win.find('#r').value(rgb.r); 166 | win.find('#g').value(rgb.g); 167 | win.find('#b').value(rgb.b); 168 | win.find('#hex').value(this.value().substr(1)); 169 | showPreview(win, this.value()); 170 | } 171 | } 172 | }, 173 | { 174 | type: 'form', 175 | padding: 0, 176 | labelGap: 5, 177 | defaults: { 178 | type: 'textbox', 179 | size: 7, 180 | value: '0', 181 | flex: 1, 182 | spellcheck: false, 183 | onchange: function () { 184 | var colorPickerCtrl = win.find('colorpicker')[0]; 185 | var name, value; 186 | 187 | name = this.name(); 188 | value = this.value(); 189 | 190 | if (name === 'hex') { 191 | value = '#' + value; 192 | setColor(win, value); 193 | colorPickerCtrl.value(value); 194 | return; 195 | } 196 | 197 | value = { 198 | r: win.find('#r').value(), 199 | g: win.find('#g').value(), 200 | b: win.find('#b').value() 201 | }; 202 | 203 | colorPickerCtrl.value(value); 204 | setColor(win, value); 205 | } 206 | }, 207 | items: [ 208 | { name: 'r', label: 'R', autofocus: 1 }, 209 | { name: 'g', label: 'G' }, 210 | { name: 'b', label: 'B' }, 211 | { name: 'hex', label: '#', value: '000000' }, 212 | { name: 'preview', type: 'container', border: 1 } 213 | ] 214 | } 215 | ] 216 | }, 217 | onSubmit: function () { 218 | callback('#' + win.toJSON().hex); 219 | } 220 | }); 221 | 222 | setColor(win, value); 223 | }; 224 | 225 | return { 226 | open: open 227 | }; 228 | } 229 | ); 230 | /** 231 | * Plugin.js 232 | * 233 | * Released under LGPL License. 234 | * Copyright (c) 1999-2017 Ephox Corp. All rights reserved 235 | * 236 | * License: http://www.tinymce.com/license 237 | * Contributing: http://www.tinymce.com/contributing 238 | */ 239 | 240 | define( 241 | 'tinymce.plugins.colorpicker.Plugin', 242 | [ 243 | 'tinymce.core.PluginManager', 244 | 'tinymce.plugins.colorpicker.ui.Dialog' 245 | ], 246 | function (PluginManager, Dialog) { 247 | PluginManager.add('colorpicker', function (editor) { 248 | if (!editor.settings.color_picker_callback) { 249 | editor.settings.color_picker_callback = function (callback, value) { 250 | Dialog.open(editor, callback, value); 251 | }; 252 | } 253 | }); 254 | 255 | return function () { }; 256 | } 257 | ); 258 | dem('tinymce.plugins.colorpicker.Plugin')(); 259 | })(); 260 | -------------------------------------------------------------------------------- /src/components/tinymce/plugins/contextmenu/plugin.min.js: -------------------------------------------------------------------------------- 1 | !(function () { var a = {}, b = function (b) { for (var c = a[b], e = c.deps, f = c.defn, g = e.length, h = new Array(g), i = 0; i < g; ++i)h[i] = d(e[i]); var j = f.apply(null, h); if (void 0 === j) throw 'module [' + b + '] returned undefined'; c.instance = j; }, c = function (b, c, d) { if (typeof b !== 'string') throw 'module id must be a string'; if (void 0 === c) throw 'no dependencies for ' + b; if (void 0 === d) throw 'no definition function for ' + b; a[b] = {deps: c, defn: d, instance: void 0}; }, d = function (c) { var d = a[c]; if (void 0 === d) throw 'module [' + c + '] was undefined'; return void 0 === d.instance && b(c), d.instance; }, e = function (a, b) { for (var c = a.length, e = new Array(c), f = 0; f < c; ++f)e[f] = d(a[f]); b.apply(null, e); }, f = {}; f.bolt = {module: {api: {define: c, require: e, demand: d}}}; var g = c, h = function (a, b) { g(a, [], function () { return b; }); }; g('1', [], function () { var a = function (b) { var c = b, d = function () { return c; }, e = function (a) { c = a; }, f = function () { return a(d()); }; return {get: d, set: e, clone: f}; }; return a; }), h('5', tinymce.util.Tools.resolve), g('2', ['5'], function (a) { return a('tinymce.PluginManager'); }), g('3', [], function () { var a = function (a) { var b = function () { return a.get(); }; return {isContextMenuVisible: b}; }; return {get: a}; }), g('6', ['5'], function (a) { return a('tinymce.dom.DOMUtils'); }), g('7', ['5'], function (a) { return a('tinymce.Env'); }), g('8', [], function () { var a = function (a) { return a.settings.contextmenu_never_use_native; }, b = function (a) { return a.getParam('contextmenu', 'link openlink image inserttable | cell row column deletetable'); }; return {shouldNeverUseNative: a, getContextMenu: b}; }), h('f', Array), h('g', Error), g('i', ['f', 'g'], function (a, b) { var c = function () {}, d = function (a, b) { return function () { return a(b.apply(null, arguments)); }; }, e = function (a) { return function () { return a; }; }, f = function (a) { return a; }, g = function (a, b) { return a === b; }, h = function (b) { for (var c = new a(arguments.length - 1), d = 1; d < arguments.length; d++)c[d - 1] = arguments[d]; return function () { for (var d = new a(arguments.length), e = 0; e < d.length; e++)d[e] = arguments[e]; var f = c.concat(d); return b.apply(null, f); }; }, i = function (a) { return function () { return !a.apply(null, arguments); }; }, j = function (a) { return function () { throw new b(a); }; }, k = function (a) { return a(); }, l = function (a) { a(); }, m = e(!1), n = e(!0); return {noop: c, compose: d, constant: e, identity: f, tripleEquals: g, curry: h, not: i, die: j, apply: k, call: l, never: m, always: n}; }), h('j', Object), g('e', ['i', 'j'], function (a, b) { var c = a.never, d = a.always, e = function () { return f; }, f = (function () { var f = function (a) { return a.isNone(); }, g = function (a) { return a(); }, h = function (a) { return a; }, i = function () {}, j = {fold: function (a, b) { return a(); }, is: c, isSome: c, isNone: d, getOr: h, getOrThunk: g, getOrDie: function (a) { throw new Error(a || 'error: getOrDie called on none.'); }, or: h, orThunk: g, map: e, ap: e, each: i, bind: e, flatten: e, exists: c, forall: d, filter: e, equals: f, equals_: f, toArray: function () { return []; }, toString: a.constant('none()')}; return b.freeze && b.freeze(j), j; }()), g = function (a) { var b = function () { return a; }, h = function () { return k; }, i = function (b) { return g(b(a)); }, j = function (b) { return b(a); }, k = {fold: function (b, c) { return c(a); }, is: function (b) { return a === b; }, isSome: d, isNone: c, getOr: b, getOrThunk: b, getOrDie: b, or: h, orThunk: h, map: i, ap: function (b) { return b.fold(e, function (b) { return g(b(a)); }); }, each: function (b) { b(a); }, bind: j, flatten: b, exists: j, forall: j, filter: function (b) { return b(a) ? k : f; }, equals: function (b) { return b.is(a); }, equals_: function (b, d) { return b.fold(c, function (b) { return d(a, b); }); }, toArray: function () { return [a]; }, toString: function () { return 'some(' + a + ')'; }}; return k; }, h = function (a) { return a === null || void 0 === a ? f : g(a); }; return {some: g, none: e, from: h}; }), h('h', String), g('b', ['e', 'f', 'g', 'h'], function (a, b, c, d) { var e = (function () { var a = b.prototype.indexOf, c = function (b, c) { return a.call(b, c); }, d = function (a, b) { return u(a, b); }; return void 0 === a ? d : c; }()), f = function (b, c) { var d = e(b, c); return d === -1 ? a.none() : a.some(d); }, g = function (a, b) { return e(a, b) > -1; }, h = function (a, b) { return t(a, b).isSome(); }, i = function (a, b) { for (var c = [], d = 0; d < a; d++)c.push(b(d)); return c; }, j = function (a, b) { for (var c = [], d = 0; d < a.length; d += b) { var e = a.slice(d, d + b); c.push(e); } return c; }, k = function (a, c) { for (var d = a.length, e = new b(d), f = 0; f < d; f++) { var g = a[f]; e[f] = c(g, f, a); } return e; }, l = function (a, b) { for (var c = 0, d = a.length; c < d; c++) { var e = a[c]; b(e, c, a); } }, m = function (a, b) { for (var c = a.length - 1; c >= 0; c--) { var d = a[c]; b(d, c, a); } }, n = function (a, b) { for (var c = [], d = [], e = 0, f = a.length; e < f; e++) { var g = a[e], h = b(g, e, a) ? c : d; h.push(g); } return {pass: c, fail: d}; }, o = function (a, b) { for (var c = [], d = 0, e = a.length; d < e; d++) { var f = a[d]; b(f, d, a) && c.push(f); } return c; }, p = function (a, b) { if (a.length === 0) return []; for (var c = b(a[0]), d = [], e = [], f = 0, g = a.length; f < g; f++) { var h = a[f], i = b(h); i !== c && (d.push(e), e = []), c = i, e.push(h); } return e.length !== 0 && d.push(e), d; }, q = function (a, b, c) { return m(a, function (a) { c = b(c, a); }), c; }, r = function (a, b, c) { return l(a, function (a) { c = b(c, a); }), c; }, s = function (b, c) { for (var d = 0, e = b.length; d < e; d++) { var f = b[d]; if (c(f, d, b)) return a.some(f); } return a.none(); }, t = function (b, c) { for (var d = 0, e = b.length; d < e; d++) { var f = b[d]; if (c(f, d, b)) return a.some(d); } return a.none(); }, u = function (a, b) { for (var c = 0, d = a.length; c < d; ++c) if (a[c] === b) return c; return -1; }, v = b.prototype.push, w = function (a) { for (var d = [], e = 0, f = a.length; e < f; ++e) { if (!b.prototype.isPrototypeOf(a[e])) throw new c('Arr.flatten item ' + e + ' was not an array, input: ' + a); v.apply(d, a[e]); } return d; }, x = function (a, b) { var c = k(a, b); return w(c); }, y = function (a, b) { for (var c = 0, d = a.length; c < d; ++c) { var e = a[c]; if (b(e, c, a) !== !0) return !1; } return !0; }, z = function (a, b) { return a.length === b.length && y(a, function (a, c) { return a === b[c]; }); }, A = b.prototype.slice, B = function (a) { var b = A.call(a, 0); return b.reverse(), b; }, C = function (a, b) { return o(a, function (a) { return !g(b, a); }); }, D = function (a, b) { for (var c = {}, e = 0, f = a.length; e < f; e++) { var g = a[e]; c[d(g)] = b(g, e); } return c; }, E = function (a) { return [a]; }, F = function (a, b) { var c = A.call(a, 0); return c.sort(b), c; }, G = function (b) { return b.length === 0 ? a.none() : a.some(b[0]); }, H = function (b) { return b.length === 0 ? a.none() : a.some(b[b.length - 1]); }; return {map: k, each: l, eachr: m, partition: n, filter: o, groupBy: p, indexOf: f, foldr: q, foldl: r, find: s, findIndex: t, flatten: w, bind: x, forall: y, exists: h, contains: g, equal: z, reverse: B, chunk: j, difference: C, mapToObject: D, pure: E, sort: F, range: i, head: G, last: H}; }), g('9', ['b'], function (a) { var b = function (a, b, c) { return b >= a.left && b <= a.right && c >= a.top && c <= a.bottom; }, c = function (c, d, e) { return !e.collapsed && a.foldl(e.getClientRects(), function (a, e) { return a || b(e, c, d); }, !1); }; return {isXYWithinRange: c}; }), g('c', ['5'], function (a) { return a('tinymce.ui.Factory'); }), g('d', ['5'], function (a) { return a('tinymce.util.Tools'); }), g('a', ['c', 'd', '8'], function (a, b, c) { var d = function (d, e) { var f, g, h = []; g = c.getContextMenu(d), b.each(g.split(/[ ,]/), function (a) { var b = d.menuItems[a]; a === '|' && (b = {text: a}), b && (b.shortcut = '', h.push(b)); }); for (var i = 0; i < h.length; i++)h[i].text === '|' && (i !== 0 && i !== h.length - 1 || h.splice(i, 1)); return f = a.create('menu', {items: h, context: 'contextmenu', classes: 'contextmenu'}).renderTo(), f.on('hide', function (a) { a.control === this && e.set(!1); }), d.on('remove', function () { f.remove(), f = null; }), f; }, e = function (a, b, c, e, f) { f.get() === null ? f.set(d(a, e)) : f.get().show(), f.get().moveTo(b, c), e.set(!0); }; return {show: e}; }), g('4', ['6', '7', '8', '9', 'a'], function (a, b, c, d, e) { var f = function (a, b) { return b.ctrlKey && !c.shouldNeverUseNative(a); }, g = function () { return b.mac && b.webkit; }, h = function (a) { return a && a.nodeName === 'IMG'; }, i = function (a, b) { return h(a.target) && d.isXYWithinRange(a.clientX, a.clientY, b) === !1; }, j = function (b, c, d) { b.on('mousedown', function (a) { g() && a.button === 2 && !f(b, a) && b.selection.isCollapsed() && b.once('contextmenu', function (a) { h(a.target) || b.selection.placeCaretAt(a.clientX, a.clientY); }); }), b.on('contextmenu', function (g) { var h = g.pageX, j = g.pageY; if (!b.inline) { var k = a.DOM.getPos(b.getContentAreaContainer()); h = k.x + g.clientX, j = k.y + g.clientY; }f(b, g) || (i(g, b.selection.getRng()) && b.selection.select(g.target), g.preventDefault(), e.show(b, h, j, c, d)); }); }; return {setup: j}; }), g('0', ['1', '2', '3', '4'], function (a, b, c, d) { return b.add('contextmenu', function (b) { var e = a(null), f = a(!1); return d.setup(b, f, e), c.get(f); }), function () {}; }), d('0')(); }()); 2 | --------------------------------------------------------------------------------