mosaico 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +8 -0
- data/Gemfile +7 -0
- data/LICENSE +680 -0
- data/README.md +179 -0
- data/Rakefile +5 -0
- data/app/assets/images/mosaico/logo_transparent.png +0 -0
- data/app/assets/javascripts/mosaico/application.js.erb +51 -0
- data/app/assets/javascripts/mosaico/plugins/debug.js.erb +10 -0
- data/app/assets/javascripts/mosaico/plugins/logo.js.erb +10 -0
- data/app/assets/javascripts/mosaico/plugins/preview.js +85 -0
- data/app/assets/javascripts/mosaico/plugins/save.js.erb +72 -0
- data/app/assets/javascripts/mosaico/plugins/template_path.js.erb +22 -0
- data/app/assets/javascripts/mosaico/plugins/translations.js +10 -0
- data/app/assets/javascripts/mosaico/utilities.js +25 -0
- data/app/assets/stylesheets/mosaico/application.css +6 -0
- data/app/controllers/mosaico/application_controller.rb +17 -0
- data/app/controllers/mosaico/images_controller.rb +142 -0
- data/app/controllers/mosaico/projects_controller.rb +31 -0
- data/app/controllers/mosaico/templates_controller.rb +8 -0
- data/app/helpers/mosaico/application_helper.rb +7 -0
- data/app/models/mosaico/image.rb +9 -0
- data/app/models/mosaico/placeholder_image.rb +9 -0
- data/app/models/mosaico/project.rb +13 -0
- data/app/models/mosaico/uploaded_image.rb +26 -0
- data/app/views/layouts/mosaico/application.html.erb +13 -0
- data/app/views/mosaico/projects/new.html.erb +1 -0
- data/app/views/mosaico/projects/show.html.erb +1 -0
- data/app/views/mosaico/shared/_metadata.html.erb +12 -0
- data/config/routes.rb +12 -0
- data/db/migrate/20170817202255_add_images.rb +14 -0
- data/db/migrate/20170824233755_add_projects.rb +11 -0
- data/lib/mosaico.rb +100 -0
- data/lib/mosaico/engine.rb +72 -0
- data/lib/mosaico/local_backend.rb +23 -0
- data/lib/mosaico/local_image_backend.rb +7 -0
- data/lib/mosaico/local_placeholder_backend.rb +7 -0
- data/lib/mosaico/placeholder.png +0 -0
- data/lib/mosaico/template.rb +89 -0
- data/lib/mosaico/versafix_template.rb +43 -0
- data/lib/mosaico/version.rb +4 -0
- data/lib/tasks/makeThumbs.js.erb +57 -0
- data/lib/tasks/thumbs.rake +35 -0
- data/mosaico.gemspec +22 -0
- data/screenshot.png +0 -0
- data/vendor/assets/fonts/LiberationSans-Regular.ttf +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/.jsbeautifyrc +6 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/.jshintrc +8 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/.travis.yml +6 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/CONTRIBUTING.md +37 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/Dockerfile +21 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/Gruntfile.js +241 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/LICENSE +680 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/NOTICE.txt +87 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/README.md +73 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/backend/README.txt +23 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/backend/main.js +162 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/bower.json +76 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/build/mosaico-material.css +7425 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/build/mosaico.css +7133 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/build/mosaico.debug.js +1517 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/build/mosaico.js +12828 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/build/templates.js +15 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/fa/fonts/fontawesome-webfont.eot +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/fa/fonts/fontawesome-webfont.svg +685 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/fa/fonts/fontawesome-webfont.ttf +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/fa/fonts/fontawesome-webfont.woff +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/fa/fonts/fontawesome-webfont.woff2 +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/img/byvoxmail.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/img/mosaico-badge.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/img/mosaico-v.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/img/mosaico32.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/img/mosaicologo.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/img/screenshot-orig.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/img/screenshot.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/lang/README.md +26 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/lang/mosaico-de.json +88 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/lang/mosaico-en.json +88 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/lang/mosaico-es.json +88 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/lang/mosaico-fr.json +88 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/lang/mosaico-it.json +88 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/lang/mosaico-nl.json +88 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/lang/mosaico-sv.json +88 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/mosaico-material.min.css +5 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/mosaico-material.min.css.map +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/mosaico.min.css +5 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/mosaico.min.css.map +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/mosaico.min.js +1517 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/mosaico.min.js.map +147 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/canvas-to-blob.min.js +2 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/jquery-ui.min.css +7 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/jquery-ui.min.js +13 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/jquery.fileupload-image.js +324 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/jquery.fileupload-process.js +175 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/jquery.fileupload-validate.js +122 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/jquery.fileupload.js +1482 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/jquery.iframe-transport.js +217 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/jquery.min.js +5 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/jquery.min.map +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/jquery.ui.touch-punch.min.js +11 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/knockout-jqueryui.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/knockout.js +123 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/load-image.all.min.js +2 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/notoregular/NotoSans-Regular-webfont.eot +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/notoregular/NotoSans-Regular-webfont.ttf +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/notoregular/NotoSans-Regular-webfont.woff +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/notoregular/stylesheet.css +9 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/advlist/plugin.js +101 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/advlist/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/anchor/plugin.js +55 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/anchor/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/autolink/plugin.js +204 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/autolink/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/autoresize/plugin.js +162 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/autoresize/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/autosave/plugin.js +165 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/autosave/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/bbcode/plugin.js +123 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/bbcode/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/charmap/plugin.js +462 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/charmap/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/code/plugin.js +60 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/code/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/codesample/css/prism.css +138 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/codesample/plugin.js +1319 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/codesample/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/colorpicker/plugin.js +112 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/colorpicker/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/contextmenu/plugin.js +100 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/contextmenu/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/directionality/plugin.js +64 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/directionality/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-cool.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-cry.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-embarassed.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-foot-in-mouth.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-frown.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-innocent.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-kiss.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-laughing.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-money-mouth.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-sealed.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-smile.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-surprised.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-tongue-out.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-undecided.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-wink.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/img/smiley-yell.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/plugin.js +65 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/emoticons/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/fullpage/plugin.js +490 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/fullpage/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/fullscreen/plugin.js +154 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/fullscreen/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/hr/plugin.js +30 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/hr/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/image/plugin.js +630 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/image/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/imagetools/plugin.js +2944 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/imagetools/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/importcss/plugin.js +273 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/importcss/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/insertdatetime/plugin.js +121 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/insertdatetime/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/layer/plugin.js +225 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/layer/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/legacyoutput/plugin.js +208 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/legacyoutput/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/link/plugin.js +403 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/link/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/lists/plugin.js +965 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/lists/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/media/moxieplayer.swf +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/media/plugin.js +879 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/media/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/nonbreaking/plugin.js +53 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/nonbreaking/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/noneditable/plugin.js +101 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/noneditable/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/pagebreak/plugin.js +88 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/pagebreak/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/paste/plugin.js +1844 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/paste/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/preview/plugin.js +101 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/preview/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/print/plugin.js +32 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/print/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/save/plugin.js +98 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/save/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/searchreplace/plugin.js +609 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/searchreplace/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/spellchecker/plugin.js +1031 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/spellchecker/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/tabfocus/plugin.js +120 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/tabfocus/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/table/plugin.js +4400 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/table/plugin.min.js +2 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/template/plugin.js +276 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/template/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/textcolor/plugin.js +297 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/textcolor/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/textpattern/plugin.js +268 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/textpattern/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/visualblocks/css/visualblocks.css +135 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/visualblocks/plugin.js +86 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/visualblocks/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/visualchars/plugin.js +123 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/visualchars/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/wordcount/plugin.js +69 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/plugins/wordcount/plugin.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/Variables.less +196 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/content.inline.min.css +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/content.min.css +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/fonts/readme.md +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/fonts/tinymce-small.eot +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/fonts/tinymce-small.json +1277 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/fonts/tinymce-small.svg +63 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/fonts/tinymce-small.ttf +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/fonts/tinymce-small.woff +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/fonts/tinymce.eot +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/fonts/tinymce.json +1972 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/fonts/tinymce.svg +98 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/fonts/tinymce.ttf +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/fonts/tinymce.woff +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/img/anchor.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/img/loader.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/img/object.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/img/trans.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/skin.ie7.min.css +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/skin.json +79 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/gray-flat/skin.min.css +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/content.inline.min.css +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/content.min.css +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/fonts/tinymce-small.eot +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/fonts/tinymce-small.svg +63 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/fonts/tinymce-small.ttf +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/fonts/tinymce-small.woff +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/fonts/tinymce.eot +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/fonts/tinymce.svg +129 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/fonts/tinymce.ttf +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/fonts/tinymce.woff +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/img/anchor.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/img/loader.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/img/object.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/img/trans.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/skin.ie7.min.css +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/skins/lightgray/skin.min.css +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/themes/inlite/theme.js +1828 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/themes/inlite/theme.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/themes/modern/theme.js +934 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/themes/modern/theme.min.js +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/dist/vendor/tinymce.min.js +14 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/editor.html +63 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/favicon.ico +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/index.html +368 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/package.json +92 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/img/byvoxmail.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/img/mosaico-badge.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/img/mosaico-v.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/img/mosaico32.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/img/mosaicologo.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/img/screenshot-orig.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/img/screenshot.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/lang/README.md +26 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/lang/mosaico-de.json +88 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/lang/mosaico-en.json +88 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/lang/mosaico-es.json +88 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/lang/mosaico-fr.json +88 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/lang/mosaico-it.json +88 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/lang/mosaico-nl.json +88 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/lang/mosaico-sv.json +88 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/Variables.less +196 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/content.inline.min.css +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/content.min.css +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/fonts/readme.md +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/fonts/tinymce-small.eot +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/fonts/tinymce-small.json +1277 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/fonts/tinymce-small.svg +63 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/fonts/tinymce-small.ttf +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/fonts/tinymce-small.woff +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/fonts/tinymce.eot +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/fonts/tinymce.json +1972 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/fonts/tinymce.svg +98 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/fonts/tinymce.ttf +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/fonts/tinymce.woff +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/img/anchor.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/img/loader.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/img/object.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/img/trans.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/skin.ie7.min.css +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/skin.json +79 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/res/vendor/skins/gray-flat/skin.min.css +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/server-config.js +12 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/spec/converter-spec.js +115 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/spec/data/template-versafix-1.model.json +137 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/spec/declarations-spec.js +282 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/spec/mensch-spec.js +114 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/spec/model-spec.js +88 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/spec/stylesheet-spec.js +177 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/css/app_standalone.less +7 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/css/app_standalone_material.less +350 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/css/safarihack.css +17 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/css/style_elements.less +497 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/css/style_elements_jquery.less +344 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/css/style_elements_mixins.less +406 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/css/style_elements_moxie.less +130 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/css/style_mosaico.less +529 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/css/style_mosaico_content.less +391 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/css/style_mosaico_tools.less +1043 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/css/style_reset.less +45 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/css/style_variables.less +156 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/app.js +167 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/bind-iframe.js +64 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/blocks.js +118 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/choose-template.js +7 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/colorpicker.js +58 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/csstext.js +16 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/droppable.js +87 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/eventable.js +33 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/extender-pagination.js +60 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/extsortables.js +103 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/fileupload.js +373 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/if-subs.js +110 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/jqueryui-spinner.js +31 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/jqueryui-tabs.js +17 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/script-template.js +30 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/scrollfix.js +48 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/scrollintoview.js +83 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/string-template.js +76 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/tooltips.js +36 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/validated-value.js +40 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/virtuals.js +102 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/bindings/wysiwygs.js +304 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/converter/checkmodel.js +114 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/converter/declarations.js +279 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/converter/domutils.js +93 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/converter/editor.js +411 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/converter/main.js +42 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/converter/model.js +536 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/converter/parser.js +485 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/converter/stylesheet.js +205 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/converter/utils.js +156 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/converter/wrapper.js +308 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/ext/color.js +53 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/ext/inliner.js +35 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/ext/localstorage.js +100 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/ko-bindings.js +22 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/template-loader.js +446 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/timed-call.js +31 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/undomanager/undomain.js +49 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/undomanager/undoserializer.js +120 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/js/viewmodel.js +595 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/tmpl/array.tmpl.html +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/tmpl/block-show.tmpl.html +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/tmpl/block-wysiwyg.tmpl.html +18 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/tmpl/blocks-show.tmpl.html +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/tmpl/blocks-wysiwyg.tmpl.html +2 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/tmpl/customstyle.tmpl.html +3 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/tmpl/empty.tmpl.html +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/tmpl/error.tmpl.html +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/tmpl/gallery-images.tmpl.html +16 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/tmpl/img-wysiwyg.tmpl.html +43 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/tmpl/main.tmpl.html +102 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/src/tmpl/toolbox.tmpl.html +111 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/tasks/combineKOTemplates.js +24 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/tasks/lib/phantom-thumbnailer-editor.js +168 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/tasks/makeThumbs.js +79 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/tedc15/README.md +1 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/tedc15/edres/_full.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/tedc15/edres/footerBlock.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/tedc15/edres/headerBlock.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/tedc15/edres/heroBlock.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/tedc15/edres/socialBlock.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/tedc15/edres/threetwoBlock.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/tedc15/edres/twoColumnBlock.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/tedc15/template-tedc15.html +567 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/tutorial/edres/HeaderAndText.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/tutorial/edres/_full.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/tutorial/edres/fixedlist.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/tutorial/mosaico-tutorial.md +335 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/tutorial/mosaico-tutorial.pdf +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/tutorial/screenshot_384.jpg +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/tutorial/screenshot_385.jpg +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/tutorial/screenshot_386.jpg +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/tutorial/screenshot_387.jpg +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/tutorial/screenshot_407.jpg +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/tutorial/screenshot_408.jpg +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/tutorial/template-tutorial.html +68 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/edres/_full.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/edres/buttonBlock.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/edres/doubleArticleBlock.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/edres/doubleImageBlock.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/edres/hrBlock.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/edres/imageBlock.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/edres/logoBlock.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/edres/sideArticleBlock.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/edres/singleArticleBlock.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/edres/socialBlock.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/edres/spacerBlock.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/edres/textBlock.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/edres/titleBlock.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/edres/tripleArticleBlock.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/edres/tripleImageBlock.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/facebook_bw_ok.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/facebook_ok.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/flickr_bw_ok.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/flickr_ok.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/google+_bw_ok.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/google+_ok.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/instagram_bw_ok.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/instagram_ok.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/linkedin_bw_ok.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/linkedin_ok.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/twitter_bw_ok.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/twitter_ok.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/vimeo_bw_ok.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/vimeo_ok.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/web_bw_ok.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/web_ok.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/youtube_bw_ok.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/social_def/youtube_ok.png +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/img/sponsor.gif +0 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/templates/versafix-1/template-versafix-1.html +1531 -0
- data/vendor/assets/mosaico-0.16.0/mosaico/uploads/README.md +1 -0
- metadata +536 -0
@@ -0,0 +1 @@
|
|
1
|
+
tinymce.PluginManager.add("advlist",function(e){function t(e,t){var n=[];return tinymce.each(t.split(/[ ,]/),function(e){n.push({text:e.replace(/\-/g," ").replace(/\b\w/g,function(e){return e.toUpperCase()}),data:"default"==e?"":e})}),n}function n(t,n){e.undoManager.transact(function(){var r,i=e.dom,o=e.selection;if(r=i.getParent(o.getNode(),"ol,ul"),!r||r.nodeName!=t||n===!1){var s={"list-style-type":n?n:""};e.execCommand("UL"==t?"InsertUnorderedList":"InsertOrderedList",!1,s)}n=n===!1?a[t]:n,a[t]=n,r=i.getParent(o.getNode(),"ol,ul"),r&&(i.setStyle(r,"listStyleType",n?n:null),r.removeAttribute("data-mce-style")),e.focus()})}function r(t){var n=e.dom.getStyle(e.dom.getParent(e.selection.getNode(),"ol,ul"),"listStyleType")||"";t.control.items().each(function(e){e.active(e.settings.data===n)})}var i,o,a={};i=t("OL",e.getParam("advlist_number_styles","default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman")),o=t("UL",e.getParam("advlist_bullet_styles","default,circle,disc,square")),e.addButton("numlist",{type:"splitbutton",tooltip:"Numbered list",menu:i,onshow:r,onselect:function(e){n("OL",e.control.settings.data)},onclick:function(){n("OL",!1)}}),e.addButton("bullist",{type:"splitbutton",tooltip:"Bullet list",menu:o,onshow:r,onselect:function(e){n("UL",e.control.settings.data)},onclick:function(){n("UL",!1)}})});
|
@@ -0,0 +1,55 @@
|
|
1
|
+
/**
|
2
|
+
* plugin.js
|
3
|
+
*
|
4
|
+
* Released under LGPL License.
|
5
|
+
* Copyright (c) 1999-2015 Ephox Corp. All rights reserved
|
6
|
+
*
|
7
|
+
* License: http://www.tinymce.com/license
|
8
|
+
* Contributing: http://www.tinymce.com/contributing
|
9
|
+
*/
|
10
|
+
|
11
|
+
/*global tinymce:true */
|
12
|
+
|
13
|
+
tinymce.PluginManager.add('anchor', function(editor) {
|
14
|
+
function showDialog() {
|
15
|
+
var selectedNode = editor.selection.getNode(), name = '';
|
16
|
+
var isAnchor = selectedNode.tagName == 'A' && editor.dom.getAttrib(selectedNode, 'href') === '';
|
17
|
+
|
18
|
+
if (isAnchor) {
|
19
|
+
name = selectedNode.name || selectedNode.id || '';
|
20
|
+
}
|
21
|
+
|
22
|
+
editor.windowManager.open({
|
23
|
+
title: 'Anchor',
|
24
|
+
body: {type: 'textbox', name: 'name', size: 40, label: 'Name', value: name},
|
25
|
+
onsubmit: function(e) {
|
26
|
+
var id = e.data.name;
|
27
|
+
|
28
|
+
if (isAnchor) {
|
29
|
+
selectedNode.id = id;
|
30
|
+
} else {
|
31
|
+
editor.selection.collapse(true);
|
32
|
+
editor.execCommand('mceInsertContent', false, editor.dom.createHTML('a', {
|
33
|
+
id: id
|
34
|
+
}));
|
35
|
+
}
|
36
|
+
}
|
37
|
+
});
|
38
|
+
}
|
39
|
+
|
40
|
+
editor.addCommand('mceAnchor', showDialog);
|
41
|
+
|
42
|
+
editor.addButton('anchor', {
|
43
|
+
icon: 'anchor',
|
44
|
+
tooltip: 'Anchor',
|
45
|
+
onclick: showDialog,
|
46
|
+
stateSelector: 'a:not([href])'
|
47
|
+
});
|
48
|
+
|
49
|
+
editor.addMenuItem('anchor', {
|
50
|
+
icon: 'anchor',
|
51
|
+
text: 'Anchor',
|
52
|
+
context: 'insert',
|
53
|
+
onclick: showDialog
|
54
|
+
});
|
55
|
+
});
|
@@ -0,0 +1 @@
|
|
1
|
+
tinymce.PluginManager.add("anchor",function(e){function t(){var t=e.selection.getNode(),n="",r="A"==t.tagName&&""===e.dom.getAttrib(t,"href");r&&(n=t.name||t.id||""),e.windowManager.open({title:"Anchor",body:{type:"textbox",name:"name",size:40,label:"Name",value:n},onsubmit:function(n){var i=n.data.name;r?t.id=i:(e.selection.collapse(!0),e.execCommand("mceInsertContent",!1,e.dom.createHTML("a",{id:i})))}})}e.addCommand("mceAnchor",t),e.addButton("anchor",{icon:"anchor",tooltip:"Anchor",onclick:t,stateSelector:"a:not([href])"}),e.addMenuItem("anchor",{icon:"anchor",text:"Anchor",context:"insert",onclick:t})});
|
@@ -0,0 +1,204 @@
|
|
1
|
+
/**
|
2
|
+
* plugin.js
|
3
|
+
*
|
4
|
+
* Released under LGPL License.
|
5
|
+
* Copyright (c) 1999-2015 Ephox Corp. All rights reserved
|
6
|
+
*
|
7
|
+
* License: http://www.tinymce.com/license
|
8
|
+
* Contributing: http://www.tinymce.com/contributing
|
9
|
+
*/
|
10
|
+
|
11
|
+
/*global tinymce:true */
|
12
|
+
|
13
|
+
tinymce.PluginManager.add('autolink', function(editor) {
|
14
|
+
var AutoUrlDetectState;
|
15
|
+
var AutoLinkPattern = /^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+\-]+@)(.+)$/i;
|
16
|
+
|
17
|
+
if (editor.settings.autolink_pattern) {
|
18
|
+
AutoLinkPattern = editor.settings.autolink_pattern;
|
19
|
+
}
|
20
|
+
|
21
|
+
editor.on("keydown", function(e) {
|
22
|
+
if (e.keyCode == 13) {
|
23
|
+
return handleEnter(editor);
|
24
|
+
}
|
25
|
+
});
|
26
|
+
|
27
|
+
// Internet Explorer has built-in automatic linking for most cases
|
28
|
+
if (tinymce.Env.ie) {
|
29
|
+
editor.on("focus", function() {
|
30
|
+
if (!AutoUrlDetectState) {
|
31
|
+
AutoUrlDetectState = true;
|
32
|
+
|
33
|
+
try {
|
34
|
+
editor.execCommand('AutoUrlDetect', false, true);
|
35
|
+
} catch (ex) {
|
36
|
+
// Ignore
|
37
|
+
}
|
38
|
+
}
|
39
|
+
});
|
40
|
+
|
41
|
+
return;
|
42
|
+
}
|
43
|
+
|
44
|
+
editor.on("keypress", function(e) {
|
45
|
+
if (e.keyCode == 41) {
|
46
|
+
return handleEclipse(editor);
|
47
|
+
}
|
48
|
+
});
|
49
|
+
|
50
|
+
editor.on("keyup", function(e) {
|
51
|
+
if (e.keyCode == 32) {
|
52
|
+
return handleSpacebar(editor);
|
53
|
+
}
|
54
|
+
});
|
55
|
+
|
56
|
+
function handleEclipse(editor) {
|
57
|
+
parseCurrentLine(editor, -1, '(', true);
|
58
|
+
}
|
59
|
+
|
60
|
+
function handleSpacebar(editor) {
|
61
|
+
parseCurrentLine(editor, 0, '', true);
|
62
|
+
}
|
63
|
+
|
64
|
+
function handleEnter(editor) {
|
65
|
+
parseCurrentLine(editor, -1, '', false);
|
66
|
+
}
|
67
|
+
|
68
|
+
function parseCurrentLine(editor, end_offset, delimiter) {
|
69
|
+
var rng, end, start, endContainer, bookmark, text, matches, prev, len, rngText;
|
70
|
+
|
71
|
+
function scopeIndex(container, index) {
|
72
|
+
if (index < 0) {
|
73
|
+
index = 0;
|
74
|
+
}
|
75
|
+
|
76
|
+
if (container.nodeType == 3) {
|
77
|
+
var len = container.data.length;
|
78
|
+
|
79
|
+
if (index > len) {
|
80
|
+
index = len;
|
81
|
+
}
|
82
|
+
}
|
83
|
+
|
84
|
+
return index;
|
85
|
+
}
|
86
|
+
|
87
|
+
function setStart(container, offset) {
|
88
|
+
if (container.nodeType != 1 || container.hasChildNodes()) {
|
89
|
+
rng.setStart(container, scopeIndex(container, offset));
|
90
|
+
} else {
|
91
|
+
rng.setStartBefore(container);
|
92
|
+
}
|
93
|
+
}
|
94
|
+
|
95
|
+
function setEnd(container, offset) {
|
96
|
+
if (container.nodeType != 1 || container.hasChildNodes()) {
|
97
|
+
rng.setEnd(container, scopeIndex(container, offset));
|
98
|
+
} else {
|
99
|
+
rng.setEndAfter(container);
|
100
|
+
}
|
101
|
+
}
|
102
|
+
|
103
|
+
// Never create a link when we are inside a link
|
104
|
+
if (editor.selection.getNode().tagName == 'A') {
|
105
|
+
return;
|
106
|
+
}
|
107
|
+
|
108
|
+
// We need at least five characters to form a URL,
|
109
|
+
// hence, at minimum, five characters from the beginning of the line.
|
110
|
+
rng = editor.selection.getRng(true).cloneRange();
|
111
|
+
if (rng.startOffset < 5) {
|
112
|
+
// During testing, the caret is placed between two text nodes.
|
113
|
+
// The previous text node contains the URL.
|
114
|
+
prev = rng.endContainer.previousSibling;
|
115
|
+
if (!prev) {
|
116
|
+
if (!rng.endContainer.firstChild || !rng.endContainer.firstChild.nextSibling) {
|
117
|
+
return;
|
118
|
+
}
|
119
|
+
|
120
|
+
prev = rng.endContainer.firstChild.nextSibling;
|
121
|
+
}
|
122
|
+
|
123
|
+
len = prev.length;
|
124
|
+
setStart(prev, len);
|
125
|
+
setEnd(prev, len);
|
126
|
+
|
127
|
+
if (rng.endOffset < 5) {
|
128
|
+
return;
|
129
|
+
}
|
130
|
+
|
131
|
+
end = rng.endOffset;
|
132
|
+
endContainer = prev;
|
133
|
+
} else {
|
134
|
+
endContainer = rng.endContainer;
|
135
|
+
|
136
|
+
// Get a text node
|
137
|
+
if (endContainer.nodeType != 3 && endContainer.firstChild) {
|
138
|
+
while (endContainer.nodeType != 3 && endContainer.firstChild) {
|
139
|
+
endContainer = endContainer.firstChild;
|
140
|
+
}
|
141
|
+
|
142
|
+
// Move range to text node
|
143
|
+
if (endContainer.nodeType == 3) {
|
144
|
+
setStart(endContainer, 0);
|
145
|
+
setEnd(endContainer, endContainer.nodeValue.length);
|
146
|
+
}
|
147
|
+
}
|
148
|
+
|
149
|
+
if (rng.endOffset == 1) {
|
150
|
+
end = 2;
|
151
|
+
} else {
|
152
|
+
end = rng.endOffset - 1 - end_offset;
|
153
|
+
}
|
154
|
+
}
|
155
|
+
|
156
|
+
start = end;
|
157
|
+
|
158
|
+
do {
|
159
|
+
// Move the selection one character backwards.
|
160
|
+
setStart(endContainer, end >= 2 ? end - 2 : 0);
|
161
|
+
setEnd(endContainer, end >= 1 ? end - 1 : 0);
|
162
|
+
end -= 1;
|
163
|
+
rngText = rng.toString();
|
164
|
+
|
165
|
+
// Loop until one of the following is found: a blank space, , delimiter, (end-2) >= 0
|
166
|
+
} while (rngText != ' ' && rngText !== '' && rngText.charCodeAt(0) != 160 && (end - 2) >= 0 && rngText != delimiter);
|
167
|
+
|
168
|
+
if (rng.toString() == delimiter || rng.toString().charCodeAt(0) == 160) {
|
169
|
+
setStart(endContainer, end);
|
170
|
+
setEnd(endContainer, start);
|
171
|
+
end += 1;
|
172
|
+
} else if (rng.startOffset === 0) {
|
173
|
+
setStart(endContainer, 0);
|
174
|
+
setEnd(endContainer, start);
|
175
|
+
} else {
|
176
|
+
setStart(endContainer, end);
|
177
|
+
setEnd(endContainer, start);
|
178
|
+
}
|
179
|
+
|
180
|
+
// Exclude last . from word like "www.site.com."
|
181
|
+
text = rng.toString();
|
182
|
+
if (text.charAt(text.length - 1) == '.') {
|
183
|
+
setEnd(endContainer, start - 1);
|
184
|
+
}
|
185
|
+
|
186
|
+
text = rng.toString();
|
187
|
+
matches = text.match(AutoLinkPattern);
|
188
|
+
|
189
|
+
if (matches) {
|
190
|
+
if (matches[1] == 'www.') {
|
191
|
+
matches[1] = 'http://www.';
|
192
|
+
} else if (/@$/.test(matches[1]) && !/^mailto:/.test(matches[1])) {
|
193
|
+
matches[1] = 'mailto:' + matches[1];
|
194
|
+
}
|
195
|
+
|
196
|
+
bookmark = editor.selection.getBookmark();
|
197
|
+
|
198
|
+
editor.selection.setRng(rng);
|
199
|
+
editor.execCommand('createlink', false, matches[1] + matches[2]);
|
200
|
+
editor.selection.moveToBookmark(bookmark);
|
201
|
+
editor.nodeChanged();
|
202
|
+
}
|
203
|
+
}
|
204
|
+
});
|
@@ -0,0 +1 @@
|
|
1
|
+
tinymce.PluginManager.add("autolink",function(e){function t(e){i(e,-1,"(",!0)}function n(e){i(e,0,"",!0)}function r(e){i(e,-1,"",!1)}function i(e,t,n){function r(e,t){if(t<0&&(t=0),3==e.nodeType){var n=e.data.length;t>n&&(t=n)}return t}function i(e,t){1!=e.nodeType||e.hasChildNodes()?s.setStart(e,r(e,t)):s.setStartBefore(e)}function o(e,t){1!=e.nodeType||e.hasChildNodes()?s.setEnd(e,r(e,t)):s.setEndAfter(e)}var s,l,c,u,d,f,h,p,m,g;if("A"!=e.selection.getNode().tagName){if(s=e.selection.getRng(!0).cloneRange(),s.startOffset<5){if(p=s.endContainer.previousSibling,!p){if(!s.endContainer.firstChild||!s.endContainer.firstChild.nextSibling)return;p=s.endContainer.firstChild.nextSibling}if(m=p.length,i(p,m),o(p,m),s.endOffset<5)return;l=s.endOffset,u=p}else{if(u=s.endContainer,3!=u.nodeType&&u.firstChild){for(;3!=u.nodeType&&u.firstChild;)u=u.firstChild;3==u.nodeType&&(i(u,0),o(u,u.nodeValue.length))}l=1==s.endOffset?2:s.endOffset-1-t}c=l;do i(u,l>=2?l-2:0),o(u,l>=1?l-1:0),l-=1,g=s.toString();while(" "!=g&&""!==g&&160!=g.charCodeAt(0)&&l-2>=0&&g!=n);s.toString()==n||160==s.toString().charCodeAt(0)?(i(u,l),o(u,c),l+=1):0===s.startOffset?(i(u,0),o(u,c)):(i(u,l),o(u,c)),f=s.toString(),"."==f.charAt(f.length-1)&&o(u,c-1),f=s.toString(),h=f.match(a),h&&("www."==h[1]?h[1]="http://www.":/@$/.test(h[1])&&!/^mailto:/.test(h[1])&&(h[1]="mailto:"+h[1]),d=e.selection.getBookmark(),e.selection.setRng(s),e.execCommand("createlink",!1,h[1]+h[2]),e.selection.moveToBookmark(d),e.nodeChanged())}}var o,a=/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+\-]+@)(.+)$/i;return e.settings.autolink_pattern&&(a=e.settings.autolink_pattern),e.on("keydown",function(t){if(13==t.keyCode)return r(e)}),tinymce.Env.ie?void e.on("focus",function(){if(!o){o=!0;try{e.execCommand("AutoUrlDetect",!1,!0)}catch(e){}}}):(e.on("keypress",function(n){if(41==n.keyCode)return t(e)}),void e.on("keyup",function(t){if(32==t.keyCode)return n(e)}))});
|
@@ -0,0 +1,162 @@
|
|
1
|
+
/**
|
2
|
+
* plugin.js
|
3
|
+
*
|
4
|
+
* Released under LGPL License.
|
5
|
+
* Copyright (c) 1999-2015 Ephox Corp. All rights reserved
|
6
|
+
*
|
7
|
+
* License: http://www.tinymce.com/license
|
8
|
+
* Contributing: http://www.tinymce.com/contributing
|
9
|
+
*/
|
10
|
+
|
11
|
+
/*global tinymce:true */
|
12
|
+
/*eslint no-nested-ternary:0 */
|
13
|
+
|
14
|
+
/**
|
15
|
+
* Auto Resize
|
16
|
+
*
|
17
|
+
* This plugin automatically resizes the content area to fit its content height.
|
18
|
+
* It will retain a minimum height, which is the height of the content area when
|
19
|
+
* it's initialized.
|
20
|
+
*/
|
21
|
+
tinymce.PluginManager.add('autoresize', function(editor) {
|
22
|
+
var settings = editor.settings, oldSize = 0;
|
23
|
+
|
24
|
+
function isFullscreen() {
|
25
|
+
return editor.plugins.fullscreen && editor.plugins.fullscreen.isFullscreen();
|
26
|
+
}
|
27
|
+
|
28
|
+
if (editor.settings.inline) {
|
29
|
+
return;
|
30
|
+
}
|
31
|
+
|
32
|
+
/**
|
33
|
+
* This method gets executed each time the editor needs to resize.
|
34
|
+
*/
|
35
|
+
function resize(e) {
|
36
|
+
var deltaSize, doc, body, docElm, DOM = tinymce.DOM, resizeHeight, myHeight,
|
37
|
+
marginTop, marginBottom, paddingTop, paddingBottom, borderTop, borderBottom;
|
38
|
+
|
39
|
+
doc = editor.getDoc();
|
40
|
+
if (!doc) {
|
41
|
+
return;
|
42
|
+
}
|
43
|
+
|
44
|
+
body = doc.body;
|
45
|
+
docElm = doc.documentElement;
|
46
|
+
resizeHeight = settings.autoresize_min_height;
|
47
|
+
|
48
|
+
if (!body || (e && e.type === "setcontent" && e.initial) || isFullscreen()) {
|
49
|
+
if (body && docElm) {
|
50
|
+
body.style.overflowY = "auto";
|
51
|
+
docElm.style.overflowY = "auto"; // Old IE
|
52
|
+
}
|
53
|
+
|
54
|
+
return;
|
55
|
+
}
|
56
|
+
|
57
|
+
// Calculate outer height of the body element using CSS styles
|
58
|
+
marginTop = editor.dom.getStyle(body, 'margin-top', true);
|
59
|
+
marginBottom = editor.dom.getStyle(body, 'margin-bottom', true);
|
60
|
+
paddingTop = editor.dom.getStyle(body, 'padding-top', true);
|
61
|
+
paddingBottom = editor.dom.getStyle(body, 'padding-bottom', true);
|
62
|
+
borderTop = editor.dom.getStyle(body, 'border-top-width', true);
|
63
|
+
borderBottom = editor.dom.getStyle(body, 'border-bottom-width', true);
|
64
|
+
myHeight = body.offsetHeight + parseInt(marginTop, 10) + parseInt(marginBottom, 10) +
|
65
|
+
parseInt(paddingTop, 10) + parseInt(paddingBottom, 10) +
|
66
|
+
parseInt(borderTop, 10) + parseInt(borderBottom, 10);
|
67
|
+
|
68
|
+
// Make sure we have a valid height
|
69
|
+
if (isNaN(myHeight) || myHeight <= 0) {
|
70
|
+
// Get height differently depending on the browser used
|
71
|
+
myHeight = tinymce.Env.ie ? body.scrollHeight : (tinymce.Env.webkit && body.clientHeight === 0 ? 0 : body.offsetHeight);
|
72
|
+
}
|
73
|
+
|
74
|
+
// Don't make it smaller than the minimum height
|
75
|
+
if (myHeight > settings.autoresize_min_height) {
|
76
|
+
resizeHeight = myHeight;
|
77
|
+
}
|
78
|
+
|
79
|
+
// If a maximum height has been defined don't exceed this height
|
80
|
+
if (settings.autoresize_max_height && myHeight > settings.autoresize_max_height) {
|
81
|
+
resizeHeight = settings.autoresize_max_height;
|
82
|
+
body.style.overflowY = "auto";
|
83
|
+
docElm.style.overflowY = "auto"; // Old IE
|
84
|
+
} else {
|
85
|
+
body.style.overflowY = "hidden";
|
86
|
+
docElm.style.overflowY = "hidden"; // Old IE
|
87
|
+
body.scrollTop = 0;
|
88
|
+
}
|
89
|
+
|
90
|
+
// Resize content element
|
91
|
+
if (resizeHeight !== oldSize) {
|
92
|
+
deltaSize = resizeHeight - oldSize;
|
93
|
+
DOM.setStyle(editor.iframeElement, 'height', resizeHeight + 'px');
|
94
|
+
oldSize = resizeHeight;
|
95
|
+
|
96
|
+
// WebKit doesn't decrease the size of the body element until the iframe gets resized
|
97
|
+
// So we need to continue to resize the iframe down until the size gets fixed
|
98
|
+
if (tinymce.isWebKit && deltaSize < 0) {
|
99
|
+
resize(e);
|
100
|
+
}
|
101
|
+
}
|
102
|
+
}
|
103
|
+
|
104
|
+
/**
|
105
|
+
* Calls the resize x times in 100ms intervals. We can't wait for load events since
|
106
|
+
* the CSS files might load async.
|
107
|
+
*/
|
108
|
+
function wait(times, interval, callback) {
|
109
|
+
tinymce.util.Delay.setEditorTimeout(editor, function() {
|
110
|
+
resize({});
|
111
|
+
|
112
|
+
if (times--) {
|
113
|
+
wait(times, interval, callback);
|
114
|
+
} else if (callback) {
|
115
|
+
callback();
|
116
|
+
}
|
117
|
+
}, interval);
|
118
|
+
}
|
119
|
+
|
120
|
+
// Define minimum height
|
121
|
+
settings.autoresize_min_height = parseInt(editor.getParam('autoresize_min_height', editor.getElement().offsetHeight), 10);
|
122
|
+
|
123
|
+
// Define maximum height
|
124
|
+
settings.autoresize_max_height = parseInt(editor.getParam('autoresize_max_height', 0), 10);
|
125
|
+
|
126
|
+
// Add padding at the bottom for better UX
|
127
|
+
editor.on("init", function() {
|
128
|
+
var overflowPadding, bottomMargin;
|
129
|
+
|
130
|
+
overflowPadding = editor.getParam('autoresize_overflow_padding', 1);
|
131
|
+
bottomMargin = editor.getParam('autoresize_bottom_margin', 50);
|
132
|
+
|
133
|
+
if (overflowPadding !== false) {
|
134
|
+
editor.dom.setStyles(editor.getBody(), {
|
135
|
+
paddingLeft: overflowPadding,
|
136
|
+
paddingRight: overflowPadding
|
137
|
+
});
|
138
|
+
}
|
139
|
+
|
140
|
+
if (bottomMargin !== false) {
|
141
|
+
editor.dom.setStyles(editor.getBody(), {
|
142
|
+
paddingBottom: bottomMargin
|
143
|
+
});
|
144
|
+
}
|
145
|
+
});
|
146
|
+
|
147
|
+
// Add appropriate listeners for resizing content area
|
148
|
+
editor.on("nodechange setcontent keyup FullscreenStateChanged", resize);
|
149
|
+
|
150
|
+
if (editor.getParam('autoresize_on_init', true)) {
|
151
|
+
editor.on('init', function() {
|
152
|
+
// Hit it 20 times in 100 ms intervals
|
153
|
+
wait(20, 100, function() {
|
154
|
+
// Hit it 5 times in 1 sec intervals
|
155
|
+
wait(5, 1000);
|
156
|
+
});
|
157
|
+
});
|
158
|
+
}
|
159
|
+
|
160
|
+
// Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('mceExample');
|
161
|
+
editor.addCommand('mceAutoResize', resize);
|
162
|
+
});
|
@@ -0,0 +1 @@
|
|
1
|
+
tinymce.PluginManager.add("autoresize",function(e){function t(){return e.plugins.fullscreen&&e.plugins.fullscreen.isFullscreen()}function n(r){var a,s,l,c,u,d,f,h,p,m,g,v,y=tinymce.DOM;if(s=e.getDoc()){if(l=s.body,c=s.documentElement,u=i.autoresize_min_height,!l||r&&"setcontent"===r.type&&r.initial||t())return void(l&&c&&(l.style.overflowY="auto",c.style.overflowY="auto"));f=e.dom.getStyle(l,"margin-top",!0),h=e.dom.getStyle(l,"margin-bottom",!0),p=e.dom.getStyle(l,"padding-top",!0),m=e.dom.getStyle(l,"padding-bottom",!0),g=e.dom.getStyle(l,"border-top-width",!0),v=e.dom.getStyle(l,"border-bottom-width",!0),d=l.offsetHeight+parseInt(f,10)+parseInt(h,10)+parseInt(p,10)+parseInt(m,10)+parseInt(g,10)+parseInt(v,10),(isNaN(d)||d<=0)&&(d=tinymce.Env.ie?l.scrollHeight:tinymce.Env.webkit&&0===l.clientHeight?0:l.offsetHeight),d>i.autoresize_min_height&&(u=d),i.autoresize_max_height&&d>i.autoresize_max_height?(u=i.autoresize_max_height,l.style.overflowY="auto",c.style.overflowY="auto"):(l.style.overflowY="hidden",c.style.overflowY="hidden",l.scrollTop=0),u!==o&&(a=u-o,y.setStyle(e.iframeElement,"height",u+"px"),o=u,tinymce.isWebKit&&a<0&&n(r))}}function r(t,i,o){tinymce.util.Delay.setEditorTimeout(e,function(){n({}),t--?r(t,i,o):o&&o()},i)}var i=e.settings,o=0;e.settings.inline||(i.autoresize_min_height=parseInt(e.getParam("autoresize_min_height",e.getElement().offsetHeight),10),i.autoresize_max_height=parseInt(e.getParam("autoresize_max_height",0),10),e.on("init",function(){var t,n;t=e.getParam("autoresize_overflow_padding",1),n=e.getParam("autoresize_bottom_margin",50),t!==!1&&e.dom.setStyles(e.getBody(),{paddingLeft:t,paddingRight:t}),n!==!1&&e.dom.setStyles(e.getBody(),{paddingBottom:n})}),e.on("nodechange setcontent keyup FullscreenStateChanged",n),e.getParam("autoresize_on_init",!0)&&e.on("init",function(){r(20,100,function(){r(5,1e3)})}),e.addCommand("mceAutoResize",n))});
|
@@ -0,0 +1,165 @@
|
|
1
|
+
/**
|
2
|
+
* plugin.js
|
3
|
+
*
|
4
|
+
* Released under LGPL License.
|
5
|
+
* Copyright (c) 1999-2015 Ephox Corp. All rights reserved
|
6
|
+
*
|
7
|
+
* License: http://www.tinymce.com/license
|
8
|
+
* Contributing: http://www.tinymce.com/contributing
|
9
|
+
*/
|
10
|
+
|
11
|
+
/*global tinymce:true */
|
12
|
+
|
13
|
+
// Internal unload handler will be called before the page is unloaded
|
14
|
+
// Needs to be outside the plugin since it would otherwise keep
|
15
|
+
// a reference to editor in closue scope
|
16
|
+
/*eslint no-func-assign:0 */
|
17
|
+
tinymce._beforeUnloadHandler = function() {
|
18
|
+
var msg;
|
19
|
+
|
20
|
+
tinymce.each(tinymce.editors, function(editor) {
|
21
|
+
// Store a draft for each editor instance
|
22
|
+
if (editor.plugins.autosave) {
|
23
|
+
editor.plugins.autosave.storeDraft();
|
24
|
+
}
|
25
|
+
|
26
|
+
// Setup a return message if the editor is dirty
|
27
|
+
if (!msg && editor.isDirty() && editor.getParam("autosave_ask_before_unload", true)) {
|
28
|
+
msg = editor.translate("You have unsaved changes are you sure you want to navigate away?");
|
29
|
+
}
|
30
|
+
});
|
31
|
+
|
32
|
+
return msg;
|
33
|
+
};
|
34
|
+
|
35
|
+
tinymce.PluginManager.add('autosave', function(editor) {
|
36
|
+
var settings = editor.settings, LocalStorage = tinymce.util.LocalStorage, prefix, started;
|
37
|
+
|
38
|
+
prefix = settings.autosave_prefix || 'tinymce-autosave-{path}{query}-{id}-';
|
39
|
+
prefix = prefix.replace(/\{path\}/g, document.location.pathname);
|
40
|
+
prefix = prefix.replace(/\{query\}/g, document.location.search);
|
41
|
+
prefix = prefix.replace(/\{id\}/g, editor.id);
|
42
|
+
|
43
|
+
function parseTime(time, defaultTime) {
|
44
|
+
var multipels = {
|
45
|
+
s: 1000,
|
46
|
+
m: 60000
|
47
|
+
};
|
48
|
+
|
49
|
+
time = /^(\d+)([ms]?)$/.exec('' + (time || defaultTime));
|
50
|
+
|
51
|
+
return (time[2] ? multipels[time[2]] : 1) * parseInt(time, 10);
|
52
|
+
}
|
53
|
+
|
54
|
+
function hasDraft() {
|
55
|
+
var time = parseInt(LocalStorage.getItem(prefix + "time"), 10) || 0;
|
56
|
+
|
57
|
+
if (new Date().getTime() - time > settings.autosave_retention) {
|
58
|
+
removeDraft(false);
|
59
|
+
return false;
|
60
|
+
}
|
61
|
+
|
62
|
+
return true;
|
63
|
+
}
|
64
|
+
|
65
|
+
function removeDraft(fire) {
|
66
|
+
LocalStorage.removeItem(prefix + "draft");
|
67
|
+
LocalStorage.removeItem(prefix + "time");
|
68
|
+
|
69
|
+
if (fire !== false) {
|
70
|
+
editor.fire('RemoveDraft');
|
71
|
+
}
|
72
|
+
}
|
73
|
+
|
74
|
+
function storeDraft() {
|
75
|
+
if (!isEmpty() && editor.isDirty()) {
|
76
|
+
LocalStorage.setItem(prefix + "draft", editor.getContent({format: 'raw', no_events: true}));
|
77
|
+
LocalStorage.setItem(prefix + "time", new Date().getTime());
|
78
|
+
editor.fire('StoreDraft');
|
79
|
+
}
|
80
|
+
}
|
81
|
+
|
82
|
+
function restoreDraft() {
|
83
|
+
if (hasDraft()) {
|
84
|
+
editor.setContent(LocalStorage.getItem(prefix + "draft"), {format: 'raw'});
|
85
|
+
editor.fire('RestoreDraft');
|
86
|
+
}
|
87
|
+
}
|
88
|
+
|
89
|
+
function startStoreDraft() {
|
90
|
+
if (!started) {
|
91
|
+
setInterval(function() {
|
92
|
+
if (!editor.removed) {
|
93
|
+
storeDraft();
|
94
|
+
}
|
95
|
+
}, settings.autosave_interval);
|
96
|
+
|
97
|
+
started = true;
|
98
|
+
}
|
99
|
+
}
|
100
|
+
|
101
|
+
settings.autosave_interval = parseTime(settings.autosave_interval, '30s');
|
102
|
+
settings.autosave_retention = parseTime(settings.autosave_retention, '20m');
|
103
|
+
|
104
|
+
function postRender() {
|
105
|
+
var self = this;
|
106
|
+
|
107
|
+
self.disabled(!hasDraft());
|
108
|
+
|
109
|
+
editor.on('StoreDraft RestoreDraft RemoveDraft', function() {
|
110
|
+
self.disabled(!hasDraft());
|
111
|
+
});
|
112
|
+
|
113
|
+
startStoreDraft();
|
114
|
+
}
|
115
|
+
|
116
|
+
function restoreLastDraft() {
|
117
|
+
editor.undoManager.beforeChange();
|
118
|
+
restoreDraft();
|
119
|
+
removeDraft();
|
120
|
+
editor.undoManager.add();
|
121
|
+
}
|
122
|
+
|
123
|
+
editor.addButton('restoredraft', {
|
124
|
+
title: 'Restore last draft',
|
125
|
+
onclick: restoreLastDraft,
|
126
|
+
onPostRender: postRender
|
127
|
+
});
|
128
|
+
|
129
|
+
editor.addMenuItem('restoredraft', {
|
130
|
+
text: 'Restore last draft',
|
131
|
+
onclick: restoreLastDraft,
|
132
|
+
onPostRender: postRender,
|
133
|
+
context: 'file'
|
134
|
+
});
|
135
|
+
|
136
|
+
function isEmpty(html) {
|
137
|
+
var forcedRootBlockName = editor.settings.forced_root_block;
|
138
|
+
|
139
|
+
html = tinymce.trim(typeof html == "undefined" ? editor.getBody().innerHTML : html);
|
140
|
+
|
141
|
+
return html === '' || new RegExp(
|
142
|
+
'^<' + forcedRootBlockName + '[^>]*>((\u00a0| |[ \t]|<br[^>]*>)+?|)<\/' + forcedRootBlockName + '>|<br>$', 'i'
|
143
|
+
).test(html);
|
144
|
+
}
|
145
|
+
|
146
|
+
if (editor.settings.autosave_restore_when_empty !== false) {
|
147
|
+
editor.on('init', function() {
|
148
|
+
if (hasDraft() && isEmpty()) {
|
149
|
+
restoreDraft();
|
150
|
+
}
|
151
|
+
});
|
152
|
+
|
153
|
+
editor.on('saveContent', function() {
|
154
|
+
removeDraft();
|
155
|
+
});
|
156
|
+
}
|
157
|
+
|
158
|
+
window.onbeforeunload = tinymce._beforeUnloadHandler;
|
159
|
+
|
160
|
+
this.hasDraft = hasDraft;
|
161
|
+
this.storeDraft = storeDraft;
|
162
|
+
this.restoreDraft = restoreDraft;
|
163
|
+
this.removeDraft = removeDraft;
|
164
|
+
this.isEmpty = isEmpty;
|
165
|
+
});
|