use_tinymce 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT-LICENSE +20 -0
- data/README.markdown +48 -0
- data/Rakefile +44 -0
- data/assets/tinymce/changelog.txt +1303 -0
- data/assets/tinymce/examples/accessibility.html +101 -0
- data/assets/tinymce/examples/css/content.css +105 -0
- data/assets/tinymce/examples/css/word.css +53 -0
- data/assets/tinymce/examples/custom_formats.html +111 -0
- data/assets/tinymce/examples/full.html +101 -0
- data/assets/tinymce/examples/index.html +10 -0
- data/assets/tinymce/examples/lists/image_list.js +9 -0
- data/assets/tinymce/examples/lists/link_list.js +10 -0
- data/assets/tinymce/examples/lists/media_list.js +14 -0
- data/assets/tinymce/examples/lists/template_list.js +9 -0
- data/assets/tinymce/examples/media/logo.jpg +0 -0
- data/assets/tinymce/examples/media/logo_over.jpg +0 -0
- data/assets/tinymce/examples/media/sample.avi +0 -0
- data/assets/tinymce/examples/media/sample.dcr +0 -0
- data/assets/tinymce/examples/media/sample.flv +0 -0
- data/assets/tinymce/examples/media/sample.mov +0 -0
- data/assets/tinymce/examples/media/sample.ram +1 -0
- data/assets/tinymce/examples/media/sample.rm +0 -0
- data/assets/tinymce/examples/media/sample.swf +0 -0
- data/assets/tinymce/examples/menu.html +18 -0
- data/assets/tinymce/examples/simple.html +47 -0
- data/assets/tinymce/examples/skins.html +216 -0
- data/assets/tinymce/examples/templates/layout1.htm +15 -0
- data/assets/tinymce/examples/templates/snippet1.htm +1 -0
- data/assets/tinymce/examples/word.html +72 -0
- data/assets/tinymce/jscripts/tiny_mce/langs/en.js +223 -0
- data/assets/tinymce/jscripts/tiny_mce/license.txt +504 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/advhr/css/advhr.css +5 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/advhr/editor_plugin.js +1 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/advhr/editor_plugin_src.js +57 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/advhr/js/rule.js +43 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/advhr/langs/en_dlg.js +7 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/advhr/rule.htm +58 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/advimage/css/advimage.css +13 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/advimage/editor_plugin.js +1 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/advimage/editor_plugin_src.js +50 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/advimage/image.htm +235 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/advimage/img/sample.gif +0 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/advimage/js/image.js +458 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/advimage/langs/en_dlg.js +45 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/advlink/css/advlink.css +8 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/advlink/editor_plugin.js +1 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/advlink/editor_plugin_src.js +61 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/advlink/js/advlink.js +532 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/advlink/langs/en_dlg.js +54 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/advlink/link.htm +338 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/advlist/editor_plugin.js +1 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/advlist/editor_plugin_src.js +161 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/autolink/editor_plugin.js +1 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/autolink/editor_plugin_src.js +169 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/autoresize/editor_plugin.js +1 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/autoresize/editor_plugin_src.js +128 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/autosave/editor_plugin.js +1 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/autosave/editor_plugin_src.js +431 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/autosave/langs/en.js +4 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin.js +1 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin_src.js +120 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/contextmenu/editor_plugin.js +1 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/contextmenu/editor_plugin_src.js +161 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/directionality/editor_plugin.js +1 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/directionality/editor_plugin_src.js +82 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/emotions/editor_plugin.js +1 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/emotions/editor_plugin_src.js +43 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/emotions/emotions.htm +41 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-cool.gif +0 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-cry.gif +0 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-embarassed.gif +0 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-foot-in-mouth.gif +0 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-frown.gif +0 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-innocent.gif +0 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-kiss.gif +0 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-laughing.gif +0 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-money-mouth.gif +0 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-sealed.gif +0 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-smile.gif +0 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-surprised.gif +0 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-tongue-out.gif +0 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-undecided.gif +0 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-wink.gif +0 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-yell.gif +0 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/emotions/js/emotions.js +22 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/emotions/langs/en_dlg.js +20 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/example/dialog.htm +22 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/example/editor_plugin.js +1 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/example/editor_plugin_src.js +84 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/example/img/example.gif +0 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/example/js/dialog.js +19 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/example/langs/en.js +3 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/example/langs/en_dlg.js +3 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/fullpage/css/fullpage.css +143 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/fullpage/editor_plugin.js +1 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/fullpage/editor_plugin_src.js +399 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/fullpage/fullpage.htm +259 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/fullpage/js/fullpage.js +232 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/fullpage/langs/en_dlg.js +85 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/fullscreen/editor_plugin.js +1 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/fullscreen/editor_plugin_src.js +159 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/fullscreen/fullscreen.htm +109 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/iespell/editor_plugin.js +1 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/iespell/editor_plugin_src.js +54 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/inlinepopups/editor_plugin.js +1 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/inlinepopups/editor_plugin_src.js +696 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif +0 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/button.gif +0 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif +0 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif +0 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif +0 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif +0 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif +0 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css +90 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/inlinepopups/template.htm +387 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/insertdatetime/editor_plugin.js +1 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/insertdatetime/editor_plugin_src.js +83 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/layer/editor_plugin.js +1 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/layer/editor_plugin_src.js +214 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/legacyoutput/editor_plugin.js +1 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/legacyoutput/editor_plugin_src.js +139 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/lists/editor_plugin.js +1 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/lists/editor_plugin_src.js +617 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/media/css/media.css +17 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/media/editor_plugin.js +1 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/media/editor_plugin_src.js +770 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/media/js/embed.js +73 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/media/js/media.js +354 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/media/langs/en_dlg.js +109 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/media/media.htm +812 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/media/moxieplayer.swf +0 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/nonbreaking/editor_plugin.js +1 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/nonbreaking/editor_plugin_src.js +53 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/noneditable/editor_plugin.js +1 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/noneditable/editor_plugin_src.js +92 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/pagebreak/editor_plugin.js +1 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/pagebreak/editor_plugin_src.js +74 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/paste/editor_plugin.js +1 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/paste/editor_plugin_src.js +933 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/paste/js/pastetext.js +36 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/paste/js/pasteword.js +51 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/paste/langs/en_dlg.js +5 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/paste/pastetext.htm +27 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/paste/pasteword.htm +21 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/preview/editor_plugin.js +1 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/preview/editor_plugin_src.js +53 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/preview/example.html +28 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/preview/jscripts/embed.js +73 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/preview/preview.html +17 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/print/editor_plugin.js +1 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/print/editor_plugin_src.js +34 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/save/editor_plugin.js +1 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/save/editor_plugin_src.js +101 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/searchreplace/css/searchreplace.css +6 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/searchreplace/editor_plugin.js +1 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/searchreplace/editor_plugin_src.js +61 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/searchreplace/js/searchreplace.js +142 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/en_dlg.js +16 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/searchreplace/searchreplace.htm +100 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/spellchecker/css/content.css +1 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/spellchecker/editor_plugin.js +1 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/spellchecker/editor_plugin_src.js +435 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/spellchecker/img/wline.gif +0 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/style/css/props.css +13 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/style/editor_plugin.js +1 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/style/editor_plugin_src.js +55 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/style/js/props.js +635 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/style/langs/en_dlg.js +70 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/style/props.htm +838 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/tabfocus/editor_plugin.js +1 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/tabfocus/editor_plugin_src.js +114 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/table/cell.htm +178 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/table/css/cell.css +17 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/table/css/row.css +25 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/table/css/table.css +13 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/table/editor_plugin.js +1 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/table/editor_plugin_src.js +1202 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/table/js/cell.js +284 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/table/js/merge_cells.js +27 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/table/js/row.js +232 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/table/js/table.js +450 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/table/langs/en_dlg.js +74 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/table/merge_cells.htm +32 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/table/row.htm +157 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/table/table.htm +188 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/template/blank.htm +12 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/template/css/template.css +23 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/template/editor_plugin.js +1 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/template/editor_plugin_src.js +159 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/template/js/template.js +106 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/template/langs/en_dlg.js +15 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/template/template.htm +31 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/visualchars/editor_plugin.js +1 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/visualchars/editor_plugin_src.js +83 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/wordcount/editor_plugin.js +1 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/wordcount/editor_plugin_src.js +114 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/abbr.htm +142 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/acronym.htm +142 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/attributes.htm +149 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/cite.htm +142 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/css/attributes.css +11 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/css/popup.css +9 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/del.htm +162 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/editor_plugin.js +1 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/editor_plugin_src.js +132 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/ins.htm +162 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/js/abbr.js +28 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/js/acronym.js +28 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/js/attributes.js +111 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/js/cite.js +28 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/js/del.js +53 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/js/element_common.js +229 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/js/ins.js +53 -0
- data/assets/tinymce/jscripts/tiny_mce/plugins/xhtmlxtras/langs/en_dlg.js +32 -0
- data/assets/tinymce/jscripts/tiny_mce/themes/advanced/about.htm +52 -0
- data/assets/tinymce/jscripts/tiny_mce/themes/advanced/anchor.htm +26 -0
- data/assets/tinymce/jscripts/tiny_mce/themes/advanced/charmap.htm +51 -0
- data/assets/tinymce/jscripts/tiny_mce/themes/advanced/color_picker.htm +74 -0
- data/assets/tinymce/jscripts/tiny_mce/themes/advanced/editor_template.js +1 -0
- data/assets/tinymce/jscripts/tiny_mce/themes/advanced/editor_template_src.js +1360 -0
- data/assets/tinymce/jscripts/tiny_mce/themes/advanced/image.htm +80 -0
- data/assets/tinymce/jscripts/tiny_mce/themes/advanced/img/colorpicker.jpg +0 -0
- data/assets/tinymce/jscripts/tiny_mce/themes/advanced/img/flash.gif +0 -0
- data/assets/tinymce/jscripts/tiny_mce/themes/advanced/img/icons.gif +0 -0
- data/assets/tinymce/jscripts/tiny_mce/themes/advanced/img/iframe.gif +0 -0
- data/assets/tinymce/jscripts/tiny_mce/themes/advanced/img/pagebreak.gif +0 -0
- data/assets/tinymce/jscripts/tiny_mce/themes/advanced/img/quicktime.gif +0 -0
- data/assets/tinymce/jscripts/tiny_mce/themes/advanced/img/realmedia.gif +0 -0
- data/assets/tinymce/jscripts/tiny_mce/themes/advanced/img/shockwave.gif +0 -0
- data/assets/tinymce/jscripts/tiny_mce/themes/advanced/img/trans.gif +0 -0
- data/assets/tinymce/jscripts/tiny_mce/themes/advanced/img/video.gif +0 -0
- data/assets/tinymce/jscripts/tiny_mce/themes/advanced/img/windowsmedia.gif +0 -0
- data/assets/tinymce/jscripts/tiny_mce/themes/advanced/js/about.js +73 -0
- data/assets/tinymce/jscripts/tiny_mce/themes/advanced/js/anchor.js +42 -0
- data/assets/tinymce/jscripts/tiny_mce/themes/advanced/js/charmap.js +355 -0
- data/assets/tinymce/jscripts/tiny_mce/themes/advanced/js/color_picker.js +329 -0
- data/assets/tinymce/jscripts/tiny_mce/themes/advanced/js/image.js +247 -0
- data/assets/tinymce/jscripts/tiny_mce/themes/advanced/js/link.js +153 -0
- data/assets/tinymce/jscripts/tiny_mce/themes/advanced/js/source_editor.js +56 -0
- data/assets/tinymce/jscripts/tiny_mce/themes/advanced/langs/en.js +68 -0
- data/assets/tinymce/jscripts/tiny_mce/themes/advanced/langs/en_dlg.js +54 -0
- data/assets/tinymce/jscripts/tiny_mce/themes/advanced/link.htm +57 -0
- data/assets/tinymce/jscripts/tiny_mce/themes/advanced/shortcuts.htm +47 -0
- data/assets/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/content.css +47 -0
- data/assets/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/dialog.css +117 -0
- data/assets/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/img/buttons.png +0 -0
- data/assets/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/img/items.gif +0 -0
- data/assets/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/img/menu_arrow.gif +0 -0
- data/assets/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/img/menu_check.gif +0 -0
- data/assets/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/img/progress.gif +0 -0
- data/assets/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/img/tabs.gif +0 -0
- data/assets/tinymce/jscripts/tiny_mce/themes/advanced/skins/default/ui.css +213 -0
- data/assets/tinymce/jscripts/tiny_mce/themes/advanced/skins/highcontrast/content.css +23 -0
- data/assets/tinymce/jscripts/tiny_mce/themes/advanced/skins/highcontrast/dialog.css +105 -0
- data/assets/tinymce/jscripts/tiny_mce/themes/advanced/skins/highcontrast/ui.css +101 -0
- data/assets/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/content.css +46 -0
- data/assets/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/dialog.css +117 -0
- data/assets/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/img/button_bg.png +0 -0
- data/assets/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_black.png +0 -0
- data/assets/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/img/button_bg_silver.png +0 -0
- data/assets/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/ui.css +216 -0
- data/assets/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/ui_black.css +8 -0
- data/assets/tinymce/jscripts/tiny_mce/themes/advanced/skins/o2k7/ui_silver.css +5 -0
- data/assets/tinymce/jscripts/tiny_mce/themes/advanced/source_editor.htm +25 -0
- data/assets/tinymce/jscripts/tiny_mce/themes/simple/editor_template.js +1 -0
- data/assets/tinymce/jscripts/tiny_mce/themes/simple/editor_template_src.js +84 -0
- data/assets/tinymce/jscripts/tiny_mce/themes/simple/img/icons.gif +0 -0
- data/assets/tinymce/jscripts/tiny_mce/themes/simple/langs/en.js +11 -0
- data/assets/tinymce/jscripts/tiny_mce/themes/simple/skins/default/content.css +25 -0
- data/assets/tinymce/jscripts/tiny_mce/themes/simple/skins/default/ui.css +32 -0
- data/assets/tinymce/jscripts/tiny_mce/themes/simple/skins/o2k7/content.css +17 -0
- data/assets/tinymce/jscripts/tiny_mce/themes/simple/skins/o2k7/img/button_bg.png +0 -0
- data/assets/tinymce/jscripts/tiny_mce/themes/simple/skins/o2k7/ui.css +35 -0
- data/assets/tinymce/jscripts/tiny_mce/tiny_mce.js +1 -0
- data/assets/tinymce/jscripts/tiny_mce/tiny_mce_popup.js +5 -0
- data/assets/tinymce/jscripts/tiny_mce/tiny_mce_src.js +15812 -0
- data/assets/tinymce/jscripts/tiny_mce/utils/editable_selects.js +70 -0
- data/assets/tinymce/jscripts/tiny_mce/utils/form_utils.js +210 -0
- data/assets/tinymce/jscripts/tiny_mce/utils/mctabs.js +162 -0
- data/assets/tinymce/jscripts/tiny_mce/utils/validate.js +252 -0
- data/assets/use_tinymce_init_advanced.js +15 -0
- data/assets/use_tinymce_init_simple.js +5 -0
- data/lib/tasks/use_tinymce.rake +25 -0
- data/lib/use_tinymce/railengine.rb +12 -0
- data/lib/use_tinymce/use_tinymce.rb +33 -0
- data/lib/use_tinymce.rb +4 -0
- data/test/use_tinymce_base_test.rb +70 -0
- metadata +353 -0
@@ -0,0 +1,696 @@
|
|
1
|
+
/**
|
2
|
+
* editor_plugin_src.js
|
3
|
+
*
|
4
|
+
* Copyright 2009, Moxiecode Systems AB
|
5
|
+
* Released under LGPL License.
|
6
|
+
*
|
7
|
+
* License: http://tinymce.moxiecode.com/license
|
8
|
+
* Contributing: http://tinymce.moxiecode.com/contributing
|
9
|
+
*/
|
10
|
+
|
11
|
+
(function() {
|
12
|
+
var DOM = tinymce.DOM, Element = tinymce.dom.Element, Event = tinymce.dom.Event, each = tinymce.each, is = tinymce.is;
|
13
|
+
|
14
|
+
tinymce.create('tinymce.plugins.InlinePopups', {
|
15
|
+
init : function(ed, url) {
|
16
|
+
// Replace window manager
|
17
|
+
ed.onBeforeRenderUI.add(function() {
|
18
|
+
ed.windowManager = new tinymce.InlineWindowManager(ed);
|
19
|
+
DOM.loadCSS(url + '/skins/' + (ed.settings.inlinepopups_skin || 'clearlooks2') + "/window.css");
|
20
|
+
});
|
21
|
+
},
|
22
|
+
|
23
|
+
getInfo : function() {
|
24
|
+
return {
|
25
|
+
longname : 'InlinePopups',
|
26
|
+
author : 'Moxiecode Systems AB',
|
27
|
+
authorurl : 'http://tinymce.moxiecode.com',
|
28
|
+
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/inlinepopups',
|
29
|
+
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
30
|
+
};
|
31
|
+
}
|
32
|
+
});
|
33
|
+
|
34
|
+
tinymce.create('tinymce.InlineWindowManager:tinymce.WindowManager', {
|
35
|
+
InlineWindowManager : function(ed) {
|
36
|
+
var t = this;
|
37
|
+
|
38
|
+
t.parent(ed);
|
39
|
+
t.zIndex = 300000;
|
40
|
+
t.count = 0;
|
41
|
+
t.windows = {};
|
42
|
+
},
|
43
|
+
|
44
|
+
open : function(f, p) {
|
45
|
+
var t = this, id, opt = '', ed = t.editor, dw = 0, dh = 0, vp, po, mdf, clf, we, w, u, parentWindow;
|
46
|
+
|
47
|
+
f = f || {};
|
48
|
+
p = p || {};
|
49
|
+
|
50
|
+
// Run native windows
|
51
|
+
if (!f.inline)
|
52
|
+
return t.parent(f, p);
|
53
|
+
|
54
|
+
parentWindow = t._frontWindow();
|
55
|
+
if (parentWindow && DOM.get(parentWindow.id + '_ifr')) {
|
56
|
+
parentWindow.focussedElement = DOM.get(parentWindow.id + '_ifr').contentWindow.document.activeElement;
|
57
|
+
}
|
58
|
+
|
59
|
+
// Only store selection if the type is a normal window
|
60
|
+
if (!f.type)
|
61
|
+
t.bookmark = ed.selection.getBookmark(1);
|
62
|
+
|
63
|
+
id = DOM.uniqueId();
|
64
|
+
vp = DOM.getViewPort();
|
65
|
+
f.width = parseInt(f.width || 320);
|
66
|
+
f.height = parseInt(f.height || 240) + (tinymce.isIE ? 8 : 0);
|
67
|
+
f.min_width = parseInt(f.min_width || 150);
|
68
|
+
f.min_height = parseInt(f.min_height || 100);
|
69
|
+
f.max_width = parseInt(f.max_width || 2000);
|
70
|
+
f.max_height = parseInt(f.max_height || 2000);
|
71
|
+
f.left = f.left || Math.round(Math.max(vp.x, vp.x + (vp.w / 2.0) - (f.width / 2.0)));
|
72
|
+
f.top = f.top || Math.round(Math.max(vp.y, vp.y + (vp.h / 2.0) - (f.height / 2.0)));
|
73
|
+
f.movable = f.resizable = true;
|
74
|
+
p.mce_width = f.width;
|
75
|
+
p.mce_height = f.height;
|
76
|
+
p.mce_inline = true;
|
77
|
+
p.mce_window_id = id;
|
78
|
+
p.mce_auto_focus = f.auto_focus;
|
79
|
+
|
80
|
+
// Transpose
|
81
|
+
// po = DOM.getPos(ed.getContainer());
|
82
|
+
// f.left -= po.x;
|
83
|
+
// f.top -= po.y;
|
84
|
+
|
85
|
+
t.features = f;
|
86
|
+
t.params = p;
|
87
|
+
t.onOpen.dispatch(t, f, p);
|
88
|
+
|
89
|
+
if (f.type) {
|
90
|
+
opt += ' mceModal';
|
91
|
+
|
92
|
+
if (f.type)
|
93
|
+
opt += ' mce' + f.type.substring(0, 1).toUpperCase() + f.type.substring(1);
|
94
|
+
|
95
|
+
f.resizable = false;
|
96
|
+
}
|
97
|
+
|
98
|
+
if (f.statusbar)
|
99
|
+
opt += ' mceStatusbar';
|
100
|
+
|
101
|
+
if (f.resizable)
|
102
|
+
opt += ' mceResizable';
|
103
|
+
|
104
|
+
if (f.minimizable)
|
105
|
+
opt += ' mceMinimizable';
|
106
|
+
|
107
|
+
if (f.maximizable)
|
108
|
+
opt += ' mceMaximizable';
|
109
|
+
|
110
|
+
if (f.movable)
|
111
|
+
opt += ' mceMovable';
|
112
|
+
|
113
|
+
// Create DOM objects
|
114
|
+
t._addAll(DOM.doc.body,
|
115
|
+
['div', {id : id, role : 'dialog', 'aria-labelledby': f.type ? id + '_content' : id + '_title', 'class' : (ed.settings.inlinepopups_skin || 'clearlooks2') + (tinymce.isIE && window.getSelection ? ' ie9' : ''), style : 'width:100px;height:100px'},
|
116
|
+
['div', {id : id + '_wrapper', 'class' : 'mceWrapper' + opt},
|
117
|
+
['div', {id : id + '_top', 'class' : 'mceTop'},
|
118
|
+
['div', {'class' : 'mceLeft'}],
|
119
|
+
['div', {'class' : 'mceCenter'}],
|
120
|
+
['div', {'class' : 'mceRight'}],
|
121
|
+
['span', {id : id + '_title'}, f.title || '']
|
122
|
+
],
|
123
|
+
|
124
|
+
['div', {id : id + '_middle', 'class' : 'mceMiddle'},
|
125
|
+
['div', {id : id + '_left', 'class' : 'mceLeft', tabindex : '0'}],
|
126
|
+
['span', {id : id + '_content'}],
|
127
|
+
['div', {id : id + '_right', 'class' : 'mceRight', tabindex : '0'}]
|
128
|
+
],
|
129
|
+
|
130
|
+
['div', {id : id + '_bottom', 'class' : 'mceBottom'},
|
131
|
+
['div', {'class' : 'mceLeft'}],
|
132
|
+
['div', {'class' : 'mceCenter'}],
|
133
|
+
['div', {'class' : 'mceRight'}],
|
134
|
+
['span', {id : id + '_status'}, 'Content']
|
135
|
+
],
|
136
|
+
|
137
|
+
['a', {'class' : 'mceMove', tabindex : '-1', href : 'javascript:;'}],
|
138
|
+
['a', {'class' : 'mceMin', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}],
|
139
|
+
['a', {'class' : 'mceMax', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}],
|
140
|
+
['a', {'class' : 'mceMed', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}],
|
141
|
+
['a', {'class' : 'mceClose', tabindex : '-1', href : 'javascript:;', onmousedown : 'return false;'}],
|
142
|
+
['a', {id : id + '_resize_n', 'class' : 'mceResize mceResizeN', tabindex : '-1', href : 'javascript:;'}],
|
143
|
+
['a', {id : id + '_resize_s', 'class' : 'mceResize mceResizeS', tabindex : '-1', href : 'javascript:;'}],
|
144
|
+
['a', {id : id + '_resize_w', 'class' : 'mceResize mceResizeW', tabindex : '-1', href : 'javascript:;'}],
|
145
|
+
['a', {id : id + '_resize_e', 'class' : 'mceResize mceResizeE', tabindex : '-1', href : 'javascript:;'}],
|
146
|
+
['a', {id : id + '_resize_nw', 'class' : 'mceResize mceResizeNW', tabindex : '-1', href : 'javascript:;'}],
|
147
|
+
['a', {id : id + '_resize_ne', 'class' : 'mceResize mceResizeNE', tabindex : '-1', href : 'javascript:;'}],
|
148
|
+
['a', {id : id + '_resize_sw', 'class' : 'mceResize mceResizeSW', tabindex : '-1', href : 'javascript:;'}],
|
149
|
+
['a', {id : id + '_resize_se', 'class' : 'mceResize mceResizeSE', tabindex : '-1', href : 'javascript:;'}]
|
150
|
+
]
|
151
|
+
]
|
152
|
+
);
|
153
|
+
|
154
|
+
DOM.setStyles(id, {top : -10000, left : -10000});
|
155
|
+
|
156
|
+
// Fix gecko rendering bug, where the editors iframe messed with window contents
|
157
|
+
if (tinymce.isGecko)
|
158
|
+
DOM.setStyle(id, 'overflow', 'auto');
|
159
|
+
|
160
|
+
// Measure borders
|
161
|
+
if (!f.type) {
|
162
|
+
dw += DOM.get(id + '_left').clientWidth;
|
163
|
+
dw += DOM.get(id + '_right').clientWidth;
|
164
|
+
dh += DOM.get(id + '_top').clientHeight;
|
165
|
+
dh += DOM.get(id + '_bottom').clientHeight;
|
166
|
+
}
|
167
|
+
|
168
|
+
// Resize window
|
169
|
+
DOM.setStyles(id, {top : f.top, left : f.left, width : f.width + dw, height : f.height + dh});
|
170
|
+
|
171
|
+
u = f.url || f.file;
|
172
|
+
if (u) {
|
173
|
+
if (tinymce.relaxedDomain)
|
174
|
+
u += (u.indexOf('?') == -1 ? '?' : '&') + 'mce_rdomain=' + tinymce.relaxedDomain;
|
175
|
+
|
176
|
+
u = tinymce._addVer(u);
|
177
|
+
}
|
178
|
+
|
179
|
+
if (!f.type) {
|
180
|
+
DOM.add(id + '_content', 'iframe', {id : id + '_ifr', src : 'javascript:""', frameBorder : 0, style : 'border:0;width:10px;height:10px'});
|
181
|
+
DOM.setStyles(id + '_ifr', {width : f.width, height : f.height});
|
182
|
+
DOM.setAttrib(id + '_ifr', 'src', u);
|
183
|
+
} else {
|
184
|
+
DOM.add(id + '_wrapper', 'a', {id : id + '_ok', 'class' : 'mceButton mceOk', href : 'javascript:;', onmousedown : 'return false;'}, 'Ok');
|
185
|
+
|
186
|
+
if (f.type == 'confirm')
|
187
|
+
DOM.add(id + '_wrapper', 'a', {'class' : 'mceButton mceCancel', href : 'javascript:;', onmousedown : 'return false;'}, 'Cancel');
|
188
|
+
|
189
|
+
DOM.add(id + '_middle', 'div', {'class' : 'mceIcon'});
|
190
|
+
DOM.setHTML(id + '_content', f.content.replace('\n', '<br />'));
|
191
|
+
|
192
|
+
Event.add(id, 'keyup', function(evt) {
|
193
|
+
var VK_ESCAPE = 27;
|
194
|
+
if (evt.keyCode === VK_ESCAPE) {
|
195
|
+
f.button_func(false);
|
196
|
+
return Event.cancel(evt);
|
197
|
+
}
|
198
|
+
});
|
199
|
+
|
200
|
+
Event.add(id, 'keydown', function(evt) {
|
201
|
+
var cancelButton, VK_TAB = 9;
|
202
|
+
if (evt.keyCode === VK_TAB) {
|
203
|
+
cancelButton = DOM.select('a.mceCancel', id + '_wrapper')[0];
|
204
|
+
if (cancelButton && cancelButton !== evt.target) {
|
205
|
+
cancelButton.focus();
|
206
|
+
} else {
|
207
|
+
DOM.get(id + '_ok').focus();
|
208
|
+
}
|
209
|
+
return Event.cancel(evt);
|
210
|
+
}
|
211
|
+
});
|
212
|
+
}
|
213
|
+
|
214
|
+
// Register events
|
215
|
+
mdf = Event.add(id, 'mousedown', function(e) {
|
216
|
+
var n = e.target, w, vp;
|
217
|
+
|
218
|
+
w = t.windows[id];
|
219
|
+
t.focus(id);
|
220
|
+
|
221
|
+
if (n.nodeName == 'A' || n.nodeName == 'a') {
|
222
|
+
if (n.className == 'mceMax') {
|
223
|
+
w.oldPos = w.element.getXY();
|
224
|
+
w.oldSize = w.element.getSize();
|
225
|
+
|
226
|
+
vp = DOM.getViewPort();
|
227
|
+
|
228
|
+
// Reduce viewport size to avoid scrollbars
|
229
|
+
vp.w -= 2;
|
230
|
+
vp.h -= 2;
|
231
|
+
|
232
|
+
w.element.moveTo(vp.x, vp.y);
|
233
|
+
w.element.resizeTo(vp.w, vp.h);
|
234
|
+
DOM.setStyles(id + '_ifr', {width : vp.w - w.deltaWidth, height : vp.h - w.deltaHeight});
|
235
|
+
DOM.addClass(id + '_wrapper', 'mceMaximized');
|
236
|
+
} else if (n.className == 'mceMed') {
|
237
|
+
// Reset to old size
|
238
|
+
w.element.moveTo(w.oldPos.x, w.oldPos.y);
|
239
|
+
w.element.resizeTo(w.oldSize.w, w.oldSize.h);
|
240
|
+
w.iframeElement.resizeTo(w.oldSize.w - w.deltaWidth, w.oldSize.h - w.deltaHeight);
|
241
|
+
|
242
|
+
DOM.removeClass(id + '_wrapper', 'mceMaximized');
|
243
|
+
} else if (n.className == 'mceMove')
|
244
|
+
return t._startDrag(id, e, n.className);
|
245
|
+
else if (DOM.hasClass(n, 'mceResize'))
|
246
|
+
return t._startDrag(id, e, n.className.substring(13));
|
247
|
+
}
|
248
|
+
});
|
249
|
+
|
250
|
+
clf = Event.add(id, 'click', function(e) {
|
251
|
+
var n = e.target;
|
252
|
+
|
253
|
+
t.focus(id);
|
254
|
+
|
255
|
+
if (n.nodeName == 'A' || n.nodeName == 'a') {
|
256
|
+
switch (n.className) {
|
257
|
+
case 'mceClose':
|
258
|
+
t.close(null, id);
|
259
|
+
return Event.cancel(e);
|
260
|
+
|
261
|
+
case 'mceButton mceOk':
|
262
|
+
case 'mceButton mceCancel':
|
263
|
+
f.button_func(n.className == 'mceButton mceOk');
|
264
|
+
return Event.cancel(e);
|
265
|
+
}
|
266
|
+
}
|
267
|
+
});
|
268
|
+
|
269
|
+
// Make sure the tab order loops within the dialog.
|
270
|
+
Event.add([id + '_left', id + '_right'], 'focus', function(evt) {
|
271
|
+
var iframe = DOM.get(id + '_ifr');
|
272
|
+
if (iframe) {
|
273
|
+
var body = iframe.contentWindow.document.body;
|
274
|
+
var focusable = DOM.select(':input:enabled,*[tabindex=0]', body);
|
275
|
+
if (evt.target.id === (id + '_left')) {
|
276
|
+
focusable[focusable.length - 1].focus();
|
277
|
+
} else {
|
278
|
+
focusable[0].focus();
|
279
|
+
}
|
280
|
+
} else {
|
281
|
+
DOM.get(id + '_ok').focus();
|
282
|
+
}
|
283
|
+
});
|
284
|
+
|
285
|
+
// Add window
|
286
|
+
w = t.windows[id] = {
|
287
|
+
id : id,
|
288
|
+
mousedown_func : mdf,
|
289
|
+
click_func : clf,
|
290
|
+
element : new Element(id, {blocker : 1, container : ed.getContainer()}),
|
291
|
+
iframeElement : new Element(id + '_ifr'),
|
292
|
+
features : f,
|
293
|
+
deltaWidth : dw,
|
294
|
+
deltaHeight : dh
|
295
|
+
};
|
296
|
+
|
297
|
+
w.iframeElement.on('focus', function() {
|
298
|
+
t.focus(id);
|
299
|
+
});
|
300
|
+
|
301
|
+
// Setup blocker
|
302
|
+
if (t.count == 0 && t.editor.getParam('dialog_type', 'modal') == 'modal') {
|
303
|
+
DOM.add(DOM.doc.body, 'div', {
|
304
|
+
id : 'mceModalBlocker',
|
305
|
+
'class' : (t.editor.settings.inlinepopups_skin || 'clearlooks2') + '_modalBlocker',
|
306
|
+
style : {zIndex : t.zIndex - 1}
|
307
|
+
});
|
308
|
+
|
309
|
+
DOM.show('mceModalBlocker'); // Reduces flicker in IE
|
310
|
+
DOM.setAttrib(DOM.doc.body, 'aria-hidden', 'true');
|
311
|
+
} else
|
312
|
+
DOM.setStyle('mceModalBlocker', 'z-index', t.zIndex - 1);
|
313
|
+
|
314
|
+
if (tinymce.isIE6 || /Firefox\/2\./.test(navigator.userAgent) || (tinymce.isIE && !DOM.boxModel))
|
315
|
+
DOM.setStyles('mceModalBlocker', {position : 'absolute', left : vp.x, top : vp.y, width : vp.w - 2, height : vp.h - 2});
|
316
|
+
|
317
|
+
DOM.setAttrib(id, 'aria-hidden', 'false');
|
318
|
+
t.focus(id);
|
319
|
+
t._fixIELayout(id, 1);
|
320
|
+
|
321
|
+
// Focus ok button
|
322
|
+
if (DOM.get(id + '_ok'))
|
323
|
+
DOM.get(id + '_ok').focus();
|
324
|
+
t.count++;
|
325
|
+
|
326
|
+
return w;
|
327
|
+
},
|
328
|
+
|
329
|
+
focus : function(id) {
|
330
|
+
var t = this, w;
|
331
|
+
|
332
|
+
if (w = t.windows[id]) {
|
333
|
+
w.zIndex = this.zIndex++;
|
334
|
+
w.element.setStyle('zIndex', w.zIndex);
|
335
|
+
w.element.update();
|
336
|
+
|
337
|
+
id = id + '_wrapper';
|
338
|
+
DOM.removeClass(t.lastId, 'mceFocus');
|
339
|
+
DOM.addClass(id, 'mceFocus');
|
340
|
+
t.lastId = id;
|
341
|
+
|
342
|
+
if (w.focussedElement) {
|
343
|
+
w.focussedElement.focus();
|
344
|
+
} else if (DOM.get(id + '_ok')) {
|
345
|
+
DOM.get(w.id + '_ok').focus();
|
346
|
+
} else if (DOM.get(w.id + '_ifr')) {
|
347
|
+
DOM.get(w.id + '_ifr').focus();
|
348
|
+
}
|
349
|
+
}
|
350
|
+
},
|
351
|
+
|
352
|
+
_addAll : function(te, ne) {
|
353
|
+
var i, n, t = this, dom = tinymce.DOM;
|
354
|
+
|
355
|
+
if (is(ne, 'string'))
|
356
|
+
te.appendChild(dom.doc.createTextNode(ne));
|
357
|
+
else if (ne.length) {
|
358
|
+
te = te.appendChild(dom.create(ne[0], ne[1]));
|
359
|
+
|
360
|
+
for (i=2; i<ne.length; i++)
|
361
|
+
t._addAll(te, ne[i]);
|
362
|
+
}
|
363
|
+
},
|
364
|
+
|
365
|
+
_startDrag : function(id, se, ac) {
|
366
|
+
var t = this, mu, mm, d = DOM.doc, eb, w = t.windows[id], we = w.element, sp = we.getXY(), p, sz, ph, cp, vp, sx, sy, sex, sey, dx, dy, dw, dh;
|
367
|
+
|
368
|
+
// Get positons and sizes
|
369
|
+
// cp = DOM.getPos(t.editor.getContainer());
|
370
|
+
cp = {x : 0, y : 0};
|
371
|
+
vp = DOM.getViewPort();
|
372
|
+
|
373
|
+
// Reduce viewport size to avoid scrollbars while dragging
|
374
|
+
vp.w -= 2;
|
375
|
+
vp.h -= 2;
|
376
|
+
|
377
|
+
sex = se.screenX;
|
378
|
+
sey = se.screenY;
|
379
|
+
dx = dy = dw = dh = 0;
|
380
|
+
|
381
|
+
// Handle mouse up
|
382
|
+
mu = Event.add(d, 'mouseup', function(e) {
|
383
|
+
Event.remove(d, 'mouseup', mu);
|
384
|
+
Event.remove(d, 'mousemove', mm);
|
385
|
+
|
386
|
+
if (eb)
|
387
|
+
eb.remove();
|
388
|
+
|
389
|
+
we.moveBy(dx, dy);
|
390
|
+
we.resizeBy(dw, dh);
|
391
|
+
sz = we.getSize();
|
392
|
+
DOM.setStyles(id + '_ifr', {width : sz.w - w.deltaWidth, height : sz.h - w.deltaHeight});
|
393
|
+
t._fixIELayout(id, 1);
|
394
|
+
|
395
|
+
return Event.cancel(e);
|
396
|
+
});
|
397
|
+
|
398
|
+
if (ac != 'Move')
|
399
|
+
startMove();
|
400
|
+
|
401
|
+
function startMove() {
|
402
|
+
if (eb)
|
403
|
+
return;
|
404
|
+
|
405
|
+
t._fixIELayout(id, 0);
|
406
|
+
|
407
|
+
// Setup event blocker
|
408
|
+
DOM.add(d.body, 'div', {
|
409
|
+
id : 'mceEventBlocker',
|
410
|
+
'class' : 'mceEventBlocker ' + (t.editor.settings.inlinepopups_skin || 'clearlooks2'),
|
411
|
+
style : {zIndex : t.zIndex + 1}
|
412
|
+
});
|
413
|
+
|
414
|
+
if (tinymce.isIE6 || (tinymce.isIE && !DOM.boxModel))
|
415
|
+
DOM.setStyles('mceEventBlocker', {position : 'absolute', left : vp.x, top : vp.y, width : vp.w - 2, height : vp.h - 2});
|
416
|
+
|
417
|
+
eb = new Element('mceEventBlocker');
|
418
|
+
eb.update();
|
419
|
+
|
420
|
+
// Setup placeholder
|
421
|
+
p = we.getXY();
|
422
|
+
sz = we.getSize();
|
423
|
+
sx = cp.x + p.x - vp.x;
|
424
|
+
sy = cp.y + p.y - vp.y;
|
425
|
+
DOM.add(eb.get(), 'div', {id : 'mcePlaceHolder', 'class' : 'mcePlaceHolder', style : {left : sx, top : sy, width : sz.w, height : sz.h}});
|
426
|
+
ph = new Element('mcePlaceHolder');
|
427
|
+
};
|
428
|
+
|
429
|
+
// Handle mouse move/drag
|
430
|
+
mm = Event.add(d, 'mousemove', function(e) {
|
431
|
+
var x, y, v;
|
432
|
+
|
433
|
+
startMove();
|
434
|
+
|
435
|
+
x = e.screenX - sex;
|
436
|
+
y = e.screenY - sey;
|
437
|
+
|
438
|
+
switch (ac) {
|
439
|
+
case 'ResizeW':
|
440
|
+
dx = x;
|
441
|
+
dw = 0 - x;
|
442
|
+
break;
|
443
|
+
|
444
|
+
case 'ResizeE':
|
445
|
+
dw = x;
|
446
|
+
break;
|
447
|
+
|
448
|
+
case 'ResizeN':
|
449
|
+
case 'ResizeNW':
|
450
|
+
case 'ResizeNE':
|
451
|
+
if (ac == "ResizeNW") {
|
452
|
+
dx = x;
|
453
|
+
dw = 0 - x;
|
454
|
+
} else if (ac == "ResizeNE")
|
455
|
+
dw = x;
|
456
|
+
|
457
|
+
dy = y;
|
458
|
+
dh = 0 - y;
|
459
|
+
break;
|
460
|
+
|
461
|
+
case 'ResizeS':
|
462
|
+
case 'ResizeSW':
|
463
|
+
case 'ResizeSE':
|
464
|
+
if (ac == "ResizeSW") {
|
465
|
+
dx = x;
|
466
|
+
dw = 0 - x;
|
467
|
+
} else if (ac == "ResizeSE")
|
468
|
+
dw = x;
|
469
|
+
|
470
|
+
dh = y;
|
471
|
+
break;
|
472
|
+
|
473
|
+
case 'mceMove':
|
474
|
+
dx = x;
|
475
|
+
dy = y;
|
476
|
+
break;
|
477
|
+
}
|
478
|
+
|
479
|
+
// Boundary check
|
480
|
+
if (dw < (v = w.features.min_width - sz.w)) {
|
481
|
+
if (dx !== 0)
|
482
|
+
dx += dw - v;
|
483
|
+
|
484
|
+
dw = v;
|
485
|
+
}
|
486
|
+
|
487
|
+
if (dh < (v = w.features.min_height - sz.h)) {
|
488
|
+
if (dy !== 0)
|
489
|
+
dy += dh - v;
|
490
|
+
|
491
|
+
dh = v;
|
492
|
+
}
|
493
|
+
|
494
|
+
dw = Math.min(dw, w.features.max_width - sz.w);
|
495
|
+
dh = Math.min(dh, w.features.max_height - sz.h);
|
496
|
+
dx = Math.max(dx, vp.x - (sx + vp.x));
|
497
|
+
dy = Math.max(dy, vp.y - (sy + vp.y));
|
498
|
+
dx = Math.min(dx, (vp.w + vp.x) - (sx + sz.w + vp.x));
|
499
|
+
dy = Math.min(dy, (vp.h + vp.y) - (sy + sz.h + vp.y));
|
500
|
+
|
501
|
+
// Move if needed
|
502
|
+
if (dx + dy !== 0) {
|
503
|
+
if (sx + dx < 0)
|
504
|
+
dx = 0;
|
505
|
+
|
506
|
+
if (sy + dy < 0)
|
507
|
+
dy = 0;
|
508
|
+
|
509
|
+
ph.moveTo(sx + dx, sy + dy);
|
510
|
+
}
|
511
|
+
|
512
|
+
// Resize if needed
|
513
|
+
if (dw + dh !== 0)
|
514
|
+
ph.resizeTo(sz.w + dw, sz.h + dh);
|
515
|
+
|
516
|
+
return Event.cancel(e);
|
517
|
+
});
|
518
|
+
|
519
|
+
return Event.cancel(se);
|
520
|
+
},
|
521
|
+
|
522
|
+
resizeBy : function(dw, dh, id) {
|
523
|
+
var w = this.windows[id];
|
524
|
+
|
525
|
+
if (w) {
|
526
|
+
w.element.resizeBy(dw, dh);
|
527
|
+
w.iframeElement.resizeBy(dw, dh);
|
528
|
+
}
|
529
|
+
},
|
530
|
+
|
531
|
+
close : function(win, id) {
|
532
|
+
var t = this, w, d = DOM.doc, fw, id;
|
533
|
+
|
534
|
+
id = t._findId(id || win);
|
535
|
+
|
536
|
+
// Probably not inline
|
537
|
+
if (!t.windows[id]) {
|
538
|
+
t.parent(win);
|
539
|
+
return;
|
540
|
+
}
|
541
|
+
|
542
|
+
t.count--;
|
543
|
+
|
544
|
+
if (t.count == 0) {
|
545
|
+
DOM.remove('mceModalBlocker');
|
546
|
+
DOM.setAttrib(DOM.doc.body, 'aria-hidden', 'false');
|
547
|
+
t.editor.focus();
|
548
|
+
}
|
549
|
+
|
550
|
+
if (w = t.windows[id]) {
|
551
|
+
t.onClose.dispatch(t);
|
552
|
+
Event.remove(d, 'mousedown', w.mousedownFunc);
|
553
|
+
Event.remove(d, 'click', w.clickFunc);
|
554
|
+
Event.clear(id);
|
555
|
+
Event.clear(id + '_ifr');
|
556
|
+
|
557
|
+
DOM.setAttrib(id + '_ifr', 'src', 'javascript:""'); // Prevent leak
|
558
|
+
w.element.remove();
|
559
|
+
delete t.windows[id];
|
560
|
+
|
561
|
+
fw = t._frontWindow();
|
562
|
+
|
563
|
+
if (fw)
|
564
|
+
t.focus(fw.id);
|
565
|
+
}
|
566
|
+
},
|
567
|
+
|
568
|
+
// Find front most window
|
569
|
+
_frontWindow : function() {
|
570
|
+
var fw, ix = 0;
|
571
|
+
// Find front most window and focus that
|
572
|
+
each (this.windows, function(w) {
|
573
|
+
if (w.zIndex > ix) {
|
574
|
+
fw = w;
|
575
|
+
ix = w.zIndex;
|
576
|
+
}
|
577
|
+
});
|
578
|
+
return fw;
|
579
|
+
},
|
580
|
+
|
581
|
+
setTitle : function(w, ti) {
|
582
|
+
var e;
|
583
|
+
|
584
|
+
w = this._findId(w);
|
585
|
+
|
586
|
+
if (e = DOM.get(w + '_title'))
|
587
|
+
e.innerHTML = DOM.encode(ti);
|
588
|
+
},
|
589
|
+
|
590
|
+
alert : function(txt, cb, s) {
|
591
|
+
var t = this, w;
|
592
|
+
|
593
|
+
w = t.open({
|
594
|
+
title : t,
|
595
|
+
type : 'alert',
|
596
|
+
button_func : function(s) {
|
597
|
+
if (cb)
|
598
|
+
cb.call(s || t, s);
|
599
|
+
|
600
|
+
t.close(null, w.id);
|
601
|
+
},
|
602
|
+
content : DOM.encode(t.editor.getLang(txt, txt)),
|
603
|
+
inline : 1,
|
604
|
+
width : 400,
|
605
|
+
height : 130
|
606
|
+
});
|
607
|
+
},
|
608
|
+
|
609
|
+
confirm : function(txt, cb, s) {
|
610
|
+
var t = this, w;
|
611
|
+
|
612
|
+
w = t.open({
|
613
|
+
title : t,
|
614
|
+
type : 'confirm',
|
615
|
+
button_func : function(s) {
|
616
|
+
if (cb)
|
617
|
+
cb.call(s || t, s);
|
618
|
+
|
619
|
+
t.close(null, w.id);
|
620
|
+
},
|
621
|
+
content : DOM.encode(t.editor.getLang(txt, txt)),
|
622
|
+
inline : 1,
|
623
|
+
width : 400,
|
624
|
+
height : 130
|
625
|
+
});
|
626
|
+
},
|
627
|
+
|
628
|
+
// Internal functions
|
629
|
+
|
630
|
+
_findId : function(w) {
|
631
|
+
var t = this;
|
632
|
+
|
633
|
+
if (typeof(w) == 'string')
|
634
|
+
return w;
|
635
|
+
|
636
|
+
each(t.windows, function(wo) {
|
637
|
+
var ifr = DOM.get(wo.id + '_ifr');
|
638
|
+
|
639
|
+
if (ifr && w == ifr.contentWindow) {
|
640
|
+
w = wo.id;
|
641
|
+
return false;
|
642
|
+
}
|
643
|
+
});
|
644
|
+
|
645
|
+
return w;
|
646
|
+
},
|
647
|
+
|
648
|
+
_fixIELayout : function(id, s) {
|
649
|
+
var w, img;
|
650
|
+
|
651
|
+
if (!tinymce.isIE6)
|
652
|
+
return;
|
653
|
+
|
654
|
+
// Fixes the bug where hover flickers and does odd things in IE6
|
655
|
+
each(['n','s','w','e','nw','ne','sw','se'], function(v) {
|
656
|
+
var e = DOM.get(id + '_resize_' + v);
|
657
|
+
|
658
|
+
DOM.setStyles(e, {
|
659
|
+
width : s ? e.clientWidth : '',
|
660
|
+
height : s ? e.clientHeight : '',
|
661
|
+
cursor : DOM.getStyle(e, 'cursor', 1)
|
662
|
+
});
|
663
|
+
|
664
|
+
DOM.setStyle(id + "_bottom", 'bottom', '-1px');
|
665
|
+
|
666
|
+
e = 0;
|
667
|
+
});
|
668
|
+
|
669
|
+
// Fixes graphics glitch
|
670
|
+
if (w = this.windows[id]) {
|
671
|
+
// Fixes rendering bug after resize
|
672
|
+
w.element.hide();
|
673
|
+
w.element.show();
|
674
|
+
|
675
|
+
// Forced a repaint of the window
|
676
|
+
//DOM.get(id).style.filter = '';
|
677
|
+
|
678
|
+
// IE has a bug where images used in CSS won't get loaded
|
679
|
+
// sometimes when the cache in the browser is disabled
|
680
|
+
// This fix tries to solve it by loading the images using the image object
|
681
|
+
each(DOM.select('div,a', id), function(e, i) {
|
682
|
+
if (e.currentStyle.backgroundImage != 'none') {
|
683
|
+
img = new Image();
|
684
|
+
img.src = e.currentStyle.backgroundImage.replace(/url\(\"(.+)\"\)/, '$1');
|
685
|
+
}
|
686
|
+
});
|
687
|
+
|
688
|
+
DOM.get(id).style.filter = '';
|
689
|
+
}
|
690
|
+
}
|
691
|
+
});
|
692
|
+
|
693
|
+
// Register plugin
|
694
|
+
tinymce.PluginManager.add('inlinepopups', tinymce.plugins.InlinePopups);
|
695
|
+
})();
|
696
|
+
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|