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,284 @@
|
|
1
|
+
tinyMCEPopup.requireLangPack();
|
2
|
+
|
3
|
+
var ed;
|
4
|
+
|
5
|
+
function init() {
|
6
|
+
ed = tinyMCEPopup.editor;
|
7
|
+
tinyMCEPopup.resizeToInnerSize();
|
8
|
+
|
9
|
+
document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table');
|
10
|
+
document.getElementById('bordercolor_pickcontainer').innerHTML = getColorPickerHTML('bordercolor_pick','bordercolor');
|
11
|
+
document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor')
|
12
|
+
|
13
|
+
var inst = ed;
|
14
|
+
var tdElm = ed.dom.getParent(ed.selection.getStart(), "td,th");
|
15
|
+
var formObj = document.forms[0];
|
16
|
+
var st = ed.dom.parseStyle(ed.dom.getAttrib(tdElm, "style"));
|
17
|
+
|
18
|
+
// Get table cell data
|
19
|
+
var celltype = tdElm.nodeName.toLowerCase();
|
20
|
+
var align = ed.dom.getAttrib(tdElm, 'align');
|
21
|
+
var valign = ed.dom.getAttrib(tdElm, 'valign');
|
22
|
+
var width = trimSize(getStyle(tdElm, 'width', 'width'));
|
23
|
+
var height = trimSize(getStyle(tdElm, 'height', 'height'));
|
24
|
+
var bordercolor = convertRGBToHex(getStyle(tdElm, 'bordercolor', 'borderLeftColor'));
|
25
|
+
var bgcolor = convertRGBToHex(getStyle(tdElm, 'bgcolor', 'backgroundColor'));
|
26
|
+
var className = ed.dom.getAttrib(tdElm, 'class');
|
27
|
+
var backgroundimage = getStyle(tdElm, 'background', 'backgroundImage').replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1");
|
28
|
+
var id = ed.dom.getAttrib(tdElm, 'id');
|
29
|
+
var lang = ed.dom.getAttrib(tdElm, 'lang');
|
30
|
+
var dir = ed.dom.getAttrib(tdElm, 'dir');
|
31
|
+
var scope = ed.dom.getAttrib(tdElm, 'scope');
|
32
|
+
|
33
|
+
// Setup form
|
34
|
+
addClassesToList('class', 'table_cell_styles');
|
35
|
+
TinyMCE_EditableSelects.init();
|
36
|
+
|
37
|
+
if (!ed.dom.hasClass(tdElm, 'mceSelected')) {
|
38
|
+
formObj.bordercolor.value = bordercolor;
|
39
|
+
formObj.bgcolor.value = bgcolor;
|
40
|
+
formObj.backgroundimage.value = backgroundimage;
|
41
|
+
formObj.width.value = width;
|
42
|
+
formObj.height.value = height;
|
43
|
+
formObj.id.value = id;
|
44
|
+
formObj.lang.value = lang;
|
45
|
+
formObj.style.value = ed.dom.serializeStyle(st);
|
46
|
+
selectByValue(formObj, 'align', align);
|
47
|
+
selectByValue(formObj, 'valign', valign);
|
48
|
+
selectByValue(formObj, 'class', className, true, true);
|
49
|
+
selectByValue(formObj, 'celltype', celltype);
|
50
|
+
selectByValue(formObj, 'dir', dir);
|
51
|
+
selectByValue(formObj, 'scope', scope);
|
52
|
+
|
53
|
+
// Resize some elements
|
54
|
+
if (isVisible('backgroundimagebrowser'))
|
55
|
+
document.getElementById('backgroundimage').style.width = '180px';
|
56
|
+
|
57
|
+
updateColor('bordercolor_pick', 'bordercolor');
|
58
|
+
updateColor('bgcolor_pick', 'bgcolor');
|
59
|
+
} else
|
60
|
+
tinyMCEPopup.dom.hide('action');
|
61
|
+
}
|
62
|
+
|
63
|
+
function updateAction() {
|
64
|
+
var el, inst = ed, tdElm, trElm, tableElm, formObj = document.forms[0];
|
65
|
+
|
66
|
+
tinyMCEPopup.restoreSelection();
|
67
|
+
el = ed.selection.getStart();
|
68
|
+
tdElm = ed.dom.getParent(el, "td,th");
|
69
|
+
trElm = ed.dom.getParent(el, "tr");
|
70
|
+
tableElm = ed.dom.getParent(el, "table");
|
71
|
+
|
72
|
+
// Cell is selected
|
73
|
+
if (ed.dom.hasClass(tdElm, 'mceSelected')) {
|
74
|
+
// Update all selected sells
|
75
|
+
tinymce.each(ed.dom.select('td.mceSelected,th.mceSelected'), function(td) {
|
76
|
+
updateCell(td);
|
77
|
+
});
|
78
|
+
|
79
|
+
ed.addVisual();
|
80
|
+
ed.nodeChanged();
|
81
|
+
inst.execCommand('mceEndUndoLevel');
|
82
|
+
tinyMCEPopup.close();
|
83
|
+
return;
|
84
|
+
}
|
85
|
+
|
86
|
+
switch (getSelectValue(formObj, 'action')) {
|
87
|
+
case "cell":
|
88
|
+
var celltype = getSelectValue(formObj, 'celltype');
|
89
|
+
var scope = getSelectValue(formObj, 'scope');
|
90
|
+
|
91
|
+
function doUpdate(s) {
|
92
|
+
if (s) {
|
93
|
+
updateCell(tdElm);
|
94
|
+
|
95
|
+
ed.addVisual();
|
96
|
+
ed.nodeChanged();
|
97
|
+
inst.execCommand('mceEndUndoLevel');
|
98
|
+
tinyMCEPopup.close();
|
99
|
+
}
|
100
|
+
};
|
101
|
+
|
102
|
+
if (ed.getParam("accessibility_warnings", 1)) {
|
103
|
+
if (celltype == "th" && scope == "")
|
104
|
+
tinyMCEPopup.confirm(ed.getLang('table_dlg.missing_scope', '', true), doUpdate);
|
105
|
+
else
|
106
|
+
doUpdate(1);
|
107
|
+
|
108
|
+
return;
|
109
|
+
}
|
110
|
+
|
111
|
+
updateCell(tdElm);
|
112
|
+
break;
|
113
|
+
|
114
|
+
case "row":
|
115
|
+
var cell = trElm.firstChild;
|
116
|
+
|
117
|
+
if (cell.nodeName != "TD" && cell.nodeName != "TH")
|
118
|
+
cell = nextCell(cell);
|
119
|
+
|
120
|
+
do {
|
121
|
+
cell = updateCell(cell, true);
|
122
|
+
} while ((cell = nextCell(cell)) != null);
|
123
|
+
|
124
|
+
break;
|
125
|
+
|
126
|
+
case "all":
|
127
|
+
var rows = tableElm.getElementsByTagName("tr");
|
128
|
+
|
129
|
+
for (var i=0; i<rows.length; i++) {
|
130
|
+
var cell = rows[i].firstChild;
|
131
|
+
|
132
|
+
if (cell.nodeName != "TD" && cell.nodeName != "TH")
|
133
|
+
cell = nextCell(cell);
|
134
|
+
|
135
|
+
do {
|
136
|
+
cell = updateCell(cell, true);
|
137
|
+
} while ((cell = nextCell(cell)) != null);
|
138
|
+
}
|
139
|
+
|
140
|
+
break;
|
141
|
+
}
|
142
|
+
|
143
|
+
ed.addVisual();
|
144
|
+
ed.nodeChanged();
|
145
|
+
inst.execCommand('mceEndUndoLevel');
|
146
|
+
tinyMCEPopup.close();
|
147
|
+
}
|
148
|
+
|
149
|
+
function nextCell(elm) {
|
150
|
+
while ((elm = elm.nextSibling) != null) {
|
151
|
+
if (elm.nodeName == "TD" || elm.nodeName == "TH")
|
152
|
+
return elm;
|
153
|
+
}
|
154
|
+
|
155
|
+
return null;
|
156
|
+
}
|
157
|
+
|
158
|
+
function updateCell(td, skip_id) {
|
159
|
+
var inst = ed;
|
160
|
+
var formObj = document.forms[0];
|
161
|
+
var curCellType = td.nodeName.toLowerCase();
|
162
|
+
var celltype = getSelectValue(formObj, 'celltype');
|
163
|
+
var doc = inst.getDoc();
|
164
|
+
var dom = ed.dom;
|
165
|
+
|
166
|
+
if (!skip_id)
|
167
|
+
dom.setAttrib(td, 'id', formObj.id.value);
|
168
|
+
|
169
|
+
dom.setAttrib(td, 'align', formObj.align.value);
|
170
|
+
dom.setAttrib(td, 'vAlign', formObj.valign.value);
|
171
|
+
dom.setAttrib(td, 'lang', formObj.lang.value);
|
172
|
+
dom.setAttrib(td, 'dir', getSelectValue(formObj, 'dir'));
|
173
|
+
dom.setAttrib(td, 'style', ed.dom.serializeStyle(ed.dom.parseStyle(formObj.style.value)));
|
174
|
+
dom.setAttrib(td, 'scope', formObj.scope.value);
|
175
|
+
dom.setAttrib(td, 'class', getSelectValue(formObj, 'class'));
|
176
|
+
|
177
|
+
// Clear deprecated attributes
|
178
|
+
ed.dom.setAttrib(td, 'width', '');
|
179
|
+
ed.dom.setAttrib(td, 'height', '');
|
180
|
+
ed.dom.setAttrib(td, 'bgColor', '');
|
181
|
+
ed.dom.setAttrib(td, 'borderColor', '');
|
182
|
+
ed.dom.setAttrib(td, 'background', '');
|
183
|
+
|
184
|
+
// Set styles
|
185
|
+
td.style.width = getCSSSize(formObj.width.value);
|
186
|
+
td.style.height = getCSSSize(formObj.height.value);
|
187
|
+
if (formObj.bordercolor.value != "") {
|
188
|
+
td.style.borderColor = formObj.bordercolor.value;
|
189
|
+
td.style.borderStyle = td.style.borderStyle == "" ? "solid" : td.style.borderStyle;
|
190
|
+
td.style.borderWidth = td.style.borderWidth == "" ? "1px" : td.style.borderWidth;
|
191
|
+
} else
|
192
|
+
td.style.borderColor = '';
|
193
|
+
|
194
|
+
td.style.backgroundColor = formObj.bgcolor.value;
|
195
|
+
|
196
|
+
if (formObj.backgroundimage.value != "")
|
197
|
+
td.style.backgroundImage = "url('" + formObj.backgroundimage.value + "')";
|
198
|
+
else
|
199
|
+
td.style.backgroundImage = '';
|
200
|
+
|
201
|
+
if (curCellType != celltype) {
|
202
|
+
// changing to a different node type
|
203
|
+
var newCell = doc.createElement(celltype);
|
204
|
+
|
205
|
+
for (var c=0; c<td.childNodes.length; c++)
|
206
|
+
newCell.appendChild(td.childNodes[c].cloneNode(1));
|
207
|
+
|
208
|
+
for (var a=0; a<td.attributes.length; a++)
|
209
|
+
ed.dom.setAttrib(newCell, td.attributes[a].name, ed.dom.getAttrib(td, td.attributes[a].name));
|
210
|
+
|
211
|
+
td.parentNode.replaceChild(newCell, td);
|
212
|
+
td = newCell;
|
213
|
+
}
|
214
|
+
|
215
|
+
dom.setAttrib(td, 'style', dom.serializeStyle(dom.parseStyle(td.style.cssText)));
|
216
|
+
|
217
|
+
return td;
|
218
|
+
}
|
219
|
+
|
220
|
+
function changedBackgroundImage() {
|
221
|
+
var formObj = document.forms[0];
|
222
|
+
var st = ed.dom.parseStyle(formObj.style.value);
|
223
|
+
|
224
|
+
st['background-image'] = "url('" + formObj.backgroundimage.value + "')";
|
225
|
+
|
226
|
+
formObj.style.value = ed.dom.serializeStyle(st);
|
227
|
+
}
|
228
|
+
|
229
|
+
function changedSize() {
|
230
|
+
var formObj = document.forms[0];
|
231
|
+
var st = ed.dom.parseStyle(formObj.style.value);
|
232
|
+
|
233
|
+
var width = formObj.width.value;
|
234
|
+
if (width != "")
|
235
|
+
st['width'] = getCSSSize(width);
|
236
|
+
else
|
237
|
+
st['width'] = "";
|
238
|
+
|
239
|
+
var height = formObj.height.value;
|
240
|
+
if (height != "")
|
241
|
+
st['height'] = getCSSSize(height);
|
242
|
+
else
|
243
|
+
st['height'] = "";
|
244
|
+
|
245
|
+
formObj.style.value = ed.dom.serializeStyle(st);
|
246
|
+
}
|
247
|
+
|
248
|
+
function changedColor() {
|
249
|
+
var formObj = document.forms[0];
|
250
|
+
var st = ed.dom.parseStyle(formObj.style.value);
|
251
|
+
|
252
|
+
st['background-color'] = formObj.bgcolor.value;
|
253
|
+
st['border-color'] = formObj.bordercolor.value;
|
254
|
+
|
255
|
+
formObj.style.value = ed.dom.serializeStyle(st);
|
256
|
+
}
|
257
|
+
|
258
|
+
function changedStyle() {
|
259
|
+
var formObj = document.forms[0];
|
260
|
+
var st = ed.dom.parseStyle(formObj.style.value);
|
261
|
+
|
262
|
+
if (st['background-image'])
|
263
|
+
formObj.backgroundimage.value = st['background-image'].replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");
|
264
|
+
else
|
265
|
+
formObj.backgroundimage.value = '';
|
266
|
+
|
267
|
+
if (st['width'])
|
268
|
+
formObj.width.value = trimSize(st['width']);
|
269
|
+
|
270
|
+
if (st['height'])
|
271
|
+
formObj.height.value = trimSize(st['height']);
|
272
|
+
|
273
|
+
if (st['background-color']) {
|
274
|
+
formObj.bgcolor.value = st['background-color'];
|
275
|
+
updateColor('bgcolor_pick','bgcolor');
|
276
|
+
}
|
277
|
+
|
278
|
+
if (st['border-color']) {
|
279
|
+
formObj.bordercolor.value = st['border-color'];
|
280
|
+
updateColor('bordercolor_pick','bordercolor');
|
281
|
+
}
|
282
|
+
}
|
283
|
+
|
284
|
+
tinyMCEPopup.onInit.add(init);
|
@@ -0,0 +1,27 @@
|
|
1
|
+
tinyMCEPopup.requireLangPack();
|
2
|
+
|
3
|
+
var MergeCellsDialog = {
|
4
|
+
init : function() {
|
5
|
+
var f = document.forms[0];
|
6
|
+
|
7
|
+
f.numcols.value = tinyMCEPopup.getWindowArg('cols', 1);
|
8
|
+
f.numrows.value = tinyMCEPopup.getWindowArg('rows', 1);
|
9
|
+
},
|
10
|
+
|
11
|
+
merge : function() {
|
12
|
+
var func, f = document.forms[0];
|
13
|
+
|
14
|
+
tinyMCEPopup.restoreSelection();
|
15
|
+
|
16
|
+
func = tinyMCEPopup.getWindowArg('onaction');
|
17
|
+
|
18
|
+
func({
|
19
|
+
cols : f.numcols.value,
|
20
|
+
rows : f.numrows.value
|
21
|
+
});
|
22
|
+
|
23
|
+
tinyMCEPopup.close();
|
24
|
+
}
|
25
|
+
};
|
26
|
+
|
27
|
+
tinyMCEPopup.onInit.add(MergeCellsDialog.init, MergeCellsDialog);
|
@@ -0,0 +1,232 @@
|
|
1
|
+
tinyMCEPopup.requireLangPack();
|
2
|
+
|
3
|
+
function init() {
|
4
|
+
tinyMCEPopup.resizeToInnerSize();
|
5
|
+
|
6
|
+
document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table');
|
7
|
+
document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor');
|
8
|
+
|
9
|
+
var inst = tinyMCEPopup.editor;
|
10
|
+
var dom = inst.dom;
|
11
|
+
var trElm = dom.getParent(inst.selection.getStart(), "tr");
|
12
|
+
var formObj = document.forms[0];
|
13
|
+
var st = dom.parseStyle(dom.getAttrib(trElm, "style"));
|
14
|
+
|
15
|
+
// Get table row data
|
16
|
+
var rowtype = trElm.parentNode.nodeName.toLowerCase();
|
17
|
+
var align = dom.getAttrib(trElm, 'align');
|
18
|
+
var valign = dom.getAttrib(trElm, 'valign');
|
19
|
+
var height = trimSize(getStyle(trElm, 'height', 'height'));
|
20
|
+
var className = dom.getAttrib(trElm, 'class');
|
21
|
+
var bgcolor = convertRGBToHex(getStyle(trElm, 'bgcolor', 'backgroundColor'));
|
22
|
+
var backgroundimage = getStyle(trElm, 'background', 'backgroundImage').replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1");
|
23
|
+
var id = dom.getAttrib(trElm, 'id');
|
24
|
+
var lang = dom.getAttrib(trElm, 'lang');
|
25
|
+
var dir = dom.getAttrib(trElm, 'dir');
|
26
|
+
|
27
|
+
selectByValue(formObj, 'rowtype', rowtype);
|
28
|
+
|
29
|
+
// Any cells selected
|
30
|
+
if (dom.select('td.mceSelected,th.mceSelected', trElm).length == 0) {
|
31
|
+
// Setup form
|
32
|
+
addClassesToList('class', 'table_row_styles');
|
33
|
+
TinyMCE_EditableSelects.init();
|
34
|
+
|
35
|
+
formObj.bgcolor.value = bgcolor;
|
36
|
+
formObj.backgroundimage.value = backgroundimage;
|
37
|
+
formObj.height.value = height;
|
38
|
+
formObj.id.value = id;
|
39
|
+
formObj.lang.value = lang;
|
40
|
+
formObj.style.value = dom.serializeStyle(st);
|
41
|
+
selectByValue(formObj, 'align', align);
|
42
|
+
selectByValue(formObj, 'valign', valign);
|
43
|
+
selectByValue(formObj, 'class', className, true, true);
|
44
|
+
selectByValue(formObj, 'dir', dir);
|
45
|
+
|
46
|
+
// Resize some elements
|
47
|
+
if (isVisible('backgroundimagebrowser'))
|
48
|
+
document.getElementById('backgroundimage').style.width = '180px';
|
49
|
+
|
50
|
+
updateColor('bgcolor_pick', 'bgcolor');
|
51
|
+
} else
|
52
|
+
tinyMCEPopup.dom.hide('action');
|
53
|
+
}
|
54
|
+
|
55
|
+
function updateAction() {
|
56
|
+
var inst = tinyMCEPopup.editor, dom = inst.dom, trElm, tableElm, formObj = document.forms[0];
|
57
|
+
var action = getSelectValue(formObj, 'action');
|
58
|
+
|
59
|
+
tinyMCEPopup.restoreSelection();
|
60
|
+
trElm = dom.getParent(inst.selection.getStart(), "tr");
|
61
|
+
tableElm = dom.getParent(inst.selection.getStart(), "table");
|
62
|
+
|
63
|
+
// Update all selected rows
|
64
|
+
if (dom.select('td.mceSelected,th.mceSelected', trElm).length > 0) {
|
65
|
+
tinymce.each(tableElm.rows, function(tr) {
|
66
|
+
var i;
|
67
|
+
|
68
|
+
for (i = 0; i < tr.cells.length; i++) {
|
69
|
+
if (dom.hasClass(tr.cells[i], 'mceSelected')) {
|
70
|
+
updateRow(tr, true);
|
71
|
+
return;
|
72
|
+
}
|
73
|
+
}
|
74
|
+
});
|
75
|
+
|
76
|
+
inst.addVisual();
|
77
|
+
inst.nodeChanged();
|
78
|
+
inst.execCommand('mceEndUndoLevel');
|
79
|
+
tinyMCEPopup.close();
|
80
|
+
return;
|
81
|
+
}
|
82
|
+
|
83
|
+
switch (action) {
|
84
|
+
case "row":
|
85
|
+
updateRow(trElm);
|
86
|
+
break;
|
87
|
+
|
88
|
+
case "all":
|
89
|
+
var rows = tableElm.getElementsByTagName("tr");
|
90
|
+
|
91
|
+
for (var i=0; i<rows.length; i++)
|
92
|
+
updateRow(rows[i], true);
|
93
|
+
|
94
|
+
break;
|
95
|
+
|
96
|
+
case "odd":
|
97
|
+
case "even":
|
98
|
+
var rows = tableElm.getElementsByTagName("tr");
|
99
|
+
|
100
|
+
for (var i=0; i<rows.length; i++) {
|
101
|
+
if ((i % 2 == 0 && action == "odd") || (i % 2 != 0 && action == "even"))
|
102
|
+
updateRow(rows[i], true, true);
|
103
|
+
}
|
104
|
+
|
105
|
+
break;
|
106
|
+
}
|
107
|
+
|
108
|
+
inst.addVisual();
|
109
|
+
inst.nodeChanged();
|
110
|
+
inst.execCommand('mceEndUndoLevel');
|
111
|
+
tinyMCEPopup.close();
|
112
|
+
}
|
113
|
+
|
114
|
+
function updateRow(tr_elm, skip_id, skip_parent) {
|
115
|
+
var inst = tinyMCEPopup.editor;
|
116
|
+
var formObj = document.forms[0];
|
117
|
+
var dom = inst.dom;
|
118
|
+
var curRowType = tr_elm.parentNode.nodeName.toLowerCase();
|
119
|
+
var rowtype = getSelectValue(formObj, 'rowtype');
|
120
|
+
var doc = inst.getDoc();
|
121
|
+
|
122
|
+
// Update row element
|
123
|
+
if (!skip_id)
|
124
|
+
dom.setAttrib(tr_elm, 'id', formObj.id.value);
|
125
|
+
|
126
|
+
dom.setAttrib(tr_elm, 'align', getSelectValue(formObj, 'align'));
|
127
|
+
dom.setAttrib(tr_elm, 'vAlign', getSelectValue(formObj, 'valign'));
|
128
|
+
dom.setAttrib(tr_elm, 'lang', formObj.lang.value);
|
129
|
+
dom.setAttrib(tr_elm, 'dir', getSelectValue(formObj, 'dir'));
|
130
|
+
dom.setAttrib(tr_elm, 'style', dom.serializeStyle(dom.parseStyle(formObj.style.value)));
|
131
|
+
dom.setAttrib(tr_elm, 'class', getSelectValue(formObj, 'class'));
|
132
|
+
|
133
|
+
// Clear deprecated attributes
|
134
|
+
dom.setAttrib(tr_elm, 'background', '');
|
135
|
+
dom.setAttrib(tr_elm, 'bgColor', '');
|
136
|
+
dom.setAttrib(tr_elm, 'height', '');
|
137
|
+
|
138
|
+
// Set styles
|
139
|
+
tr_elm.style.height = getCSSSize(formObj.height.value);
|
140
|
+
tr_elm.style.backgroundColor = formObj.bgcolor.value;
|
141
|
+
|
142
|
+
if (formObj.backgroundimage.value != "")
|
143
|
+
tr_elm.style.backgroundImage = "url('" + formObj.backgroundimage.value + "')";
|
144
|
+
else
|
145
|
+
tr_elm.style.backgroundImage = '';
|
146
|
+
|
147
|
+
// Setup new rowtype
|
148
|
+
if (curRowType != rowtype && !skip_parent) {
|
149
|
+
// first, clone the node we are working on
|
150
|
+
var newRow = tr_elm.cloneNode(1);
|
151
|
+
|
152
|
+
// next, find the parent of its new destination (creating it if necessary)
|
153
|
+
var theTable = dom.getParent(tr_elm, "table");
|
154
|
+
var dest = rowtype;
|
155
|
+
var newParent = null;
|
156
|
+
for (var i = 0; i < theTable.childNodes.length; i++) {
|
157
|
+
if (theTable.childNodes[i].nodeName.toLowerCase() == dest)
|
158
|
+
newParent = theTable.childNodes[i];
|
159
|
+
}
|
160
|
+
|
161
|
+
if (newParent == null) {
|
162
|
+
newParent = doc.createElement(dest);
|
163
|
+
|
164
|
+
if (theTable.firstChild.nodeName == 'CAPTION')
|
165
|
+
inst.dom.insertAfter(newParent, theTable.firstChild);
|
166
|
+
else
|
167
|
+
theTable.insertBefore(newParent, theTable.firstChild);
|
168
|
+
}
|
169
|
+
|
170
|
+
// append the row to the new parent
|
171
|
+
newParent.appendChild(newRow);
|
172
|
+
|
173
|
+
// remove the original
|
174
|
+
tr_elm.parentNode.removeChild(tr_elm);
|
175
|
+
|
176
|
+
// set tr_elm to the new node
|
177
|
+
tr_elm = newRow;
|
178
|
+
}
|
179
|
+
|
180
|
+
dom.setAttrib(tr_elm, 'style', dom.serializeStyle(dom.parseStyle(tr_elm.style.cssText)));
|
181
|
+
}
|
182
|
+
|
183
|
+
function changedBackgroundImage() {
|
184
|
+
var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
|
185
|
+
var st = dom.parseStyle(formObj.style.value);
|
186
|
+
|
187
|
+
st['background-image'] = "url('" + formObj.backgroundimage.value + "')";
|
188
|
+
|
189
|
+
formObj.style.value = dom.serializeStyle(st);
|
190
|
+
}
|
191
|
+
|
192
|
+
function changedStyle() {
|
193
|
+
var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
|
194
|
+
var st = dom.parseStyle(formObj.style.value);
|
195
|
+
|
196
|
+
if (st['background-image'])
|
197
|
+
formObj.backgroundimage.value = st['background-image'].replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");
|
198
|
+
else
|
199
|
+
formObj.backgroundimage.value = '';
|
200
|
+
|
201
|
+
if (st['height'])
|
202
|
+
formObj.height.value = trimSize(st['height']);
|
203
|
+
|
204
|
+
if (st['background-color']) {
|
205
|
+
formObj.bgcolor.value = st['background-color'];
|
206
|
+
updateColor('bgcolor_pick','bgcolor');
|
207
|
+
}
|
208
|
+
}
|
209
|
+
|
210
|
+
function changedSize() {
|
211
|
+
var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
|
212
|
+
var st = dom.parseStyle(formObj.style.value);
|
213
|
+
|
214
|
+
var height = formObj.height.value;
|
215
|
+
if (height != "")
|
216
|
+
st['height'] = getCSSSize(height);
|
217
|
+
else
|
218
|
+
st['height'] = "";
|
219
|
+
|
220
|
+
formObj.style.value = dom.serializeStyle(st);
|
221
|
+
}
|
222
|
+
|
223
|
+
function changedColor() {
|
224
|
+
var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
|
225
|
+
var st = dom.parseStyle(formObj.style.value);
|
226
|
+
|
227
|
+
st['background-color'] = formObj.bgcolor.value;
|
228
|
+
|
229
|
+
formObj.style.value = dom.serializeStyle(st);
|
230
|
+
}
|
231
|
+
|
232
|
+
tinyMCEPopup.onInit.add(init);
|