ouvrages-tinymce-rails 3.4.6 → 3.4.9
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +52 -16
- data/Rakefile +11 -20
- data/app/assets/javascripts/tinymce-jquery.js +3 -0
- data/app/assets/javascripts/tinymce.js +2 -0
- data/app/assets/javascripts/tinymce/preinit.js.erb +5 -0
- data/lib/tasks/assets.rake +7 -0
- data/lib/tinymce-rails.rb +1 -2
- data/lib/tinymce/rails.rb +12 -0
- data/lib/tinymce/rails/configuration.rb +67 -0
- data/lib/tinymce/rails/engine.rb +16 -0
- data/lib/tinymce/rails/helper.rb +29 -0
- data/lib/tinymce/rails/version.rb +6 -0
- data/vendor/assets/javascripts/tinymce/jquery.tinymce.js +1 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/langs/en.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/license.txt +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/advhr/css/advhr.css +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/advhr/editor_plugin.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/advhr/editor_plugin_src.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/advhr/js/rule.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/advhr/langs/en_dlg.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/advhr/rule.htm +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/advimage/css/advimage.css +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/advimage/editor_plugin.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/advimage/editor_plugin_src.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/advimage/image.htm +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/advimage/img/sample.gif +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/advimage/js/image.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/advimage/langs/en_dlg.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/advlink/css/advlink.css +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/advlink/editor_plugin.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/advlink/editor_plugin_src.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/advlink/js/advlink.js +8 -1
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/advlink/langs/en_dlg.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/advlink/link.htm +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/advlist/editor_plugin.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/advlist/editor_plugin_src.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/autolink/editor_plugin.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/autolink/editor_plugin_src.js +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/autoresize/editor_plugin.js +1 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/autoresize/editor_plugin_src.js +20 -38
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/autosave/editor_plugin.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/autosave/editor_plugin_src.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/autosave/langs/en.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/bbcode/editor_plugin.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/bbcode/editor_plugin_src.js +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/contextmenu/editor_plugin.js +1 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/contextmenu/editor_plugin_src.js +1 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/directionality/editor_plugin.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/directionality/editor_plugin_src.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/emotions/editor_plugin.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/emotions/editor_plugin_src.js +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/emotions/emotions.htm +42 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/emotions/img/smiley-cool.gif +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/emotions/img/smiley-cry.gif +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/emotions/img/smiley-embarassed.gif +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/emotions/img/smiley-foot-in-mouth.gif +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/emotions/img/smiley-frown.gif +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/emotions/img/smiley-innocent.gif +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/emotions/img/smiley-kiss.gif +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/emotions/img/smiley-laughing.gif +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/emotions/img/smiley-money-mouth.gif +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/emotions/img/smiley-sealed.gif +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/emotions/img/smiley-smile.gif +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/emotions/img/smiley-surprised.gif +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/emotions/img/smiley-tongue-out.gif +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/emotions/img/smiley-undecided.gif +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/emotions/img/smiley-wink.gif +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/emotions/img/smiley-yell.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/emotions/js/emotions.js +43 -0
- data/vendor/assets/javascripts/tinymce/plugins/emotions/langs/en_dlg.js +1 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/example/dialog.htm +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/example/editor_plugin.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/example/editor_plugin_src.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/example/img/example.gif +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/example/js/dialog.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/example/langs/en.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/example/langs/en_dlg.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/example_dependency/editor_plugin.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/example_dependency/editor_plugin_src.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/fullpage/css/fullpage.css +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/fullpage/editor_plugin.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/fullpage/editor_plugin_src.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/fullpage/fullpage.htm +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/fullpage/js/fullpage.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/fullpage/langs/en_dlg.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/fullscreen/editor_plugin.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/fullscreen/editor_plugin_src.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/fullscreen/fullscreen.htm +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/iespell/editor_plugin.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/iespell/editor_plugin_src.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/inlinepopups/editor_plugin.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/inlinepopups/editor_plugin_src.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/inlinepopups/skins/clearlooks2/img/button.gif +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/inlinepopups/skins/clearlooks2/window.css +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/inlinepopups/template.htm +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/insertdatetime/editor_plugin.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/insertdatetime/editor_plugin_src.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/layer/editor_plugin.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/layer/editor_plugin_src.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/legacyoutput/editor_plugin.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/legacyoutput/editor_plugin_src.js +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/lists/editor_plugin.js +1 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/lists/editor_plugin_src.js +221 -48
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/media/css/media.css +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/media/editor_plugin.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/media/editor_plugin_src.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/media/js/embed.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/media/js/media.js +39 -22
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/media/langs/en_dlg.js +1 -1
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/media/media.htm +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/media/moxieplayer.swf +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/nonbreaking/editor_plugin.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/nonbreaking/editor_plugin_src.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/noneditable/editor_plugin.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/noneditable/editor_plugin_src.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/pagebreak/editor_plugin.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/pagebreak/editor_plugin_src.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/paste/editor_plugin.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/paste/editor_plugin_src.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/paste/js/pastetext.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/paste/js/pasteword.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/paste/langs/en_dlg.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/paste/pastetext.htm +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/paste/pasteword.htm +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/preview/editor_plugin.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/preview/editor_plugin_src.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/preview/example.html +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/preview/jscripts/embed.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/preview/preview.html +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/print/editor_plugin.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/print/editor_plugin_src.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/save/editor_plugin.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/save/editor_plugin_src.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/searchreplace/css/searchreplace.css +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/searchreplace/editor_plugin.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/searchreplace/editor_plugin_src.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/searchreplace/js/searchreplace.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/searchreplace/langs/en_dlg.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/searchreplace/searchreplace.htm +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/spellchecker/css/content.css +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/spellchecker/editor_plugin.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/spellchecker/editor_plugin_src.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/spellchecker/img/wline.gif +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/style/css/props.css +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/style/editor_plugin.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/style/editor_plugin_src.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/style/js/props.js +15 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/style/langs/en_dlg.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/style/props.htm +1 -1
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/tabfocus/editor_plugin.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/tabfocus/editor_plugin_src.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/table/cell.htm +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/table/css/cell.css +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/table/css/row.css +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/table/css/table.css +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/table/editor_plugin.js +1 -1
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/table/editor_plugin_src.js +108 -46
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/table/js/cell.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/table/js/merge_cells.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/table/js/row.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/table/js/table.js +50 -12
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/table/langs/en_dlg.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/table/merge_cells.htm +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/table/row.htm +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/table/table.htm +1 -1
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/template/blank.htm +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/template/css/template.css +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/template/editor_plugin.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/template/editor_plugin_src.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/template/js/template.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/template/langs/en_dlg.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/template/template.htm +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/visualchars/editor_plugin.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/visualchars/editor_plugin_src.js +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/wordcount/editor_plugin.js +1 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/wordcount/editor_plugin_src.js +14 -6
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/xhtmlxtras/abbr.htm +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/xhtmlxtras/acronym.htm +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/xhtmlxtras/attributes.htm +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/xhtmlxtras/cite.htm +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/xhtmlxtras/css/attributes.css +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/xhtmlxtras/css/popup.css +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/xhtmlxtras/del.htm +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/xhtmlxtras/editor_plugin.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/xhtmlxtras/editor_plugin_src.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/xhtmlxtras/ins.htm +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/xhtmlxtras/js/abbr.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/xhtmlxtras/js/acronym.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/xhtmlxtras/js/attributes.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/xhtmlxtras/js/cite.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/xhtmlxtras/js/del.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/xhtmlxtras/js/element_common.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/xhtmlxtras/js/ins.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/xhtmlxtras/langs/en_dlg.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/about.htm +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/anchor.htm +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/charmap.htm +5 -1
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/color_picker.htm +0 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/editor_template.js +1 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/editor_template_src.js +7 -3
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/image.htm +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/img/colorpicker.jpg +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/img/flash.gif +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/img/icons.gif +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/img/iframe.gif +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/img/pagebreak.gif +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/img/quicktime.gif +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/img/realmedia.gif +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/img/shockwave.gif +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/img/trans.gif +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/img/video.gif +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/img/windowsmedia.gif +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/js/about.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/js/anchor.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/js/charmap.js +11 -3
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/js/color_picker.js +4 -4
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/js/image.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/js/link.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/js/source_editor.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/langs/en.js +0 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/langs/en_dlg.js +1 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/link.htm +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/shortcuts.htm +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/skins/default/content.css +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/skins/default/dialog.css +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/skins/default/img/buttons.png +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/skins/default/img/items.gif +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/skins/default/img/menu_arrow.gif +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/skins/default/img/menu_check.gif +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/skins/default/img/progress.gif +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/skins/default/img/tabs.gif +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/skins/default/ui.css +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/skins/highcontrast/content.css +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/skins/highcontrast/dialog.css +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/skins/highcontrast/ui.css +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/skins/o2k7/content.css +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/skins/o2k7/dialog.css +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/skins/o2k7/img/button_bg.png +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/skins/o2k7/img/button_bg_black.png +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/skins/o2k7/img/button_bg_silver.png +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/skins/o2k7/ui.css +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/skins/o2k7/ui_black.css +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/skins/o2k7/ui_silver.css +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/advanced/source_editor.htm +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/simple/editor_template.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/simple/editor_template_src.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/simple/img/icons.gif +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/simple/langs/en.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/simple/skins/default/content.css +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/simple/skins/default/ui.css +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/simple/skins/o2k7/content.css +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/simple/skins/o2k7/img/button_bg.png +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/themes/simple/skins/o2k7/ui.css +0 -0
- data/vendor/assets/javascripts/tinymce/tiny_mce.js +1 -0
- data/vendor/assets/javascripts/tinymce/tiny_mce_jquery.js +1 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/tiny_mce_jquery_src.js +774 -409
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/tiny_mce_popup.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/tiny_mce_src.js +774 -409
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/utils/editable_selects.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/utils/form_utils.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/utils/mctabs.js +0 -0
- data/{assets/precompiled → vendor/assets/javascripts}/tinymce/utils/validate.js +0 -0
- metadata +294 -318
- data/assets/integration/tinymce-jquery.js +0 -3
- data/assets/integration/tinymce.js +0 -2
- data/assets/integration/tinymce/preinit.js.erb +0 -5
- data/assets/precompiled/tinymce/jquery.tinymce.js +0 -1
- data/assets/precompiled/tinymce/langs/fr.js +0 -1
- data/assets/precompiled/tinymce/plugins/advhr/langs/fr_dlg.js +0 -1
- data/assets/precompiled/tinymce/plugins/advimage/langs/fr_dlg.js +0 -1
- data/assets/precompiled/tinymce/plugins/advlink/langs/fr_dlg.js +0 -1
- data/assets/precompiled/tinymce/plugins/autoresize/editor_plugin.js +0 -1
- data/assets/precompiled/tinymce/plugins/contextmenu/editor_plugin.js +0 -1
- data/assets/precompiled/tinymce/plugins/emotions/emotions.htm +0 -41
- data/assets/precompiled/tinymce/plugins/emotions/js/emotions.js +0 -22
- data/assets/precompiled/tinymce/plugins/emotions/langs/en_dlg.js +0 -1
- data/assets/precompiled/tinymce/plugins/emotions/langs/fr_dlg.js +0 -1
- data/assets/precompiled/tinymce/plugins/fullpage/langs/fr_dlg.js +0 -1
- data/assets/precompiled/tinymce/plugins/lists/editor_plugin.js +0 -1
- data/assets/precompiled/tinymce/plugins/media/langs/fr_dlg.js +0 -1
- data/assets/precompiled/tinymce/plugins/media/moxieplayer.swf +0 -0
- data/assets/precompiled/tinymce/plugins/paste/langs/fr_dlg.js +0 -1
- data/assets/precompiled/tinymce/plugins/searchreplace/langs/fr_dlg.js +0 -1
- data/assets/precompiled/tinymce/plugins/style/langs/fr_dlg.js +0 -1
- data/assets/precompiled/tinymce/plugins/table/langs/fr_dlg.js +0 -1
- data/assets/precompiled/tinymce/plugins/template/langs/fr_dlg.js +0 -1
- data/assets/precompiled/tinymce/plugins/wordcount/editor_plugin.js +0 -1
- data/assets/precompiled/tinymce/plugins/xhtmlxtras/langs/fr_dlg.js +0 -1
- data/assets/precompiled/tinymce/themes/advanced/editor_template.js +0 -1
- data/assets/precompiled/tinymce/themes/advanced/langs/en_dlg.js +0 -1
- data/assets/precompiled/tinymce/themes/advanced/langs/fr.js +0 -1
- data/assets/precompiled/tinymce/themes/advanced/langs/fr_dlg.js +0 -1
- data/assets/precompiled/tinymce/themes/simple/langs/fr.js +0 -1
- data/assets/precompiled/tinymce/tiny_mce.js +0 -1
- data/assets/precompiled/tinymce/tiny_mce_jquery.js +0 -1
- data/assets/vendor/tinymce/jquery-tinymce.js +0 -1
- data/assets/vendor/tinymce/tiny_mce.js +0 -16479
- data/assets/vendor/tinymce/tiny_mce_jquery.js +0 -15656
- data/lib/tinymce/assets.rake +0 -7
- data/lib/tinymce/rails-3.1.0.rake +0 -65
- data/lib/tinymce/railtie.rb +0 -27
- data/lib/tinymce/version.rb +0 -4
data/README.md
CHANGED
@@ -11,35 +11,65 @@ Instructions
|
|
11
11
|
|
12
12
|
gem 'tinymce-rails'
|
13
13
|
|
14
|
-
Then run `bundle install`.
|
14
|
+
Be sure to add to the global group, not the `assets` group. Then run `bundle install`.
|
15
15
|
|
16
16
|
|
17
|
-
**
|
17
|
+
**2. Create a `config/tinymce.yml` file with your global configuration options:**
|
18
|
+
|
19
|
+
theme_advanced_toolbar_location: top
|
20
|
+
theme_advanced_toolbar_align: left
|
21
|
+
theme_advanced_statusbar_location: bottom
|
22
|
+
theme_advanced_buttons3_add:
|
23
|
+
- tablecontrols
|
24
|
+
- fullscreen
|
25
|
+
plugins:
|
26
|
+
- table
|
27
|
+
- fullscreen
|
28
|
+
|
29
|
+
See the [TinyMCE Documentation](http://www.tinymce.com/wiki.php/Configuration) for a full list of configuration options.
|
30
|
+
|
31
|
+
|
32
|
+
**3. Include the TinyMCE assets**
|
18
33
|
|
19
34
|
Add to your application.js:
|
20
35
|
|
36
|
+
//= require tinymce
|
37
|
+
|
38
|
+
or with jQuery integration:
|
39
|
+
|
21
40
|
//= require tinymce-jquery
|
22
41
|
|
23
|
-
|
42
|
+
The TinyMCE assets can be included on a per-page basis using the `tinymce_assets` helper:
|
24
43
|
|
25
|
-
<%=
|
44
|
+
<%= tinymce_assets %>
|
45
|
+
#=> <script type="text/javascript" src="/assets/tinymce.js">
|
26
46
|
|
27
|
-
<script type="text/javascript">
|
28
|
-
$(function() {
|
29
|
-
$('textarea').tinymce({
|
30
|
-
theme: 'advanced'
|
31
|
-
});
|
32
|
-
});
|
33
|
-
</script>
|
34
47
|
|
48
|
+
**4. Initialize TinyMCE**
|
35
49
|
|
36
|
-
|
50
|
+
For each textarea that you want to use with TinyMCE, add the "tinymce" class and ensure it has a unique ID:
|
37
51
|
|
38
|
-
|
52
|
+
<%= text_area_tag :editor, "", :class => "tinymce", :rows => 40, :cols => 120 %>
|
39
53
|
|
40
|
-
|
54
|
+
Then invoke the `tinymce` helper to initialize TinyMCE:
|
55
|
+
|
56
|
+
<%= tinymce %>
|
57
|
+
|
58
|
+
Custom options can be passed to `tinymce` to override the global options specified in `config/tinymce.yml`:
|
59
|
+
|
60
|
+
<%= tinymce :theme => "simple", :language => "de", :plugins => ["inlinepopups", "paste"] %>
|
61
|
+
|
62
|
+
|
63
|
+
Language Packs
|
64
|
+
--------------
|
41
65
|
|
42
|
-
|
66
|
+
See the [tinymce-rails-langs](https://github.com/spohlenz/tinymce-rails-langs) gem for additional language packs for TinyMCE. The `tinymce` helper will use the current locale as the language if available, falling back to English if the core language files are missing.
|
67
|
+
|
68
|
+
|
69
|
+
Manual Initialization
|
70
|
+
---------------------
|
71
|
+
|
72
|
+
Using the `tinymce` helper and global configuration file is entirely optional. The `tinyMCE.init` function can be invoked manually if desired.
|
43
73
|
|
44
74
|
<%= text_area_tag :editor, "", :rows => 40, :cols => 120 %>
|
45
75
|
|
@@ -58,7 +88,13 @@ To use custom plugins or skins, simply add the files to your asset load path so
|
|
58
88
|
|
59
89
|
For example, a plugin called `mycustomplugin` could have its main JS file at `app/assets/javascripts/tinymce/plugins/mycustomplugin/editor_plugin.js`.
|
60
90
|
|
61
|
-
|
91
|
+
You should also ensure that your custom paths are added to the asset precompile paths.
|
92
|
+
|
93
|
+
|
94
|
+
Using tinymce-rails as an Engine Dependency
|
95
|
+
-------------------------------------------
|
96
|
+
|
97
|
+
Ensure that you explicitly require `tinymce-rails` within your engine file. Including tinymce-rails as a dependency in your gemspec is not enough.
|
62
98
|
|
63
99
|
|
64
100
|
Updating
|
data/Rakefile
CHANGED
@@ -1,7 +1,4 @@
|
|
1
|
-
|
2
|
-
$:.unshift File.expand_path("../lib", __FILE__)
|
3
|
-
require "tinymce/version"
|
4
|
-
end
|
1
|
+
require File.expand_path('../lib/tinymce/rails/version', __FILE__)
|
5
2
|
|
6
3
|
def step(name)
|
7
4
|
print "#{name} ..."
|
@@ -15,29 +12,29 @@ def download(url, filename)
|
|
15
12
|
`curl -L -# #{url} -o tmp/#{filename}`
|
16
13
|
end
|
17
14
|
|
18
|
-
desc "Update TinyMCE to version
|
15
|
+
desc "Update TinyMCE to version #{TinyMCE::Rails::TINYMCE_VERSION}"
|
19
16
|
task :update => [ :fetch, :extract, :process ]
|
20
17
|
|
21
18
|
task :fetch do
|
22
|
-
download("https://github.com/downloads/tinymce/tinymce/tinymce_#{TinyMCE::TINYMCE_VERSION}.zip", "tinymce.zip")
|
23
|
-
download("https://github.com/downloads/tinymce/tinymce/tinymce_#{TinyMCE::TINYMCE_VERSION}_jquery.zip", "tinymce.jquery.zip")
|
19
|
+
download("https://github.com/downloads/tinymce/tinymce/tinymce_#{TinyMCE::Rails::TINYMCE_VERSION}.zip", "tinymce.zip")
|
20
|
+
download("https://github.com/downloads/tinymce/tinymce/tinymce_#{TinyMCE::Rails::TINYMCE_VERSION}_jquery.zip", "tinymce.jquery.zip")
|
24
21
|
end
|
25
22
|
|
26
23
|
task :extract do
|
27
24
|
step "Extracting core files" do
|
28
25
|
`rm -rf tmp/tinymce`
|
29
26
|
`unzip -u tmp/tinymce.zip -d tmp`
|
30
|
-
`rm -rf assets/
|
31
|
-
`mkdir -p assets/
|
32
|
-
`mv tmp/tinymce/jscripts/tiny_mce/* assets/
|
27
|
+
`rm -rf vendor/assets/javascripts/tinymce`
|
28
|
+
`mkdir -p vendor/assets/javascripts/tinymce`
|
29
|
+
`mv tmp/tinymce/jscripts/tiny_mce/* vendor/assets/javascripts/tinymce/`
|
33
30
|
end
|
34
31
|
|
35
32
|
step "Extracting jQuery files" do
|
36
33
|
`rm -rf tmp/tinymce`
|
37
34
|
`unzip -u tmp/tinymce.jquery.zip -d tmp`
|
38
|
-
`mv tmp/tinymce/jscripts/tiny_mce/jquery.tinymce.js assets/
|
39
|
-
`mv tmp/tinymce/jscripts/tiny_mce/tiny_mce.js assets/
|
40
|
-
`mv tmp/tinymce/jscripts/tiny_mce/tiny_mce_src.js assets/
|
35
|
+
`mv tmp/tinymce/jscripts/tiny_mce/jquery.tinymce.js vendor/assets/javascripts/tinymce/jquery.tinymce.js`
|
36
|
+
`mv tmp/tinymce/jscripts/tiny_mce/tiny_mce.js vendor/assets/javascripts/tinymce/tiny_mce_jquery.js`
|
37
|
+
`mv tmp/tinymce/jscripts/tiny_mce/tiny_mce_src.js vendor/assets/javascripts/tinymce/tiny_mce_jquery_src.js`
|
41
38
|
end
|
42
39
|
end
|
43
40
|
|
@@ -45,15 +42,9 @@ task :process do
|
|
45
42
|
step "Fixing file encoding" do
|
46
43
|
require 'iconv'
|
47
44
|
converter = Iconv.new('UTF-8', 'ISO-8859-1')
|
48
|
-
Dir["assets/
|
45
|
+
Dir["vendor/assets/javascripts/tinymce/**/*.js"].each do |file|
|
49
46
|
contents = converter.iconv(File.read(file)).force_encoding('UTF-8')
|
50
47
|
File.open(file, 'w') { |f| f.write(contents) }
|
51
48
|
end
|
52
49
|
end
|
53
|
-
|
54
|
-
step "Copying includeable assets" do
|
55
|
-
`cp assets/precompiled/tinymce/tiny_mce_src.js assets/vendor/tinymce/tiny_mce.js`
|
56
|
-
`cp assets/precompiled/tinymce/tiny_mce_jquery_src.js assets/vendor/tinymce/tiny_mce_jquery.js`
|
57
|
-
`cp assets/precompiled/tinymce/jquery.tinymce.js assets/vendor/tinymce/jquery-tinymce.js`
|
58
|
-
end
|
59
50
|
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
Rake::Task['assets:precompile:primary'].enhance do
|
2
|
+
assets = File.expand_path(File.dirname(__FILE__) + "/../../vendor/assets/javascripts/tinymce")
|
3
|
+
target = File.join(Rails.public_path, Rails.application.config.assets.prefix)
|
4
|
+
|
5
|
+
mkdir_p target
|
6
|
+
cp_r assets, target
|
7
|
+
end
|
data/lib/tinymce-rails.rb
CHANGED
@@ -1,2 +1 @@
|
|
1
|
-
require "tinymce/
|
2
|
-
require "tinymce/railtie"
|
1
|
+
require "tinymce/rails"
|
@@ -0,0 +1,12 @@
|
|
1
|
+
module TinyMCE
|
2
|
+
module Rails
|
3
|
+
require 'tinymce/rails/engine'
|
4
|
+
require 'tinymce/rails/version'
|
5
|
+
require "tinymce/rails/configuration"
|
6
|
+
require "tinymce/rails/helper"
|
7
|
+
|
8
|
+
def self.configuration
|
9
|
+
@configuration ||= Configuration.load(::Rails.root.join("config/tinymce.yml"))
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,67 @@
|
|
1
|
+
module TinyMCE::Rails
|
2
|
+
class Configuration
|
3
|
+
def self.defaults
|
4
|
+
{
|
5
|
+
"mode" => "specific_textareas",
|
6
|
+
"editor_selector" => "tinymce",
|
7
|
+
"theme" => "advanced"
|
8
|
+
}
|
9
|
+
end
|
10
|
+
|
11
|
+
attr_reader :options
|
12
|
+
|
13
|
+
def initialize(options)
|
14
|
+
@options = options
|
15
|
+
end
|
16
|
+
|
17
|
+
def options_for_tinymce
|
18
|
+
result = {}
|
19
|
+
|
20
|
+
options.each do |key, value|
|
21
|
+
if value.is_a?(Array) && value.all? { |v| v.is_a?(String) }
|
22
|
+
result[key] = value.join(",")
|
23
|
+
else
|
24
|
+
result[key] = value
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
result["language"] ||= self.class.default_language
|
29
|
+
|
30
|
+
result
|
31
|
+
end
|
32
|
+
|
33
|
+
def merge(options)
|
34
|
+
self.class.new(self.options.merge(options))
|
35
|
+
end
|
36
|
+
|
37
|
+
def load(filename)
|
38
|
+
options.merge!(YAML::load(ERB.new(IO.read(filename)).result))
|
39
|
+
end
|
40
|
+
|
41
|
+
def self.load(filename)
|
42
|
+
config = new(defaults)
|
43
|
+
config.load(filename) if File.exists?(filename)
|
44
|
+
config
|
45
|
+
end
|
46
|
+
|
47
|
+
# Default language falls back to English if current locale is not available.
|
48
|
+
def self.default_language
|
49
|
+
available_languages.include?(I18n.locale.to_s) ? I18n.locale.to_s : "en"
|
50
|
+
end
|
51
|
+
|
52
|
+
# Searches asset paths for TinyMCE language files.
|
53
|
+
def self.available_languages
|
54
|
+
assets.paths.map { |path|
|
55
|
+
files = assets.entries(File.join(path, "tinymce/langs"))
|
56
|
+
files.map { |file|
|
57
|
+
asset = assets.attributes_for(File.join(path, file))
|
58
|
+
asset.logical_path.sub(/\.js$/, "")
|
59
|
+
}
|
60
|
+
}.flatten.uniq
|
61
|
+
end
|
62
|
+
|
63
|
+
def self.assets
|
64
|
+
Rails.application.assets
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module TinyMCE::Rails
|
2
|
+
class Engine < ::Rails::Engine
|
3
|
+
config.tinymce = ActiveSupport::OrderedOptions.new
|
4
|
+
|
5
|
+
# Set an explicit base path for TinyMCE assets (usually defaults to /assets/tinymce)
|
6
|
+
config.tinymce.base = nil
|
7
|
+
|
8
|
+
initializer "precompile", :group => :all do |app|
|
9
|
+
app.config.assets.precompile << "tinymce.js"
|
10
|
+
end
|
11
|
+
|
12
|
+
initializer "helper" do |app|
|
13
|
+
ActionController::Base.helper(Helper)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module TinyMCE::Rails
|
2
|
+
module Helper
|
3
|
+
# Initializes TinyMCE on the current page based on the global configuration.
|
4
|
+
#
|
5
|
+
# Custom options can be set via the options hash, which will be passed to
|
6
|
+
# the TinyMCE init function.
|
7
|
+
#
|
8
|
+
# By default, all textareas with a class of "tinymce" will have the TinyMCE
|
9
|
+
# editor applied. The current locale will also be used as the language when
|
10
|
+
# TinyMCE language files are available, falling back to English if not
|
11
|
+
# available. The :editor_selector and :language options can be used to
|
12
|
+
# override these defaults.
|
13
|
+
#
|
14
|
+
# @example
|
15
|
+
# <%= tinymce(:theme => "advanced", :editor_selector => "editorClass") %>
|
16
|
+
def tinymce(options={})
|
17
|
+
configuration = TinyMCE::Rails.configuration.merge(options)
|
18
|
+
|
19
|
+
javascript_tag do
|
20
|
+
"tinyMCE.init(#{configuration.options_for_tinymce.to_json});".html_safe
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
# Includes TinyMCE javascript assets via a script tag.
|
25
|
+
def tinymce_assets
|
26
|
+
javascript_include_tag "tinymce"
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(b){var e,d,a=[],c=window;b.fn.tinymce=function(j){var p=this,g,k,h,m,i,l="",n="";if(!p.length){return p}if(!j){return tinyMCE.get(p[0].id)}p.css("visibility","hidden");function o(){var r=[],q=0;if(f){f();f=null}p.each(function(t,u){var s,w=u.id,v=j.oninit;if(!w){u.id=w=tinymce.DOM.uniqueId()}s=new tinymce.Editor(w,j);r.push(s);s.onInit.add(function(){var x,y=v;p.css("visibility","");if(v){if(++q==r.length){if(tinymce.is(y,"string")){x=(y.indexOf(".")===-1)?null:tinymce.resolve(y.replace(/\.\w+$/,""));y=tinymce.resolve(y)}y.apply(x||tinymce,r)}}})});b.each(r,function(t,s){s.render()})}if(!c.tinymce&&!d&&(g=j.script_url)){d=1;h=g.substring(0,g.lastIndexOf("/"));if(/_(src|dev)\.js/g.test(g)){n="_src"}m=g.lastIndexOf("?");if(m!=-1){l=g.substring(m+1)}c.tinyMCEPreInit=c.tinyMCEPreInit||{base:h,suffix:n,query:l};if(g.indexOf("gzip")!=-1){i=j.language||"en";g=g+(/\?/.test(g)?"&":"?")+"js=true&core=true&suffix="+escape(n)+"&themes="+escape(j.theme)+"&plugins="+escape(j.plugins)+"&languages="+i;if(!c.tinyMCE_GZ){tinyMCE_GZ={start:function(){tinymce.suffix=n;function q(r){tinymce.ScriptLoader.markDone(tinyMCE.baseURI.toAbsolute(r))}q("langs/"+i+".js");q("themes/"+j.theme+"/editor_template"+n+".js");q("themes/"+j.theme+"/langs/"+i+".js");b.each(j.plugins.split(","),function(s,r){if(r){q("plugins/"+r+"/editor_plugin"+n+".js");q("plugins/"+r+"/langs/"+i+".js")}})},end:function(){}}}}b.ajax({type:"GET",url:g,dataType:"script",cache:true,success:function(){tinymce.dom.Event.domLoaded=1;d=2;if(j.script_loaded){j.script_loaded()}o();b.each(a,function(q,r){r()})}})}else{if(d===1){a.push(o)}else{o()}}return p};b.extend(b.expr[":"],{tinymce:function(g){return !!(g.id&&tinyMCE.get(g.id))}});function f(){function i(l){if(l==="remove"){this.each(function(n,o){var m=h(o);if(m){m.remove()}})}this.find("span.mceEditor,div.mceEditor").each(function(n,o){var m=tinyMCE.get(o.id.replace(/_parent$/,""));if(m){m.remove()}})}function k(n){var m=this,l;if(n!==e){i.call(m);m.each(function(p,q){var o;if(o=tinyMCE.get(q.id)){o.setContent(n)}})}else{if(m.length>0){if(l=tinyMCE.get(m[0].id)){return l.getContent()}}}}function h(m){var l=null;(m)&&(m.id)&&(c.tinymce)&&(l=tinyMCE.get(m.id));return l}function g(l){return !!((l)&&(l.length)&&(c.tinymce)&&(l.is(":tinymce")))}var j={};b.each(["text","html","val"],function(n,l){var o=j[l]=b.fn[l],m=(l==="text");b.fn[l]=function(s){var p=this;if(!g(p)){return o.apply(p,arguments)}if(s!==e){k.call(p.filter(":tinymce"),s);o.apply(p.not(":tinymce"),arguments);return p}else{var r="";var q=arguments;(m?p:p.eq(0)).each(function(u,v){var t=h(v);r+=t?(m?t.getContent().replace(/<(?:"[^"]*"|'[^']*'|[^'">])*>/g,""):t.getContent()):o.apply(b(v),q)});return r}}});b.each(["append","prepend"],function(n,m){var o=j[m]=b.fn[m],l=(m==="prepend");b.fn[m]=function(q){var p=this;if(!g(p)){return o.apply(p,arguments)}if(q!==e){p.filter(":tinymce").each(function(s,t){var r=h(t);r&&r.setContent(l?q+r.getContent():r.getContent()+q)});o.apply(p.not(":tinymce"),arguments);return p}}});b.each(["remove","replaceWith","replaceAll","empty"],function(m,l){var n=j[l]=b.fn[l];b.fn[l]=function(){i.call(this,l);return n.apply(this,arguments)}});j.attr=b.fn.attr;b.fn.attr=function(n,q,o){var m=this;if((!n)||(n!=="value")||(!g(m))){return j.attr.call(m,n,q,o)}if(q!==e){k.call(m.filter(":tinymce"),q);j.attr.call(m.not(":tinymce"),n,q,o);return m}else{var p=m[0],l=h(p);return l?l.getContent():j.attr.call(b(p),n,q,o)}}}})(jQuery);
|
File without changes
|
File without changes
|
File without changes
|
data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/advhr/editor_plugin.js
RENAMED
File without changes
|
data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/advhr/editor_plugin_src.js
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/advimage/css/advimage.css
RENAMED
File without changes
|
data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/advimage/editor_plugin.js
RENAMED
File without changes
|
data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/advimage/editor_plugin_src.js
RENAMED
File without changes
|
File without changes
|
data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/advimage/img/sample.gif
RENAMED
File without changes
|
File without changes
|
data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/advimage/langs/en_dlg.js
RENAMED
File without changes
|
data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/advlink/css/advlink.css
RENAMED
File without changes
|
data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/advlink/editor_plugin.js
RENAMED
File without changes
|
data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/advlink/editor_plugin_src.js
RENAMED
File without changes
|
@@ -54,6 +54,13 @@ function init() {
|
|
54
54
|
document.getElementById('popupurl').style.width = '180px';
|
55
55
|
|
56
56
|
elm = inst.dom.getParent(elm, "A");
|
57
|
+
if (elm == null) {
|
58
|
+
var prospect = inst.dom.create("p", null, inst.selection.getContent());
|
59
|
+
if (prospect.childNodes.length === 1) {
|
60
|
+
elm = prospect.firstChild;
|
61
|
+
}
|
62
|
+
}
|
63
|
+
|
57
64
|
if (elm != null && elm.nodeName == "A")
|
58
65
|
action = "update";
|
59
66
|
|
@@ -503,7 +510,7 @@ function getTargetListHTML(elm_id, target_form_element) {
|
|
503
510
|
var targets = tinyMCEPopup.getParam('theme_advanced_link_targets', '').split(';');
|
504
511
|
var html = '';
|
505
512
|
|
506
|
-
html += '<select id="' + elm_id + '" name="' + elm_id + '"
|
513
|
+
html += '<select id="' + elm_id + '" name="' + elm_id + '" onfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="this.form.' + target_form_element + '.value=';
|
507
514
|
html += 'this.options[this.selectedIndex].value;">';
|
508
515
|
html += '<option value="_self">' + tinyMCEPopup.getLang('advlink_dlg.target_same') + '</option>';
|
509
516
|
html += '<option value="_blank">' + tinyMCEPopup.getLang('advlink_dlg.target_blank') + ' (_blank)</option>';
|
data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/advlink/langs/en_dlg.js
RENAMED
File without changes
|
File without changes
|
data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/advlist/editor_plugin.js
RENAMED
File without changes
|
data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/advlist/editor_plugin_src.js
RENAMED
File without changes
|
data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/autolink/editor_plugin.js
RENAMED
File without changes
|
data/{assets/precompiled → vendor/assets/javascripts}/tinymce/plugins/autolink/editor_plugin_src.js
RENAMED
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
(function(){tinymce.create("tinymce.plugins.AutoResizePlugin",{init:function(a,c){var d=this,e=0;if(a.getParam("fullscreen_is_enabled")){return}function b(){var j,i=a.getDoc(),f=i.body,l=i.documentElement,h=tinymce.DOM,k=d.autoresize_min_height,g;g=tinymce.isIE?f.scrollHeight:(tinymce.isWebKit&&f.clientHeight==0?0:f.offsetHeight);if(g>d.autoresize_min_height){k=g}if(d.autoresize_max_height&&g>d.autoresize_max_height){k=d.autoresize_max_height;f.style.overflowY="auto";l.style.overflowY="auto"}else{f.style.overflowY="hidden";l.style.overflowY="hidden";f.scrollTop=0}if(k!==e){j=k-e;h.setStyle(h.get(a.id+"_ifr"),"height",k+"px");e=k;if(tinymce.isWebKit&&j<0){b()}}}d.editor=a;d.autoresize_min_height=parseInt(a.getParam("autoresize_min_height",a.getElement().offsetHeight));d.autoresize_max_height=parseInt(a.getParam("autoresize_max_height",0));a.onInit.add(function(f){f.dom.setStyle(f.getBody(),"paddingBottom",f.getParam("autoresize_bottom_margin",50)+"px")});a.onChange.add(b);a.onSetContent.add(b);a.onPaste.add(b);a.onKeyUp.add(b);a.onPostRender.add(b);if(a.getParam("autoresize_on_init",true)){a.onLoad.add(b);a.onLoadContent.add(b)}a.addCommand("mceAutoResize",b)},getInfo:function(){return{longname:"Auto Resize",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autoresize",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("autoresize",tinymce.plugins.AutoResizePlugin)})();
|
@@ -11,7 +11,7 @@
|
|
11
11
|
(function() {
|
12
12
|
/**
|
13
13
|
* Auto Resize
|
14
|
-
*
|
14
|
+
*
|
15
15
|
* This plugin automatically resizes the content area to fit its content height.
|
16
16
|
* It will retain a minimum height, which is the height of the content area when
|
17
17
|
* it's initialized.
|
@@ -35,10 +35,10 @@
|
|
35
35
|
* This method gets executed each time the editor needs to resize.
|
36
36
|
*/
|
37
37
|
function resize() {
|
38
|
-
var d = ed.getDoc(),
|
38
|
+
var deltaSize, d = ed.getDoc(), body = d.body, de = d.documentElement, DOM = tinymce.DOM, resizeHeight = t.autoresize_min_height, myHeight;
|
39
39
|
|
40
40
|
// Get height differently depending on the browser used
|
41
|
-
myHeight = tinymce.isIE ?
|
41
|
+
myHeight = tinymce.isIE ? body.scrollHeight : (tinymce.isWebKit && body.clientHeight == 0 ? 0 : body.offsetHeight);
|
42
42
|
|
43
43
|
// Don't make it smaller than the minimum height
|
44
44
|
if (myHeight > t.autoresize_min_height)
|
@@ -47,30 +47,34 @@
|
|
47
47
|
// If a maximum height has been defined don't exceed this height
|
48
48
|
if (t.autoresize_max_height && myHeight > t.autoresize_max_height) {
|
49
49
|
resizeHeight = t.autoresize_max_height;
|
50
|
-
|
51
|
-
|
52
|
-
|
50
|
+
body.style.overflowY = "auto";
|
51
|
+
de.style.overflowY = "auto"; // Old IE
|
52
|
+
} else {
|
53
|
+
body.style.overflowY = "hidden";
|
54
|
+
de.style.overflowY = "hidden"; // Old IE
|
55
|
+
body.scrollTop = 0;
|
56
|
+
}
|
53
57
|
|
54
58
|
// Resize content element
|
55
59
|
if (resizeHeight !== oldSize) {
|
60
|
+
deltaSize = resizeHeight - oldSize;
|
56
61
|
DOM.setStyle(DOM.get(ed.id + '_ifr'), 'height', resizeHeight + 'px');
|
57
62
|
oldSize = resizeHeight;
|
58
|
-
}
|
59
63
|
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
+
// WebKit doesn't decrease the size of the body element until the iframe gets resized
|
65
|
+
// So we need to continue to resize the iframe down until the size gets fixed
|
66
|
+
if (tinymce.isWebKit && deltaSize < 0)
|
67
|
+
resize();
|
64
68
|
}
|
65
69
|
};
|
66
70
|
|
67
71
|
t.editor = ed;
|
68
72
|
|
69
73
|
// Define minimum height
|
70
|
-
t.autoresize_min_height = parseInt(
|
74
|
+
t.autoresize_min_height = parseInt(ed.getParam('autoresize_min_height', ed.getElement().offsetHeight));
|
71
75
|
|
72
|
-
// Define maximum height
|
73
|
-
t.autoresize_max_height = parseInt(
|
76
|
+
// Define maximum height
|
77
|
+
t.autoresize_max_height = parseInt(ed.getParam('autoresize_max_height', 0));
|
74
78
|
|
75
79
|
// Add padding at the bottom for better UX
|
76
80
|
ed.onInit.add(function(ed){
|
@@ -85,30 +89,8 @@
|
|
85
89
|
ed.onPostRender.add(resize);
|
86
90
|
|
87
91
|
if (ed.getParam('autoresize_on_init', true)) {
|
88
|
-
|
89
|
-
ed.
|
90
|
-
// Show throbber until content area is resized properly
|
91
|
-
ed.setProgressState(true);
|
92
|
-
t.throbbing = true;
|
93
|
-
|
94
|
-
// Hide scrollbars
|
95
|
-
ed.getBody().style.overflowY = "hidden";
|
96
|
-
});
|
97
|
-
|
98
|
-
ed.onLoadContent.add(function(ed, l) {
|
99
|
-
resize();
|
100
|
-
|
101
|
-
// Because the content area resizes when its content CSS loads,
|
102
|
-
// and we can't easily add a listener to its onload event,
|
103
|
-
// we'll just trigger a resize after a short loading period
|
104
|
-
setTimeout(function() {
|
105
|
-
resize();
|
106
|
-
|
107
|
-
// Disable throbber
|
108
|
-
ed.setProgressState(false);
|
109
|
-
t.throbbing = false;
|
110
|
-
}, 1250);
|
111
|
-
});
|
92
|
+
ed.onLoad.add(resize);
|
93
|
+
ed.onLoadContent.add(resize);
|
112
94
|
}
|
113
95
|
|
114
96
|
// Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('mceExample');
|