Version Notes
1.0.2
Download this release
Release Info
Developer | Magento Core Team |
Extension | freepdf |
Version | 1.0.2 |
Comparing to | |
See all releases |
Code changes from version 1.0.1 to 1.0.2
- js/ip_pdffree/.DS_Store +0 -0
- js/ip_pdffree/tinymce/changelog.txt +1555 -0
- js/ip_pdffree/tinymce/examples/accessibility.html +101 -0
- js/ip_pdffree/tinymce/examples/css/content.css +105 -0
- js/ip_pdffree/tinymce/examples/css/word.css +53 -0
- js/ip_pdffree/tinymce/examples/custom_formats.html +111 -0
- js/ip_pdffree/tinymce/examples/full.html +101 -0
- js/ip_pdffree/tinymce/examples/index.html +10 -0
- js/ip_pdffree/tinymce/examples/lists/image_list.js +9 -0
- js/ip_pdffree/tinymce/examples/lists/link_list.js +10 -0
- js/ip_pdffree/tinymce/examples/lists/media_list.js +14 -0
- js/ip_pdffree/tinymce/examples/lists/template_list.js +9 -0
- js/ip_pdffree/tinymce/examples/media/logo.jpg +0 -0
- js/ip_pdffree/tinymce/examples/media/logo_over.jpg +0 -0
- js/ip_pdffree/tinymce/examples/media/sample.avi +0 -0
- js/ip_pdffree/tinymce/examples/media/sample.dcr +0 -0
- js/ip_pdffree/tinymce/examples/media/sample.flv +0 -0
- js/ip_pdffree/tinymce/examples/media/sample.mov +0 -0
- js/ip_pdffree/tinymce/examples/media/sample.ram +1 -0
- js/ip_pdffree/tinymce/examples/media/sample.rm +0 -0
- js/ip_pdffree/tinymce/examples/media/sample.swf +0 -0
- js/ip_pdffree/tinymce/examples/menu.html +18 -0
- js/ip_pdffree/tinymce/examples/simple.html +47 -0
- js/ip_pdffree/tinymce/examples/skins.html +216 -0
- js/ip_pdffree/tinymce/examples/templates/layout1.htm +15 -0
- js/ip_pdffree/tinymce/examples/templates/snippet1.htm +1 -0
- js/ip_pdffree/tinymce/examples/word.html +72 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/langs/en.js +1 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/license.txt +504 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/advhr/css/advhr.css +5 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/advhr/editor_plugin.js +1 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/advhr/editor_plugin_src.js +57 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/advhr/js/rule.js +43 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/advhr/langs/en_dlg.js +1 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/advhr/rule.htm +58 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/advimage/css/advimage.css +13 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/advimage/editor_plugin.js +1 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/advimage/editor_plugin_src.js +50 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/advimage/image.htm +235 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/advimage/img/sample.gif +0 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/advimage/js/image.js +462 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/advimage/langs/en_dlg.js +1 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/advlink/css/advlink.css +8 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/advlink/editor_plugin.js +1 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/advlink/editor_plugin_src.js +61 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/advlink/js/advlink.js +539 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/advlink/langs/en_dlg.js +1 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/advlink/link.htm +338 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/advlist/editor_plugin.js +1 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/advlist/editor_plugin_src.js +176 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/autolink/editor_plugin.js +1 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/autolink/editor_plugin_src.js +174 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/autoresize/editor_plugin.js +1 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/autoresize/editor_plugin_src.js +119 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/autosave/editor_plugin.js +1 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/autosave/editor_plugin_src.js +431 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/autosave/langs/en.js +4 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin.js +1 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin_src.js +120 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/contextmenu/editor_plugin.js +1 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/contextmenu/editor_plugin_src.js +161 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/directionality/editor_plugin.js +1 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/directionality/editor_plugin_src.js +82 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/emotions/editor_plugin.js +1 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/emotions/editor_plugin_src.js +43 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/emotions/emotions.htm +42 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-cool.gif +0 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-cry.gif +0 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-embarassed.gif +0 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-foot-in-mouth.gif +0 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-frown.gif +0 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-innocent.gif +0 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-kiss.gif +0 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-laughing.gif +0 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-money-mouth.gif +0 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-sealed.gif +0 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-smile.gif +0 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-surprised.gif +0 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-tongue-out.gif +0 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-undecided.gif +0 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-wink.gif +0 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-yell.gif +0 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/emotions/js/emotions.js +43 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/emotions/langs/en_dlg.js +1 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/example/dialog.htm +22 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/example/editor_plugin.js +1 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/example/editor_plugin_src.js +84 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/example/img/example.gif +0 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/example/js/dialog.js +19 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/example/langs/en.js +3 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/example/langs/en_dlg.js +3 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/example_dependency/editor_plugin.js +1 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/example_dependency/editor_plugin_src.js +50 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/fullpage/css/fullpage.css +143 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/fullpage/editor_plugin.js +1 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/fullpage/editor_plugin_src.js +405 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/fullpage/fullpage.htm +259 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/fullpage/js/fullpage.js +232 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/fullpage/langs/en_dlg.js +1 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/fullscreen/editor_plugin.js +1 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/fullscreen/editor_plugin_src.js +159 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/fullscreen/fullscreen.htm +110 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/iespell/editor_plugin.js +1 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/iespell/editor_plugin_src.js +54 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/inlinepopups/editor_plugin.js +1 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/inlinepopups/editor_plugin_src.js +699 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif +0 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/button.gif +0 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif +0 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif +0 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif +0 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif +0 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif +0 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css +90 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/inlinepopups/template.htm +387 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/insertdatetime/editor_plugin.js +1 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/insertdatetime/editor_plugin_src.js +83 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/layer/editor_plugin.js +1 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/layer/editor_plugin_src.js +262 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/legacyoutput/editor_plugin.js +1 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/legacyoutput/editor_plugin_src.js +139 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/lists/editor_plugin.js +1 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/lists/editor_plugin_src.js +951 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/media/css/media.css +17 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/media/editor_plugin.js +1 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/media/editor_plugin_src.js +890 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/media/js/embed.js +73 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/media/js/media.js +470 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/media/langs/en_dlg.js +1 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/media/media.htm +922 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/media/moxieplayer.swf +0 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/nonbreaking/editor_plugin.js +1 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/nonbreaking/editor_plugin_src.js +54 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/noneditable/editor_plugin.js +1 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/noneditable/editor_plugin_src.js +454 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/pagebreak/editor_plugin.js +1 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/pagebreak/editor_plugin_src.js +74 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/paste/editor_plugin.js +1 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/paste/editor_plugin_src.js +871 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/paste/js/pastetext.js +36 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/paste/js/pasteword.js +51 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/paste/langs/en_dlg.js +1 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/paste/pastetext.htm +27 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/paste/pasteword.htm +21 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/preview/editor_plugin.js +1 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/preview/editor_plugin_src.js +53 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/preview/example.html +28 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/preview/jscripts/embed.js +73 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/preview/preview.html +17 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/print/editor_plugin.js +1 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/print/editor_plugin_src.js +34 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/save/editor_plugin.js +1 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/save/editor_plugin_src.js +101 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/searchreplace/css/searchreplace.css +6 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/searchreplace/editor_plugin.js +1 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/searchreplace/editor_plugin_src.js +61 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/searchreplace/js/searchreplace.js +142 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/en_dlg.js +1 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/searchreplace/searchreplace.htm +100 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/spellchecker/css/content.css +1 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/spellchecker/editor_plugin.js +1 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/spellchecker/editor_plugin_src.js +436 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/spellchecker/img/wline.gif +0 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/style/css/props.css +14 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/style/editor_plugin.js +1 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/style/editor_plugin_src.js +71 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/style/js/props.js +709 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/style/langs/en_dlg.js +1 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/style/props.htm +845 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/style/readme.txt +19 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/tabfocus/editor_plugin.js +1 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/tabfocus/editor_plugin_src.js +122 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/table/cell.htm +180 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/table/css/cell.css +17 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/table/css/row.css +25 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/table/css/table.css +13 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/table/editor_plugin.js +1 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/table/editor_plugin_src.js +1428 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/table/js/cell.js +319 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/table/js/merge_cells.js +27 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/table/js/row.js +237 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/table/js/table.js +489 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/table/langs/en_dlg.js +1 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/table/merge_cells.htm +32 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/table/row.htm +158 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/table/table.htm +188 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/template/blank.htm +12 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/template/css/template.css +23 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/template/editor_plugin.js +1 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/template/editor_plugin_src.js +159 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/template/js/template.js +106 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/template/langs/en_dlg.js +1 -0
- js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/template/template.htm +13 -0
js/ip_pdffree/.DS_Store
ADDED
Binary file
|
js/ip_pdffree/tinymce/changelog.txt
ADDED
@@ -0,0 +1,1555 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Version 3.5b3 (2012-03-29)
|
2 |
+
Added cancel button to colour picker dialog.
|
3 |
+
Added figure and figcaption to the html5 visualblocks plugin.
|
4 |
+
Added default alignment options for the figure element.
|
5 |
+
Fixed bug where empty inline elements within block elements would sometimes produce a br child element.
|
6 |
+
Fixed bug where urls pointing to the same domain as the current one would cause undefined errors. Patch contributed by Paul Giberson.
|
7 |
+
Fixed bug where enter inside an editable element inside an non editable element would split the element.
|
8 |
+
Fixed bug where cut/copy/paste of noneditable elements didn't work.
|
9 |
+
Fixed bug where backspace would sometimes produce font elements on WebKit.
|
10 |
+
Fixed bug where WebKit would produce spans out of various inline elements when using backspace.
|
11 |
+
Fixed bug where IE9 wouldn't properly update image styles when images where resized.
|
12 |
+
Fixed bug where drag/drop of noneditable elements didn't work correctly.
|
13 |
+
Fixed bug where applying formatting to all contents wouldn't work correctly when an end point was inside an empty bock. Patch contributed by Jose Luiz.
|
14 |
+
Fixed bug where IE10 removed the scopeName from the DOM element interface and there for it produced an undefined string in element path.
|
15 |
+
Fixed bug where the caret would be placed at an incorrect location if you applied block formatting while having the caret at the end of the block.
|
16 |
+
Fixed bug where applying column changes using the cell dialog would only update the first column. Patch contributed by krzyko.
|
17 |
+
Fixed bug where the visualblocks plugin would force editor focus if it was turned on by default.
|
18 |
+
Fixed bug where the tabfocus plugin would tab to iframes these are now ignored.
|
19 |
+
Fixed bug where format drop down list wouldn't show the currently active format for a parent element.
|
20 |
+
Fixed bug where paste of plain text in IE 9 would remove the new line characters from text.
|
21 |
+
Fixed bug where the menu buttons/split button menus wouldn't be opened at the right location on older IE versions.
|
22 |
+
Fixed bug where Gecko browsers wouldn't properly display the right format when having the selection as specific places.
|
23 |
+
Fixed bug where shift+enter inside the body when having forced_root_blocks set to false would throw an error.
|
24 |
+
Fixed bug where the jQuery plugin would break the attr method of jQuery 1.7.2. Patch contributed by Markus Kemmerling.
|
25 |
+
Fixed so options like content_css accepts and array as well as a comma separated string as input.
|
26 |
+
Restructured the internal logic to make it more separate from Editor.js.
|
27 |
+
Updated the Sizzle engine to the latest version.
|
28 |
+
Version 3.5b2 (2012-03-15)
|
29 |
+
Rewrote the enter key logic to normalize browser behavior.
|
30 |
+
Fixed so enter within PRE elements produces a BR and shift+enter breaks/end the PRE. Can be disabled using the br_in_pre option.
|
31 |
+
Fixed bug where the selection wouldn't be correct after applying formatting and having the caret at the end of the new format node.
|
32 |
+
Fixed bug where the noneditable plugin would process contents on raw input calls for example on undo/redo calls.
|
33 |
+
Fixed bug where WebKit could produce an exception when a bookmark was requested when there wasn't a proper selection.
|
34 |
+
Fixed bug where WebKit would fail to open the image dialog since it would be returning false for a class name instead of a string.
|
35 |
+
Fixed so alignment and indentation works properly when forced_root_blocks is set to false. It will produce a DIV by default.
|
36 |
+
Version 3.5b1 (2012-03-08)
|
37 |
+
Added new event class that is faster and enables support for faking events.
|
38 |
+
Added new self_closing_elements, short_ended_elements, boolean_attributes, non_empty_elements and block_elements options to control the HTML Schema.
|
39 |
+
Added new schema option and support for the HTML5 schema.
|
40 |
+
Added new visualblocks plugin that shows html5 blocks with visual borders.
|
41 |
+
Added new types and selector options to make it easier to create editor instances with different configs.
|
42 |
+
Added new preview of formatting options in various listboxes.
|
43 |
+
Added new preview_styles option that enables control over what gets previewed.
|
44 |
+
Fixed bug where content css would be loaded twice into iframe.
|
45 |
+
Fixed bug where start elements with only whitespace in the attribute part wouldn't be correctly parsed.
|
46 |
+
Fixed bug where the advlink dialog would produce an error about the addSelectAccessibility function not being defined.
|
47 |
+
Fixed bug where the caret would be placed at an incorrect position if span was removed by the invalid_elements setting.
|
48 |
+
Fixed bug where elements inside a white space preserve element like pre didn't inherit the behavior while parsing.
|
49 |
+
Version 3.4.9.x (2012-02-xx)
|
50 |
+
Improved behaviour of backspacing into a table to be consistant across browsers and disable backspace when cursor immediately follows a table.
|
51 |
+
Improved edit CSS style plugin for single and multiple block selection and provide option to apply style to only selected text.
|
52 |
+
Fixed bug in Chrome where moving caret down in table and pasting throws errors.
|
53 |
+
Corrected reference to TinyMCE trim function.
|
54 |
+
Fixed bug where Ignore All in IE did not remove the underline from the selected word.
|
55 |
+
Fixed bug in html source editor word wrap option not wrapping text in Webkit browsers.
|
56 |
+
Fixed bug where it was possible to insert an invalid colour in the color pop-up dialog.
|
57 |
+
Fixed bug in Webkit where if anchor is on last line by itself caret can not be placed after it.
|
58 |
+
Version 3.4.9 (2012-02-23)
|
59 |
+
Added settings to wordcount plugin to configure update rate and checking wordcount on backspace and delete using wordcount_update_rate and wordcount_update_on_delete.
|
60 |
+
Fixed bug in Webkit and IE where deleting empty paragraphs would remove entire editor contents.
|
61 |
+
Fixed bug where pressing enter on end of list item with a heading would create a new item with heading.
|
62 |
+
Fixed edit css style dialog text-decoration none checkbox so it disables other text-decoration options when enabled.
|
63 |
+
Fixed bug in Gecko where undo wasn't added when focus was lost.
|
64 |
+
Fixed bug in Gecko where shift-enter in table cell ending with BR doesn't move caret to new line.
|
65 |
+
Fixed bug where right-click on formatted text in IE selected the entire line.
|
66 |
+
Fixed bug where text ending with space could not be unformatted in IE.
|
67 |
+
Fixed bug where caret formatting would be removed when moving the caret when a selector expression was used.
|
68 |
+
Fixed bug where formatting would be applied to the body element when all contents where selected and format had both inline and selector parts.
|
69 |
+
Fixed bug where the media plugin would throw errors if you had iframe set as an invalid element in config.
|
70 |
+
Fixed bug where the caret would be placed at the top of the document if you inserted a table and undo:ed that operation. Patch contributed by Wesley Walser.
|
71 |
+
Fixed bug where content css files where loaded twice into the iframe.
|
72 |
+
Fixed so elements with comments would be trated as non empty elements. Patch contributed by Arjan Scherpenisse.
|
73 |
+
Version 3.4.8 (2012-02-02)
|
74 |
+
Fixed bug in IE where selected text ending with space cannot be formatted then formatted again to get original text.
|
75 |
+
Fixed bug in IE where images larger than editor area were being deselected when toolbar buttons are clicked.
|
76 |
+
Fixed bug where wrong text align buttons are active when multiple block elements are selected.
|
77 |
+
Fixed bug where selected link not showing in target field of link dialog in some selection cases.
|
78 |
+
Use settings for remove_trailing_br so this can be turned off instead of hard coding the value.
|
79 |
+
Fixed bug in IE where the media plugin displayed null text when some values aren't filled in.
|
80 |
+
Added API method 'onSetAttrib' that fires when the attribute value on a node changes.
|
81 |
+
Fix font size dropdown value not being updated when text already has a font size in the advanced template.
|
82 |
+
Fixed bug in IE where IE doesn't use ARIA attributes properly on options - causing labels to be read out 2 times.
|
83 |
+
Fixed bug where caret cannot be placed after table if table is at end of document in IE.
|
84 |
+
Fixed bug where adding range isn't always successful so we need to check range count otherwise an exception can occur.
|
85 |
+
Added spacebar onclick handler to toolbar buttons to ensure that the accessibility behaviour works correctly.
|
86 |
+
Fixed bug where a stranded bullet point would get created in WebKit.
|
87 |
+
Fixed bug where selecting text in a blockquote and pressing backspace toggles the style.
|
88 |
+
Fixed bug where pressing enter from a heading in IE, the resulting P tag below it shares the style property.
|
89 |
+
Fix white space in between spans from being deleted.
|
90 |
+
Fixed bug where scrollbars where visible in the character map dialog on Gecko.
|
91 |
+
Fixed issue with missing translation for one of the emoticons.
|
92 |
+
Fixed bug where dots in id:s where causing problems. Patch provided by Abhishek Dev.
|
93 |
+
Fixed bug where urls with an at sign in the path wouldn't be parsed correctly. Patch contributed by Jason Grout.
|
94 |
+
Fixed bug where Opera would remove the first character of a inline formatted word if you pressed backspace.
|
95 |
+
Fixed bugs with the autoresize plugin on various browsers and removed the need for the throbber.
|
96 |
+
Fixed performance issue where the contextmenu plugin would try to remove the menu even if it was removed. Patch contributed by mhu.
|
97 |
+
Version 3.4.7 (2011-11-03)
|
98 |
+
Modified the caret formatting behavior to word similar to common desktop wordprocessors like Word or Libre Office.
|
99 |
+
Fixed bug in Webkit - Cursor positioning does not work vertically within a table cell with multiple lines of text.
|
100 |
+
Fixed bug in IE where Inserting a table in IE8 places cursor in the second cell of the first row.
|
101 |
+
Fixed bug in IE where editor in a frame doesn't give focus to the toolbar using ALT-F10.
|
102 |
+
Fix for webkit and gecko so that deleting bullet from start of list outdents inner list items and moves first item into paragraph.
|
103 |
+
Fix new list items in IE8 not displayed on a new line when list contains nested list items.
|
104 |
+
Clear formatting in table cell breaks the cell.
|
105 |
+
Made media type list localisable.
|
106 |
+
Fix out of memory error when using prototype in media dialog.
|
107 |
+
Fixed bug where could not add a space in the middle of a th cell.
|
108 |
+
Fixed bug where adding a bullet between two existing bullets adds an extra one
|
109 |
+
Fixed bug where trying to insert a new entry midway through a bulleted list fails dismally when the next entry is tabbed in.
|
110 |
+
Fixed bug where pressing enter on an empty list item does not outdent properly in FF
|
111 |
+
Fixed bug where adding a heading after a list item in a table cell changes all styles in that cell
|
112 |
+
Fixed bug where hitting enter to exit from a bullet list moves cursor to the top of the page in Firefox.
|
113 |
+
Fixed bug where pressing backspace would not delete HRs in Firefox and IE when next to an empty paragraph.
|
114 |
+
Fixed bug where deleting part of the link text can cause a link with no destination to be saved.
|
115 |
+
Fixed bug where css style border widths wasn't handled correctly in table dialog.
|
116 |
+
Fixed bug where parsing invalid html contents on IE or WebKit could produce an infinite loop.
|
117 |
+
Fixed bug where scripts with custom script types wasn't properly passed though the editor.
|
118 |
+
Fixed issue where some Japanese kanji characters wasn't properly entity encoded when numeric entity mode was enabled.
|
119 |
+
Made emoticons dialog use the keyboard naviation.
|
120 |
+
Added navigation instructions to the symbols dialog.
|
121 |
+
Added ability to set default values for the media plugin.
|
122 |
+
Added new font_size_legacy_values option for converting old font element sizes to span with font-size properties.
|
123 |
+
Fixed bug where the symbols dialog was not accessible.
|
124 |
+
Added quirk for IE ensuring that the body of the document containing tinyMCE has a role="application" for accessibility.
|
125 |
+
Fixed bug where the advanced color picker wasn't working properly on FF 7.
|
126 |
+
Fixed issue where the advanced color picker was producing uppercase hex codes.
|
127 |
+
Fixed bug where IE 8 could throw exceptions if the contents contained resizable content elements.
|
128 |
+
Fixed bug where caret formatting wouldn't be correctly applied to previous sibling on WebKit.
|
129 |
+
Fixed bug where the select boxes for font size/family would loose it's value on WebKit due to recent iOS fixes.
|
130 |
+
Version 3.4.6 (2011-09-29)
|
131 |
+
Fixed bug where list items were being created for empty divs.
|
132 |
+
Added support in Media plugin for audio media using the embed tag
|
133 |
+
Fixed accessibility bugs in WebKit and IE8 where toolbar items were not being read.
|
134 |
+
Added new use_accessible_selects option to ensure accessible list boxes are used in all browsers (custom widget in firefox native on other browsers)
|
135 |
+
Fixed bug where classid attribute was not being checked from embed objects.
|
136 |
+
Fixed bug in jsrobot tests with intermittently failing.
|
137 |
+
Fixed bug where anchors wasn't updated properly if you edited them using IE 8.
|
138 |
+
Fixed bug where input method on WebKit on Mac OS X would fail to initialize when sometimes focusing the editor.
|
139 |
+
Fixed bug where it wasn't possible to select HR elements on WebKit by simply clicking on them.
|
140 |
+
Fixed bug where the media plugin wouldn't work on IE9 when not using the inlinepopups plugin.
|
141 |
+
Fixed bug where hspace,vspace,align and bgcolor would be removed from object elements in the media plugin.
|
142 |
+
Fixed bug where the new youtube format wouldn't be properly parsed by the media plugin.
|
143 |
+
Fixed bug where the style attribute of layers wasn't properly updated on IE and Gecko.
|
144 |
+
Fixed bug where editing contents in a layer would fail on Gecko since contentEditable doesn't inherit properly.
|
145 |
+
Fixed bug where IE 6/7 would produce JS errors when serializing contents containing layers.
|
146 |
+
Version 3.4.5 (2011-09-06)
|
147 |
+
Fixed accessibility bug in WebKit where the right and left arrow keys would update native list boxes.
|
148 |
+
Added new whitespace_elements option to enable users to specify specific elements where the whitespace is preserved.
|
149 |
+
Added new merge_siblings option to formats. This option makes it possible to disable the auto merging of siblings when applying formats.
|
150 |
+
Fixed bug in IE where trailing comma in paste plugin would cause plugin to not run correctly.
|
151 |
+
Fixed bug in WebKit where console messages would be logged when deleting an empty document.
|
152 |
+
Fixed bug in IE8 where caret positioned is on list item instead of paragraph when outdent splits the list
|
153 |
+
Fixed bug with image dialogs not inserting an image if id was omitted from valid_elements.
|
154 |
+
Fixed bug where the selection normalization logic wouldn't properly handle image elements in specific config cases.
|
155 |
+
Fixed bug where the map elements coords attribute would be messed up by IE when serializing the DOM.
|
156 |
+
Fixed bug where IE wouldn't properly handle custom elements when the contents was serialized.
|
157 |
+
Fixed bug where you couldn't move the caret in Gecko if you focused the editor using the API or a UI control.
|
158 |
+
Fixed bug where adjacent links would get merged on IE due to bugs in their link command.
|
159 |
+
Fixed bug where the color split buttons would loose the selection on IE if the editor was placed in a frame/iframe.
|
160 |
+
Fixed bug where floated images in WebKit wouldn't get properly linked.
|
161 |
+
Fixed bug where the fullscreen mode in a separate window wasn't forced into IE9+ standards mode.
|
162 |
+
Fixed bug where pressing enter in an empty editor on WebKit could produce DIV elements instead of P.
|
163 |
+
Fixed bug where spans would get removed incorrectly when merging two blocks on backspace/delete on WebKit.
|
164 |
+
Fixed bug where the editor contents wouldn't be completely removed on backspace/delete on WebKit.
|
165 |
+
Fixed bug where the fullpage plugin wouldn't properly render style elements in the head on IE 6/7.
|
166 |
+
Fixed bug where the nonbreaking_force_tab option in the nonbreaking plugin wouldn't work on Gecko/WebKit.
|
167 |
+
Fixed bug where the isDirty state would become true on non IE browsers if there was an table at the end of the contents.
|
168 |
+
Fixed bug where entities wasn't properly encoded on WebKit when pasting text as plain text.
|
169 |
+
Fixed bug where empty editors would produce an exception of valid_elements didn't include body and forced_root_blocks where disabled.
|
170 |
+
Fixed bug where the fullscreen mode wouldn't retain the header/footer in the fullpage plugin.
|
171 |
+
Fixed issue where the plaintext_mode and plaintext_mode_sticky language keys where swapped.
|
172 |
+
Version 3.4.4 (2011-08-04)
|
173 |
+
Added new html5 audio support. Patch contributed by Ronald M. Clifford.
|
174 |
+
Added mute option for video elements and preload options for video/audio patch contributed by Dmitry Kalinkin.
|
175 |
+
Fixed selection to match visual selection before applying formatting changes.
|
176 |
+
Fixed browser specific bugs in lists for WebKit and IE.
|
177 |
+
Fixed bug where IE would scroll the window if you closed an inline dialog that was larger than the viewport. Patch by Laurence Keijmel.
|
178 |
+
Fixed bug where pasting contents near a span element could remove parts of that span. Patch contributed by Wesley Walser.
|
179 |
+
Fixed bug where formatting change would be lost after pressing enter.
|
180 |
+
Fixed bug in WebKit where deleting across blocks would add extra styles.
|
181 |
+
Fixed bug where moving cursor vertically in tables in WebKit wasn't working.
|
182 |
+
Fixed bug in IE where deleting would cause error in console.
|
183 |
+
Fixed bug where the formatter was not applying formats across list elements.
|
184 |
+
Fixed bug where the wordcount plugin would try and update the wordcount if tinymce had been destroyed.
|
185 |
+
Fixed bug where tabfocus plugin would attempt to focus elements not displayed when their parent element was hidden.
|
186 |
+
Fixed bug where the contentEditable state would sometimes be removed if you deleted contents in Gecko.
|
187 |
+
Fixed bug where inserting contents using mceInsertContent would fail if "span" was disabled in valid_elements.
|
188 |
+
Fixed bug where initialization might fail if some resource on gecko wouldn't load properly and fire the onload event.
|
189 |
+
Fixed bug where ctrl+7/8/9 keys wouldn't properly add the specific formats associated with them.
|
190 |
+
Fixed bug where the HTML tags wasn't properly closed in the style plugins properties dialog.
|
191 |
+
Fixed bug where the list plugin would produce an exception if the user tried to delete an element at the very first location.
|
192 |
+
Version 3.4.3.2 (2011-06-30)
|
193 |
+
Fixed bug where deleting all of a paragraph inside a table cell would behave badly in webkit.
|
194 |
+
Fixed bugs in tests in firefox5 and WebKit.
|
195 |
+
Fixed bug where selection of table cells would produce an exception on Gecko.
|
196 |
+
Fixed bug where the caret wasn't properly rendered on Gecko when the editor was hidden.
|
197 |
+
Fixed bug where pasting plain text into WebKit would produce a pre element it will now produce more semantic markup.
|
198 |
+
Fixed bug where selecting list type formats using the advlist plugin on IE8 would loose editor selection.
|
199 |
+
Fixed bug where forced root blocks logic wouldn't properly pad elements created if they contained data attributes.
|
200 |
+
Fixed bug where it would remove all contents of the editor if you inserted an image when not having a caret in the document.
|
201 |
+
Fixed bug where the YUI compressor wouldn't properly encode strings with only a quote in them.
|
202 |
+
Fixed bug where WebKit on iOS5 wouldn't call nodeChanged when the selection was changed.
|
203 |
+
Fixed bug where mceFocus command wouldn't work properly on Gecko since it didn't focus the body element.
|
204 |
+
Fixed performance issue with the noneditable plugin where it would enable/disable controls to often.
|
205 |
+
Version 3.4.3.1 (2011-06-16)
|
206 |
+
Fixed bug where listboxes were not being handled correctly by JAWS in firefox with the o2k7 skin.
|
207 |
+
Fixed bug where custom buttons were not being rendered correctly when in high contrast mode.
|
208 |
+
Added support for iOS 5 that now supporting contentEditable in it's latest beta.
|
209 |
+
Fixed bug where urls in style attributes with a _ character followed by a number would cause incorrect output.
|
210 |
+
Fixed bug where custom_elements option wasn't working properly on IE browsers.
|
211 |
+
Fixed bug where custom_elements marked as block elements wouldn't get correctly treated as block elements.
|
212 |
+
Fixed bug where attributes with </> wasn't properly encoded as XML entities.
|
213 |
+
Version 3.4.3 (2011-06-09)
|
214 |
+
Fixed bug where deleting backwards before an image into a list would put the cursor in the wrong location.
|
215 |
+
Fixed bug where styles plugin would not apply styles across multiple selected block elements correctly.
|
216 |
+
Fixed bug where cursor would jump to start of document when selection contained empty table cells in IE8.
|
217 |
+
Fixed bug where applied styles wouldn't be kept if you pressed enter twice to produce two paragraphs.
|
218 |
+
Fixed bug where a ghost like caret would appear on Gecko when pressing enter while having a text color applied.
|
219 |
+
Fixed bug where IE would produce absolute urls if you inserted a image/link and reloaded the page.
|
220 |
+
Fixed bug where applying a heading style to a list item would cascade style to children list items.
|
221 |
+
Fixed bug where Editor loses focus when backspacing and changing styles in WebKit.
|
222 |
+
Fixed bug where exception was thrown in tinymce.util.URI when parsing a relative URI and no base_uri setting was provided.
|
223 |
+
Fixed bug where alt-f10 was not always giving focus to the toolbar on Safari.
|
224 |
+
Added new 'allow_html_in_named_anchor' option to allow html to occur within a named anchor tag. Use at own risk.
|
225 |
+
Added plugin dependency support. Will autoload plugins specified as a dependency if they haven't been loaded.
|
226 |
+
Fixed bug where the autolink plugin didn't work with non-English keyboards when pressing ).
|
227 |
+
Added possibility to change properties of all table cells in a column.
|
228 |
+
Added external_image_list option to get images list from user-defined variable or function.
|
229 |
+
Fixed bug where the autoresize plugin wouldn't reduce the editors height on Chrome.
|
230 |
+
Fixed bug where table size inputs were to small for values with size units.
|
231 |
+
Fixed bug where table cell/row size input values were not validated.
|
232 |
+
Fixed bug where menu item line-height would be set to wrong value by external styles.
|
233 |
+
Fixed bug where hasUndo() would return wrong answer.
|
234 |
+
Fixed bug where page title would be set to undefined by fullpage plugin.
|
235 |
+
Fixed bug where HTML5 video properties were not updated in embedded media settings.
|
236 |
+
Fixed bug where HTML comment on the first line would cause an error.
|
237 |
+
Fixed bug where spellchecker menu was positioned incorrectly on IE.
|
238 |
+
Fixed bug where breaking out of list elements on WebKit would produce a DIV instead of P after the list.
|
239 |
+
Fixed bug where pasting from Word in IE9 would add extra BR elements when text was word wrapped.
|
240 |
+
Fixed bug where numeric entities with leading zeros would produce incorrect decoding.
|
241 |
+
Fixed bug where hexadecimal entities wasn't properly decoded.
|
242 |
+
Fixed bug where bookmarks wasn't properly stored/restored on undo/redo.
|
243 |
+
Fixed bug where the mceInsertCommand didn't retain the values of links if they contained non url contents.
|
244 |
+
Fixed bug where the valid_styles option wouldn't be properly used on styles for specific elements.
|
245 |
+
Fixed so contentEditable is used for the body of the editor if it's supported.
|
246 |
+
Fixed so trailing BR elements gets removed even when forced_root_blocks option was set to false/null.
|
247 |
+
Fixed performance issue with mceInsertCommand and inserting very simple contents.
|
248 |
+
Fixed performance issue with older IE version and huge documents by optimizing the forced root blocks logic.
|
249 |
+
Fixed performance issue with table plugin where it checked for selected cells to often.
|
250 |
+
Fixed bug where creating a link on centered/floated image would produce an error on WebKit browsers.
|
251 |
+
Fixed bug where Gecko would remove single paragraphs if there where contents before/after it.
|
252 |
+
Fixed bug where the scrollbar would move up/down when pasting contents using the paste plugin.
|
253 |
+
Version 3.4.2 (2011-04-07)
|
254 |
+
Added new 'paste_text_sticky_default' option to paste plugin, enables you to set the default state for paste as plain text.
|
255 |
+
Added new autoresize_bottom_margin option to autoresize plugin that enables you to add an extra margin at the bottom. Patch contributed by Andrew Ozz.
|
256 |
+
Rewritten the fullpage plugin to handle style contents better and have a more normalized behavior across browsers.
|
257 |
+
Fixed bug where contents inserted with mceInsertContent wasn't parsed using the default dom parser.
|
258 |
+
Fixed bug where blocks containing a single anchor element would be treated as empty.
|
259 |
+
Fixed bug where merging of table cells on IE 6, 7 wouldn't look correctly until the contents was refreshed.
|
260 |
+
Fixed bug where context menu wouldn't work properly on Safari since it was passing out the ctrl key as pressed.
|
261 |
+
Fixed bug where image border color/style values were overwritten by advimage plugin.
|
262 |
+
Fixed bug where setting border in advimage plugin would throw error in IE.
|
263 |
+
Fixed bug where empty anchors list in link settings wasn't hidden.
|
264 |
+
Fixed bug where xhtmlextras popups were missing localized popup-size parameters.
|
265 |
+
Fixed bug where the context menu wouldn't select images on WebKit browsers.
|
266 |
+
Fixed bug where paste plugin wouldn't properly extract the contents on WebKit due to recent changes in browser behavior.
|
267 |
+
Fixed bug where focus of the editor would get on control contents on IE lost due to a bug in the ColorSplitButton control.
|
268 |
+
Fixed bug where contextmenu wasn't disabled on noneditable elements.
|
269 |
+
Fixed bug where getStyle function would trigger error when called on element without style property.
|
270 |
+
Fixed bug where editor fail to load if Javascript Compressor was used.
|
271 |
+
Fixed bug where list-style-type=lower-greek would produce errors in IE<8.
|
272 |
+
Fixed bug where spellchecker plugin would produce errors on IE6-7.
|
273 |
+
Fixed bug where theme_advanced_containers configuration option causes error.
|
274 |
+
Fixed bug where the mceReplaceContent command would produce an error since it didn't correctly handle a return value.
|
275 |
+
Fixed bug where you couldn't enter float point values for em in dialog input fields since it wouldn't be considered a valid size.
|
276 |
+
Fixed bug in xhtmlxtras plugin where it wasn't possible to remove some attributes in the attributes dialog.
|
277 |
+
Version 3.4.1 (2011-03-24)
|
278 |
+
Added significantly improved list handling via the new 'lists' plugin.
|
279 |
+
Added 'autolink' plugin to enable automatically linking URLs. Similar to the behavior IE has by default.
|
280 |
+
Added 'theme_advanced_show_current_color' setting to enable the forecolor and backcolor buttons to continuously show the current text color.
|
281 |
+
Added 'contextmenu_never_use_native' setting to disable the ctrl-right-click showing the native browser context menu behaviour.
|
282 |
+
Added 'paste_enable_default_filters' setting to enable the default paste filters to be disabled.
|
283 |
+
Fixed bug where selection locations on undo/redo didn't work correctly on specific contents.
|
284 |
+
Fixed bug where an exception would be trown on IE when loading TinyMCE inside an iframe.
|
285 |
+
Fixed bug where some ascii numeric entities wasn't properly decoded.
|
286 |
+
Fixed bug where some non western language codes wasn't properly decoded/encoded.
|
287 |
+
Fixed bug where undo levels wasn't created when deleting contents on IE.
|
288 |
+
Fixed bug where the initial undo levels bookmark wasn't updated correctly.
|
289 |
+
Fixed bug where search/replace wouldn't be scoped to editor instances on IE8.
|
290 |
+
Fixed bug where IE9 would produce two br elements after block elements when pasting.
|
291 |
+
Fixed bug where IE would place the caret at an incorrect position after a paste operation.
|
292 |
+
Fixed bug where a paste operation using the keyboard would add an extra undo level.
|
293 |
+
Fixed bug where some attributes/elements wasn't correctly filtered when invalid contents was inserted.
|
294 |
+
Fixed bug where the table plugin couldn't correctly handle invalid table structures.
|
295 |
+
Fixed bug where charset and title of the page were handled incorrectly by the fullpage plugin.
|
296 |
+
Fixed bug where toggle states on some of the list boxes didn't update correctly.
|
297 |
+
Fixed bug where sub/sub wouldn't work correctly when done as a caret action in Chrome 10.
|
298 |
+
Fixed bug where the constrain proportions checkbox wouldn't work in the media plugin.
|
299 |
+
Fixed bug where block elements containing trailing br elements wouldn't treated properly if they where invalid.
|
300 |
+
Fixed bug where the color picker dialog wouldn't be rendered correctly when using the o2k7 theme.
|
301 |
+
Fixed bug where setting border=0 using advimage plugin invalid style attribute content was created in Chrome.
|
302 |
+
Fixed bug with references to non-existing images in css of fullpage plugin.
|
303 |
+
Fixed bug where item could be unselected in spellchecker's language selector.
|
304 |
+
Fixed bug where some mispelled words could be not highlighted using spellchecker plugin.
|
305 |
+
Fixed bug where spellchecking would merge some words on IE.
|
306 |
+
Fixed bug where spellchecker context menu was not always positioned correctly.
|
307 |
+
Fixed bug with empty anchors list in advlink popup when Invisible Elements feature was disabled.
|
308 |
+
Fixed bug where older IE versions wouldn't properly handle some elements if they where placed at the top of editor contents.
|
309 |
+
Fixed bug where selecting the whole table would enable table tools for cells and rows.
|
310 |
+
Fixed bug where it wasn't possible to replace selected contents on IE when pasting using the paste plugin.
|
311 |
+
Fixed bug where setting text color in fullpage plugin doesn't work.
|
312 |
+
Fixed bug where the state of checkboxes in media plugin wouldn't be set correctly.
|
313 |
+
Fixed bug where black spade suit character was not included in special character selector.
|
314 |
+
Fixed bug where setting invalid values for table cell size would throw an error in IE.
|
315 |
+
Fixed bug where spellchecking would remove whitespace characters from PRE block in IE.
|
316 |
+
Fixed bug where HR was inserted inside P elements instead of splitting them.
|
317 |
+
Fixed bug where extra, empty span tags were added when using a format with both selector and inline modes.
|
318 |
+
Fixed bug where bullet lists weren't always detected correctly.
|
319 |
+
Fixed bug where deleting some paragraphs on IE would cause an exception.
|
320 |
+
Fixed bug where the json encoder logic wouldn't properly encode \ characters.
|
321 |
+
Fixed bug where the onChange event would be fired when the editor was first initialized.
|
322 |
+
Fixed bug where mceSelected wouldn't be removed properly from output even if it's an internal class.
|
323 |
+
Fixed issue with table background colors not being transparent. This improves compliance with users browser color preferences.
|
324 |
+
Fixed issue where styles were not included when using the full page plugin.
|
325 |
+
Fixed issue where drag/drop operations wasn't properly added to the undo levels.
|
326 |
+
Fixed issue where colors wasn't correctly applied to elements with underline decoration.
|
327 |
+
Fixed issue where deleting some paragraphs on IE would cause an exception.
|
328 |
+
Version 3.4 (2011-03-10)
|
329 |
+
Added accessibility example with various accessibility options contributed by Ephox.
|
330 |
+
Fixed bug where attributes wasn't properly handled in the xhtmlxtras plugin.
|
331 |
+
Fixed bug where the image.htm had some strange td artifacts probably due to auto merging.
|
332 |
+
Fixed bug where the ToolbarGroup had an missing reference to this in it's destroy method.
|
333 |
+
Fixed bug with the resizeBy function in the advanced theme where it was scaled by the wrong parent.
|
334 |
+
Fixed bug where an exception would be thrown by the element if the page was served in xhtml mode.
|
335 |
+
Fixed bug where mceInsertContent would throw an exception when page was served in xhtml mode.
|
336 |
+
Fixed bug where you couldn't select a forground/background color when page was served in xhtml mode.
|
337 |
+
Fixed bug where the editor would scroll to the toolbar when clicked due to a call to focus in ListBox.
|
338 |
+
Fixed bug where pages with rtl dir wouldn't render split buttons correctly when using the o2k7 theme.
|
339 |
+
Fixed bug where anchor elements with names wasn't properly collapsed as they where in 3.3.x.
|
340 |
+
Fixed bug where WebKit wouldn't properly handle image selection if it was done left to right.
|
341 |
+
Fixed bug where the formatter would align images when the selection range was collapsed.
|
342 |
+
Fixed bug where the image button would be active when the selection range was collapsed.
|
343 |
+
Fixed bug where the element_format option wasn't used by the new (X)HTML serializer logic.
|
344 |
+
Fixed bug where the table cell/row dialogs would produce empty attributes.
|
345 |
+
Fixed bug where the tfoot wouldn't be added to the top of the table.
|
346 |
+
Fixed bug where the formatter would merge siblings with white space between them.
|
347 |
+
Fixed bug where pasting headers and paragraphs would produce an extra paragraph.
|
348 |
+
Fixed bug where the ColorSplitButton would throw an exception if you clicked out side a color.
|
349 |
+
Fixed bug where IE9 wouldn't properly produce new paragraphs on enter if the current paragraph had formatting.
|
350 |
+
Fixed bug where multiple BR elements at end of block elements where removed.
|
351 |
+
Fixed bug where fullscreen plugin wouldn't correctly display the edit area on IE6 for long pages.
|
352 |
+
Fixed bug where paste plugin wouldn't properly encode raw entities when pasting in plain text mode.
|
353 |
+
Fixed bug where the search/replace plugin wouldn't work correctly on IE 9.
|
354 |
+
Fixed so the drop menus doesn't get an outline border visible when focused, patch contributed by Ephox.
|
355 |
+
Fixed so the values entered in the color picker are forced to hex values.
|
356 |
+
Removed dialog workaround for IE 9 beta since the RC is now out and people should upgrade.
|
357 |
+
Removed obsolete calls in various plugins to the mceBeginUndoLevel command.
|
358 |
+
Version 3.4b3 (2011-02-10)
|
359 |
+
Added WAI-ARIA support for the main UI and dialogs this feature was contributed by Ephox.
|
360 |
+
Added iframe support to media plugin in order to handle the new YouTube HTML5 video formats.
|
361 |
+
Fixed bug where anchors would wrap the text contents after it due to a bug in the DomParser logic.
|
362 |
+
Fixed bug where the selected state wouldn't be removed on ListBox controls when a menu item was selected.
|
363 |
+
Fixed bug where IE could throw an unspecified error exception when the getBookmark logic was executed.
|
364 |
+
Fixed bug where IE would throw an invalid argument error when focus was applied to an empty editor instance.
|
365 |
+
Fixed bug where applying inline format wouldn't work if the start cell in the selection was empty.
|
366 |
+
Fixed bug where auto detection logic for YouTube and Google Video wouldn't work in the new media plugin.
|
367 |
+
Fixed bug where td elements would get a colspan/rowspan of 1 when created by the table plugin.
|
368 |
+
Fixed bug where removal/padding of empty elements wasn't handled correctly.
|
369 |
+
Fixed bug where internal elements would show up in element path.
|
370 |
+
Fixed bug where internal elements would get serialized as valid output.
|
371 |
+
Fixed bug where color wasn't correctly applied to anchor elements.
|
372 |
+
Fixed bug where float option in the style plugin dialog wouldn't be handled correctly on WebKit.
|
373 |
+
Fixed bug where the tinymce.dom.TreeWalker prev function wouldn't walk the DOM correctly.
|
374 |
+
Fixed bug where mceInsertContent command could produce empty block elements after the inserted content.
|
375 |
+
Fixed bug where mceInsertContent command wouldn't apply visual aids on tables and similar elements.
|
376 |
+
Fixed bug where empty block elements would get double br bogus elements in them.
|
377 |
+
Fixed bug where the color menu wouldn't apply the color correctly on IE when the viewport was to small.
|
378 |
+
Fixed bug where right clicking out side the body element of the editor iframe would prevent paste from working on IE.
|
379 |
+
Fixed bug where the onContextMenu event wouldn't fire correctly on IE if you clicked out side the body element.
|
380 |
+
Fixed bug where the onContextMenu event wouldn't fire correctly on modern Opera versions that now support it by default.
|
381 |
+
Fixed bug where legacy content wasn't converted correctly when inserted using mceInsertContent or through the source dialog.
|
382 |
+
Fixed bug where resizing images or tables wouldn't update the style attribute correctly or leave data-mce prefixed attributes.
|
383 |
+
Fixed bug where adding links wouldn't work correctly when using TinyMCE jQuery version with jQuery 1.5.
|
384 |
+
Fixed bug where single quotes inside param elements wasn't treated correctly by the media plugin.
|
385 |
+
Fixed bug where pasting plain text in WebKit wouldn't work correctly. It will now auto detect the WebKit bug and use plain text mode.
|
386 |
+
Fixed bug where the DomParser would fail to move out invalid elements within invalid elements on complex contents.
|
387 |
+
Fixed bug where paste as plain text would not decode html entities properly.
|
388 |
+
Fixed bug where large paragraphs would cause incorrect scrolling behavior if you would split them using enter.
|
389 |
+
Fixed bug where the SaxParser wouldn't properly parse some specific short ended elements.
|
390 |
+
Fixed so mceReplaceContent supports caret position and makes sure that the contents inserted gets validated.
|
391 |
+
Fixed so unnecessary traling br elements in blocks gets removed on Gecko/WebKit when using mceInsertContent command.
|
392 |
+
Moved some plugin css contents into the skin content css files to reduce the number of http requests.
|
393 |
+
Moved some plugin specific images into the theme img directory since they can then be shared.
|
394 |
+
Version 3.4b2 (2011-01-13)
|
395 |
+
Added new custom flash player, this player supports mp4 and flv and has skin support.
|
396 |
+
Fixed so mceInsertContent handles context correctly to enforce valid nesting of elements.
|
397 |
+
Fixed bug where scrolling would become jerky on IE on some contents.
|
398 |
+
Fixed bug where paste as plain text would throw exception of missing entities setting.
|
399 |
+
Fixed bug where anchor nodes where removed by the new serializer engine.
|
400 |
+
Fixed bug where IE would crash if when backspace where used on some specific contents.
|
401 |
+
Fixed bug where pasting of plain text in WebKit would result in merging of text lines.
|
402 |
+
Fixed bug where it wasn't possible to delete images or tables using backspace on IE9.
|
403 |
+
Fixed bug where urls in styles would generate a JS error due to incorrect scope.
|
404 |
+
Fixed bug where copy paste from Java applications would produce extra contents in FF on Mac.
|
405 |
+
Fixed bug where the verify_html option wouldn't allow all elements and attributes.
|
406 |
+
Version 3.4b1 (2010-12-20)
|
407 |
+
Added new serialization engine that increases performance and enforces valid output according to the specified schema settings.
|
408 |
+
Added new HTML parser logic used by the serialization engine and can handle malformed html contents.
|
409 |
+
Added new valid_children config option, enables more fine grain control of elements can be inside other elements.
|
410 |
+
Added new entities encoding logic boost performance and will only encode entities based on context i.e. attributes/text nodes.
|
411 |
+
Added new protect setting that enables users to protect template items from being removed by the serializer logic.
|
412 |
+
Added new {$caret} marker for the mceInsertContent command. Makes it possible to move the caret to a specific position when inserting contents.
|
413 |
+
Added new validation of anchor names. Only valid W3C names will be accepted.
|
414 |
+
Replaced the internal _mce_ prefixed attributes to the more standard HTML5 data-mce- prefix. This will also resolve future browser santiaztion issues.
|
415 |
+
Fixed bug where the paste plugin wouldn't convert Word lists with more than 9 items to real ol lists. Patch contributed by Mike (yogaboy).
|
416 |
+
Fixed bug where clicking on a format title would produce errors if the current selection didn't have any formats.
|
417 |
+
Fixed bug where paste of simple texts wouldn't work correctly in Gecko using the paste plugin since it keeps block formatting.
|
418 |
+
Fixed bug where confirm dialogs didn't display correctly due to resent IE9 fixes.
|
419 |
+
Fixed bug where spaces in URLs wouldn't be properly encoded to %20 if the user entered them in the link dialogs. Patch contributed by Ephox.
|
420 |
+
Fixed bug where the image alignment buttons wouldn't reposition the resize handles on FF due to a browser issue. Patch contributed by Ephox.
|
421 |
+
Fixed bug where the compareBoundaryPoints method of the IE Range class didn't work correctly. Patch contributed by Ephox.
|
422 |
+
Fixed bug where selection of elements using double click wouldn't select the clicked element but rather the parent node on FF. Patch contributed by Ephox.
|
423 |
+
Fixed bug where IE would scroll the user to the current selection causing parent document to scroll as well. Patch contributed by Ephox.
|
424 |
+
Fixed bug where style compression would incorrectly compress items with different values. It now only compresses if the values are the same. Patch contributed by Ephox.
|
425 |
+
Fixed bug where FF would add non breaking spaces outside TD elements if formatting was applied to table cells. Patch contributed by Ephox.
|
426 |
+
Fixed bug where the caret position would be lost on WebKit browsers if you pasted images multiple times. Patch contributed by Ephox.
|
427 |
+
Fixed bug where non word contents like * would be counted as words in the wordcount pluging. Patch contributed by David Balatero.
|
428 |
+
Fixed bug where the toggle absolute button in the layer plugin wouldn't remove the existing internal style attribute first.
|
429 |
+
Fixed bug where the autosave plugin would generate an exception on IE if the user had disabled userdata persistence.
|
430 |
+
Fixed bug where the paste plugin would remove dashed classes on IE since the regexps didn't include that character.
|
431 |
+
Fixed bug where applying text color would not add spans inside link elements. This is needed due to CSS style inheritance.
|
432 |
+
Fixed bug where applying block formats to empty elements wouldn't render correctly on IE.
|
433 |
+
Fixed bug where the searchreplace plugin would add a f or r character when shortcuts where used on IE while using default dialogs.
|
434 |
+
Fixed bug where Opera wouldn't load scripts correctly since the onreadystate would fire even though the script wasn't loaded.
|
435 |
+
Fixed issue where wouldn't be handled correctly in the bbcode plugin if entity_encoding was set to raw.
|
436 |
+
Fixed issue where contents would flicker since the content css files where asynchronously loaded.
|
437 |
+
Fixed bug where WebKit wouldn't create links on images with a float style.
|
438 |
+
Version 3.3.9.3 (2010-12-20)
|
439 |
+
Fixed issue where WebKit wouldn't correctly apply ins/del in xhtmlxtras plugin.
|
440 |
+
Fixed bug where paste as plaintext on WebKit wouldn't produce br and p elements correctly.
|
441 |
+
Fixed bug where the confirm dialog texts would be incorrectly placed due to recent IE 9 workarounds in the window.css.
|
442 |
+
Fixed bug where applying text color would not add spans inside link elements. This is needed due to CSS style inheritance.
|
443 |
+
Version 3.3.9.2 (2010-09-29)
|
444 |
+
Fixed bug where placing the caret in IE 9 beta 1 would not work correctly if you clicked out side the document body element.
|
445 |
+
Fixed bug where IE 9 beta 1 wouldn't resize the editor correctly since the events didn't fire as previous versions did.
|
446 |
+
Fixed bug where FF would produce an error message when being rendered inside a hidden div element.
|
447 |
+
Fixed bug where resize logic could produce a cookie with a width/height less than the size of the container.
|
448 |
+
Fixed bug where content_css wouldn't populate the styles dropdown correctly.
|
449 |
+
Version 3.3.9.1 (2010-09-23)
|
450 |
+
Fixed bug where WebKit browsers wouldn't activate the image button when images where selected.
|
451 |
+
Fixed bug where Opera Presto 10.60 deletes elements when restoring bookmarks.
|
452 |
+
Fixed bug where IE9 beta1 doesn't handle regexp replacement values correctly.
|
453 |
+
Fixed bug where IE9 beta1 didn't render the inline dialogs correctly due to a bug with CSS clip.
|
454 |
+
Fixed bug where IE9 beta1 would produce error messages on load since they removed the document.recalc method.
|
455 |
+
Fixed bug where IE9 beta1 would produce <html xmlns=""> since they haven't implemented document.implementation.createDocument correctly.
|
456 |
+
Fixed bug where IE9 beta1 would searchreplace doesn't work since their native DOM Range doesn't have a find method.
|
457 |
+
Fixed bug where IE9 beta1 would render the source view incorrectly due to incorrect viewport size measurements.
|
458 |
+
Fixed bug where IE9 beta1 would crash when running the basic functionality unit tests.
|
459 |
+
Fixed bug where IE9 beta1 would wrap elements in blocks correctly due to changes to the selection object.
|
460 |
+
Fixed bug where IE9 beta1 would fail to insert contents since they havn't implemented the createContextualFragment method in their DOM Range.
|
461 |
+
Fixed bug where IE9 beta1 would fail to handle image selection since they currently doesn't support control selections in their DOM Range.
|
462 |
+
Fixed bug where IE9 beta1 would fail to load scripts since they fire the onload event before the scripts are parsed and executed.
|
463 |
+
Version 3.3.9 (2010-09-08)
|
464 |
+
Fixed bug where inserting table rows into a table with subtable would produce an incorrect column count.
|
465 |
+
Fixed bug where the selection of cells in a table with subtables could produce invalid selections.
|
466 |
+
Fixed bug where the table plugin would produce a script error if you tried to move the caret before a first child table.
|
467 |
+
Fixed bug where the keep_styles feature on IE would move the caret to an incorrect location at the end of list blocks.
|
468 |
+
Fixed so attributes from legacy elements such as font gets retained when they get converted to spans.
|
469 |
+
Fixed minor issue where the select boxes wouldn't be set the not set by default in the table dialog.
|
470 |
+
Version 3.3.8 (2010-06-30)
|
471 |
+
On IE8+ and FireFox 3.5+, dragging an image now correctly adds an undo
|
472 |
+
event.
|
473 |
+
Fixed bug where WebKit would not move the caret to a correct position after a paste operation.
|
474 |
+
Fixed bug where WebKit would produce a div wrapper element when pasting some contents.
|
475 |
+
Fixed bug where the visual chars and nonbreaking plugin wouldn't show nbsp elements correctly.
|
476 |
+
Fixed bug where the format states would be enabled even after the format was removed.
|
477 |
+
Fixed bug where the delete key would move the caret to an incorrect position.
|
478 |
+
Fixed bug where it wasn't possible to toggle of the current font size/family/style by clicking the title item.
|
479 |
+
Fixed bug where the abbr element wouldn't get serialized correctly on IE6.
|
480 |
+
Fixed so that the examples checks if they are executed from the local file system since that might not work properly.
|
481 |
+
Version 3.3.7 (2010-06-10)
|
482 |
+
Fixed bug where context menu would produce an error on IE if you right clicked twice and left clicked once.
|
483 |
+
Fixed bug where resizing of the window on WebKit browsers in fullscreen mode wouldn't position the statusbar correctly.
|
484 |
+
Fixed bug where IE would produce an error if the editor was empty and you where undoing to that initial level.
|
485 |
+
Fixed bug where setting the table background on gecko would produce \" entities inside the url style property.
|
486 |
+
Fixed bug where the button states wouldn't be updated correctly on IE if you placed the caret inside the new element.
|
487 |
+
Fixed bug where undo levels wasn't properly added after applying styles or font sizes.
|
488 |
+
Fixed bug where IE would throw an error if you used "select all" on empty elements and applied formatting to that.
|
489 |
+
Fixed bug where IE could select one extra character when you did a bookmark call on a caret location.
|
490 |
+
Fixed bug where IE could produce a script error on delete since it would sometimes produce an invalid DOM.
|
491 |
+
Fixed bug where IE would return the wrong start element if the whole element was selected.
|
492 |
+
Fixed bug where formatting states wasn't updated on IE if you pressed enter at the end of a block with formatting.
|
493 |
+
Fixed bug where submenus for the context menu wasn't removed correctly when the editor was destroyed.
|
494 |
+
Fixed bug where Gecko could select the wrong element after applying format to multiple elements.
|
495 |
+
Fixed bug where Gecko would delete parts of the previous element if the selection range was a element selection.
|
496 |
+
Fixed bug where Gecko would not merge paragraph elements correctly if they contained br elements.
|
497 |
+
Fixed bug where the cleanup button could produce span artifacts if you pressed it twice in a row.
|
498 |
+
Fixed bug where the fullpage plugin header/footer would be have it's header reseted to it's initial state on undo.
|
499 |
+
Fixed bug where an empty paragraph would be collapsed if you performed a cleanup while having the caret inside it.
|
500 |
+
Fixed a few memory leaks on IE especially with drop menus in listboxes and the spellchecker.
|
501 |
+
Fixed so formats applied to the current caret gets merged to reduce the number of output elements.
|
502 |
+
Added the latest version of Sizzle for the CSS selector logic to fix a compatibility issue with prototype.
|
503 |
+
Version 3.3.6 (2010-05-20)
|
504 |
+
Fixed bug where a editor.focus call could produce errors on IE in very specific scenarios.
|
505 |
+
Fixed bug where Gecko would produce an error if you unformatted text inside an empty element.
|
506 |
+
Fixed bug where IE would produce an error if the caret was placed before a table and you used the align buttons.
|
507 |
+
Fixed bug where the font size drop down didn't display the a preview correctly.
|
508 |
+
Fixed bug where the paste plugin wouldn't include all contents some times on WebKit browsers.
|
509 |
+
Fixed bug where the plain text mode toggle wouldn't work properly on WebKit.
|
510 |
+
Fixed bug where the editors statusbar would become invisible when you resized the window in fullscreen mode.
|
511 |
+
Version 3.3.5.1 (2010-05-07)
|
512 |
+
Fixed a critical bug with the fullscreen plugin. Produced error messages when the state was toggled on/off.
|
513 |
+
Version 3.3.5 (2010-05-06)
|
514 |
+
Added new merge_with_parents option to formats, enables the control of removal of elements with similar parents.
|
515 |
+
Fixed so the default behavior for applying classes isn't a toggle state but the old behavior from before the 3.3 release.
|
516 |
+
Fixed bug where selecting contents using double click on Gecko would produce errors when using removing format.
|
517 |
+
Fixed bug where the IE DOM could get messed up when non valid contents was pasted into the editor.
|
518 |
+
Fixed bug where merging selected table cells using the context menu didn't work as expected.
|
519 |
+
Fixed bug where some nestled formatting would be applied incorrectly.
|
520 |
+
Fixed bug with enter in list items when using the force_br_newlines mode on WebKit patch contributed by Ryan Koopmans.
|
521 |
+
Fixed bug where undo/redo could produce js errors on some specific operations.
|
522 |
+
Fixed bug where the theme_advanced_font_sizes didn't work as before 3.3 when complex settings where used.
|
523 |
+
Fixed bug where the table plugin would copy cell/row id attributes when making new rows/cells.
|
524 |
+
Version 3.3.4 (2010-04-27)
|
525 |
+
Fixed bug where fullscreen plugin would add two editor instances to EditorManager collection.
|
526 |
+
Fixed bug where it was difficult to enter text on non western languages such as Japanese on IE.
|
527 |
+
Fixed bug where removing contents from nodes could result in an exception when using undo/redo.
|
528 |
+
Fixed bug with selection of images inside layers or other resizable containers on IE.
|
529 |
+
Fixed so editors isn't initialized on iPhone/iPad devices since they don't have caret support.
|
530 |
+
Version 3.3.3 (2010-04-19)
|
531 |
+
Added new script_loaded callback function setting for the jQuery plugin.
|
532 |
+
Added various fixes and new rpc methods for the spellchecker plugin. Patch contributed by Michael Peters.
|
533 |
+
Removed some unnecessary inline style information from some of the dialogs.
|
534 |
+
Fixed some issues with the chaining for the TinyMCE jQuery plugin.
|
535 |
+
Fixed so any extra arguments passed to patched jQuery functions gets passed through. Patch contributed by Lee Henson.
|
536 |
+
Fixed so spellchecking/contextmenu can be toggled on/off if the browser has native spellchecker support.
|
537 |
+
Fixed bug where some texts in the new paste plugin wasn't placed in language pack.
|
538 |
+
Fixed bug where IE would produce an incorrect information message when cutting.
|
539 |
+
Fixed bug where removing items using the xhtmlxtras plugin wouldn't work correctly.
|
540 |
+
Fixed bug where setting table background images would add extra quotes on Gecko.
|
541 |
+
Fixed bug where shortcut for bold/italic/underline wouldn't work properly on WebKit.
|
542 |
+
Fixed bug where IE would produce an error message if only contents was an image tag and bold was used.
|
543 |
+
Fixed bug where the caret would move if alignment was applied to empty block elements.
|
544 |
+
Fixed bug where some shortcut key commands wouldn't apply formatting correctly.
|
545 |
+
Version 3.3.2 (2010-03-25)
|
546 |
+
Fixed bug where it was possible to scale the editor iframe smaller than the editor UI.
|
547 |
+
Fixed bug where some of the resizing option didn't work with the new live resize.
|
548 |
+
Fixed bug where the format listbox didn't show nestled formats correctly.
|
549 |
+
Fixed bug where the native listboxes didn't work correctly.
|
550 |
+
Fixed bug where font size selection in using the legacyoutput plugin would produce errors.
|
551 |
+
Fixed so block and blockquote formats remove their matching element regardless of it's attributes.
|
552 |
+
Version 3.3.1 (2010-03-18)
|
553 |
+
Added new live resize feature, the editor contents is now visible while resizing.
|
554 |
+
Fixed bug where some valid_element patterns would produce an unknown property error.
|
555 |
+
Fixed bug where it wasn't possible to toggle off blockquotes.
|
556 |
+
Fixed bug where an undo level wasn't produced when applying formatting using the styles dropdown.
|
557 |
+
Fixed bug where IE 6/7 wouldn't perform caret formatting due to a focus/event bug in IE.
|
558 |
+
Fixed bug where undo/redo wasn't restoring the previous selection correctly.
|
559 |
+
Fixed bug where the caret would become invisible if you resized the editor in latest Gecko.
|
560 |
+
Fixed bug where the class attribute wasn't completely removed in IE 6/7 when the removeClass function was used.
|
561 |
+
Fixed so the matchNode method of the Formatter class returns the matched format rule.
|
562 |
+
Fixed so it's possible to apply formatting to both blocks and as inline elements.
|
563 |
+
Version 3.3 (2010-03-10)
|
564 |
+
Fixed bug where backspace on a table on IE would produce an empty tbody and some JS exceptions.
|
565 |
+
Fixed bug where some redundant children wasn't removed properly when applying inline styles to them.
|
566 |
+
Fixed bug where Chrome would produce incorect dialog sizes if the inlinepopups plugin wasn't used.
|
567 |
+
Fixed bug where spans with different classes would get merged if they where siblings to each other.
|
568 |
+
Fixed bug where IE 8 would crash if you used the spellchecker.
|
569 |
+
Fixed bug where Input Method for non western languages didn't work correctly.
|
570 |
+
Fixed bug where the UI would render incorrectly in FF 3.6 on Mac due to a bug n their rendering engine.
|
571 |
+
Fixed bug where WebKit wouldn't scroll down correctly if Shift+Enter was used. Patch contributed by Thomas Andersen.
|
572 |
+
Version 3.3rc1 (2010-02-23)
|
573 |
+
Fixed bug with new legacyoutput plugin not working correctly on it's own.
|
574 |
+
Fixed bug some performance issues with removing text formats.
|
575 |
+
Fixed bug where TinyMCE specific attributes wasn't removed properly by remove format.
|
576 |
+
Fixed bug where it wasn't possible to align images within inline elements.
|
577 |
+
Fixed bug where Ctrl+Delete/Backspace would produce an invalid argument exception on IE.
|
578 |
+
Fixed bug where the search/replace logic could produce an infinite loop on IE for reverse searches.
|
579 |
+
Fixed bug where cloning formats in cells didn't work properly on IE.
|
580 |
+
Fixed bug where IE6 would produce a horizontal scroll bar.
|
581 |
+
Fixed so remove jQuery method removes the TinyMCE instance as well as the specified textarea.
|
582 |
+
Fixed so selected rows and cells gets updated using the row/cell properties dialogs.
|
583 |
+
Version 3.3b2 (2010-02-04)
|
584 |
+
Fixed bug where sometimes img elements would be removed by split method in DOMUtils.
|
585 |
+
Fixed bug where merging of span elements could occur on bookmark nodes.
|
586 |
+
Fixed bug where classes wasn't properly removed when removeformat was used on IE 6.
|
587 |
+
Fixed bug where multiple calls to an tinyMCE.init with mode set to exact could produce the same unique ID.
|
588 |
+
Fixed bug with the IE selection implementation when it was feeded an document range.
|
589 |
+
Fixed bug where block elements formatting wasn't properly removed by removeformat on all browsers.
|
590 |
+
Fixed bug where selection location was lost if you performed a manual cleanup.
|
591 |
+
Fixed bug where removeformat wouldn't remove span elements within styled block elements.
|
592 |
+
Fixed bug where an error would be thrown if you clicked on the separator lines in menus.
|
593 |
+
Fixed bug with the jQuery plugin adding always adding a querystring value to other resources.
|
594 |
+
Fixed bug where IE would produce an error message if you had an empty editor instance.
|
595 |
+
Fixed bug where Shift+Enter didn't produce br elements on WebKit browsers.
|
596 |
+
Fixed bug where a temporary marker element wasn't removed by the paste plugin.
|
597 |
+
Fixed bug where inserting a table would produce two undo levels instead of one.
|
598 |
+
Version 3.3b1 (2010-01-25)
|
599 |
+
Added new text formatting engine. Fixes a lot of browser quirks and adds new possibilities.
|
600 |
+
Added new advlist plugin that enables you to set the formats of list elements.
|
601 |
+
Added new paste plugin logic that enables you to retain style information from Office.
|
602 |
+
Added new autosave plugin logic that automatically saves contents in local storage.
|
603 |
+
Added new valid_styles option. Adds the possibility to restrict styles and their order.
|
604 |
+
Added new theme_advanced_runtime_fontsize option to display the runtime font size in font size select box.
|
605 |
+
Added new jquery plugin version that handles the gzip compressor amongst other things. Contributed by Speednet.
|
606 |
+
Added new $ function to tinymce namespace and editor instances for the jQuery build.
|
607 |
+
Added the possibility to get editors by index as well as name in the tinyMCE.editors collection.
|
608 |
+
Fixed so the contents inside the editor renders in standards mode by default.
|
609 |
+
Fixed bug where it wasn't possible to move the caret on short documents running in standards mode on IE.
|
610 |
+
Fixed bug where the decode method of the DOMUtils class could end up in an endless loop.
|
611 |
+
Fixed bug where it was possible to bypass the paste cleanup on non IE browsers if you clicked while pasting.
|
612 |
+
Fixed bug where some attributes wasn't serialized correctly on IE if wildcard attribute patters where used.
|
613 |
+
Fixed bug where entity decoding was performed on strings that didn't have any valid entities in them.
|
614 |
+
Fixed bugs with the insertNode method of the IE DOMRange implementation. Patch contributed by Scott McNaught.
|
615 |
+
Rewrote the getBookmark/moveToBookmark selection logic to boost performance on larger documents.
|
616 |
+
Rewrote the table plugin to include new cell selection logic and fixed various bugs and issues.
|
617 |
+
Merged the tinyMCE, tinymce and tinymce.EditorManager into the same instance makes more sense.
|
618 |
+
Removed browser setting since the browser support for TinyMCE is not far better than it was when that setting was introduced.
|
619 |
+
Changed the mce_ attribute prefix to the more standard _mce_ prefix. This is similar to browser vendors prefixes.
|
620 |
+
Optimized performance with named entities on Gecko. Regexp replace was executing very slowly probably due to a Gecko bug.
|
621 |
+
Optimized performance of the IE specific selection/range implementation.
|
622 |
+
Removed the safari plugin since we now replaced all text formatting logic to custom code.
|
623 |
+
Version 3.2.7 (2009-09-22)
|
624 |
+
Fixed bug where uppercase paragraphs could still produce an invalid DOM tree on IE.
|
625 |
+
Fixed bug where split command didn't work on WebKit since the node serializer needs a real document to work with.
|
626 |
+
Fixed bug where it was impossible in Gecko to place the caret before a table if it was the first one.
|
627 |
+
Fixed bug where linking to urls like ../../ would produce an extra traling slash ../..//.
|
628 |
+
Fixed bug where the template cdate functionality was using an old 2.x API call. Patch contributed by vectorjohn.
|
629 |
+
Fixed bug where urls to the same site but different protocol would be converted when relative_urls where set to false. Patch contributed by Ted Rust.
|
630 |
+
Fixed bug where the paste plugin would remove mceItem prefixed classes.
|
631 |
+
Fixed bug where the paste plugin would sometimes add items in a reverse order on WebKit.
|
632 |
+
Fixed bug where the paste buttons would present an error message on Gecko even if you changed user.js. Patch contributed by Todd (teeaykay).
|
633 |
+
Fixed bug where Opera would crash if you had tables incorrectly placed inside paragraphs.
|
634 |
+
Fixed bug where styles elements wasn't properly processed if you had bad input HTML.
|
635 |
+
Fixed bug where style attributes wasn't properly forced into a specific format.
|
636 |
+
Fixed bug and issues with boolean attributes like checked, nowrap etc.
|
637 |
+
Fixed bug where input elements could override attributes on form elements.
|
638 |
+
Fixed bug where script or style elements could get modified by the DOMUtils processHTML method.
|
639 |
+
Fixed bug where the selected attribute could get lost when force root blocks logic got executed on IE. Patch contributed by Attila Mezei-Horvati.
|
640 |
+
Fixed bug where getAttribs method didn't handle boolean attributes correctly on IE.
|
641 |
+
Fixed so the paste from word dialog is presented if you paste content on an IE with to restrictive security settings.
|
642 |
+
Fixed so the paste_strip_class_attributes option is set to none by default in the paste plugin.
|
643 |
+
Removed default border=0 on tables for the default value of valid_elements.
|
644 |
+
Version 3.2.6 (2009-08-19)
|
645 |
+
Added new wordcount plugin, this will display the number of typed words as you write. Contributed by Andrew Ozz.
|
646 |
+
Added new getNext and getPrev methods to DOM utils. These will return the first matching sibling.
|
647 |
+
Fixed bug where it was impossible to place the caret after a table on Gecko. It will now add a paragraph after tables.
|
648 |
+
Fixed bug where inline dialogs would fail if used in a window opened using a showModalDialog. Patch contributed by Derek Britt.
|
649 |
+
Fixed bug where IE could sometimes render a unknown runtime error on invalid input HTML.
|
650 |
+
Fixed bug where some incorrectly placed tables wouldn't be moved outside the paragraphs on IE.
|
651 |
+
Fixed bug where uppercase script/style element wouldn't be handled correctly and converted to valid lowercase.
|
652 |
+
Fixed bug where some WebKit versions on Mac OS X would produce issues with hidden select fields.
|
653 |
+
Fixed bug where the media plugin would fail on WebKit since the node wasn't properly imported to the right document.
|
654 |
+
Fixed bug where absolute URLs for the TinyMCE script using a base href element would cause loading problems in IE 6/7.
|
655 |
+
Fixed bug where pasting using the paste plugin wasn't possible on IE with to restrictive security settings.
|
656 |
+
Fixed bug where pasting of whitespace was impossible using the new custom paste method.
|
657 |
+
Fixed bug where pasting on some WebKit browsers would not work if you pasted specific contents due to a WebKit bug.
|
658 |
+
Fixed bug where doctypes with multiple lines would not be parsed correctly by the fullpage plugin. Patch contributed by Colin.
|
659 |
+
Fixed bug where the autoresize plugin would break the fullscreen functionality.
|
660 |
+
Fixed bug where tables would be chopped up running on IE using invalid contents and pasting paragraphs into a cell.
|
661 |
+
Fixed bug where the each method of jQuery build didn't iterate styleSheets. We now use the TinyMCE API one instead.
|
662 |
+
Fixed bug where auto switching to paragraphs after headers some times failed in Gecko.
|
663 |
+
Fixed so all editor options gets passed to the Serializer class. Patch contributed by Jasper Mattsson.
|
664 |
+
Fixed so script/style blocks isn't wrapped in paragraphs as other inline elements.
|
665 |
+
Fixed so the XHR requests sends the X-Requested-With HTTP header.
|
666 |
+
Fixed so the data url scheme is handled in the tinymce.util.URI class.
|
667 |
+
Changed inline documentation to use moxiedoc style comments.
|
668 |
+
Removed the compat2x plugin people should have upgraded to the 3.x API by now. 3.0 was released more then a year ago.
|
669 |
+
Re-added Gecko specific message for users who doesn't understand the security concept regarding paste.
|
670 |
+
Version 3.2.5 (2009-06-29)
|
671 |
+
Added new jQuery plugin for the jQuery specific package. This enables you to more easily load and use TinyMCE.
|
672 |
+
Added new autoresize plugin contributed by Peter Dekkers. This plugin will auto resize the editor to the size of the contents.
|
673 |
+
Fixed so all packages have the same directory structure. Previous releases had a different structure for the production package.
|
674 |
+
Fixed so the paste from word dialog forces the contents to be processed as word contents even if it's not.
|
675 |
+
Fixed so the jQuery build adapter build works. It's currently only excluding Sizzle.
|
676 |
+
Fixed so noscript element contents is retained during the editing process.
|
677 |
+
Fixed bug where the getBookmark method would need a "simple" string input when the documented way is a boolean.
|
678 |
+
Fixed bug where invalid contents could break the fix_table_elements logic.
|
679 |
+
Fixed bug where Sizzle specific attributes would be serialized if the valid_elements was set to *[*].
|
680 |
+
Fixed bug where IE would produce an error if you specified a relative content_css and opened the paste dialog.
|
681 |
+
Fixed bug where pasting images on IE would produce broken images if they came from an external site.
|
682 |
+
Fixed bug where memory was leaked if you add/remove controls dynamically. Some event handlers wasn't removed properly.
|
683 |
+
Fixed bug where domain relaxing wasn't treated correctly if you added it after the TinyMCE script element.
|
684 |
+
Fixed bug where the activeEditor wasn't set to null if the last editor instance was removed.
|
685 |
+
Fixed bug where IE was leaking memory on the onbeforeunload event due to some recently introduced logic. Patch contributed by Options.
|
686 |
+
Fixed bug where inserting tables in Safari 4 didn't work due to a new WebKit bug where some element names are reserved.
|
687 |
+
Fixed bug where URLs having a :// value in the query string would make it absolute regardless of URL settings.
|
688 |
+
Fixed the WebKit specific bug where DOM Ranges would fail if the node wasn't attached to something in a different way.
|
689 |
+
Removed the auto_resize option and the resizeToContent method from the tinymce.Editor class. Use the new autoresize plugin instead.
|
690 |
+
Version 3.2.4.1 (2009-05-25)
|
691 |
+
Fixed bug where Gecko browsers would produce an extra space after for example strong when loaded from sub domains.
|
692 |
+
Fixed bug where script elements would be removed if they where placed inside a paragraph element.
|
693 |
+
Fixed bug where IE 8 would produce 1 item remaining when loading CSS files dynamically with an empty cache.
|
694 |
+
Fixed bug where bound events would be removed from other editor instances if a specific one was removed.
|
695 |
+
Fixed various bugs and issues with script and style elements inside the editor.
|
696 |
+
Fixed so all script contents gets wrapped in CDATA sections so that they can be parsed using a XML parser.
|
697 |
+
Fixed so it's impossible for elements marked as closed to have child nodes rendered in output.
|
698 |
+
Version 3.2.4 (2009-05-21)
|
699 |
+
Added new paste_remove_styles/paste_remove_styles_if_webkit option to paste plugin concept contributed by Hadrien Gardeur.
|
700 |
+
Added new functionality to paste plugin contributed by Scott Eade aka monkeybrain.
|
701 |
+
Added new paste_block_drop option to the paste plugin this is disabled by default and will block any drag/drop event.
|
702 |
+
Added new bind/unbind methods to DOMUtils these works like Event.add/Event.remove but is easier to access.
|
703 |
+
Added new paste_dialog_width/paste_dialog_height options to paste pluign. Enables you to change the dialog sizes.
|
704 |
+
Fixed bug on IE 8 where it would sometimes produce a "1 item remaining" status message that would never finish.
|
705 |
+
Fixed bug on Safari 4 beta that would produce DOM Range exceptions on the DOMUtils split method since the browser has a bug.
|
706 |
+
Fixed bug where the paste plugin could accidentally think that some word sentences was supposed to be list elements.
|
707 |
+
Fixed bug where paste plugin would produce one extra empty undo level on some browsers.
|
708 |
+
Fixed bug where spans wasn't produced correctly on new line when the keep_styles option was enabled.
|
709 |
+
Fixed bug where the caret would be placed at the beginning of contents in IE 8 if you selected colors from the color pickers.
|
710 |
+
Fixed so the Event class is a normal class instead of a static one. The tinymce.dom.Event is now a global instance of that class.
|
711 |
+
Fixed so internal events for instances gets removed when the DOMUtils instance is removed.
|
712 |
+
Fixed so preventDefault and stopPropagation methods can be used on the event object in all browsers.
|
713 |
+
Version 3.2.3.1 (2009-05-05)
|
714 |
+
Fixed bug where paragraphs containing form elements such as input or textarea would be removed.
|
715 |
+
Fixed bug where some IE versions would produce a wrapper function for events attributes.
|
716 |
+
Fixed bug where table cell contents could be removed if you pressed return/enter at the end of the cell contents.
|
717 |
+
Fixed bug where the paste plugin would remove a extra character if the selection range was collapsed.
|
718 |
+
Fixed bug where creating tables with % width wouldn't be handled correctly on WebKit browsers.
|
719 |
+
Version 3.2.3 (2009-04-23)
|
720 |
+
Added new paste plugin logic. This new version will autodetect Word contents and clean it up.
|
721 |
+
Added a optional root element argument to getPos so you can tell it where to stop the calculation.
|
722 |
+
Added new DOM ready logic to remove the usage of document.write. We now use basically the same method as jQuery.
|
723 |
+
Fixed bug where WebKit browsers would fail when selecting all contents in the area using Ctrl+A.
|
724 |
+
Fixed bug where IE would produce paragraphs with empty inline style elements.
|
725 |
+
Fixed bug where WebKit browsers would fail when inserting tables with a non pixel width.
|
726 |
+
Fixed bug where block elements could get a redundant br element at the end of the element.
|
727 |
+
Fixed bug where the tabfocus plugin only worked with a single editor instance on page.
|
728 |
+
Fixed bug where IE 8 was loosing caret position if the selection was collapsed and a menu was clicked.
|
729 |
+
Fixed bug with application/xhtml+xml mode where menus wasn't working properly.
|
730 |
+
Fixed bug where the onstop workaround fix for IE would produce errors in an ASP update panel.
|
731 |
+
Fixed bug where the submit function override could produce errors if executed in the wrong scope.
|
732 |
+
Fixed bug where the area element wasn't closed by a short ending.
|
733 |
+
Fixed various number issues in the style plugins properties dialog. Contributed by datpaulchen.
|
734 |
+
Fixed issues with size suffix values in the style plugin dialog.
|
735 |
+
Fixed issue where hasDuplicate variable would leak out to the global space due to a bug in the Sizzle engine.
|
736 |
+
Fixed issue where the paste event would fire a dialog warning on IE since we extracted the text contents.
|
737 |
+
Updated Sizzle engine to the latest version, this version fixes a few bugs that was reported.
|
738 |
+
Version 3.2.2.3 (2009-03-26)
|
739 |
+
Fixed regression bug with the getPos method, it would return invalid if the view port was to small.
|
740 |
+
Version 3.2.2.2 (2009-03-25)
|
741 |
+
Fixed so the DOMUtils getPos method can be used cross documents if needed.
|
742 |
+
Fixed bug where undo/redo wasn't working correctly in Gecko browsers.
|
743 |
+
Version 3.2.2.1 (2009-03-19)
|
744 |
+
Added support for tel: URL prefixes. Even though this doesn't match any official RFC.
|
745 |
+
Fixed so the select method of the Selection class selects the first best suitable contents.
|
746 |
+
Fixed bug where the regexps for www. prefixes for link and advlink dialogs would match wwwX.
|
747 |
+
Fixed bug where the preview dialog would fail to open if the content_css wasn't defined. Patch contributed by David Bildstr�m (ChronoZ).
|
748 |
+
Fixed bug where editors wasn't converted in application/xhtml+xml mode due to an issue with Sizzle.
|
749 |
+
Fixed bug where alignment would fail if multiple lines where selected.
|
750 |
+
Updated Sizzle engine to the latest version, this version fixes a few bugs that was reported.
|
751 |
+
Version 3.2.2 (2009-03-05)
|
752 |
+
Added new CSS selector engine. Sizzle the same one that jQuery and other libraries are using.
|
753 |
+
Added new is and getParents methods to the DOMUtils class. These use the new Sizzle engine to select elements.
|
754 |
+
Added new removeformat_selector option, enables you to specify a CSS selector pattern of elements to remove when using removeformat.
|
755 |
+
Fixed so the getParent method can take CSS expressions when selecting it's parents.
|
756 |
+
Added new ant based build process, includes a new javabased preprocessor and a yuicompressor ant task.
|
757 |
+
Moved the tab_focus logic into a plugin called tabfocus, so the old tab_focus option has been removed from the core.
|
758 |
+
Replaced the TinyMCE custom unit testing framework with Qunit and rewrote all tests to match the new logic.
|
759 |
+
Moved the examples/testcases to a root directory called tests since it now includes slickspeed.
|
760 |
+
Fixed bug where nbsp wasn't replaced correctly in ForceBlocks.js. Patch contributed by thorn.
|
761 |
+
Fixed bug where an dom exception would be thrown in Gecko when the theme_advanced_path path was set to false under xml application mode.
|
762 |
+
Fixed bug where it was impossible to get out of a link at the end of a block element in Gecko.
|
763 |
+
Fixed bug where the latest WebKit nightly would fail when changing font size and font family.
|
764 |
+
Fixed bug where the latest WebKit nightly would fail when opening dialogs due to changes to the arguments object.
|
765 |
+
Fixed bug where paragraphs wasn't added to elements positioned absolute using classes.
|
766 |
+
Fixed bug where font size values with dot's like 1.4em would produce a class instead of the style value.
|
767 |
+
Fixed bug where IE 8 would return an incorrect position for elements.
|
768 |
+
Fixed bug where IE 8 would render colorpicker/filepicker icons incorrectly.
|
769 |
+
Fixed bug where trailing slashes for directories in URLs would be removed.
|
770 |
+
Fixed bug where autostart and other boolean values in the media dialog wouldn't be stored/parsed correctly.
|
771 |
+
Fixed bug where the repaint call for the media plugin wouldn't be executed due to a typo in the source.
|
772 |
+
Fixed bug where id attribute of object elements wasn't kept intact by the media plugin.
|
773 |
+
Fixed bug where preview of embeded elements when the media_use_script option was used would fail.
|
774 |
+
Fixed bug where inlinepopups could be rendered at an incorrect location on IE 6 while dragging.
|
775 |
+
Fixed bug where the blocker shim could be placed at an incorrect location on IE 6.
|
776 |
+
Fixed bug where the multiple and size attributes of select elements would produce incorrect values while running in IE.
|
777 |
+
Fixed bug where IE would loose the caret position is you selected a color from the color drop down.
|
778 |
+
Fixed bug where remove format wouldn't work on IE since it couldn't remove span elements that had style information.
|
779 |
+
Fixed bug where Opera was removing links when removing formatting from selected contents.
|
780 |
+
Fixed bug where paragraphs could be produced inside non positional elements styled with the CSS position value of static.
|
781 |
+
Fixed bug where removeformat wouldn't work if you selected part of a span in IE.
|
782 |
+
Fixed bug where media plugin didn't retain the style attribute on embed/object elements.
|
783 |
+
Fixed bug where auto focus on empty editor instances could produce strange results if you inserted an image into it.
|
784 |
+
Fixed bug where characters would be removed in FF when inserted with the mceInsertContent or selection.setContent methods.
|
785 |
+
Fixed bug where warning message of missing paste support wasn't displayed on WebKit browsers.
|
786 |
+
Fixed bug where anchor links could include other links. The selected range is now unlinked before adding news links to it.
|
787 |
+
Fixed memory leak when TinyMCE was used with prototype. Patch contributed by James Ots.
|
788 |
+
Fixed so the non documented fullpage_hide_in_source_view option for the fullpage plugin works again in the 3.x branch.
|
789 |
+
Fixed so tables doesn't get inserted into paragraphs by default since it's not W3C valid. Can be disabled by using the fix_table_elements option.
|
790 |
+
Fixed so the source view dialog sets a source_view state to the event object. Enables plugins to intercept the source view mode.
|
791 |
+
Fixed various validation issues with the html dialogs and pages.
|
792 |
+
Removed ask mode option since there is way better ways of doing this now. Use the add/remove control methods instead.
|
793 |
+
Removed logic for compatibility with Safari 2.x, this browser is no longer supported since no one is using it.
|
794 |
+
Removed the auto domain relaxing feature. If loading scripts cross sub domains it's better to specify the document.domain by hand.
|
795 |
+
Version 3.2.1.1 (2008-11-27)
|
796 |
+
Added new theme_advanced_default_background_color/theme_advanced_default_foreground_color options. Patch contributed by David Bildstr�m (ChronoZ).
|
797 |
+
Fixed font style formatting compatibility issue with Adobe Air.
|
798 |
+
Fixed so legacy font elements get converted into spans even if cleanup_on_startup isn't enabled.
|
799 |
+
Fixed bug where pre elements could be incorrectly modified by an IE bug workaround. Patch contributed by hu vime.
|
800 |
+
Fixed bug where input elements inside inlinepopups wasn't editable in Firefox 2.
|
801 |
+
Fixed bug where the xhtmlxtras plugin wasn't replacing attribute values correctly.
|
802 |
+
Fixed bug where menu buttons in skin variants would look strange due to IE 8 fixes.
|
803 |
+
Fixed bug where WebKit browsers would on backspace take you back to the previous page if the editor was empty.
|
804 |
+
Fixed bug where DOMUtils decode method wouldn't handle strings larger than 4096kb due to node chunking.
|
805 |
+
Fixed bug where meta key wasn't handled as ctrl key on Mac OS X for custom keyboard short cuts.
|
806 |
+
Fixed bug where init event would get fired twice on WebKit on Mac OS X.
|
807 |
+
Version 3.2.1 (2008-11-04)
|
808 |
+
Added support for custom icon image for drop menus. Use icon_src to set a custom image directly.
|
809 |
+
Added new media_strict option to media plugin. Enables you to control if the flash embed is strict or not. Enabled by default.
|
810 |
+
Fixed so the editors script files gets dynamically loaded without using XHR or eval.
|
811 |
+
Fixed so the media plugin outputs valid XHTML object elements for Flash movies. Can be disabled with the media_strict option.
|
812 |
+
Fixed so dynamic loading doesn't require eval calls on non IE browsers for better Air support.
|
813 |
+
Fixed bug where the editor wasn't treated as empty if the remaining paragraph had attributes.
|
814 |
+
Fixed bug where id's of elements was removed ones they got wrapped in paragraphs. Patch contributed by ChronoZ.
|
815 |
+
Fixed bug where WebKit browsers where placing list elements inside paragraph elements.
|
816 |
+
Fixed bug where inserting images or links would produce absolute urls on WebKit browsers.
|
817 |
+
Fixed bug where values for checked, readonly, disabled and selected attributes was incorrect on IE.
|
818 |
+
Fixed bug where positive values for checked, readonly, disabled and selected attributes wasn't forced to valid values.
|
819 |
+
Fixed bug where selecting the first option in a native select box would produce an undefined error.
|
820 |
+
Fixed bug where tabindex 32768 could be outputted on IE if element attributes where cloned.
|
821 |
+
Fixed bug where the media dialogs preview window would display incorrect contents due to duplicate clsid prefixes.
|
822 |
+
Fixed bug where non pixel or percent heights for textarea elements would produce errors on IE.
|
823 |
+
Fixed bug where cdata sections in script elements wasn't handled correctly.
|
824 |
+
Fixed bug where nowrap of table cells would produce a 65535 value output.
|
825 |
+
Fixed bug where media plugin would produce an error if you selected the first item in the items list.
|
826 |
+
Fixed bug where media plugin would modify links with the item _value in them.
|
827 |
+
Fixed so table width/height is better forced if inline_styles is enabled. Patch contributed by daKmoR.
|
828 |
+
Fixed css for IE 8 such as opacity and other rendering quirks.
|
829 |
+
Version 3.2.0.2 (2008-10-02)
|
830 |
+
Fixed bug where the SelectBox and NativeSelectBox wasn't updated correctly if undefined was passed to them.
|
831 |
+
Fixed bug where the style dropdown wasn't correctly changed back to it's original state when element had no class.
|
832 |
+
Fixed bug where multiple pending font styles wasn't handled correctly.
|
833 |
+
Fixed so you can disable all auto css loading for dialogs by setting the popups_css option to false.
|
834 |
+
Version 3.2.0.1 (2008-09-17)
|
835 |
+
Fixed bug where font sizes and faces wouldn't be changed correctly when there was a parent with a different style.
|
836 |
+
Fixed bug where adding fonts to the same selection would produce redundant spans.
|
837 |
+
Version 3.2 (2008-09-11)
|
838 |
+
Added new text style support, it will now use span elements internally instead of font elements.
|
839 |
+
Added new improved support for the theme_advanced_font_sizes option, check the Wiki for details.
|
840 |
+
Added new keep_style setting that maintains the text style on return/enter on non IE browsers, enabled by default.
|
841 |
+
Added new onBeforeSetContent/onBeforeGetContent/onSetContent/onGetContent events to the Selection class.
|
842 |
+
Added new selectByIndex method to ListBox class. This enables you to select list items by an index instead of a value.
|
843 |
+
Added new possibility to the select method of the ListBox class. This can now have a selector function as it's value argument.
|
844 |
+
Added new possibility to skip the loading of popups css by setting the feature popup_css to the value false.
|
845 |
+
Added new possibility to skip translation of popups by setting the translate_i18n feature to false.
|
846 |
+
Added new element_format option enables you to produce HTML element endings instead of XHTML. But we are still in the XHTML is better camp.
|
847 |
+
Added missing allowfullscreen and quality options for flash elements, this will now get correctly stored.
|
848 |
+
Fixed bug where table cell dialog didn't close properly unless the accessibility_warnings option was set to false.
|
849 |
+
Fixed bug where the modal dialog blocker element for inlinepopups wasn't placed at a correct location if the page had scroll.
|
850 |
+
Fixed bug where non inline dialogs didn't close correctly if the inlinepopups plugin was used.
|
851 |
+
Fixed bug where non inline dialogs could make the modal dialog blocker to work incorrectly.
|
852 |
+
Fixed bug where style select wasn't populated correctly if you pressed the arrow. Patch by Hari Karam Singh.
|
853 |
+
Fixed bug where toggling the fullscreen mode didn't restore scrollbars on IE when the editor was inside a frame. Patch by Jacob Barrett.
|
854 |
+
Fixed bug where inserting flash contents using the template plugin didn't work correctly.
|
855 |
+
Fixed bug where inserting flash contents using the selection.setContent or mceInsertContent command didn't work correctly.
|
856 |
+
Fixed bug where IE would produce an exception if a comment started with -.
|
857 |
+
Fixed bug where the blockquote button would wrap lists incorrectly on non IE browsers.
|
858 |
+
Fixed bug where Opera would display BR elements in the element path.
|
859 |
+
Fixed bug where xhtmlxtras didn't insert elements correctly on IE.
|
860 |
+
Fixed bug where the buttons wasn't activated correctly in the xhtmlxtras plugin.
|
861 |
+
Fixed bug where adding an object as the style attribute for the dom setAttribs method wouldn't work.
|
862 |
+
Fixed bug where the background color would bleed out to parent container element in Gecko.
|
863 |
+
Fixed bug where the insert column actions for tables would fail if you did it in a thead or tfoot. Patch contributed by T Andersen (tan73).
|
864 |
+
Fixed bug where event blocker element wasn't positioned correctly for the inlinepopups plugin.
|
865 |
+
Fixed bug where pasting from Office 2007 would produce an odd comment in the contents.
|
866 |
+
Fixed bug where the paste as plain text could remove an extra character. Patch contributed by Speednet.
|
867 |
+
Fixed bug where some characters where missing for the paste_replace_list option. Patch contributed by Speednet.
|
868 |
+
Fixed bug where removing non existing editor instances by the mceRemoveControl command would produce an error.
|
869 |
+
Fixed bug where meta elements with the name description would produce errors in IE.
|
870 |
+
Fixed bug where color and background colors wouldn't be updated properly.
|
871 |
+
Fixed bug where the createMenuButton of tinymce.ControlManager didn't implement the last class argument.
|
872 |
+
Fixed bug where the editor_css option was relative from the TinyMCE installation directory not the current page.
|
873 |
+
Fixed bug where elements wouldn't be padded if the element contained bogus br elements. For example TD elements.
|
874 |
+
Fixed bug where parsing of <body > in fullpage plugin would produce an error.
|
875 |
+
Fixed bug where relative urls with just ./ would become an empty string.
|
876 |
+
Fixed bug where outdent button would be disabled if inline_styles where set to false.
|
877 |
+
Fixed bug where replace with an empty search string would produce an error on IE.
|
878 |
+
Fixed bug where restoring the overflow state of the body in fullscreen plugin running on IE would produce vertical scrollbars.
|
879 |
+
Fixed bug where pressing return/enter in list items would sometimes move the caret the to top of the content area in FF.
|
880 |
+
Fixed bug where the style listbox wouldn't be updated correctly if you used the use_native_selects option.
|
881 |
+
Fixed bug where WebKit browsers would produce a div element when ending list elements using return.
|
882 |
+
Fixed so translation of popup contents only occurs if it's needed.
|
883 |
+
Optimized the URI object in regards or converting absolute URIs to relative URIs.
|
884 |
+
Version 3.1.1 (2008-08-18)
|
885 |
+
Added new getSize method to DOMUtils it will return the dimensions only of an element.
|
886 |
+
Added new alert/confirm methods to the tinyMCEPopup class to prevent focus problems and also to shorten method calls.
|
887 |
+
Added new plugin_preview_inline option to preview plugin to enable/disable native/inline dialogs.
|
888 |
+
Added new readonly option. If this is set the editor will only display the contents for the user.
|
889 |
+
Added missing tabindex and accesskey to input elements in the default valid_elements setup.
|
890 |
+
Updated firebug lite to 1.2, to enable it use the tiny_mce_dev.js?debug=1 on the development package.
|
891 |
+
Fixed so the preview dialog in the preview plugin uses inline dialogs/popups.
|
892 |
+
Fixed so CDATA sections remains intact through the serialization process of the DOM tree.
|
893 |
+
Fixed various issues with the getAttrib command. It will now return more correct values.
|
894 |
+
Fixed bug where the embed element wasn't properly parsed in the media plugin it now supports 3 formats.
|
895 |
+
Fixed bug where the noshade attribute was serialized incorrectly on IE.
|
896 |
+
Fixed bug where editing an existing link element didn't force it relative.
|
897 |
+
Fixed bug where image link creation fails on Safari if the image is aligned.
|
898 |
+
Fixed bug where it was possible to scroll the fullscreen mode in Opera 9.50.
|
899 |
+
Fixed bug where removal of center image alignment would fail. Patch contributed by Andrew Ozz.
|
900 |
+
Fixed bug where inlinedialogs didn't work properly if the doctype was incorrect in IE.
|
901 |
+
Fixed bug where cross domain loading didn't work correctly in Opera 9.50.
|
902 |
+
Fixed bug where breaking huge text blocks with return/enter key would scroll to end of block.
|
903 |
+
Fixed bug where replace button kept inserting the replacement text even if there is no more matches.
|
904 |
+
Fixed bug with fullpage plugin where value wasn't set correctly. Patch contributed by Pascal Chantelois.
|
905 |
+
Fixed bug where the dom utils setAttrib method call could produce an exception if the input was null/false.
|
906 |
+
Fixed bug where pressing backspace would sometimes remove one extra character in Gecko browsers.
|
907 |
+
Fixed bug where the native confirm/alert boxes would move focus to parent document if fired in dialogs.
|
908 |
+
Fixed bug where Opera 9.50 was telling you that the selection is collapsed even when it isn't.
|
909 |
+
Fixed bug where mceInsertContent would break up existing elements in Opera and Gecko.
|
910 |
+
Fixed bug where TinyMCE fails to detect some keyboard combos on Mac, contributed by MattyRob.
|
911 |
+
Fixed bug where replace all didn't move the caret to beginning of text before searching.
|
912 |
+
Fixed bug where the oninit callback wasn't executed correctly when the strict_loading_mode option was used, thanks goes to Nicholas Oxhoej.
|
913 |
+
Fixed bug where a access denied exception was thrown if some other script specified document.domain before loading TinyMCE.
|
914 |
+
Fixed so setting language to empty string will skip language loading if translations are made by some backend.
|
915 |
+
Fixed so dialog_type is automatically modal if you use the inlinepopups plugin use dialog_type : "window" to re-enable the old behavior.
|
916 |
+
Version 3.1.0.1 (2008-06-18)
|
917 |
+
Fixed bug where the Opera line break fix didn't work correctly on Mac OS X and Unix.
|
918 |
+
Fixed bug where IE was producing the default value the maxlength attribute of input elements.
|
919 |
+
Version 3.1.0 (2008-06-17)
|
920 |
+
Fixed bug where the paste as text didn't work correctly it encoded produced paragraphs and br elements.
|
921 |
+
Fixed bug where embed element in XHTML style didn't work correctly in the media plugin.
|
922 |
+
Fixed bug where style elements was forced empty in IE. The will now be wrapped in a comment just like script elements.
|
923 |
+
Fixed bug where some script elements wrapped in CDATA could fail to be serialized correctly.
|
924 |
+
Fixed bug where FF 3 produced -moz- internal styles in some style attributes.
|
925 |
+
Fixed bug where query strings and external URLs didn't work correctly in style attributes.
|
926 |
+
Fixed bug where shape attribute of area elements got serialized as rect regardless of it's initial value in IE 6.
|
927 |
+
Fixed bug where selection of elements inside layers would fail in IE since focus was moved to the document body.
|
928 |
+
Fixed bug where pressing enter/return in an editable select box would produce an __mce_add_custom__ class value.
|
929 |
+
Fixed bug where changing font size of text placed inside a colored text chunk would remove the parent node.
|
930 |
+
Fixed bug where Opera 9.5 final produced a strange line break behavior due to a workaround for previous Opera versions.
|
931 |
+
Fixed bug where text/background color would produce a strange focus problem when you tried to click on the body in IE.
|
932 |
+
Fixed issue where selecting the title of an listbox equals the old 2.x behavior of changing the value to an empty string.
|
933 |
+
Fixed issue where it was common for the media plugin to break if the _value attribute wasn't added for the param element.
|
934 |
+
Fixed issue where the wrong parent editor instance might be updated if you use fullscreen mode in an incorrect way.
|
935 |
+
Fixed issue where Safari was producing a warning about the base element not being closed correctly.
|
936 |
+
Removed redundant form element name matching from regexp in the DOMUtils class.
|
937 |
+
Version 3.0.9 (2008-06-02)
|
938 |
+
Added new contextmenu_offset_x/contextmenu_offset_y options for the contextmenu plugin.
|
939 |
+
Added cite attribute to the default rule for the blockquote element.
|
940 |
+
Added support for using arrow keys for selection of items in listboxes.
|
941 |
+
Added support for using arrow keys for selection of items in dropmenus.
|
942 |
+
Fixed bug where blockformat change on elements with BR inside them didn't change correctly on Firefox.
|
943 |
+
Fixed bug where removing table rows inside thead or tfoot would remove the whole table if it was the last one.
|
944 |
+
Fixed bug where XHR synchronous mode didn't execute the callback handlers synchronously.
|
945 |
+
Fixed bug where setting border to 0 didn't add border: 0 to the style attribute when using the advimage dialog.
|
946 |
+
Fixed bug where the selection of images and table cells didn't work correctly when the editor is placed in a frame and running on IE.
|
947 |
+
Fixed bug where the store/restore of a selection didn't work correctly in non IE browsers.
|
948 |
+
Fixed bug where only the first element would be invalid for the invalid_elements option.
|
949 |
+
Fixed bug where paste as plain text didn't encode the characters correctly when they where inserted.
|
950 |
+
Fixed bug where HTML source window couldn't be maximized on Gecko when the maximizable feature was enabled.
|
951 |
+
Fixed bug where color selection using the color picker could produce exception in IE.
|
952 |
+
Fixed bug where font size changes could produce produce extra redundant elements.
|
953 |
+
Fixed bug where IE could produce unknown runtime error if you replaced a image with another image from a separate frame.
|
954 |
+
Fixed bug where the domLoaded state for the Event class wasn't set correctly if the editor was loaded dynamically using the gzip compressor.
|
955 |
+
Fixed bug where handling of the base element for a page would produce incorrect urls. Based on a patch contributed by John LeSueur.
|
956 |
+
Fixed bug where table constraint alert boxes was presented with an empty value and wasn't the skinned inline ones.
|
957 |
+
Fixed bug where the onChange event wasn't fired when the form was submitted. It's now also triggered when the save method is called.
|
958 |
+
Fixed bug where encoding set to xml didn't work as expected. It now encodes the contents into XML entities.
|
959 |
+
Fixed bug where numrows didn't work correctly for the merge cells dialog of the table plugin.
|
960 |
+
Fixed bug where the onGetContent event was fired even when the no_events flag was set.
|
961 |
+
Fixed bug where the preview panels for the advimage and the media plugin could overflow on Safari and FF 3.
|
962 |
+
Fixed bug where the editing and removal of abbr elements using the xhtmlxtras plugin working correctly on IE.
|
963 |
+
Fixed bug where save button in the save plugin didn't work correctly on IE.
|
964 |
+
Fixed bug where dragging layers didn't work as expected since it would snap back to it's original location if you saved.
|
965 |
+
Fixed bug where the description of the template plugin dialog wasn't updated correctly.
|
966 |
+
Fixed bug where the values for frame and rules in the table dialogs where swapped.
|
967 |
+
Fixed bug where the elements like ins, del, cite, acronym and abbr didn't have the default editing style as the old 2.x branch.
|
968 |
+
Fixed bug where ask mode would lock the focused textarea if you pressed cancel in the confirm dialog on FF 3.
|
969 |
+
Fixed bug where ask mode would produce contents for empty textareas if you reloaded the page.
|
970 |
+
Fixed so the onGetContent event gets the full pass through object just like the other events.
|
971 |
+
Fixed so attributes for block elements remains the same when you change format of a element.
|
972 |
+
Version 3.0.8 (2008-04-30)
|
973 |
+
Fixed bug where IE would produce an error if textareas without names where converted.
|
974 |
+
Fixed bug where editor wasn't forced empty when there was only a single br or empty paragraph left.
|
975 |
+
Fixed bug where IE would produce an warning message if object elements where produced in the media plugins preview running on https.
|
976 |
+
Fixed bug where new addVer function didn't handle hash items correctly. Patch contributed by Mirek Burkon.
|
977 |
+
Fixed bug where font_size_style_values option wasn't applied correctly to fonts inside the editor.
|
978 |
+
Fixed bug where image selection could be lost if a image was edited using context menu on IE.
|
979 |
+
Fixed bug where style values wasn't updated properly due to an invalid regexp.
|
980 |
+
Fixed bug where IE 6 where displaying warning message about insecure items when inserting an image while using https. Patch contributed by Norifumi Sunaoka.
|
981 |
+
Fixed bug where IE was producing an auto save message if you selected a color from the color split button.
|
982 |
+
Fixed bug where backspace sometimes would move the caret to the end of the previous block in Gecko.
|
983 |
+
Fixed bug where the rowlayout manager didn't work as described in the documentation.
|
984 |
+
Fixed bug where the default options for the fullpage plugin wasn't applied correctly.
|
985 |
+
Fixed bug where selection would jump one character if you applied a styles to a words in non IE browsers.
|
986 |
+
Fixed bug where undo levels wasn't added correctly if you went back in undo history and added a new event.
|
987 |
+
Fixed bug where font size dropdown didn't mark the selected size in IE.
|
988 |
+
Fixed bug where the size of the editor was determined using clientWidth instead of offsetWidth.
|
989 |
+
Fixed so the onchange event doesn't fire on the initial undo level, it will also fire when the editor is blurred.
|
990 |
+
Fixed so the advhr plugin produces XHTML valid output instead of non standard attributes.
|
991 |
+
Fixed so blockquote gets converted into [quote] in when the bbcode plugin is enabled.
|
992 |
+
Fixed so theme_advanced_font_sizes can be named for example Font 1=1, Font 2=2 etc.
|
993 |
+
Fixed so editor_selector/editor_deselector can be regexps. By default only strings are allowed not part regexps like before.
|
994 |
+
Fixed so that the version suffix is optional. It still requires the build process so you need to export it manually.
|
995 |
+
Fixed so it's possible to tab to table cells in non Gecko browsers and also produce new rows if you tab at the end of a table. Contributed by Josh Peek.
|
996 |
+
Version 3.0.7 (2008-04-14)
|
997 |
+
Added new version suffix to all internal GET requests to make sure that the users cache gets cleared correctly.
|
998 |
+
Fixed issue with isDirty returning true event if it wasn't dirty on IE due to changes in tables during initialization.
|
999 |
+
Fixed memory leak in IE where if a page was unloaded before all images on the page was loaded it would leak.
|
1000 |
+
Fixed bug in IE where underline and strikethrough could produce an exception error message.
|
1001 |
+
Fixed bug where inserting paragraphs in totally empty table cells would produce odd effects.
|
1002 |
+
Fixed bug where layer style data wasn't updated correctly due to some performance enhancements with the DOM serializer.
|
1003 |
+
Fixed bug where it would convert the wrong element if there was two elements with the same name and id on the page.
|
1004 |
+
Fixed bug where it was possible to add style information to the body element using the style plugin.
|
1005 |
+
Fixed bug where Gecko would add an extra undo level some times due to the blur event.
|
1006 |
+
Fixed bug where the underline icon would get active if the caret was inside a link element.
|
1007 |
+
Fixed bug where merging th cells not working correctly. Patch contributed by Andr� R.
|
1008 |
+
Fixed bug where forecolorpicker and backcolorpicker buttons where rendered incorrectly when the o2k7 skin was used.
|
1009 |
+
Fixed bug where comment couldn't contain -- since it's invalid markup. It will now at least not break on those invalid comments.
|
1010 |
+
Fixed bug where apos wasn't handled correctly in IE. It will now convert apos to ' on IE since that browser doesn't support that entity.
|
1011 |
+
Fixed bug where entities wasn't encoded correctly inside pre elements since they where protected from whitespace removal.
|
1012 |
+
Fixed bug where color split buttons where rendered incorrectly on IE6 when using the non default theme.
|
1013 |
+
Fixed so caret is placed after links ones they are created, to improve usability of the editor.
|
1014 |
+
Fixed so you can select tables by clicking on it's borders in non IE browsers to normalize the behavior.
|
1015 |
+
Fixed so the menus can be toggled by clicking once more on the icon in listboxes, menubuttons and splitbuttons based on code contributed by Josh Peek.
|
1016 |
+
Fixed so buttons can be labeled, currently only works with the default skin, so it's kind of experimental. Patch contributed by Daniel Insley.
|
1017 |
+
Fixed so forecolorpicker and backcolorpicker remembers the last selected color. Patch contributed by Shane Tomlinson.
|
1018 |
+
Fixed so that you can only execute the mceAddEditor command once for the same instance name.
|
1019 |
+
Fixed so command functions added with addCommand can pass though the call to default handles if it returns true.
|
1020 |
+
Version 3.0.6.2 (2008-04-07)
|
1021 |
+
Fixed bug where empty tables couldn't be edited correctly on non IE browsers if they where loaded into the editor.
|
1022 |
+
Fixed bug where it was impossible to resize layers correctly in IE since it thought it was an image.
|
1023 |
+
Fixed bug where an editor instance was stealing focus in IE resulting in a scroll to the editor on page reloads.
|
1024 |
+
Fixed bug where Safari was crashing on Mac OS X if you closed dialogs using the Esc key.
|
1025 |
+
Version 3.0.6.1 (2008-04-04)
|
1026 |
+
Added support for the missing mceAddFrameControl command. The input for this command has changed so consult the Wiki.
|
1027 |
+
Fixed bug where sub menus for the drop menus would leave an empty element behind.
|
1028 |
+
Fixed memory leak in IE if the editor was placed in a frame or iframe.
|
1029 |
+
Version 3.0.6 (2008-04-03)
|
1030 |
+
Added elements to the default value of valid_elements option. It now contains all XHTML strict elements and a few transitional.
|
1031 |
+
Added more accessibility fixes, it's now possible to navigate and close list boxes and split button menus with the keyboard.
|
1032 |
+
Added missing getInfo method to the contextmenu and safari plugin, this caused problems for the Drupal module.
|
1033 |
+
Added new inlinepopups_zindex option to the inlinepopups plugin so that you can configure the default start z-index.
|
1034 |
+
Added new setControlType method to the tinymce.ControlManager class. This method enables you to override the default classes.
|
1035 |
+
Added ability to specific an optional control class to use instead of the default one for the ControlManager methods. Based on concept by Josh Peek.
|
1036 |
+
Fixed bug where attribute rules for the DOM Serializer couldn't contain - or _ characters in their names.
|
1037 |
+
Fixed bug where inlinepopups event blocker and modal dialog blocker elements produced vertical scrollbars.
|
1038 |
+
Fixed bug where there was a rendering issue with quirks mode in Safari moving the resize handle to an incorrect position.
|
1039 |
+
Fixed bug with forecolor/backcolor controls on IE. Sometimes elements positioned relative will generate display errors.
|
1040 |
+
Fixed bug where a p2 was leaking out in the global name space when you selected a color from the forecolor/backcolor controls.
|
1041 |
+
Fixed bug where empty paragraphs didn't work as expected in browsers other than IE.
|
1042 |
+
Fixed bug where the load method of the tinymce.dom.ScriptLoader didn't check if the file was already loaded.
|
1043 |
+
Fixed bug where the load method for the PluginManager and ThemeManager didn't check if a plugin/theme by a specific name was all ready loaded.
|
1044 |
+
Fixed bug where the theme_advanced_link_targets option didn't work correctly with the advanced themes link dialog. Patch contributed by Arnold B.
|
1045 |
+
Fixed bug where the style command would merge classes into empty span elements.
|
1046 |
+
Fixed bug where the style command would remove empty span elements outside the current selection.
|
1047 |
+
Fixed bug where the fix for the Safari backspace bug removed all editor contents if it was filled with empty paragraphs.
|
1048 |
+
Fixed bug where alert and confirm boxes opened by the inlinepopups plugin would produce an exception if domain relaxing was used.
|
1049 |
+
Fixed bug where Safari was adding style attributes to all elements when you paste them into the editor.
|
1050 |
+
Fixed bug where the spellchecker menus was visually incorrect since the space for the non existing icon was still there.
|
1051 |
+
Fixed bug where remove_linebreaks option didn't remove line breaks inside the text contents of a element.
|
1052 |
+
Fixed bug where Safari 3.1 was introducing _mc_tmp into paragraphs due to the new querySelectorAll and a TinyMCE specific workaround.
|
1053 |
+
Fixed bug where getParam method in the Editor class was returning incorrect objects and would mess up the font drop down. Patch contributed by speednet.
|
1054 |
+
Fixed bug where the table dialog would produce an exception in IE when you edited tables since it tried to place focus in a disabled field.
|
1055 |
+
Fixed bug where class attribute on some span elements was removed on cleanup.
|
1056 |
+
Fixed bug where resizing the editor in IE could produce an exception if the editor width/height got to be a negative value.
|
1057 |
+
Fixed bug where wmv files wouldn't play since the src param was used instead of the url param.
|
1058 |
+
Fixed bug where br elements would be added here and there in Gecko. Geckos internal _moz_dirty br elements where serialized as well.
|
1059 |
+
Fixed bug where editing named anchors would produce two anchors instead of one updated one.
|
1060 |
+
Fixed bug where arrow and function keys didn't work when an noneditable element was focused within the editor.
|
1061 |
+
Fixed bug where the dispatcher could produce an exception if the listener list was altered inside an event callback.
|
1062 |
+
Fixed bug where it was impossible to totally empty the editor contents on Safari due to an mistreatment of nbsp as whitespace. Patch contributed by Andrew Ozz.
|
1063 |
+
Fixed bug where TinyMCE would not convert textareas with the same name attribute value. It will now generate an unique id for those textareas.
|
1064 |
+
Fixed bug where backspace/delete key was deleting td elements inside tables while running on Gecko.
|
1065 |
+
Fixed bug where Firefox 3.0b4 and Opera 9.26 where scrolling to the top of document when pressing return/enter.
|
1066 |
+
Fixed bug where the template plugin wasn't just inserting the mceTmpl tagged element.
|
1067 |
+
Fixed bug where the alert method of the default WindowManager implementation didn't translate input language strings like the inlinepopups dialog does.
|
1068 |
+
Fixed bugs with the backspace behavior in Gecko. The caret was placed on incorrect locations in the DOM sometimes.
|
1069 |
+
Fixed so advimage dialog and table dialogs has support for editable select boxes for the class value.
|
1070 |
+
Fixed so the media, pagebreak and spellchecker doesn't load it's default content.css file if the content_css option is set to false.
|
1071 |
+
Fixed so the paste_use_dialog option works again it's enabled by default but can be disabled on IE. Patch contributed by Speednet.
|
1072 |
+
Fixed so that the fullscreen editor is focused when switching fullscreen editing on.
|
1073 |
+
Fixed so it's possible to edit images and links inside tables using the context menu.
|
1074 |
+
Fixed so table dialogs and the advanced image dialog doesn't loose selection in IE if the dialogs where navigated/submitted with the keyboard.
|
1075 |
+
Fixed so the theme_advanced_blockformats options can have named items for example title 1=h1;title 2=h2.
|
1076 |
+
Fixed so it's possible to add a custom editor_css for the simple theme.
|
1077 |
+
Fixed quirks with directionality rtl, patch contributed by Andrew Ozz.
|
1078 |
+
Fixed so the inlinepopups default start zIndex is 300000.
|
1079 |
+
Fixed typo in media plugin Shockware is now replaced with Shockwave.
|
1080 |
+
Fixed psuedo memory leak in IE with the replaceChild method inside the DOMUtils.replace method.
|
1081 |
+
Fixed so memory is released when an editor instance is removed from page.
|
1082 |
+
Optimized the color split button menus so that they use less event handlers.
|
1083 |
+
Removed the util/mclayer.js file since it's no longer used by any of the TinyMCE dialogs and is considered deprecated.
|
1084 |
+
Version 3.0.5 (2008-03-12)
|
1085 |
+
Added new black skin variant to the o2k7 skin contributed by Stefan Moonen.
|
1086 |
+
Added new explode method to the tinymce core class. This does a split but removed whitespace it also defaults to a , delimiter.
|
1087 |
+
Added new detection logic for IE 8 standards mode into the DOMUtils class strMode can now be checked to see if that mode is on/off.
|
1088 |
+
Added new noscale option value for the scale select box for Flash in the media plugin.
|
1089 |
+
Fixed bug where the menu for the ColorSplitButton wasn't removed when the editor was removed.
|
1090 |
+
Fixed bug where font colors couldn't be edited correctly since the style of the element didn't get updated correctly.
|
1091 |
+
Fixed bug where class of elements would get lost when TinyMCE was fixing incorrect HTML markup.
|
1092 |
+
Fixed bug where table editing would produce double height values.
|
1093 |
+
Fixed bug where width style value wouldn't be removed if you switched width unit from cm/em to pixels or percent.
|
1094 |
+
Fixed bug where the search/replace input box wasn't auto focused like the other dialogs.
|
1095 |
+
Fixed bug where the old mceAddControl command would use the fullscreen settings next time it created an instance.
|
1096 |
+
Fixed bug where multiple lines where added to the target cell if you merged multiple empty cells.
|
1097 |
+
Fixed bug where drop down menus would be incorrectly positioned inside scrollable divs.
|
1098 |
+
Fixed bug where the separators of the silver skin variant didn't display correctly in IE 6.
|
1099 |
+
Fixed bug where createStyleSheet seems to load scripts at opposite order in some IE versions.
|
1100 |
+
Fixed bug where directionality could produce odd results for the UI and the dialogs.
|
1101 |
+
Fixed bug where the DOM serializer wouldn't serialize custom namespaced attributes in IE 6 using the *[*] valid elements rule.
|
1102 |
+
Fixed bug where table caption would be inserted after the thead element if you swapped a tr to be inside the thead.
|
1103 |
+
Fixed bug where the youtube detection logic for the media plugin was to generic.
|
1104 |
+
Fixed so the deprecated and undocumented theme_advanced_path_location set to none won't hide the whole statusbar.
|
1105 |
+
Fixed so most input lists can have whitespace in them they are now split using the new tinymce.explode method.
|
1106 |
+
Fixed so the popup_css and popup_css_add URLs are relative to where the current document is located.
|
1107 |
+
Fixed various bugs and quirks with the store/restore selection logic.
|
1108 |
+
Fixed so the editor starts in IE 8 standards mode but still that browser is very very buggy.
|
1109 |
+
Fixed so dialog_type set to modal will block the background and other inline windows and only give access to the front most window.
|
1110 |
+
Version 3.0.4.1 (2008-03-08)
|
1111 |
+
Fixed critical bug where it was impossible to edit images when inlinepopups where used due to lost selection in IE.
|
1112 |
+
Version 3.0.4 (2008-03-07)
|
1113 |
+
Added new option constrain_menus, this enables you to force view port constraints on all menus. Contributed by Shane Tomlinson.
|
1114 |
+
Fixed bug where table background wasn't visible inside the editor due to a default CSS rule overriding the style attribute.
|
1115 |
+
Fixed bug where links would get a null class added if no styles was used in IE.
|
1116 |
+
Fixed bug where spellchecker was auto focusing the editor in IE.
|
1117 |
+
Fixed bug where document.domain would produce invalid argument if the editor was loaded in IE6 over a network UNC path.
|
1118 |
+
Fixed bug where table height attribute was used, this is deprecated in XHTML so it now adds it as an style.
|
1119 |
+
Fixed bug where textareas with style values would produce error in IE.
|
1120 |
+
Fixed so the first element in each dialog is focused by default to enhance keyboard usage.
|
1121 |
+
Fixed so you can add a mceFocus class to elements to make it auto focused.
|
1122 |
+
Fixed so you can close dialogs using the esc key.
|
1123 |
+
Fixed so you can press return/enter to submit the action of each dialog.
|
1124 |
+
Fixed so tabbing inside an inline popups wont focus the resize anchor elements.
|
1125 |
+
Fixed so you can press ok in inline alert messages using the return/enter key.
|
1126 |
+
Fixed so textareas can be set to non px or % sizes for example em, cm, pt etc.
|
1127 |
+
Fixed so non pixel values can be used in width/height properties for tables.
|
1128 |
+
Fixed so the custom context menu can be disabled by holding down ctrl key while clicking.
|
1129 |
+
Fixed so the layout for the o2k7 skin looks better if you don't have separators before and after list boxes.
|
1130 |
+
Fixed so the sub classes get a copy of the super class constructor function to ease up type checking.
|
1131 |
+
Fixed so font sizes for the format block previews are normalized according to http://www.w3.org/TR/CSS21/sample.html (it can be overridden).
|
1132 |
+
Fixed so font sizes for h1-h6 in the default content.css is normalized according to http://www.w3.org/TR/CSS21/sample.html (it can be overridden).
|
1133 |
+
Version 3.0.3 (2008-03-03)
|
1134 |
+
Fixed bug where an error about document.domain would be thrown if TinyMCE was loaded using a different port.
|
1135 |
+
Fixed bug where mode exact would convert textareas without id or name if the elements option was omitted.
|
1136 |
+
Fixed bug where the caret could be placed at an incorrect location when backspace was used in Gecko.
|
1137 |
+
Fixed bug where local file:// URLs where converted into absolute domain URLs.
|
1138 |
+
Fixed bug where an error was produced if a editor was removed inside an editor command.
|
1139 |
+
Fixed bug where force_p_newlines didn't effect the paste plugin correctly.
|
1140 |
+
Fixed bug where the paste plugin was producing an exception on IE if you pasted contents with middots.
|
1141 |
+
Fixed bug where delete key could produce exceptions in Gecko sometimes due to the fix for the table cell bug.
|
1142 |
+
Fixed bug where the layer plugin would produce an visual add class called mceVisualAid this one is now renamed to mceItemVisualAid to mark it internal.
|
1143 |
+
Fixed bug where TinyMCE wouldn't initialize properly if ActiveX controls was disabled in IE.
|
1144 |
+
Fixed bug where tables and other elements that had visual aids on them would produce an extra space after any custom class names.
|
1145 |
+
Fixed bug where search with an empty string would produce some odd "invalid pointer" error in IE.
|
1146 |
+
Fixed bug where elements like menus where placed at incorrect positions in Opera 9.26.
|
1147 |
+
Fixed bug where IE was loosing focus of the editor when you clicked some dropmenu and if it was placed in a frame or iframe.
|
1148 |
+
Fixed bug where focus of images could be lost in IE if you focused the accessibility confirm dialog in the advimage plugin.
|
1149 |
+
Fixed bug where nestled font elements would produce odd output like missing font elements.
|
1150 |
+
Fixed bug where text colors and styles got removed if invalid_elements included the font element.
|
1151 |
+
Fixed bug where text-decoration set to underline or line-through would remove other styles from span elements.
|
1152 |
+
Fixed bug where editor contents like \n\n would be incorrectly handled and processed as real line feeds.
|
1153 |
+
Fixed bug where incorrectly encoded urls with ampersands in them would be decoded incorrectly.
|
1154 |
+
Optimized the DOMUtils decode method to be a lot faster if the string doesn't have any entities to decode.
|
1155 |
+
Version 3.0.2.1 (2008-02-26)
|
1156 |
+
Fixed alert/confirm dialogs so they display correctly.
|
1157 |
+
Version 3.0.2 (2008-02-26)
|
1158 |
+
Added new body_id option that enables you to specify the id of the body inside the editor iframe based on ideas by David Bildstr�m (ChronoZ).
|
1159 |
+
Added new body_class option that enables you to set the class for the body of the editor iframe based on ideas by David Bildstr�m (ChronoZ).
|
1160 |
+
Added new CSS class to the default content.css files mceForceColors that forces white background and black text can be used with the body_class option.
|
1161 |
+
Added new type parameter to the Editor.getParam function to reduce redundant logic for parsing hash tables.
|
1162 |
+
Added new isDone method to the ScriptLoaded class, this enables you to check if a script has been loaded or not.
|
1163 |
+
Added new resizeTo and resizeBy methods for the advanced theme. Can be called using tinyMCE.activeEditor.theme.resizeTo(w, h);
|
1164 |
+
Added new skin_variant option this can be used to extend existing skins with slight modifications like color.
|
1165 |
+
Added new variant of the o2k7 skin called "silver" based on a contribution made by Stefan Moonen.
|
1166 |
+
Fixed bug where the template plugin might produce errors if the template_mdate_classes wasn't configured.
|
1167 |
+
Fixed bug where the media plugin didn't convert the URLs for movies once they where inserted.
|
1168 |
+
Fixed bug where the style field for the advlink dialog didn't work correctly if you edited an existing link.
|
1169 |
+
Fixed bug where alignment of toolbars would fail in editor was uses in a quirks mode on IE, fix contributed by Peter Wood & Art Lawry.
|
1170 |
+
Fixed bug where initialization of multiple editors at the same time using the mceAddControl method would produce errors.
|
1171 |
+
Fixed bug where initialization of editors using mceAddControl command or new tinymce.Editor calls would fail during page load.
|
1172 |
+
Fixed bug where the check for domain relaxing could fail if the document.domain property was changed by another script.
|
1173 |
+
Fixed bug where textareas couldn't be named description or any other name that matches the meta elements in IE and Opera.
|
1174 |
+
Fixed bug where the element path would fail sometimes in IE due to "unknown runtime error" on innerHTML.
|
1175 |
+
Fixed bug where Safari would crash if you was hiding the editor before serializing the contents.
|
1176 |
+
Fixed bug where the editor wasn't scaled propertly in fullscreen mode using the old fullscreen_new_window option.
|
1177 |
+
Fixed bug where render method didn't load language packs in IE and Opera if you rendered an editor during page load.
|
1178 |
+
Fixed bug where resizing the browser window in fullscreen didn't resize the editor.
|
1179 |
+
Fixed bug where the blockquote command didn't move the caret inside the new empty blockquote if you used it on an empty document.
|
1180 |
+
Fixed bug where auto in a style width/height for the textarea would produce an editor with the size value of 100. Fix contributed by Shane Tomlinson.
|
1181 |
+
Fixed bug where restoration of selection at the beginning of an element could fail in Gecko.
|
1182 |
+
Fixed bug where caret restoration after a cleanup could place the it at an incorrect location.
|
1183 |
+
Fixed bug where delete key inside td elements would delete the cell in Gecko.
|
1184 |
+
Fixed so the blockquote button toggles individual lines. This behavior is a bit more like the old indentation behavior in the 2.x branch.
|
1185 |
+
Fixed so the dialog language packs only gets loaded the first time you open a dialog.
|
1186 |
+
Fixed so all classes in the whole UI is prefixed with "mce" to avoid collisions, use the skin converter to update your existing skins.
|
1187 |
+
Fixed so all classes in the inlinepopups logic is prefixed with "mce" to avoid collisions, use the skin converter to update your existing skins.
|
1188 |
+
Fixed so that the window in fullscreen mode can be resized when fullscreen_new_window option is enabled.
|
1189 |
+
Fixed so blockquote elements are formatted in the source output with an linefeed before and after it.
|
1190 |
+
Optimized the editor initialization by reducing the number of calls to getBookmark/moveToBookmark.
|
1191 |
+
Version 3.0.1 (2008-02-21)
|
1192 |
+
Added spellchecker plugin into the main package, but without any backend can be specified with the spellchecker_rpc_url option.
|
1193 |
+
Added src attribute for script elements to the default valid_elements option value.
|
1194 |
+
Added extra parameter to the class_filter callback it can now also filter out classes based on the whole CSS rule.
|
1195 |
+
Added support for domain relaxing, TinyMCE can now be loaded from an remote domain as long as they are on the same root domain.
|
1196 |
+
Added support for custom elements the new custom_elements option enables you to add non HTML elements to the editor.
|
1197 |
+
Added support for the W3C Selectors API that was added to latest nightly build of WebKit.
|
1198 |
+
Fixed bug where some object param element wasn't stored correctly using the media plugin.
|
1199 |
+
Fixed bug where Opera was scrolling to top of page is drop menus on list boxes where displayed.
|
1200 |
+
Fixed bug where IE6 was crashing if a format block was used on a container with anchor elements.
|
1201 |
+
Fixed bug where spans with font sizes wasn't handled correctly when editor was loading contents.
|
1202 |
+
Fixed bug where mode exact couldn't convert editors with name only. Id is no longer required but recommended.
|
1203 |
+
Fixed bug where the mceInsertRawHTML command produced an extra undo level.
|
1204 |
+
Fixed bug where the specific_textareas mode didn't work correctly this is the same thing as textareas now.
|
1205 |
+
Fixed bug where the values of input elements in the HTML page of dialogs pages where changed in IE.
|
1206 |
+
Fixed bug where fullscreen and fullpage plugins didn't work well together.
|
1207 |
+
Fixed bug where embed elements wasn't handled properly in the media plugin.
|
1208 |
+
Fixed bug where style information on span elements gets munged when fonts are converted to spans.
|
1209 |
+
Fixed bug where some entities in element attributes where encoded incorrectly in the latest WebKit build.
|
1210 |
+
Fixed bug where initialization would fail in IE if there where two input elements with the name submit in the form.
|
1211 |
+
Fixed bug where fullscreen mode didn't work correctly in IE when the fullscreen_new_window option was used.
|
1212 |
+
Fixed bug where invalid contents like an ul inside a p element would produce odd results in IE.
|
1213 |
+
Fixed bug where Opera 9.2x was placing the drop menus at incorrect locations if the editor was placed in a table.
|
1214 |
+
Fixed bug where Opera was producing odd results if enter/return was pressed while having forced_root_blocks disabled.
|
1215 |
+
Fixed bug where layer plugin was stealing focus in IE on initialization.
|
1216 |
+
Fixed bug where body attributes wasn't set properly in the fullpage plugin, fix contributed by Hiroaki Kawai.
|
1217 |
+
Fixed bug where insert image and insert link dialogs where producing an extra level in the undo history.
|
1218 |
+
Fixed bug where Gecko would produce an error if empty elements like <div></div> where inserted using mceInsertContent.
|
1219 |
+
Fixed bug where center alignment of images produced odd results inside table cells.
|
1220 |
+
Fixed bug where center alignment of images couldn't be toggled correctly.
|
1221 |
+
Fixed bug where alignment of images inside tables would produce double float style items in IE if the fix_table_elements option was enabled.
|
1222 |
+
Fixed bug where a variable called 'v' was polluting the global namespace. Objects tinymce and tinyMCE are the only ones allowed to be global.
|
1223 |
+
Fixed bug where insert table from context menu couldn't insert new tables inside existing tables.
|
1224 |
+
Fixed bug where Safari wouldn't produce br elements on enter when the force_br_newlines option was enabled.
|
1225 |
+
Fixed bug where switching cell type in table cell dialog would produce odd attributes in IE.
|
1226 |
+
Fixed bug where Gecko was outputting internal attributes if valid_elements where set to "*[*]".
|
1227 |
+
Fixed bug where the style plugin would produce non hex colors inside the dialog when running on Gecko.
|
1228 |
+
Fixed bug where an empty src value for insert image would remove the currently selected image if it wasn't and image element.
|
1229 |
+
Fixed bug where hidden input elements would break the logic for the tab_focus option.
|
1230 |
+
Fixed bug where save button wasn't working correctly in fullscreen mode.
|
1231 |
+
Fixed bug where the editor was forced to be placed in a form element if the save_onsavecallback option was used.
|
1232 |
+
Fixed bug where upper case param attributes wasn't parsed correctly in the media plugin.
|
1233 |
+
Fixed bug where render method of tinymce.Editor class would produce an exception if the strict_loading_mode option was omitted.
|
1234 |
+
Fixed bug where nodeChanged event could be fired while the editor was loading and there for produce an exception in FF.
|
1235 |
+
Fixed bug where no undo levels where added if the user created new table rows using the tab key on Gecko.
|
1236 |
+
Fixed bug where tables would be broken if you selected a different block format for contents withing an table cell.
|
1237 |
+
Fixed bug where the render method of the tinymce.Editor class didn't setup the tinymce.EditorManager.settings object correctly.
|
1238 |
+
Fixed bug where the advanced image dialog would go to the first tab if the alternative image was changed using the file browser link.
|
1239 |
+
Fixed bug where the forced_root_block option would produce BR elements inside empty blocks if the block wasn't a paragraph.
|
1240 |
+
Fixed bug where the forced_root_block doesn't work correctly on IE if the specified element was something else than paragraphs.
|
1241 |
+
Fixed bug where selection of images would get lost if user selected something from the context menu in IE.
|
1242 |
+
Fixed bug where the context menu plugin would pollute the global namespace with two variables p1 and p2.
|
1243 |
+
Fixed compatibility issue with Mootools, it is destroying document.getElementById on unload in IE. (Mantra: You don't own the internal objects).
|
1244 |
+
Fixed bugs where dialogs/tabs and other UI elements where rendered incorrectly in Firefox 3.
|
1245 |
+
Fixed so the auto CSS class importer is compatible with 2.x.
|
1246 |
+
Fixed so the editor UI and inlinedialogs works correctly with the YUI CSS reset package.
|
1247 |
+
Fixed so header and footer elements are forced to lower case when the fullpage plugin is used.
|
1248 |
+
Fixed so load prefixes "-" for plugins and themes isn't required if the plugin/theme was loaded by the ThemeManager/PluginManager.
|
1249 |
+
Fixed so the JSONRequest uses application/json content type to make Ruby on rails happy.
|
1250 |
+
Fixed so the CSS rule is more exact for the body in the default content.css files. Body is now defined as "body.mceContentBody" instead of just "body".
|
1251 |
+
Fixed so the tiny_mce_dev.js uses XHR instead of document.write to load scripts to resolve an issue with Opera 9.50.
|
1252 |
+
Fixed so language pack loading can be disabled by setting the language option to false. Can be useful for systems with their own language pack management.
|
1253 |
+
Version 3.0 (2008-01-30)
|
1254 |
+
Added map and area elements to the default valid_elements list and also some indentation rules.
|
1255 |
+
Fixed bug where empty paragraphs wasn't padded when loading contents.
|
1256 |
+
Fixed bug where the RowLayout manager didn't work at all.
|
1257 |
+
Fixed bug where style attribute data would get messed up in advimage dialog.
|
1258 |
+
Fixed bug where the table dialogs class select wasn't updated correctly.
|
1259 |
+
Fixed bug where elements would get extra whitespace around on insert when body was present in valid_elements.
|
1260 |
+
Fixed bug where coords attribute of the area element wasn't handled properly in IE.
|
1261 |
+
Fixed bug where Safari didn't produce BR elements on shift+return.
|
1262 |
+
Fixed bug where force blocks would cast odd invalid attribute exception in IE.
|
1263 |
+
Fixed bug where media plugin would produce extra whitespace before and after objects.
|
1264 |
+
Fixed bug where cleanup_callback could break the contents of the editor. But use the new event system instead of this option.
|
1265 |
+
Fixed bug where the tab_focus option didn't work between editor instanced. You can now tab between editors.
|
1266 |
+
Fixed bug where the load function of the ScriptLoader class didn't load single files without the load que as it was supposed to.
|
1267 |
+
Fixed bug where the execcommand_callback parameter order was incorrect. Recommendation use the new addCommand method.
|
1268 |
+
Fixed bug where range.select calls sometimes failed on some IE versions.
|
1269 |
+
Fixed bug where Safari was scrolling to top of document when enter/returned was pressed.
|
1270 |
+
Fixed bug where fullscreen_new_window option didn't work correctly.
|
1271 |
+
Fixed bug where the nonbreaking plugin inserted an space instead of an non breaking space the first time.
|
1272 |
+
Fixed bug where the visualization of non breaking spaces where visual in element path.
|
1273 |
+
Fixed so the focus is restored to the editor after inserting an custom character.
|
1274 |
+
Fixed so the isNotDirty state is set to false if a new undo level is added.
|
1275 |
+
Fixed so pointless style information for borders gets removed in IE.
|
1276 |
+
Fixed so the resize button has a se-resize cursor css value.
|
1277 |
+
Version 3.0rc2 (2008-01-18)
|
1278 |
+
Added new fix_nesting option to fix bug #1867292, this is disabled by default.
|
1279 |
+
Added new indentation option enables you to specify how much each indent/outdent call will add/remove.
|
1280 |
+
Added easier support for enabling/disabling icon columns on drop menues.
|
1281 |
+
Added new menu button control class. This control is very similar to the splitbutton but without any onclick action.
|
1282 |
+
Added support for previous tab focus (shift+tab). The tab_focus setting now takes two items next and previous element.
|
1283 |
+
Fixed bug where iframes inside the editor got removed in Firefox on initial load.
|
1284 |
+
Fixed bug where the CSS for abbr elements wasn't applied correctly in IE.
|
1285 |
+
Fixed bug where mceAddControl on element inside a hidden container produced errors.
|
1286 |
+
Fixed bug where closed anchors like <a /> produced strange results.
|
1287 |
+
Fixed bug where caret would jump to the top of the editor if enter was pressed a the end of a list.
|
1288 |
+
Fixed bug where remove editor failed if the editor wasn't properly initialized.
|
1289 |
+
Fixed bug where render call on for a non existing element produced exception.
|
1290 |
+
Fixed bug where parent window was hidden when the color picker was used in a non inlinepopups setup.
|
1291 |
+
Fixed bug where onchange event wasn't fired correctly on IE when color picker was used in dialogs.
|
1292 |
+
Fixed bug where save plugin could not save contents if the converted element wasn't an textarea.
|
1293 |
+
Fixed bug where events might be fired even after an editor instance was removed such as blur events.
|
1294 |
+
Fixed bug where an exception about undefined undo levels could be throwed sometimes.
|
1295 |
+
Fixed bug where the plugin_preview_pageurl option didn't work.
|
1296 |
+
Fixed bug where adding/removing an editor instance very fast could produce problems.
|
1297 |
+
Fixed bug where the link button was highlighted when an anchor element was selected.
|
1298 |
+
Fixed bug where the selected contents where removed if a new anchor element was added.
|
1299 |
+
Fixed bug where splitbuttons where rendered one pixel down in the default theme.
|
1300 |
+
Fixed bug where some buttons where placed at incorrect positions in the o2k7 theme.
|
1301 |
+
Fixed bug that made it impossible to visually disable a custom button that used an image instead of CSS sprites.
|
1302 |
+
Fixed bug where it wasn't possible to press delete/backspace if the editor was added+removed and re-added due to a FF bug.
|
1303 |
+
Fixed bug where an entities option with only 38,amp,60,lt,62,gt would fail in IE.
|
1304 |
+
Fixed bug where innerHTML sometimes generated unknown runtime error on IE.
|
1305 |
+
Fixed bug where content_css files wasn't loaded in the template preview iframe.
|
1306 |
+
Fixed bug where scroll position was incorrect when toggling fullscreen mode.
|
1307 |
+
Fixed bug where restoration of overflow didn't work correctly when disabling fullscreen mode in Opera.
|
1308 |
+
Fixed bug where drop menus where places at incorrect locations if the editor was placed in a scrollable container element.
|
1309 |
+
Fixed bug where hideMenu didn't hide sub menus correctly. It will now hide all menus recursively.
|
1310 |
+
Fixed so theme_advanced_path_location can be used in init options for compatibility reasons.
|
1311 |
+
Fixed so the drop menu colors matches the rest of o2k7 theme.
|
1312 |
+
Fixed so the preview example.html file is updated to the new 3.x API.
|
1313 |
+
Fixed so the margins are the same by default inside the editable area between IE and other browsers.
|
1314 |
+
Fixed so editor contents gets stored before it the onSubmit event is fired.
|
1315 |
+
Version 3.0rc1 (2008-01-08)
|
1316 |
+
Added new classes for toolbar rows in advanced theme mceToolbarRow1..n enabled you to change appearance of individual rows.
|
1317 |
+
Added auto detection for the strict_loading_mode option when running in application/xhtml+xml mode on Gecko.
|
1318 |
+
Optimized the HTML serializer by bundling some post process methods together.
|
1319 |
+
Fixed so that the toolbars have unique IDs, enables you to alter the toolbars using the ControlManager and the DOM.
|
1320 |
+
Fixed bug where delta values for dialog sizes in language packs didn't work correctly due to missing string to number casting.
|
1321 |
+
Fixed bug where paragraph generation logic didn't handle hr or table elements correctly if they where the only element.
|
1322 |
+
Fixed bug where some elements got extra linebreaks added after or before it in HTML output.
|
1323 |
+
Fixed bug where it was hard to modify existing style data on table rows and table cells.
|
1324 |
+
Fixed bug where the dom.getRect method didn't handle non pixel values correctly.
|
1325 |
+
Fixed bug where strikethrough and underline couldn't be toggled on existing span elements.
|
1326 |
+
Fixed bug where the postprocessor searched for nsbp instead of nbsp entities.
|
1327 |
+
Fixed bug where it was impossible to edit links that had child elements within them.
|
1328 |
+
Fixed bug where it was possible to click on the parent item of a submenu.
|
1329 |
+
Fixed bug where mouseover/mouseout images couldn't be removed in advimage dialog.
|
1330 |
+
Fixed bug where drop menus didn't work when running in application/xhtml+xml mode.
|
1331 |
+
Fixed bug where Opera added doctype to output in application/xhtml+xml mode.
|
1332 |
+
Fixed bug where some DOM methods didn't work correctly in the application/xhtml+xml mode.
|
1333 |
+
Fixed bug where the inlinepopups didn't work correctly in the application/xhtml+xml mode.
|
1334 |
+
Fixed bug where the ColorSplitButton didn't display correctly in the application/xhtml+xml mode.
|
1335 |
+
Fixed bug where the UI layout was incorrect on Gecko browsers when running in application/xhtml+xml mode.
|
1336 |
+
Fixed bug where the word paste plugin produced exception while running in application/xhtml+xml mode.
|
1337 |
+
Fixed bug where there wasn't any hidden input element generated for divs while running in application/xhtml+xml mode.
|
1338 |
+
Fixed bug where indentation of script/style/pre elements where incorrect.
|
1339 |
+
Fixed bug where script element contents was removed in IE.
|
1340 |
+
Fixed bug where script element contents got entity encoded.
|
1341 |
+
Fixed bug where you couldn't edit existing element styles using the styles plugin.
|
1342 |
+
Fixed bug where styles wasn't updated properly sometimes due to an performance enhancement.
|
1343 |
+
Fixed bug where font sizes couldn't be changed using the style plugin.
|
1344 |
+
Fixed bug where an error was produced in Gecko browsers when switching back from fullscreen mode.
|
1345 |
+
Fixed bug where Opera was producing br elements after elements like h3.
|
1346 |
+
Fixed bug where TinyMCE couldn't be loaded on a page using - characters in it's URL.
|
1347 |
+
Fixed bug where the editor container element was forced to have a specific name.
|
1348 |
+
Fixed bug with force_br_newlines option on Firefox, even though it should never be used (Read FAQ).
|
1349 |
+
Fixed bug where onclick event had an return true; prefix added when creating an popup.
|
1350 |
+
Fixed bug where the theme_advanced_statusbar_location option couldn't handle the value "none".
|
1351 |
+
Fixed issue with URLs with multiple at characters for example an Zope URI.
|
1352 |
+
Fixed so simple and advanced themes doesn't collide.
|
1353 |
+
Fixed so a elements gets removed when the href field is left empty, the href attribute is required in a link after all.
|
1354 |
+
Fixed so img elements gets removed when the src field is left empty, the src attribute is required for all images after all.
|
1355 |
+
Removed the indent and encode methods from the tinymce.dom.Serializer class due to performance enhancement and reduction of the API size.
|
1356 |
+
Version 3.0b3 (2007-12-14)
|
1357 |
+
Added new getElement method to Editor class, returns the element that was replaced with the editor instance.
|
1358 |
+
Added new unavailable prefix for disabled controls for accessibility reasons.
|
1359 |
+
Fixed bug where regexp patterns couldn't be used for the editor_selector/editor_deselector options.
|
1360 |
+
Fixed bug where the DOM wasn't properly initialized before the onInit event was executed in popups.
|
1361 |
+
Fixed bug where font sizes where reduced by font size actions on previous spans in Safari.
|
1362 |
+
Fixed bug where HR elements got places at the wrong location in IE.
|
1363 |
+
Fixed bug where align/justify didn't work correctly on multiple paragraphs.
|
1364 |
+
Fixed bug with missing translation for cell scope settings.
|
1365 |
+
Fixed bug where selection/caret position was lost on some table actions.
|
1366 |
+
Fixed bug where editor instances couldn't be added to hidden div elements.
|
1367 |
+
Fixed bug where list elements in Safari would get an odd ID attribute.
|
1368 |
+
Fixed bug where IE would return <html/> when the editor was completely empty.
|
1369 |
+
Fixed bug where accessibility title attribute for access keys wasn't setup properly.
|
1370 |
+
Fixed bug where forecolorpicker and backcolorpicker control names wasn't working.
|
1371 |
+
Fixed bug where inserting template content didn't work in Safari due to selection exception.
|
1372 |
+
Fixed bug where absolute URLs to remote hosts couldn't be used for background images.
|
1373 |
+
Fixed bug where mysterious span elements where produced in Safari when injecting HTML contents.
|
1374 |
+
Fixed bug where the media plugin didn't work correctly on the latest Opera 9.24.
|
1375 |
+
Fixed bug where indentation of HTML output wasn't applied to all block elements.
|
1376 |
+
Fixed bug where Safari was production DOM exception if you pressed enter in an empty editor.
|
1377 |
+
Fixed bug where media plugin didn't parse script tags correctly patch contributed by Mathieu Campagna.
|
1378 |
+
Fixed bug where the drop menus of list boxes like blockformat could produce scrolling of the page.
|
1379 |
+
Fixed bug where the drop menus where placed at an incorrect location if TinyMCE was placed in a scrollable div.
|
1380 |
+
Fixed bug where submit buttons couldn't be named submit, it's not recommended to name submit buttons submit anyway.
|
1381 |
+
Fixed bug where the stylelistbox produced an exception if there was only one class in the list box.
|
1382 |
+
Fixed bug where the stylelistbox wasn't updated correctly when the current class was removed.
|
1383 |
+
Fixed bug where the formatblock command sometimes removed the body element.
|
1384 |
+
Fixed bug where fullscreen switching in IE sometimes produced an exception when the spellchecker plugin was enabled.
|
1385 |
+
Fixed issue where FF produced an empty paragraph when the editor was completely empty.
|
1386 |
+
Fixed issue with size of image dialog in the advanced theme.
|
1387 |
+
Fixed issues with the bbcode plugin it now also handles spans and the [font] rule.
|
1388 |
+
Fixed so the style compression feature is a bit smarter to resolve issues with Opera.
|
1389 |
+
Reintroduced the remove_linebreaks option, this is enabled by default.
|
1390 |
+
Version 3.0b2 (2007-11-29)
|
1391 |
+
Added type and compact attributes to the default valid_elements list for the ul and ol elements.
|
1392 |
+
Added missing accessibility support to native list boxes in both the toolbar and dialogs.
|
1393 |
+
Added missing access key for the element path for accessibility reasons.
|
1394 |
+
Fixed support for loading themes from external URLs.
|
1395 |
+
Fixed bug where setOuterHTML didn't work correctly when multiple elements where passed to it.
|
1396 |
+
Fixed bug with visualchars plugin was moving elements around in the DOM.
|
1397 |
+
Fixed bug with DIV elements that got converted into editors on IE.
|
1398 |
+
Fixed bug with paste plugin using the old event API.
|
1399 |
+
Fixed bug where the spellchecker was removing the word when it was ignored.
|
1400 |
+
Fixed bug where fullscreen wasn't working properly.
|
1401 |
+
Fixed bug where the base href element and attribute was ignored.
|
1402 |
+
Fixed bug where redo function didn't work in IE.
|
1403 |
+
Fixed bug where content_css didn't work as previous 2.x branch.
|
1404 |
+
Fixed bug where preview dialog was throwing errors if the content_css wasn't defined.
|
1405 |
+
Fixed bug where the theme_advanced_path option didn't work like the 2.x branch.
|
1406 |
+
Fixed bug where the theme_advanced_statusbar_location was called theme_advanced_status_location.
|
1407 |
+
Fixed bug where the strict_loading_mode option didn't work if you created editors dynamically without using the EditorManager.
|
1408 |
+
Fixed bug where some language values wasn't translated such as insert and update in dialogs.
|
1409 |
+
Fixed bug where some image attributes wasn't stored correctly when inserting an image.
|
1410 |
+
Fixed bug where fullscreen mode didn't restore scrollbars when disabled.
|
1411 |
+
Fixed bug where there was no visual representation for tab focus in toolbars on IE.
|
1412 |
+
Fixed bug where HR elements wasn't treated as block elements so forced_root_block would fail on these.
|
1413 |
+
Fixed bug where autosave presented warning message even when the form was submitted normally.
|
1414 |
+
Fixed typo of openBrower it's now openBrowser in form_utils.js.
|
1415 |
+
Fixed various HTML problems like missing TD elements and duplicated doctypes.
|
1416 |
+
Fixed default values for theme_advanced_resize_horizontal, theme_advanced_resizing_use_cookie to be 2.x compatible.
|
1417 |
+
Moved spellchecker JS files into the development package.
|
1418 |
+
Removed support for theme_advanced_path_location since the theme_advanced_statusbar_location is the correct option name.
|
1419 |
+
Version 3.0b1 (2007-11-21)
|
1420 |
+
Added new tab_focus option, that enables you to specify a element id or that the next element to be focused on tab key down.
|
1421 |
+
Added new addQueryValueHandler method to the tinymce.Editor class.
|
1422 |
+
Added new class_filter option, this enables you to specify a function that can filter out CSS classes for the styles list box.
|
1423 |
+
Added support form [url=url]title[/url] to the bbcode plugin.
|
1424 |
+
Renamed the addCommandQueryState method in the tinymce.Editor class to addQueryStateHandler.
|
1425 |
+
Renamed loadQue to loadQueue, to correct spelling.
|
1426 |
+
Removed the createDOM method from the window manager and replace it with a createInstance method.
|
1427 |
+
Removed the add to beginning of class attribute parameter of the DOMUtils.addClass method.
|
1428 |
+
Fixed bug with the forced_root_block option, didn't work correctly with multiple inline elements.
|
1429 |
+
Fixed bug where image dialogs replaced the current image element with a new one even when it was updated.
|
1430 |
+
Fixed bug where the submit trigger wasn't executed when divs where converted into editor instances.
|
1431 |
+
Fixed bug where div elements that got converted into editors didn't get a hidden input element generated for them.
|
1432 |
+
Fixed bug where the the media_use_script option for the media plugin wasn't working correctly.
|
1433 |
+
Fixed bug where the font size and font family listboxes wasn't updated correctly on Safari.
|
1434 |
+
Fixed bug where the height of the fieldset in default image dialog for the advanced theme was to small.
|
1435 |
+
Fixed bug where the font sizes behaved incorrectly after a cleanup on Safari.
|
1436 |
+
Fixed bug where formatblock didn't work correctly in Safari on some elements.
|
1437 |
+
Fixed bug where template plugin didn't insert content correctly unless some options where specified.
|
1438 |
+
Fixed bug where charmap on Safari produced scrollbars.
|
1439 |
+
Fixed bug where there was white artifacts in some dialogs due to missing background color.
|
1440 |
+
Fixed bug where port was added to all external URLs if the editor was loaded from a custom port.
|
1441 |
+
Fixed bug where the context menus got duplicated on Safari 3.0.4 on Mac OS X.
|
1442 |
+
Fixed bug where dialogs like paste from word was huge on Firefox.
|
1443 |
+
Fixed bug with media plugin not working with windows media objects.
|
1444 |
+
Fixed bug where a forever loop was created if multiple instances where submitted using form.submit.
|
1445 |
+
Fixed bug with editing a table produce error in IE when inlinepopups where used.
|
1446 |
+
Fixed bug where the style plugin generated ugly looking style information in IE.
|
1447 |
+
Fixed bug where the inline dialogs that got opened while in fullscreen mode wasn't visible.
|
1448 |
+
Fixed bug where it was difficult to place the caret inside the word paste dialog.
|
1449 |
+
Fixed bug where Opera produced strange border in the word paste dialog.
|
1450 |
+
Fixed bug where viewport constraints could move a inlinepopup to a negative x, y position if the viewport was to small.
|
1451 |
+
Fixed bug where template plugin was producing an error due to a deprecated API call.
|
1452 |
+
Fixed bug where drag drop of images failed in Gecko if a document_base_url was specified.
|
1453 |
+
Fixed bug where Firefox 3 failed to apply block formats like H1-H6 it still breaks on DIVs this has been reported to bugzilla.
|
1454 |
+
Fixed bug where IE was producing a warning dialog about non secure items when running TinyMCE over HTTPS.
|
1455 |
+
Fixed bug where the onbeforeunload event was triggered when menus or dialogs where opened.
|
1456 |
+
Fixed bug where the fullscreen mode of the HTML view source box threw an error.
|
1457 |
+
Fixed bug where the mceFocus command didn't work correctly.
|
1458 |
+
Fixed bug where the selection could get lost in IE using inlinepopups.
|
1459 |
+
Fixed so the body of the editor area has the mceContentBody class just like the 2.x branch.
|
1460 |
+
Fixed so the media icon gets active when a media element is selected.
|
1461 |
+
Version 3.0a3 (2007-11-13)
|
1462 |
+
Added new experimental jQuery and Prototype framework adapters to the development package.
|
1463 |
+
Added new translation.html file for the development package. Helps with the internationalization of TinyMCE.
|
1464 |
+
Added new setup callback option, use this callback to add events to TinyMCE. This method is recommended over the old callbacks.
|
1465 |
+
Added new API documetation to all classes, functions, events, properties to the Wiki with examples etc.
|
1466 |
+
Added new init method to all plugins and themes, since it's shorter to write and it mimics interface capable languages better.
|
1467 |
+
Fixed various CSS issues in the default skin such as alignment of split buttons and separators.
|
1468 |
+
Fixed issues with mod_security. It didn't like that a content type of text/javascript was forced in a XHR.
|
1469 |
+
Fixed all events so that they now pass the sender object as it's first argument.
|
1470 |
+
Fixed some DOM methods so they now can take an array as input.
|
1471 |
+
Fixed so addButton and the methods of the ControlManager uses less arguments and it now uses a settings object instead.
|
1472 |
+
Fixed various issues with the tinymce.util.URI class.
|
1473 |
+
Fixed bug in IE and Safari and the on demand gzip loading feature.
|
1474 |
+
Fixed bug with moving inline windows sometimes failed in IE6.
|
1475 |
+
Fixed bug where save_callback function wasn't executed at all.
|
1476 |
+
Fixed bug where inlinepopups produces scrollbars if windows where moved to the corners of the browser.
|
1477 |
+
Fixed bug where view HTML source failed when inserting a embedded media object.
|
1478 |
+
Fixed bug where the listbox menus didn't display correctly on IE6.
|
1479 |
+
Fixed bug where undo level wasn't added when editor was blurred.
|
1480 |
+
Fixed bug where spellchecker wasn't disabled when fullscreen mode was enabled.
|
1481 |
+
Fixed bug where Firefox could crash some times when the user switched to fullscreen mode.
|
1482 |
+
Fixed bug where tinymce.ui.DropMenu didn't remove all item data when an item was removed from the menu.
|
1483 |
+
Fixed bug where anchor list in advlink dialog wasn't populated correctly in Safari.
|
1484 |
+
Fixed bug where it wasn't possible to edit tables in IE when inlinepopups was enabled.
|
1485 |
+
Fixed bug where it wasn't possible to change the table width of an existing table.
|
1486 |
+
Fixed bug where xhtmlxtras like abbr didn't work correctly on IE.
|
1487 |
+
Fixed bug where IE6 had some graphics rendering issues with the inlinepopups.
|
1488 |
+
Fixed bug where inlinepopup windows where moved incorrectly when they were boundary checked for min width.
|
1489 |
+
Fixed bug where textareas without id or name couldn't be converted into editor instances.
|
1490 |
+
Fixed bug where TinyMCE was stealing element focus on IE.
|
1491 |
+
Fixed bug where the getParam method didn't handle false values correctly.
|
1492 |
+
Fixed bug where inlinepopups was clipped by other TinyMCE instances or relative elements in IE.
|
1493 |
+
Fixed bug where the contextmenu was clipped by other TinyMCE instances or relative elements in IE.
|
1494 |
+
Fixed bug where listbox menus was clipped by other TinyMCE instances or relative elements in IE.
|
1495 |
+
Fixed bug where listboxes wasn't updated correctly when the a value wasn't found by select.
|
1496 |
+
Fixed various CSS issues that produced odd rendering bugs in IE.
|
1497 |
+
Fixed issues with tinymce.ui.DropMenu class, it required some optional settings to be specified.
|
1498 |
+
Fixed so multiple blockquotes can be removed with a easier method than before.
|
1499 |
+
Optimized some of the core API to boost performance.
|
1500 |
+
Removed some functions from the core API that wasn't needed.
|
1501 |
+
Version 3.0a2 (2007-11-02)
|
1502 |
+
Fixed critical bug where IE generaded an error on a hasAttribute call in the serialization engine.
|
1503 |
+
Fixed critical bug where some dialogs didn't open in the non dev package.
|
1504 |
+
Fixed bug when using the theme_advanced_styles option. Error was thrown in some dialogs.
|
1505 |
+
Fixed bug where the close buttons produced an error when native windows where used.
|
1506 |
+
Fixed bug in default skin so that split buttons gets activated correctly.
|
1507 |
+
Fixed so plugins can be loaded from external urls outsite the plugins directory.
|
1508 |
+
Version 3.0a1 (2007-11-01)
|
1509 |
+
Rewrote the core and most of the plugins and themes from scratch.
|
1510 |
+
Added new and improved serialization engine, faster and more powerful.
|
1511 |
+
Added new internal event system, things like editor.onClick.add(func).
|
1512 |
+
Added new inlinepopups plugin, the dialogs are now skinnable and uses clearlooks2 as default.
|
1513 |
+
Added new contextmenu plugin, context menus can now have submenus and plugins can add items on the fly.
|
1514 |
+
Added new skin support for the simple and advanced themes you can alter the whole UI using CSS.
|
1515 |
+
Added new o2k7 skin for the simple and advanced themes.
|
1516 |
+
Added new custom list boxes for font size/format/style etc with preview support.
|
1517 |
+
Added new UI management, enabled plugins to create controls like splitbuttons or menus easier.
|
1518 |
+
Added new JSON parser/serializer and JSON-RPC class to the core API.
|
1519 |
+
Added new cookie utility class to the core API.
|
1520 |
+
Added new Unit testing class to the core API only available in dev mode.
|
1521 |
+
Added new firebug lite integration when loading the dev version of TinyMCE.
|
1522 |
+
Added new Safari plugin, fixes lots compatibility of issues with Safari 3.x.
|
1523 |
+
Added new URI/URL parsing it now handles the hole RFC and even some exceptions.
|
1524 |
+
Added new pagebreak plugin, enables you to insert pagebreak comments like <!-- pagebreak -->
|
1525 |
+
Added new on demand loading of plugins and themes. Enables you to load and init TinyMCE at any time.
|
1526 |
+
Added new throbber/progress visualization a plugin can show/hide this when it's needed.
|
1527 |
+
Added new blockquote button. Enables you to wrap paragraphs in blockquotes.
|
1528 |
+
Added new compat2x plugin. Will provide a TinyMCE 2.x API for older plugins.
|
1529 |
+
Added new theme_advanced_resizing_min_width, theme_advanced_resizing_min_height options.
|
1530 |
+
Added new theme_advanced_resizing_max_height, theme_advanced_resizing_max_height options.
|
1531 |
+
Added new use_native_selects option. Enables you to toggle native listboxes on and off.
|
1532 |
+
Added new docs_url option enables you to specify where the TinyMCE user documentation is located.
|
1533 |
+
Added new frame and rules options for the table dialog.
|
1534 |
+
Added new global rule for valid_elements/extended_valid_elements enables you to specify global attributes for all elements.
|
1535 |
+
Added new deny attribute rule characher so it's possible to deny global attribute rules on specific elements.
|
1536 |
+
Added new unit tests in the dev package of TinyMCE. Runs tests on the core API, commands and settings of the editor.
|
1537 |
+
Readded the inline_styles option and enabled it by default so deprecated attributes are no longer used.
|
1538 |
+
Removed all button images and replaced them with CSS sprite images. Reduces the number of requests needed.
|
1539 |
+
Removed lots of language files and merged them into the base language files. Reduces the number of requests needed.
|
1540 |
+
Removed lots of unnecessary files and merged many of them together to reduce requests and improve loading speed.
|
1541 |
+
Reduced the over all script size by 33% and the number of files/requests by 75% so it loads a lot faster.
|
1542 |
+
Fixed so convert_fonts_to_spans are enabled by default. So no more font tags.
|
1543 |
+
Fixed so underline and strikethrough uses spans instread of deprecated U and STRIKE elements.
|
1544 |
+
Fixed so indent/outdent adds/removed margin-left instead of blockquotes.
|
1545 |
+
Fixed so alignment of paragraphs results in a text-align style value instead of the deprecated align attribute.
|
1546 |
+
Fixed so alignment of images uses float or vertical-align style values instead of the deprecated align attribute.
|
1547 |
+
Fixed so all classes from @import stylesheets gets imported into the editor.
|
1548 |
+
Fixed so the directionality can toggle the dir attribute on and off.
|
1549 |
+
Fixed so the fullscreen_settings can be used for all types of fullscreen modes.
|
1550 |
+
Fixed so the advanced HR dialog gets displayed when inserting a HR not only on edit.
|
1551 |
+
Fixed bug where word wrap didn't work in the source editor on Safari.
|
1552 |
+
Fixed so non HTML elements can be used within the editor such as <myns:tag>
|
1553 |
+
Fixed various memory leaks in IE and reduced the unload cleanups needed.
|
1554 |
+
Fixed so the preformatted option adds an invisible container pre tag inside the editor.
|
1555 |
+
Renamed the _template plugin to example and updated it to use the new 3.x API.
|
js/ip_pdffree/tinymce/examples/accessibility.html
ADDED
@@ -0,0 +1,101 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2 |
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
+
<head>
|
4 |
+
<title>Full featured example</title>
|
5 |
+
|
6 |
+
<!-- TinyMCE -->
|
7 |
+
<script type="text/javascript" src="../jscripts/tiny_mce/tiny_mce.js"></script>
|
8 |
+
<script type="text/javascript">
|
9 |
+
tinyMCE.init({
|
10 |
+
// General options
|
11 |
+
mode : "textareas",
|
12 |
+
theme : "advanced",
|
13 |
+
plugins : "pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,wordcount,advlist,autosave",
|
14 |
+
|
15 |
+
// Theme options
|
16 |
+
theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
|
17 |
+
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
|
18 |
+
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
|
19 |
+
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft",
|
20 |
+
theme_advanced_toolbar_location : "top",
|
21 |
+
theme_advanced_toolbar_align : "left",
|
22 |
+
theme_advanced_statusbar_location : "bottom",
|
23 |
+
theme_advanced_resizing : true,
|
24 |
+
|
25 |
+
// Example content CSS (should be your site CSS)
|
26 |
+
// using false to ensure that the default browser settings are used for best Accessibility
|
27 |
+
// ACCESSIBILITY SETTINGS
|
28 |
+
content_css : false,
|
29 |
+
// Use browser preferred colors for dialogs.
|
30 |
+
browser_preferred_colors : true,
|
31 |
+
detect_highcontrast : true,
|
32 |
+
|
33 |
+
// Drop lists for link/image/media/template dialogs
|
34 |
+
template_external_list_url : "lists/template_list.js",
|
35 |
+
external_link_list_url : "lists/link_list.js",
|
36 |
+
external_image_list_url : "lists/image_list.js",
|
37 |
+
media_external_list_url : "lists/media_list.js",
|
38 |
+
|
39 |
+
// Style formats
|
40 |
+
style_formats : [
|
41 |
+
{title : 'Bold text', inline : 'b'},
|
42 |
+
{title : 'Red text', inline : 'span', styles : {color : '#ff0000'}},
|
43 |
+
{title : 'Red header', block : 'h1', styles : {color : '#ff0000'}},
|
44 |
+
{title : 'Example 1', inline : 'span', classes : 'example1'},
|
45 |
+
{title : 'Example 2', inline : 'span', classes : 'example2'},
|
46 |
+
{title : 'Table styles'},
|
47 |
+
{title : 'Table row 1', selector : 'tr', classes : 'tablerow1'}
|
48 |
+
],
|
49 |
+
|
50 |
+
// Replace values for the template plugin
|
51 |
+
template_replace_values : {
|
52 |
+
username : "Some User",
|
53 |
+
staffid : "991234"
|
54 |
+
}
|
55 |
+
});
|
56 |
+
</script>
|
57 |
+
<!-- /TinyMCE -->
|
58 |
+
|
59 |
+
</head>
|
60 |
+
<body>
|
61 |
+
|
62 |
+
<form method="post" action="http://tinymce.moxiecode.com/dump.php?example=true">
|
63 |
+
<div>
|
64 |
+
<h3>Full featured example, with Accessibility settings enabled</h3>
|
65 |
+
|
66 |
+
<p>
|
67 |
+
This page has got the TinyMCE set up to work with configurations related to accessiblity enabled.
|
68 |
+
In particular
|
69 |
+
<ul>
|
70 |
+
<li>the <strong>content_css</strong> is set to false, to ensure that all default browser styles are used, </li>
|
71 |
+
<li>the <strong>browser_preferred_colors</strong> dialog option is used to ensure that default css is used for dialogs, </li>
|
72 |
+
<li>and the <strong>detect_highcontrast</strong> option has been set to ensure that highcontrast mode in Windows browsers
|
73 |
+
is detected and the toolbars are displayed in a high contrast mode.</li>
|
74 |
+
</ul>
|
75 |
+
</p>
|
76 |
+
|
77 |
+
<!-- Gets replaced with TinyMCE, remember HTML in a textarea should be encoded -->
|
78 |
+
<div>
|
79 |
+
<textarea id="elm1" name="elm1" rows="15" cols="80" style="width: 80%">
|
80 |
+
<p>
|
81 |
+
This is some example text that you can edit inside the <strong>TinyMCE editor</strong>.
|
82 |
+
</p>
|
83 |
+
<p>
|
84 |
+
Nam nisi elit, cursus in rhoncus sit amet, pulvinar laoreet leo. Nam sed lectus quam, ut sagittis tellus. Quisque dignissim mauris a augue rutrum tempor. Donec vitae purus nec massa vestibulum ornare sit amet id tellus. Nunc quam mauris, fermentum nec lacinia eget, sollicitudin nec ante. Aliquam molestie volutpat dapibus. Nunc interdum viverra sodales. Morbi laoreet pulvinar gravida. Quisque ut turpis sagittis nunc accumsan vehicula. Duis elementum congue ultrices. Cras faucibus feugiat arcu quis lacinia. In hac habitasse platea dictumst. Pellentesque fermentum magna sit amet tellus varius ullamcorper. Vestibulum at urna augue, eget varius neque. Fusce facilisis venenatis dapibus. Integer non sem at arcu euismod tempor nec sed nisl. Morbi ultricies, mauris ut ultricies adipiscing, felis odio condimentum massa, et luctus est nunc nec eros.
|
85 |
+
</p>
|
86 |
+
</textarea>
|
87 |
+
</div>
|
88 |
+
|
89 |
+
<br />
|
90 |
+
<input type="submit" name="save" value="Submit" />
|
91 |
+
<input type="reset" name="reset" value="Reset" />
|
92 |
+
</div>
|
93 |
+
</form>
|
94 |
+
|
95 |
+
<script type="text/javascript">
|
96 |
+
if (document.location.protocol == 'file:') {
|
97 |
+
alert("The examples might not work properly on the local file system due to security settings in your browser. Please use a real webserver.");
|
98 |
+
}
|
99 |
+
</script>
|
100 |
+
</body>
|
101 |
+
</html>
|
js/ip_pdffree/tinymce/examples/css/content.css
ADDED
@@ -0,0 +1,105 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
body {
|
2 |
+
background-color: #FFFFFF;
|
3 |
+
font-family: Verdana, Arial, Helvetica, sans-serif;
|
4 |
+
font-size: 10px;
|
5 |
+
scrollbar-3dlight-color: #F0F0EE;
|
6 |
+
scrollbar-arrow-color: #676662;
|
7 |
+
scrollbar-base-color: #F0F0EE;
|
8 |
+
scrollbar-darkshadow-color: #DDDDDD;
|
9 |
+
scrollbar-face-color: #E0E0DD;
|
10 |
+
scrollbar-highlight-color: #F0F0EE;
|
11 |
+
scrollbar-shadow-color: #F0F0EE;
|
12 |
+
scrollbar-track-color: #F5F5F5;
|
13 |
+
}
|
14 |
+
|
15 |
+
td {
|
16 |
+
font-family: Verdana, Arial, Helvetica, sans-serif;
|
17 |
+
font-size: 10px;
|
18 |
+
}
|
19 |
+
|
20 |
+
pre {
|
21 |
+
font-family: Verdana, Arial, Helvetica, sans-serif;
|
22 |
+
font-size: 10px;
|
23 |
+
}
|
24 |
+
|
25 |
+
.example1 {
|
26 |
+
font-weight: bold;
|
27 |
+
font-size: 14px
|
28 |
+
}
|
29 |
+
|
30 |
+
.example2 {
|
31 |
+
font-weight: bold;
|
32 |
+
font-size: 12px;
|
33 |
+
color: #FF0000
|
34 |
+
}
|
35 |
+
|
36 |
+
.tablerow1 {
|
37 |
+
background-color: #BBBBBB;
|
38 |
+
}
|
39 |
+
|
40 |
+
thead {
|
41 |
+
background-color: #FFBBBB;
|
42 |
+
}
|
43 |
+
|
44 |
+
tfoot {
|
45 |
+
background-color: #BBBBFF;
|
46 |
+
}
|
47 |
+
|
48 |
+
th {
|
49 |
+
font-family: Verdana, Arial, Helvetica, sans-serif;
|
50 |
+
font-size: 13px;
|
51 |
+
}
|
52 |
+
|
53 |
+
/* Basic formats */
|
54 |
+
|
55 |
+
.bold {
|
56 |
+
font-weight: bold;
|
57 |
+
}
|
58 |
+
|
59 |
+
.italic {
|
60 |
+
font-style: italic;
|
61 |
+
}
|
62 |
+
|
63 |
+
.underline {
|
64 |
+
text-decoration: underline;
|
65 |
+
}
|
66 |
+
|
67 |
+
/* Global align classes */
|
68 |
+
|
69 |
+
.left {
|
70 |
+
text-align: inherit;
|
71 |
+
}
|
72 |
+
|
73 |
+
.center {
|
74 |
+
text-align: center;
|
75 |
+
}
|
76 |
+
|
77 |
+
.right {
|
78 |
+
text-align: right;
|
79 |
+
}
|
80 |
+
|
81 |
+
.full {
|
82 |
+
text-align: justify
|
83 |
+
}
|
84 |
+
|
85 |
+
/* Image and table specific aligns */
|
86 |
+
|
87 |
+
img.left, table.left {
|
88 |
+
float: left;
|
89 |
+
text-align: inherit;
|
90 |
+
}
|
91 |
+
|
92 |
+
img.center, table.center {
|
93 |
+
margin-left: auto;
|
94 |
+
margin-right: auto;
|
95 |
+
text-align: inherit;
|
96 |
+
}
|
97 |
+
|
98 |
+
img.center {
|
99 |
+
display: block;
|
100 |
+
}
|
101 |
+
|
102 |
+
img.right, table.right {
|
103 |
+
float: right;
|
104 |
+
text-align: inherit;
|
105 |
+
}
|
js/ip_pdffree/tinymce/examples/css/word.css
ADDED
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
body {
|
2 |
+
background-color: #FFFFFF;
|
3 |
+
font-family: Verdana, Arial, Helvetica, sans-serif;
|
4 |
+
font-size: 10px;
|
5 |
+
scrollbar-3dlight-color: #F0F0EE;
|
6 |
+
scrollbar-arrow-color: #676662;
|
7 |
+
scrollbar-base-color: #F0F0EE;
|
8 |
+
scrollbar-darkshadow-color: #DDDDDD;
|
9 |
+
scrollbar-face-color: #E0E0DD;
|
10 |
+
scrollbar-highlight-color: #F0F0EE;
|
11 |
+
scrollbar-shadow-color: #F0F0EE;
|
12 |
+
scrollbar-track-color: #F5F5F5;
|
13 |
+
}
|
14 |
+
|
15 |
+
p {margin:0; padding:0;}
|
16 |
+
|
17 |
+
td {
|
18 |
+
font-family: Verdana, Arial, Helvetica, sans-serif;
|
19 |
+
font-size: 10px;
|
20 |
+
}
|
21 |
+
|
22 |
+
pre {
|
23 |
+
font-family: Verdana, Arial, Helvetica, sans-serif;
|
24 |
+
font-size: 10px;
|
25 |
+
}
|
26 |
+
|
27 |
+
.example1 {
|
28 |
+
font-weight: bold;
|
29 |
+
font-size: 14px
|
30 |
+
}
|
31 |
+
|
32 |
+
.example2 {
|
33 |
+
font-weight: bold;
|
34 |
+
font-size: 12px;
|
35 |
+
color: #FF0000
|
36 |
+
}
|
37 |
+
|
38 |
+
.tablerow1 {
|
39 |
+
background-color: #BBBBBB;
|
40 |
+
}
|
41 |
+
|
42 |
+
thead {
|
43 |
+
background-color: #FFBBBB;
|
44 |
+
}
|
45 |
+
|
46 |
+
tfoot {
|
47 |
+
background-color: #BBBBFF;
|
48 |
+
}
|
49 |
+
|
50 |
+
th {
|
51 |
+
font-family: Verdana, Arial, Helvetica, sans-serif;
|
52 |
+
font-size: 13px;
|
53 |
+
}
|
js/ip_pdffree/tinymce/examples/custom_formats.html
ADDED
@@ -0,0 +1,111 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2 |
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
+
<head>
|
4 |
+
<title>Custom formats example</title>
|
5 |
+
|
6 |
+
<!-- TinyMCE -->
|
7 |
+
<script type="text/javascript" src="../jscripts/tiny_mce/tiny_mce.js"></script>
|
8 |
+
<script type="text/javascript">
|
9 |
+
tinyMCE.init({
|
10 |
+
// General options
|
11 |
+
mode : "textareas",
|
12 |
+
theme : "advanced",
|
13 |
+
plugins : "autolink,lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,wordcount,advlist,autosave",
|
14 |
+
|
15 |
+
// Theme options
|
16 |
+
theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
|
17 |
+
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
|
18 |
+
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
|
19 |
+
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft",
|
20 |
+
theme_advanced_toolbar_location : "top",
|
21 |
+
theme_advanced_toolbar_align : "left",
|
22 |
+
theme_advanced_statusbar_location : "bottom",
|
23 |
+
theme_advanced_resizing : true,
|
24 |
+
|
25 |
+
// Example content CSS (should be your site CSS)
|
26 |
+
content_css : "css/content.css",
|
27 |
+
|
28 |
+
// Drop lists for link/image/media/template dialogs
|
29 |
+
template_external_list_url : "lists/template_list.js",
|
30 |
+
external_link_list_url : "lists/link_list.js",
|
31 |
+
external_image_list_url : "lists/image_list.js",
|
32 |
+
media_external_list_url : "lists/media_list.js",
|
33 |
+
|
34 |
+
// Style formats
|
35 |
+
style_formats : [
|
36 |
+
{title : 'Bold text', inline : 'b'},
|
37 |
+
{title : 'Red text', inline : 'span', styles : {color : '#ff0000'}},
|
38 |
+
{title : 'Red header', block : 'h1', styles : {color : '#ff0000'}},
|
39 |
+
{title : 'Example 1', inline : 'span', classes : 'example1'},
|
40 |
+
{title : 'Example 2', inline : 'span', classes : 'example2'},
|
41 |
+
{title : 'Table styles'},
|
42 |
+
{title : 'Table row 1', selector : 'tr', classes : 'tablerow1'}
|
43 |
+
],
|
44 |
+
|
45 |
+
formats : {
|
46 |
+
alignleft : {selector : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img', classes : 'left'},
|
47 |
+
aligncenter : {selector : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img', classes : 'center'},
|
48 |
+
alignright : {selector : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img', classes : 'right'},
|
49 |
+
alignfull : {selector : 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img', classes : 'full'},
|
50 |
+
bold : {inline : 'span', 'classes' : 'bold'},
|
51 |
+
italic : {inline : 'span', 'classes' : 'italic'},
|
52 |
+
underline : {inline : 'span', 'classes' : 'underline', exact : true},
|
53 |
+
strikethrough : {inline : 'del'}
|
54 |
+
},
|
55 |
+
|
56 |
+
// Replace values for the template plugin
|
57 |
+
template_replace_values : {
|
58 |
+
username : "Some User",
|
59 |
+
staffid : "991234"
|
60 |
+
}
|
61 |
+
});
|
62 |
+
</script>
|
63 |
+
<!-- /TinyMCE -->
|
64 |
+
|
65 |
+
</head>
|
66 |
+
<body>
|
67 |
+
|
68 |
+
<form method="post" action="http://tinymce.moxiecode.com/dump.php?example=true">
|
69 |
+
<div>
|
70 |
+
<h3>Custom formats example</h3>
|
71 |
+
|
72 |
+
<p>
|
73 |
+
This example shows you how to override the default formats for bold, italic, underline, strikethough and alignment to use classes instead of inline styles.
|
74 |
+
There are more examples on how to use TinyMCE in the <a href="http://tinymce.moxiecode.com/examples/">Wiki</a>.
|
75 |
+
</p>
|
76 |
+
|
77 |
+
<!-- Gets replaced with TinyMCE, remember HTML in a textarea should be encoded -->
|
78 |
+
<div>
|
79 |
+
<textarea id="elm1" name="elm1" rows="15" cols="80" style="width: 80%">
|
80 |
+
<p>
|
81 |
+
This is some example text that you can edit inside the <strong>TinyMCE editor</strong>.
|
82 |
+
</p>
|
83 |
+
<p>
|
84 |
+
Nam nisi elit, cursus in rhoncus sit amet, pulvinar laoreet leo. Nam sed lectus quam, ut sagittis tellus. Quisque dignissim mauris a augue rutrum tempor. Donec vitae purus nec massa vestibulum ornare sit amet id tellus. Nunc quam mauris, fermentum nec lacinia eget, sollicitudin nec ante. Aliquam molestie volutpat dapibus. Nunc interdum viverra sodales. Morbi laoreet pulvinar gravida. Quisque ut turpis sagittis nunc accumsan vehicula. Duis elementum congue ultrices. Cras faucibus feugiat arcu quis lacinia. In hac habitasse platea dictumst. Pellentesque fermentum magna sit amet tellus varius ullamcorper. Vestibulum at urna augue, eget varius neque. Fusce facilisis venenatis dapibus. Integer non sem at arcu euismod tempor nec sed nisl. Morbi ultricies, mauris ut ultricies adipiscing, felis odio condimentum massa, et luctus est nunc nec eros.
|
85 |
+
</p>
|
86 |
+
</textarea>
|
87 |
+
</div>
|
88 |
+
|
89 |
+
<!-- Some integration calls -->
|
90 |
+
<a href="javascript:;" onmousedown="tinyMCE.get('elm1').show();">[Show]</a>
|
91 |
+
<a href="javascript:;" onmousedown="tinyMCE.get('elm1').hide();">[Hide]</a>
|
92 |
+
<a href="javascript:;" onmousedown="tinyMCE.get('elm1').execCommand('Bold');">[Bold]</a>
|
93 |
+
<a href="javascript:;" onmousedown="alert(tinyMCE.get('elm1').getContent());">[Get contents]</a>
|
94 |
+
<a href="javascript:;" onmousedown="alert(tinyMCE.get('elm1').selection.getContent());">[Get selected HTML]</a>
|
95 |
+
<a href="javascript:;" onmousedown="alert(tinyMCE.get('elm1').selection.getContent({format : 'text'}));">[Get selected text]</a>
|
96 |
+
<a href="javascript:;" onmousedown="alert(tinyMCE.get('elm1').selection.getNode().nodeName);">[Get selected element]</a>
|
97 |
+
<a href="javascript:;" onmousedown="tinyMCE.execCommand('mceInsertContent',false,'<b>Hello world!!</b>');">[Insert HTML]</a>
|
98 |
+
<a href="javascript:;" onmousedown="tinyMCE.execCommand('mceReplaceContent',false,'<b>{$selection}</b>');">[Replace selection]</a>
|
99 |
+
|
100 |
+
<br />
|
101 |
+
<input type="submit" name="save" value="Submit" />
|
102 |
+
<input type="reset" name="reset" value="Reset" />
|
103 |
+
</div>
|
104 |
+
</form>
|
105 |
+
<script type="text/javascript">
|
106 |
+
if (document.location.protocol == 'file:') {
|
107 |
+
alert("The examples might not work properly on the local file system due to security settings in your browser. Please use a real webserver.");
|
108 |
+
}
|
109 |
+
</script>
|
110 |
+
</body>
|
111 |
+
</html>
|
js/ip_pdffree/tinymce/examples/full.html
ADDED
@@ -0,0 +1,101 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2 |
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
+
<head>
|
4 |
+
<title>Full featured example</title>
|
5 |
+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
6 |
+
<!-- TinyMCE -->
|
7 |
+
<script type="text/javascript" src="../jscripts/tiny_mce/tiny_mce.js"></script>
|
8 |
+
<script type="text/javascript">
|
9 |
+
tinyMCE.init({
|
10 |
+
// General options
|
11 |
+
mode : "textareas",
|
12 |
+
theme : "advanced",
|
13 |
+
plugins : "autolink,lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,wordcount,advlist,autosave,visualblocks",
|
14 |
+
|
15 |
+
// Theme options
|
16 |
+
theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
|
17 |
+
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
|
18 |
+
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
|
19 |
+
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft,visualblocks",
|
20 |
+
theme_advanced_toolbar_location : "top",
|
21 |
+
theme_advanced_toolbar_align : "left",
|
22 |
+
theme_advanced_statusbar_location : "bottom",
|
23 |
+
theme_advanced_resizing : true,
|
24 |
+
|
25 |
+
// Example content CSS (should be your site CSS)
|
26 |
+
content_css : "css/content.css",
|
27 |
+
|
28 |
+
// Drop lists for link/image/media/template dialogs
|
29 |
+
template_external_list_url : "lists/template_list.js",
|
30 |
+
external_link_list_url : "lists/link_list.js",
|
31 |
+
external_image_list_url : "lists/image_list.js",
|
32 |
+
media_external_list_url : "lists/media_list.js",
|
33 |
+
|
34 |
+
// Style formats
|
35 |
+
style_formats : [
|
36 |
+
{title : 'Bold text', inline : 'b'},
|
37 |
+
{title : 'Red text', inline : 'span', styles : {color : '#ff0000'}},
|
38 |
+
{title : 'Red header', block : 'h1', styles : {color : '#ff0000'}},
|
39 |
+
{title : 'Example 1', inline : 'span', classes : 'example1'},
|
40 |
+
{title : 'Example 2', inline : 'span', classes : 'example2'},
|
41 |
+
{title : 'Table styles'},
|
42 |
+
{title : 'Table row 1', selector : 'tr', classes : 'tablerow1'}
|
43 |
+
],
|
44 |
+
|
45 |
+
// Replace values for the template plugin
|
46 |
+
template_replace_values : {
|
47 |
+
username : "Some User",
|
48 |
+
staffid : "991234"
|
49 |
+
}
|
50 |
+
});
|
51 |
+
</script>
|
52 |
+
<!-- /TinyMCE -->
|
53 |
+
|
54 |
+
</head>
|
55 |
+
<body role="application">
|
56 |
+
|
57 |
+
<form method="post" action="http://tinymce.moxiecode.com/dump.php?example=true">
|
58 |
+
<div>
|
59 |
+
<h3>Full featured example</h3>
|
60 |
+
|
61 |
+
<p>
|
62 |
+
This page shows all available buttons and plugins that are included in the TinyMCE core package.
|
63 |
+
There are more examples on how to use TinyMCE in the <a href="http://tinymce.moxiecode.com/examples/">Wiki</a>.
|
64 |
+
</p>
|
65 |
+
|
66 |
+
<!-- Gets replaced with TinyMCE, remember HTML in a textarea should be encoded -->
|
67 |
+
<div>
|
68 |
+
<textarea id="elm1" name="elm1" rows="15" cols="80" style="width: 80%">
|
69 |
+
<p>
|
70 |
+
This is some example text that you can edit inside the <strong>TinyMCE editor</strong>.
|
71 |
+
</p>
|
72 |
+
<p>
|
73 |
+
Nam nisi elit, cursus in rhoncus sit amet, pulvinar laoreet leo. Nam sed lectus quam, ut sagittis tellus. Quisque dignissim mauris a augue rutrum tempor. Donec vitae purus nec massa vestibulum ornare sit amet id tellus. Nunc quam mauris, fermentum nec lacinia eget, sollicitudin nec ante. Aliquam molestie volutpat dapibus. Nunc interdum viverra sodales. Morbi laoreet pulvinar gravida. Quisque ut turpis sagittis nunc accumsan vehicula. Duis elementum congue ultrices. Cras faucibus feugiat arcu quis lacinia. In hac habitasse platea dictumst. Pellentesque fermentum magna sit amet tellus varius ullamcorper. Vestibulum at urna augue, eget varius neque. Fusce facilisis venenatis dapibus. Integer non sem at arcu euismod tempor nec sed nisl. Morbi ultricies, mauris ut ultricies adipiscing, felis odio condimentum massa, et luctus est nunc nec eros.
|
74 |
+
</p>
|
75 |
+
</textarea>
|
76 |
+
</div>
|
77 |
+
|
78 |
+
<!-- Some integration calls -->
|
79 |
+
<a href="javascript:;" onclick="tinyMCE.get('elm1').show();return false;">[Show]</a>
|
80 |
+
<a href="javascript:;" onclick="tinyMCE.get('elm1').hide();return false;">[Hide]</a>
|
81 |
+
<a href="javascript:;" onclick="tinyMCE.get('elm1').execCommand('Bold');return false;">[Bold]</a>
|
82 |
+
<a href="javascript:;" onclick="alert(tinyMCE.get('elm1').getContent());return false;">[Get contents]</a>
|
83 |
+
<a href="javascript:;" onclick="alert(tinyMCE.get('elm1').selection.getContent());return false;">[Get selected HTML]</a>
|
84 |
+
<a href="javascript:;" onclick="alert(tinyMCE.get('elm1').selection.getContent({format : 'text'}));return false;">[Get selected text]</a>
|
85 |
+
<a href="javascript:;" onclick="alert(tinyMCE.get('elm1').selection.getNode().nodeName);return false;">[Get selected element]</a>
|
86 |
+
<a href="javascript:;" onclick="tinyMCE.execCommand('mceInsertContent',false,'<b>Hello world!!</b>');return false;">[Insert HTML]</a>
|
87 |
+
<a href="javascript:;" onclick="tinyMCE.execCommand('mceReplaceContent',false,'<b>{$selection}</b>');return false;">[Replace selection]</a>
|
88 |
+
|
89 |
+
<br />
|
90 |
+
<input type="submit" name="save" value="Submit" />
|
91 |
+
<input type="reset" name="reset" value="Reset" />
|
92 |
+
</div>
|
93 |
+
</form>
|
94 |
+
|
95 |
+
<script type="text/javascript">
|
96 |
+
if (document.location.protocol == 'file:') {
|
97 |
+
alert("The examples might not work properly on the local file system due to security settings in your browser. Please use a real webserver.");
|
98 |
+
}
|
99 |
+
</script>
|
100 |
+
</body>
|
101 |
+
</html>
|
js/ip_pdffree/tinymce/examples/index.html
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
|
2 |
+
<html>
|
3 |
+
<head>
|
4 |
+
<title>TinyMCE examples</title>
|
5 |
+
</head>
|
6 |
+
<frameset cols="180,80%">
|
7 |
+
<frame src="menu.html" name="menu" />
|
8 |
+
<frame src="full.html" name="main" />
|
9 |
+
</frameset>
|
10 |
+
</html>
|
js/ip_pdffree/tinymce/examples/lists/image_list.js
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// This list may be created by a server logic page PHP/ASP/ASPX/JSP in some backend system.
|
2 |
+
// There images will be displayed as a dropdown in all image dialogs if the "external_link_image_url"
|
3 |
+
// option is defined in TinyMCE init.
|
4 |
+
|
5 |
+
var tinyMCEImageList = new Array(
|
6 |
+
// Name, URL
|
7 |
+
["Logo 1", "media/logo.jpg"],
|
8 |
+
["Logo 2 Over", "media/logo_over.jpg"]
|
9 |
+
);
|
js/ip_pdffree/tinymce/examples/lists/link_list.js
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// This list may be created by a server logic page PHP/ASP/ASPX/JSP in some backend system.
|
2 |
+
// There links will be displayed as a dropdown in all link dialogs if the "external_link_list_url"
|
3 |
+
// option is defined in TinyMCE init.
|
4 |
+
|
5 |
+
var tinyMCELinkList = new Array(
|
6 |
+
// Name, URL
|
7 |
+
["Moxiecode", "http://www.moxiecode.com"],
|
8 |
+
["Freshmeat", "http://www.freshmeat.com"],
|
9 |
+
["Sourceforge", "http://www.sourceforge.com"]
|
10 |
+
);
|
js/ip_pdffree/tinymce/examples/lists/media_list.js
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// This list may be created by a server logic page PHP/ASP/ASPX/JSP in some backend system.
|
2 |
+
// There flash movies will be displayed as a dropdown in all media dialog if the "media_external_list_url"
|
3 |
+
// option is defined in TinyMCE init.
|
4 |
+
|
5 |
+
var tinyMCEMediaList = [
|
6 |
+
// Name, URL
|
7 |
+
["Some Flash", "media/sample.swf"],
|
8 |
+
["Some Quicktime", "media/sample.mov"],
|
9 |
+
["Some AVI", "media/sample.avi"],
|
10 |
+
["Some RealMedia", "media/sample.rm"],
|
11 |
+
["Some Shockwave", "media/sample.dcr"],
|
12 |
+
["Some Video", "media/sample.mp4"],
|
13 |
+
["Some FLV", "media/sample.flv"]
|
14 |
+
];
|
js/ip_pdffree/tinymce/examples/lists/template_list.js
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// This list may be created by a server logic page PHP/ASP/ASPX/JSP in some backend system.
|
2 |
+
// There templates will be displayed as a dropdown in all media dialog if the "template_external_list_url"
|
3 |
+
// option is defined in TinyMCE init.
|
4 |
+
|
5 |
+
var tinyMCETemplateList = [
|
6 |
+
// Name, URL, Description
|
7 |
+
["Simple snippet", "templates/snippet1.htm", "Simple HTML snippet."],
|
8 |
+
["Layout", "templates/layout1.htm", "HTML Layout."]
|
9 |
+
];
|
js/ip_pdffree/tinymce/examples/media/logo.jpg
ADDED
Binary file
|
js/ip_pdffree/tinymce/examples/media/logo_over.jpg
ADDED
Binary file
|
js/ip_pdffree/tinymce/examples/media/sample.avi
ADDED
Binary file
|
js/ip_pdffree/tinymce/examples/media/sample.dcr
ADDED
Binary file
|
js/ip_pdffree/tinymce/examples/media/sample.flv
ADDED
Binary file
|
js/ip_pdffree/tinymce/examples/media/sample.mov
ADDED
Binary file
|
js/ip_pdffree/tinymce/examples/media/sample.ram
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
http://streaming.uga.edu/samples/ayp_lan.rm
|
js/ip_pdffree/tinymce/examples/media/sample.rm
ADDED
Binary file
|
js/ip_pdffree/tinymce/examples/media/sample.swf
ADDED
Binary file
|
js/ip_pdffree/tinymce/examples/menu.html
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2 |
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
+
<head>
|
4 |
+
<title>Menu</title>
|
5 |
+
<style>
|
6 |
+
a {display:block;}
|
7 |
+
</style>
|
8 |
+
</head>
|
9 |
+
<body>
|
10 |
+
<h3>Examples</h3>
|
11 |
+
<a href="full.html" target="main">Full featured</a>
|
12 |
+
<a href="simple.html" target="main">Simple theme</a>
|
13 |
+
<a href="skins.html" target="main">Skin support</a>
|
14 |
+
<a href="word.html" target="main">Word processor</a>
|
15 |
+
<a href="custom_formats.html" target="main">Custom formats</a>
|
16 |
+
<a href="accessibility.html" target="main">Accessibility Options</a>
|
17 |
+
</body>
|
18 |
+
</html>
|
js/ip_pdffree/tinymce/examples/simple.html
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2 |
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
+
<head>
|
4 |
+
<title>Simple theme example</title>
|
5 |
+
|
6 |
+
<!-- TinyMCE -->
|
7 |
+
<script type="text/javascript" src="../jscripts/tiny_mce/tiny_mce.js"></script>
|
8 |
+
<script type="text/javascript">
|
9 |
+
tinyMCE.init({
|
10 |
+
mode : "textareas",
|
11 |
+
theme : "simple"
|
12 |
+
});
|
13 |
+
</script>
|
14 |
+
<!-- /TinyMCE -->
|
15 |
+
|
16 |
+
</head>
|
17 |
+
<body>
|
18 |
+
|
19 |
+
<form method="post" action="http://tinymce.moxiecode.com/dump.php?example=true">
|
20 |
+
<h3>Simple theme example</h3>
|
21 |
+
|
22 |
+
<p>
|
23 |
+
This page shows you the simple theme and it's core functionality you can extend it by changing the code use the advanced theme if you need to configure/add more buttons etc.
|
24 |
+
There are more examples on how to use TinyMCE in the <a href="http://tinymce.moxiecode.com/examples/">Wiki</a>.
|
25 |
+
</p>
|
26 |
+
|
27 |
+
<!-- Gets replaced with TinyMCE, remember HTML in a textarea should be encoded -->
|
28 |
+
<textarea id="elm1" name="elm1" rows="15" cols="80" style="width: 80%">
|
29 |
+
<p>
|
30 |
+
This is some example text that you can edit inside the <strong>TinyMCE editor</strong>.
|
31 |
+
</p>
|
32 |
+
<p>
|
33 |
+
Nam nisi elit, cursus in rhoncus sit amet, pulvinar laoreet leo. Nam sed lectus quam, ut sagittis tellus. Quisque dignissim mauris a augue rutrum tempor. Donec vitae purus nec massa vestibulum ornare sit amet id tellus. Nunc quam mauris, fermentum nec lacinia eget, sollicitudin nec ante. Aliquam molestie volutpat dapibus. Nunc interdum viverra sodales. Morbi laoreet pulvinar gravida. Quisque ut turpis sagittis nunc accumsan vehicula. Duis elementum congue ultrices. Cras faucibus feugiat arcu quis lacinia. In hac habitasse platea dictumst. Pellentesque fermentum magna sit amet tellus varius ullamcorper. Vestibulum at urna augue, eget varius neque. Fusce facilisis venenatis dapibus. Integer non sem at arcu euismod tempor nec sed nisl. Morbi ultricies, mauris ut ultricies adipiscing, felis odio condimentum massa, et luctus est nunc nec eros.
|
34 |
+
</p>
|
35 |
+
</textarea>
|
36 |
+
|
37 |
+
<br />
|
38 |
+
<input type="submit" name="save" value="Submit" />
|
39 |
+
<input type="reset" name="reset" value="Reset" />
|
40 |
+
</form>
|
41 |
+
<script type="text/javascript">
|
42 |
+
if (document.location.protocol == 'file:') {
|
43 |
+
alert("The examples might not work properly on the local file system due to security settings in your browser. Please use a real webserver.");
|
44 |
+
}
|
45 |
+
</script>
|
46 |
+
</body>
|
47 |
+
</html>
|
js/ip_pdffree/tinymce/examples/skins.html
ADDED
@@ -0,0 +1,216 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2 |
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
+
<head>
|
4 |
+
<title>Skin support example</title>
|
5 |
+
|
6 |
+
<!-- TinyMCE -->
|
7 |
+
<script type="text/javascript" src="../jscripts/tiny_mce/tiny_mce.js"></script>
|
8 |
+
<script type="text/javascript">
|
9 |
+
// Default skin
|
10 |
+
tinyMCE.init({
|
11 |
+
// General options
|
12 |
+
mode : "exact",
|
13 |
+
elements : "elm1",
|
14 |
+
theme : "advanced",
|
15 |
+
plugins : "autolink,lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups,autosave",
|
16 |
+
|
17 |
+
// Theme options
|
18 |
+
theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
|
19 |
+
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
|
20 |
+
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
|
21 |
+
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft",
|
22 |
+
theme_advanced_toolbar_location : "top",
|
23 |
+
theme_advanced_toolbar_align : "left",
|
24 |
+
theme_advanced_statusbar_location : "bottom",
|
25 |
+
theme_advanced_resizing : true,
|
26 |
+
|
27 |
+
// Example content CSS (should be your site CSS)
|
28 |
+
content_css : "css/content.css",
|
29 |
+
|
30 |
+
// Drop lists for link/image/media/template dialogs
|
31 |
+
template_external_list_url : "lists/template_list.js",
|
32 |
+
external_link_list_url : "lists/link_list.js",
|
33 |
+
external_image_list_url : "lists/image_list.js",
|
34 |
+
media_external_list_url : "lists/media_list.js",
|
35 |
+
|
36 |
+
// Replace values for the template plugin
|
37 |
+
template_replace_values : {
|
38 |
+
username : "Some User",
|
39 |
+
staffid : "991234"
|
40 |
+
}
|
41 |
+
});
|
42 |
+
|
43 |
+
// O2k7 skin
|
44 |
+
tinyMCE.init({
|
45 |
+
// General options
|
46 |
+
mode : "exact",
|
47 |
+
elements : "elm2",
|
48 |
+
theme : "advanced",
|
49 |
+
skin : "o2k7",
|
50 |
+
plugins : "lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups,autosave",
|
51 |
+
|
52 |
+
// Theme options
|
53 |
+
theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
|
54 |
+
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
|
55 |
+
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
|
56 |
+
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft",
|
57 |
+
theme_advanced_toolbar_location : "top",
|
58 |
+
theme_advanced_toolbar_align : "left",
|
59 |
+
theme_advanced_statusbar_location : "bottom",
|
60 |
+
theme_advanced_resizing : true,
|
61 |
+
|
62 |
+
// Example content CSS (should be your site CSS)
|
63 |
+
content_css : "css/content.css",
|
64 |
+
|
65 |
+
// Drop lists for link/image/media/template dialogs
|
66 |
+
template_external_list_url : "lists/template_list.js",
|
67 |
+
external_link_list_url : "lists/link_list.js",
|
68 |
+
external_image_list_url : "lists/image_list.js",
|
69 |
+
media_external_list_url : "lists/media_list.js",
|
70 |
+
|
71 |
+
// Replace values for the template plugin
|
72 |
+
template_replace_values : {
|
73 |
+
username : "Some User",
|
74 |
+
staffid : "991234"
|
75 |
+
}
|
76 |
+
});
|
77 |
+
|
78 |
+
// O2k7 skin (silver)
|
79 |
+
tinyMCE.init({
|
80 |
+
// General options
|
81 |
+
mode : "exact",
|
82 |
+
elements : "elm3",
|
83 |
+
theme : "advanced",
|
84 |
+
skin : "o2k7",
|
85 |
+
skin_variant : "silver",
|
86 |
+
plugins : "lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups,autosave",
|
87 |
+
|
88 |
+
// Theme options
|
89 |
+
theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
|
90 |
+
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
|
91 |
+
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
|
92 |
+
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft",
|
93 |
+
theme_advanced_toolbar_location : "top",
|
94 |
+
theme_advanced_toolbar_align : "left",
|
95 |
+
theme_advanced_statusbar_location : "bottom",
|
96 |
+
theme_advanced_resizing : true,
|
97 |
+
|
98 |
+
// Example content CSS (should be your site CSS)
|
99 |
+
content_css : "css/content.css",
|
100 |
+
|
101 |
+
// Drop lists for link/image/media/template dialogs
|
102 |
+
template_external_list_url : "lists/template_list.js",
|
103 |
+
external_link_list_url : "lists/link_list.js",
|
104 |
+
external_image_list_url : "lists/image_list.js",
|
105 |
+
media_external_list_url : "lists/media_list.js",
|
106 |
+
|
107 |
+
// Replace values for the template plugin
|
108 |
+
template_replace_values : {
|
109 |
+
username : "Some User",
|
110 |
+
staffid : "991234"
|
111 |
+
}
|
112 |
+
});
|
113 |
+
|
114 |
+
// O2k7 skin (silver)
|
115 |
+
tinyMCE.init({
|
116 |
+
// General options
|
117 |
+
mode : "exact",
|
118 |
+
elements : "elm4",
|
119 |
+
theme : "advanced",
|
120 |
+
skin : "o2k7",
|
121 |
+
skin_variant : "black",
|
122 |
+
plugins : "lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups,autosave",
|
123 |
+
|
124 |
+
// Theme options
|
125 |
+
theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
|
126 |
+
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
|
127 |
+
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
|
128 |
+
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft",
|
129 |
+
theme_advanced_toolbar_location : "top",
|
130 |
+
theme_advanced_toolbar_align : "left",
|
131 |
+
theme_advanced_statusbar_location : "bottom",
|
132 |
+
theme_advanced_resizing : true,
|
133 |
+
|
134 |
+
// Example content CSS (should be your site CSS)
|
135 |
+
content_css : "css/content.css",
|
136 |
+
|
137 |
+
// Drop lists for link/image/media/template dialogs
|
138 |
+
template_external_list_url : "lists/template_list.js",
|
139 |
+
external_link_list_url : "lists/link_list.js",
|
140 |
+
external_image_list_url : "lists/image_list.js",
|
141 |
+
media_external_list_url : "lists/media_list.js",
|
142 |
+
|
143 |
+
// Replace values for the template plugin
|
144 |
+
template_replace_values : {
|
145 |
+
username : "Some User",
|
146 |
+
staffid : "991234"
|
147 |
+
}
|
148 |
+
});
|
149 |
+
</script>
|
150 |
+
<!-- /TinyMCE -->
|
151 |
+
|
152 |
+
</head>
|
153 |
+
<body>
|
154 |
+
|
155 |
+
<form method="post" action="http://tinymce.moxiecode.com/dump.php?example=true">
|
156 |
+
<h3>Skin support example</h3>
|
157 |
+
|
158 |
+
<p>
|
159 |
+
This page displays the two skins that TinyMCE comes with. You can make your own by creating a CSS file in themes/advanced/skins/<yout skin>/ui.css
|
160 |
+
There are more examples on how to use TinyMCE in the <a href="http://tinymce.moxiecode.com/examples/">Wiki</a>.
|
161 |
+
</p>
|
162 |
+
|
163 |
+
<!-- Gets replaced with TinyMCE, remember HTML in a textarea should be encoded -->
|
164 |
+
<textarea id="elm1" name="elm1" rows="15" cols="80" style="width: 80%">
|
165 |
+
<p>
|
166 |
+
This is some example text that you can edit inside the <strong>TinyMCE editor</strong>.
|
167 |
+
</p>
|
168 |
+
<p>
|
169 |
+
Nam nisi elit, cursus in rhoncus sit amet, pulvinar laoreet leo. Nam sed lectus quam, ut sagittis tellus. Quisque dignissim mauris a augue rutrum tempor. Donec vitae purus nec massa vestibulum ornare sit amet id tellus. Nunc quam mauris, fermentum nec lacinia eget, sollicitudin nec ante. Aliquam molestie volutpat dapibus. Nunc interdum viverra sodales. Morbi laoreet pulvinar gravida. Quisque ut turpis sagittis nunc accumsan vehicula. Duis elementum congue ultrices. Cras faucibus feugiat arcu quis lacinia. In hac habitasse platea dictumst. Pellentesque fermentum magna sit amet tellus varius ullamcorper. Vestibulum at urna augue, eget varius neque. Fusce facilisis venenatis dapibus. Integer non sem at arcu euismod tempor nec sed nisl. Morbi ultricies, mauris ut ultricies adipiscing, felis odio condimentum massa, et luctus est nunc nec eros.
|
170 |
+
</p>
|
171 |
+
</textarea>
|
172 |
+
|
173 |
+
<br />
|
174 |
+
|
175 |
+
<textarea id="elm2" name="elm2" rows="15" cols="80" style="width: 80%">
|
176 |
+
<p>
|
177 |
+
This is some example text that you can edit inside the <strong>TinyMCE editor</strong>.
|
178 |
+
</p>
|
179 |
+
<p>
|
180 |
+
Nam nisi elit, cursus in rhoncus sit amet, pulvinar laoreet leo. Nam sed lectus quam, ut sagittis tellus. Quisque dignissim mauris a augue rutrum tempor. Donec vitae purus nec massa vestibulum ornare sit amet id tellus. Nunc quam mauris, fermentum nec lacinia eget, sollicitudin nec ante. Aliquam molestie volutpat dapibus. Nunc interdum viverra sodales. Morbi laoreet pulvinar gravida. Quisque ut turpis sagittis nunc accumsan vehicula. Duis elementum congue ultrices. Cras faucibus feugiat arcu quis lacinia. In hac habitasse platea dictumst. Pellentesque fermentum magna sit amet tellus varius ullamcorper. Vestibulum at urna augue, eget varius neque. Fusce facilisis venenatis dapibus. Integer non sem at arcu euismod tempor nec sed nisl. Morbi ultricies, mauris ut ultricies adipiscing, felis odio condimentum massa, et luctus est nunc nec eros.
|
181 |
+
</p>
|
182 |
+
</textarea>
|
183 |
+
|
184 |
+
<br />
|
185 |
+
|
186 |
+
<textarea id="elm3" name="elm3" rows="15" cols="80" style="width: 80%">
|
187 |
+
<p>
|
188 |
+
This is some example text that you can edit inside the <strong>TinyMCE editor</strong>.
|
189 |
+
</p>
|
190 |
+
<p>
|
191 |
+
Nam nisi elit, cursus in rhoncus sit amet, pulvinar laoreet leo. Nam sed lectus quam, ut sagittis tellus. Quisque dignissim mauris a augue rutrum tempor. Donec vitae purus nec massa vestibulum ornare sit amet id tellus. Nunc quam mauris, fermentum nec lacinia eget, sollicitudin nec ante. Aliquam molestie volutpat dapibus. Nunc interdum viverra sodales. Morbi laoreet pulvinar gravida. Quisque ut turpis sagittis nunc accumsan vehicula. Duis elementum congue ultrices. Cras faucibus feugiat arcu quis lacinia. In hac habitasse platea dictumst. Pellentesque fermentum magna sit amet tellus varius ullamcorper. Vestibulum at urna augue, eget varius neque. Fusce facilisis venenatis dapibus. Integer non sem at arcu euismod tempor nec sed nisl. Morbi ultricies, mauris ut ultricies adipiscing, felis odio condimentum massa, et luctus est nunc nec eros.
|
192 |
+
</p>
|
193 |
+
</textarea>
|
194 |
+
|
195 |
+
<br />
|
196 |
+
|
197 |
+
<textarea id="elm4" name="elm4" rows="15" cols="80" style="width: 80%">
|
198 |
+
<p>
|
199 |
+
This is some example text that you can edit inside the <strong>TinyMCE editor</strong>.
|
200 |
+
</p>
|
201 |
+
<p>
|
202 |
+
Nam nisi elit, cursus in rhoncus sit amet, pulvinar laoreet leo. Nam sed lectus quam, ut sagittis tellus. Quisque dignissim mauris a augue rutrum tempor. Donec vitae purus nec massa vestibulum ornare sit amet id tellus. Nunc quam mauris, fermentum nec lacinia eget, sollicitudin nec ante. Aliquam molestie volutpat dapibus. Nunc interdum viverra sodales. Morbi laoreet pulvinar gravida. Quisque ut turpis sagittis nunc accumsan vehicula. Duis elementum congue ultrices. Cras faucibus feugiat arcu quis lacinia. In hac habitasse platea dictumst. Pellentesque fermentum magna sit amet tellus varius ullamcorper. Vestibulum at urna augue, eget varius neque. Fusce facilisis venenatis dapibus. Integer non sem at arcu euismod tempor nec sed nisl. Morbi ultricies, mauris ut ultricies adipiscing, felis odio condimentum massa, et luctus est nunc nec eros.
|
203 |
+
</p>
|
204 |
+
</textarea>
|
205 |
+
|
206 |
+
<br />
|
207 |
+
<input type="submit" name="save" value="Submit" />
|
208 |
+
<input type="reset" name="reset" value="Reset" />
|
209 |
+
</form>
|
210 |
+
<script type="text/javascript">
|
211 |
+
if (document.location.protocol == 'file:') {
|
212 |
+
alert("The examples might not work properly on the local file system due to security settings in your browser. Please use a real webserver.");
|
213 |
+
}
|
214 |
+
</script>
|
215 |
+
</body>
|
216 |
+
</html>
|
js/ip_pdffree/tinymce/examples/templates/layout1.htm
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<table border="1">
|
2 |
+
<thead>
|
3 |
+
<tr>
|
4 |
+
<td>Column 1</td>
|
5 |
+
<td>Column 2</td>
|
6 |
+
</tr>
|
7 |
+
</thead>
|
8 |
+
|
9 |
+
<tbody>
|
10 |
+
<tr>
|
11 |
+
<td>Username: {$username}</td>
|
12 |
+
<td>Staffid: {$staffid}</td>
|
13 |
+
</tr>
|
14 |
+
</tbody>
|
15 |
+
</table>
|
js/ip_pdffree/tinymce/examples/templates/snippet1.htm
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
This is just some <strong>code</strong>.
|
js/ip_pdffree/tinymce/examples/word.html
ADDED
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2 |
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
+
<head>
|
4 |
+
<title>Word processor example</title>
|
5 |
+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
6 |
+
<!-- TinyMCE -->
|
7 |
+
<script type="text/javascript" src="../jscripts/tiny_mce/tiny_mce.js"></script>
|
8 |
+
<script type="text/javascript">
|
9 |
+
tinyMCE.init({
|
10 |
+
// General options
|
11 |
+
mode : "textareas",
|
12 |
+
theme : "advanced",
|
13 |
+
skin : "o2k7",
|
14 |
+
plugins : "autolink,lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,inlinepopups,autosave",
|
15 |
+
|
16 |
+
// Theme options
|
17 |
+
theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",
|
18 |
+
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
|
19 |
+
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
|
20 |
+
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft",
|
21 |
+
theme_advanced_toolbar_location : "top",
|
22 |
+
theme_advanced_toolbar_align : "left",
|
23 |
+
theme_advanced_statusbar_location : "bottom",
|
24 |
+
theme_advanced_resizing : true,
|
25 |
+
|
26 |
+
// Example word content CSS (should be your site CSS) this one removes paragraph margins
|
27 |
+
content_css : "css/word.css",
|
28 |
+
|
29 |
+
// Drop lists for link/image/media/template dialogs
|
30 |
+
template_external_list_url : "lists/template_list.js",
|
31 |
+
external_link_list_url : "lists/link_list.js",
|
32 |
+
external_image_list_url : "lists/image_list.js",
|
33 |
+
media_external_list_url : "lists/media_list.js",
|
34 |
+
|
35 |
+
// Replace values for the template plugin
|
36 |
+
template_replace_values : {
|
37 |
+
username : "Some User",
|
38 |
+
staffid : "991234"
|
39 |
+
}
|
40 |
+
});
|
41 |
+
</script>
|
42 |
+
<!-- /TinyMCE -->
|
43 |
+
|
44 |
+
</head>
|
45 |
+
<body>
|
46 |
+
|
47 |
+
<form method="post" action="http://tinymce.moxiecode.com/dump.php?example=true">
|
48 |
+
<h3>Word processor example</h3>
|
49 |
+
|
50 |
+
<p>
|
51 |
+
This page shows you how to configure TinyMCE to work more like common word processors.
|
52 |
+
There are more examples on how to use TinyMCE in the <a href="http://tinymce.moxiecode.com/examples/">Wiki</a>.
|
53 |
+
</p>
|
54 |
+
|
55 |
+
<!-- Gets replaced with TinyMCE, remember HTML in a textarea should be encoded -->
|
56 |
+
<textarea id="elm1" name="elm1" rows="15" cols="80" style="width: 80%">
|
57 |
+
<p>This is the first paragraph.</p>
|
58 |
+
<p>This is the second paragraph.</p>
|
59 |
+
<p>This is the third paragraph.</p>
|
60 |
+
</textarea>
|
61 |
+
|
62 |
+
<br />
|
63 |
+
<input type="submit" name="save" value="Submit" />
|
64 |
+
<input type="reset" name="reset" value="Reset" />
|
65 |
+
</form>
|
66 |
+
<script type="text/javascript">
|
67 |
+
if (document.location.protocol == 'file:') {
|
68 |
+
alert("The examples might not work properly on the local file system due to security settings in your browser. Please use a real webserver.");
|
69 |
+
}
|
70 |
+
</script>
|
71 |
+
</body>
|
72 |
+
</html>
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/langs/en.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
tinyMCE.addI18n({en:{common:{"more_colors":"More Colors...","invalid_data":"Error: Invalid values entered, these are marked in red.","popup_blocked":"Sorry, but we have noticed that your popup-blocker has disabled a window that provides application functionality. You will need to disable popup blocking on this site in order to fully utilize this tool.","clipboard_no_support":"Currently not supported by your browser, use keyboard shortcuts instead.","clipboard_msg":"Copy/Cut/Paste is not available in Mozilla and Firefox.\nDo you want more information about this issue?","not_set":"-- Not Set --","class_name":"Class",browse:"Browse",close:"Close",cancel:"Cancel",update:"Update",insert:"Insert",apply:"Apply","edit_confirm":"Do you want to use the WYSIWYG mode for this textarea?","invalid_data_number":"{#field} must be a number","invalid_data_min":"{#field} must be a number greater than {#min}","invalid_data_size":"{#field} must be a number or percentage",value:"(value)"},contextmenu:{full:"Full",right:"Right",center:"Center",left:"Left",align:"Alignment"},insertdatetime:{"day_short":"Sun,Mon,Tue,Wed,Thu,Fri,Sat,Sun","day_long":"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday","months_short":"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec","months_long":"January,February,March,April,May,June,July,August,September,October,November,December","inserttime_desc":"Insert Time","insertdate_desc":"Insert Date","time_fmt":"%H:%M:%S","date_fmt":"%Y-%m-%d"},print:{"print_desc":"Print"},preview:{"preview_desc":"Preview"},directionality:{"rtl_desc":"Direction Right to Left","ltr_desc":"Direction Left to Right"},layer:{content:"New layer...","absolute_desc":"Toggle Absolute Positioning","backward_desc":"Move Backward","forward_desc":"Move Forward","insertlayer_desc":"Insert New Layer"},save:{"save_desc":"Save","cancel_desc":"Cancel All Changes"},nonbreaking:{"nonbreaking_desc":"Insert Non-Breaking Space Character"},iespell:{download:"ieSpell not detected. Do you want to install it now?","iespell_desc":"Check Spelling"},advhr:{"delta_height":"","delta_width":"","advhr_desc":"Insert Horizontal Line"},emotions:{"delta_height":"","delta_width":"","emotions_desc":"Emotions"},searchreplace:{"replace_desc":"Find/Replace","delta_width":"","delta_height":"","search_desc":"Find"},advimage:{"delta_width":"","image_desc":"Insert/Edit Image","delta_height":""},advlink:{"delta_height":"","delta_width":"","link_desc":"Insert/Edit Link"},xhtmlxtras:{"attribs_delta_height":"","attribs_delta_width":"","ins_delta_height":"","ins_delta_width":"","del_delta_height":"","del_delta_width":"","acronym_delta_height":"","acronym_delta_width":"","abbr_delta_height":"","abbr_delta_width":"","cite_delta_height":"","cite_delta_width":"","attribs_desc":"Insert/Edit Attributes","ins_desc":"Insertion","del_desc":"Deletion","acronym_desc":"Acronym","abbr_desc":"Abbreviation","cite_desc":"Citation"},style:{"delta_height":"","delta_width":"",desc:"Edit CSS Style"},paste:{"plaintext_mode_stick":"Paste is now in plain text mode. Click again to toggle back to regular paste mode.","plaintext_mode":"Paste is now in plain text mode. Click again to toggle back to regular paste mode. After you paste something you will be returned to regular paste mode.","selectall_desc":"Select All","paste_word_desc":"Paste from Word","paste_text_desc":"Paste as Plain Text"},"paste_dlg":{"word_title":"Use Ctrl+V on your keyboard to paste the text into the window.","text_linebreaks":"Keep Linebreaks","text_title":"Use Ctrl+V on your keyboard to paste the text into the window."},table:{"merge_cells_delta_height":"","merge_cells_delta_width":"","table_delta_height":"","table_delta_width":"","cellprops_delta_height":"","cellprops_delta_width":"","rowprops_delta_height":"","rowprops_delta_width":"",cell:"Cell",col:"Column",row:"Row",del:"Delete Table","copy_row_desc":"Copy Table Row","cut_row_desc":"Cut Table Row","paste_row_after_desc":"Paste Table Row After","paste_row_before_desc":"Paste Table Row Before","props_desc":"Table Properties","cell_desc":"Table Cell Properties","row_desc":"Table Row Properties","merge_cells_desc":"Merge Table Cells","split_cells_desc":"Split Merged Table Cells","delete_col_desc":"Delete Column","col_after_desc":"Insert Column After","col_before_desc":"Insert Column Before","delete_row_desc":"Delete Row","row_after_desc":"Insert Row After","row_before_desc":"Insert Row Before",desc:"Insert/Edit Table"},autosave:{"warning_message":"If you restore the saved content, you will lose all the content that is currently in the editor.\n\nAre you sure you want to restore the saved content?","restore_content":"Restore auto-saved content.","unload_msg":"The changes you made will be lost if you navigate away from this page."},fullscreen:{desc:"Toggle Full Screen Mode"},media:{"delta_height":"","delta_width":"",edit:"Edit Embedded Media",desc:"Insert/Edit Embedded Media"},fullpage:{desc:"Document Properties","delta_width":"","delta_height":""},template:{desc:"Insert Predefined Template Content"},visualchars:{desc:"Show/Hide Visual Control Characters"},spellchecker:{desc:"Toggle Spell Checker",menu:"Spell Checker Settings","ignore_word":"Ignore Word","ignore_words":"Ignore All",langs:"Languages",wait:"Please wait...",sug:"Suggestions","no_sug":"No Suggestions","no_mpell":"No misspellings found.","learn_word":"Learn word"},pagebreak:{desc:"Insert Page Break for Printing"},advlist:{types:"Types",def:"Default","lower_alpha":"Lower Alpha","lower_greek":"Lower Greek","lower_roman":"Lower Roman","upper_alpha":"Upper Alpha","upper_roman":"Upper Roman",circle:"Circle",disc:"Disc",square:"Square"},colors:{"333300":"Dark olive","993300":"Burnt orange","000000":"Black","003300":"Dark green","003366":"Dark azure","000080":"Navy Blue","333399":"Indigo","333333":"Very dark gray","800000":"Maroon",FF6600:"Orange","808000":"Olive","008000":"Green","008080":"Teal","0000FF":"Blue","666699":"Grayish blue","808080":"Gray",FF0000:"Red",FF9900:"Amber","99CC00":"Yellow green","339966":"Sea green","33CCCC":"Turquoise","3366FF":"Royal blue","800080":"Purple","999999":"Medium gray",FF00FF:"Magenta",FFCC00:"Gold",FFFF00:"Yellow","00FF00":"Lime","00FFFF":"Aqua","00CCFF":"Sky blue","993366":"Brown",C0C0C0:"Silver",FF99CC:"Pink",FFCC99:"Peach",FFFF99:"Light yellow",CCFFCC:"Pale green",CCFFFF:"Pale cyan","99CCFF":"Light sky blue",CC99FF:"Plum",FFFFFF:"White"},aria:{"rich_text_area":"Rich Text Area"},wordcount:{words:"Words:"},visualblocks:{desc:'Show/hide block elements'}}});
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/license.txt
ADDED
@@ -0,0 +1,504 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
GNU LESSER GENERAL PUBLIC LICENSE
|
2 |
+
Version 2.1, February 1999
|
3 |
+
|
4 |
+
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
5 |
+
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
6 |
+
Everyone is permitted to copy and distribute verbatim copies
|
7 |
+
of this license document, but changing it is not allowed.
|
8 |
+
|
9 |
+
[This is the first released version of the Lesser GPL. It also counts
|
10 |
+
as the successor of the GNU Library Public License, version 2, hence
|
11 |
+
the version number 2.1.]
|
12 |
+
|
13 |
+
Preamble
|
14 |
+
|
15 |
+
The licenses for most software are designed to take away your
|
16 |
+
freedom to share and change it. By contrast, the GNU General Public
|
17 |
+
Licenses are intended to guarantee your freedom to share and change
|
18 |
+
free software--to make sure the software is free for all its users.
|
19 |
+
|
20 |
+
This license, the Lesser General Public License, applies to some
|
21 |
+
specially designated software packages--typically libraries--of the
|
22 |
+
Free Software Foundation and other authors who decide to use it. You
|
23 |
+
can use it too, but we suggest you first think carefully about whether
|
24 |
+
this license or the ordinary General Public License is the better
|
25 |
+
strategy to use in any particular case, based on the explanations below.
|
26 |
+
|
27 |
+
When we speak of free software, we are referring to freedom of use,
|
28 |
+
not price. Our General Public Licenses are designed to make sure that
|
29 |
+
you have the freedom to distribute copies of free software (and charge
|
30 |
+
for this service if you wish); that you receive source code or can get
|
31 |
+
it if you want it; that you can change the software and use pieces of
|
32 |
+
it in new free programs; and that you are informed that you can do
|
33 |
+
these things.
|
34 |
+
|
35 |
+
To protect your rights, we need to make restrictions that forbid
|
36 |
+
distributors to deny you these rights or to ask you to surrender these
|
37 |
+
rights. These restrictions translate to certain responsibilities for
|
38 |
+
you if you distribute copies of the library or if you modify it.
|
39 |
+
|
40 |
+
For example, if you distribute copies of the library, whether gratis
|
41 |
+
or for a fee, you must give the recipients all the rights that we gave
|
42 |
+
you. You must make sure that they, too, receive or can get the source
|
43 |
+
code. If you link other code with the library, you must provide
|
44 |
+
complete object files to the recipients, so that they can relink them
|
45 |
+
with the library after making changes to the library and recompiling
|
46 |
+
it. And you must show them these terms so they know their rights.
|
47 |
+
|
48 |
+
We protect your rights with a two-step method: (1) we copyright the
|
49 |
+
library, and (2) we offer you this license, which gives you legal
|
50 |
+
permission to copy, distribute and/or modify the library.
|
51 |
+
|
52 |
+
To protect each distributor, we want to make it very clear that
|
53 |
+
there is no warranty for the free library. Also, if the library is
|
54 |
+
modified by someone else and passed on, the recipients should know
|
55 |
+
that what they have is not the original version, so that the original
|
56 |
+
author's reputation will not be affected by problems that might be
|
57 |
+
introduced by others.
|
58 |
+
|
59 |
+
Finally, software patents pose a constant threat to the existence of
|
60 |
+
any free program. We wish to make sure that a company cannot
|
61 |
+
effectively restrict the users of a free program by obtaining a
|
62 |
+
restrictive license from a patent holder. Therefore, we insist that
|
63 |
+
any patent license obtained for a version of the library must be
|
64 |
+
consistent with the full freedom of use specified in this license.
|
65 |
+
|
66 |
+
Most GNU software, including some libraries, is covered by the
|
67 |
+
ordinary GNU General Public License. This license, the GNU Lesser
|
68 |
+
General Public License, applies to certain designated libraries, and
|
69 |
+
is quite different from the ordinary General Public License. We use
|
70 |
+
this license for certain libraries in order to permit linking those
|
71 |
+
libraries into non-free programs.
|
72 |
+
|
73 |
+
When a program is linked with a library, whether statically or using
|
74 |
+
a shared library, the combination of the two is legally speaking a
|
75 |
+
combined work, a derivative of the original library. The ordinary
|
76 |
+
General Public License therefore permits such linking only if the
|
77 |
+
entire combination fits its criteria of freedom. The Lesser General
|
78 |
+
Public License permits more lax criteria for linking other code with
|
79 |
+
the library.
|
80 |
+
|
81 |
+
We call this license the "Lesser" General Public License because it
|
82 |
+
does Less to protect the user's freedom than the ordinary General
|
83 |
+
Public License. It also provides other free software developers Less
|
84 |
+
of an advantage over competing non-free programs. These disadvantages
|
85 |
+
are the reason we use the ordinary General Public License for many
|
86 |
+
libraries. However, the Lesser license provides advantages in certain
|
87 |
+
special circumstances.
|
88 |
+
|
89 |
+
For example, on rare occasions, there may be a special need to
|
90 |
+
encourage the widest possible use of a certain library, so that it becomes
|
91 |
+
a de-facto standard. To achieve this, non-free programs must be
|
92 |
+
allowed to use the library. A more frequent case is that a free
|
93 |
+
library does the same job as widely used non-free libraries. In this
|
94 |
+
case, there is little to gain by limiting the free library to free
|
95 |
+
software only, so we use the Lesser General Public License.
|
96 |
+
|
97 |
+
In other cases, permission to use a particular library in non-free
|
98 |
+
programs enables a greater number of people to use a large body of
|
99 |
+
free software. For example, permission to use the GNU C Library in
|
100 |
+
non-free programs enables many more people to use the whole GNU
|
101 |
+
operating system, as well as its variant, the GNU/Linux operating
|
102 |
+
system.
|
103 |
+
|
104 |
+
Although the Lesser General Public License is Less protective of the
|
105 |
+
users' freedom, it does ensure that the user of a program that is
|
106 |
+
linked with the Library has the freedom and the wherewithal to run
|
107 |
+
that program using a modified version of the Library.
|
108 |
+
|
109 |
+
The precise terms and conditions for copying, distribution and
|
110 |
+
modification follow. Pay close attention to the difference between a
|
111 |
+
"work based on the library" and a "work that uses the library". The
|
112 |
+
former contains code derived from the library, whereas the latter must
|
113 |
+
be combined with the library in order to run.
|
114 |
+
|
115 |
+
GNU LESSER GENERAL PUBLIC LICENSE
|
116 |
+
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
117 |
+
|
118 |
+
0. This License Agreement applies to any software library or other
|
119 |
+
program which contains a notice placed by the copyright holder or
|
120 |
+
other authorized party saying it may be distributed under the terms of
|
121 |
+
this Lesser General Public License (also called "this License").
|
122 |
+
Each licensee is addressed as "you".
|
123 |
+
|
124 |
+
A "library" means a collection of software functions and/or data
|
125 |
+
prepared so as to be conveniently linked with application programs
|
126 |
+
(which use some of those functions and data) to form executables.
|
127 |
+
|
128 |
+
The "Library", below, refers to any such software library or work
|
129 |
+
which has been distributed under these terms. A "work based on the
|
130 |
+
Library" means either the Library or any derivative work under
|
131 |
+
copyright law: that is to say, a work containing the Library or a
|
132 |
+
portion of it, either verbatim or with modifications and/or translated
|
133 |
+
straightforwardly into another language. (Hereinafter, translation is
|
134 |
+
included without limitation in the term "modification".)
|
135 |
+
|
136 |
+
"Source code" for a work means the preferred form of the work for
|
137 |
+
making modifications to it. For a library, complete source code means
|
138 |
+
all the source code for all modules it contains, plus any associated
|
139 |
+
interface definition files, plus the scripts used to control compilation
|
140 |
+
and installation of the library.
|
141 |
+
|
142 |
+
Activities other than copying, distribution and modification are not
|
143 |
+
covered by this License; they are outside its scope. The act of
|
144 |
+
running a program using the Library is not restricted, and output from
|
145 |
+
such a program is covered only if its contents constitute a work based
|
146 |
+
on the Library (independent of the use of the Library in a tool for
|
147 |
+
writing it). Whether that is true depends on what the Library does
|
148 |
+
and what the program that uses the Library does.
|
149 |
+
|
150 |
+
1. You may copy and distribute verbatim copies of the Library's
|
151 |
+
complete source code as you receive it, in any medium, provided that
|
152 |
+
you conspicuously and appropriately publish on each copy an
|
153 |
+
appropriate copyright notice and disclaimer of warranty; keep intact
|
154 |
+
all the notices that refer to this License and to the absence of any
|
155 |
+
warranty; and distribute a copy of this License along with the
|
156 |
+
Library.
|
157 |
+
|
158 |
+
You may charge a fee for the physical act of transferring a copy,
|
159 |
+
and you may at your option offer warranty protection in exchange for a
|
160 |
+
fee.
|
161 |
+
|
162 |
+
2. You may modify your copy or copies of the Library or any portion
|
163 |
+
of it, thus forming a work based on the Library, and copy and
|
164 |
+
distribute such modifications or work under the terms of Section 1
|
165 |
+
above, provided that you also meet all of these conditions:
|
166 |
+
|
167 |
+
a) The modified work must itself be a software library.
|
168 |
+
|
169 |
+
b) You must cause the files modified to carry prominent notices
|
170 |
+
stating that you changed the files and the date of any change.
|
171 |
+
|
172 |
+
c) You must cause the whole of the work to be licensed at no
|
173 |
+
charge to all third parties under the terms of this License.
|
174 |
+
|
175 |
+
d) If a facility in the modified Library refers to a function or a
|
176 |
+
table of data to be supplied by an application program that uses
|
177 |
+
the facility, other than as an argument passed when the facility
|
178 |
+
is invoked, then you must make a good faith effort to ensure that,
|
179 |
+
in the event an application does not supply such function or
|
180 |
+
table, the facility still operates, and performs whatever part of
|
181 |
+
its purpose remains meaningful.
|
182 |
+
|
183 |
+
(For example, a function in a library to compute square roots has
|
184 |
+
a purpose that is entirely well-defined independent of the
|
185 |
+
application. Therefore, Subsection 2d requires that any
|
186 |
+
application-supplied function or table used by this function must
|
187 |
+
be optional: if the application does not supply it, the square
|
188 |
+
root function must still compute square roots.)
|
189 |
+
|
190 |
+
These requirements apply to the modified work as a whole. If
|
191 |
+
identifiable sections of that work are not derived from the Library,
|
192 |
+
and can be reasonably considered independent and separate works in
|
193 |
+
themselves, then this License, and its terms, do not apply to those
|
194 |
+
sections when you distribute them as separate works. But when you
|
195 |
+
distribute the same sections as part of a whole which is a work based
|
196 |
+
on the Library, the distribution of the whole must be on the terms of
|
197 |
+
this License, whose permissions for other licensees extend to the
|
198 |
+
entire whole, and thus to each and every part regardless of who wrote
|
199 |
+
it.
|
200 |
+
|
201 |
+
Thus, it is not the intent of this section to claim rights or contest
|
202 |
+
your rights to work written entirely by you; rather, the intent is to
|
203 |
+
exercise the right to control the distribution of derivative or
|
204 |
+
collective works based on the Library.
|
205 |
+
|
206 |
+
In addition, mere aggregation of another work not based on the Library
|
207 |
+
with the Library (or with a work based on the Library) on a volume of
|
208 |
+
a storage or distribution medium does not bring the other work under
|
209 |
+
the scope of this License.
|
210 |
+
|
211 |
+
3. You may opt to apply the terms of the ordinary GNU General Public
|
212 |
+
License instead of this License to a given copy of the Library. To do
|
213 |
+
this, you must alter all the notices that refer to this License, so
|
214 |
+
that they refer to the ordinary GNU General Public License, version 2,
|
215 |
+
instead of to this License. (If a newer version than version 2 of the
|
216 |
+
ordinary GNU General Public License has appeared, then you can specify
|
217 |
+
that version instead if you wish.) Do not make any other change in
|
218 |
+
these notices.
|
219 |
+
|
220 |
+
Once this change is made in a given copy, it is irreversible for
|
221 |
+
that copy, so the ordinary GNU General Public License applies to all
|
222 |
+
subsequent copies and derivative works made from that copy.
|
223 |
+
|
224 |
+
This option is useful when you wish to copy part of the code of
|
225 |
+
the Library into a program that is not a library.
|
226 |
+
|
227 |
+
4. You may copy and distribute the Library (or a portion or
|
228 |
+
derivative of it, under Section 2) in object code or executable form
|
229 |
+
under the terms of Sections 1 and 2 above provided that you accompany
|
230 |
+
it with the complete corresponding machine-readable source code, which
|
231 |
+
must be distributed under the terms of Sections 1 and 2 above on a
|
232 |
+
medium customarily used for software interchange.
|
233 |
+
|
234 |
+
If distribution of object code is made by offering access to copy
|
235 |
+
from a designated place, then offering equivalent access to copy the
|
236 |
+
source code from the same place satisfies the requirement to
|
237 |
+
distribute the source code, even though third parties are not
|
238 |
+
compelled to copy the source along with the object code.
|
239 |
+
|
240 |
+
5. A program that contains no derivative of any portion of the
|
241 |
+
Library, but is designed to work with the Library by being compiled or
|
242 |
+
linked with it, is called a "work that uses the Library". Such a
|
243 |
+
work, in isolation, is not a derivative work of the Library, and
|
244 |
+
therefore falls outside the scope of this License.
|
245 |
+
|
246 |
+
However, linking a "work that uses the Library" with the Library
|
247 |
+
creates an executable that is a derivative of the Library (because it
|
248 |
+
contains portions of the Library), rather than a "work that uses the
|
249 |
+
library". The executable is therefore covered by this License.
|
250 |
+
Section 6 states terms for distribution of such executables.
|
251 |
+
|
252 |
+
When a "work that uses the Library" uses material from a header file
|
253 |
+
that is part of the Library, the object code for the work may be a
|
254 |
+
derivative work of the Library even though the source code is not.
|
255 |
+
Whether this is true is especially significant if the work can be
|
256 |
+
linked without the Library, or if the work is itself a library. The
|
257 |
+
threshold for this to be true is not precisely defined by law.
|
258 |
+
|
259 |
+
If such an object file uses only numerical parameters, data
|
260 |
+
structure layouts and accessors, and small macros and small inline
|
261 |
+
functions (ten lines or less in length), then the use of the object
|
262 |
+
file is unrestricted, regardless of whether it is legally a derivative
|
263 |
+
work. (Executables containing this object code plus portions of the
|
264 |
+
Library will still fall under Section 6.)
|
265 |
+
|
266 |
+
Otherwise, if the work is a derivative of the Library, you may
|
267 |
+
distribute the object code for the work under the terms of Section 6.
|
268 |
+
Any executables containing that work also fall under Section 6,
|
269 |
+
whether or not they are linked directly with the Library itself.
|
270 |
+
|
271 |
+
6. As an exception to the Sections above, you may also combine or
|
272 |
+
link a "work that uses the Library" with the Library to produce a
|
273 |
+
work containing portions of the Library, and distribute that work
|
274 |
+
under terms of your choice, provided that the terms permit
|
275 |
+
modification of the work for the customer's own use and reverse
|
276 |
+
engineering for debugging such modifications.
|
277 |
+
|
278 |
+
You must give prominent notice with each copy of the work that the
|
279 |
+
Library is used in it and that the Library and its use are covered by
|
280 |
+
this License. You must supply a copy of this License. If the work
|
281 |
+
during execution displays copyright notices, you must include the
|
282 |
+
copyright notice for the Library among them, as well as a reference
|
283 |
+
directing the user to the copy of this License. Also, you must do one
|
284 |
+
of these things:
|
285 |
+
|
286 |
+
a) Accompany the work with the complete corresponding
|
287 |
+
machine-readable source code for the Library including whatever
|
288 |
+
changes were used in the work (which must be distributed under
|
289 |
+
Sections 1 and 2 above); and, if the work is an executable linked
|
290 |
+
with the Library, with the complete machine-readable "work that
|
291 |
+
uses the Library", as object code and/or source code, so that the
|
292 |
+
user can modify the Library and then relink to produce a modified
|
293 |
+
executable containing the modified Library. (It is understood
|
294 |
+
that the user who changes the contents of definitions files in the
|
295 |
+
Library will not necessarily be able to recompile the application
|
296 |
+
to use the modified definitions.)
|
297 |
+
|
298 |
+
b) Use a suitable shared library mechanism for linking with the
|
299 |
+
Library. A suitable mechanism is one that (1) uses at run time a
|
300 |
+
copy of the library already present on the user's computer system,
|
301 |
+
rather than copying library functions into the executable, and (2)
|
302 |
+
will operate properly with a modified version of the library, if
|
303 |
+
the user installs one, as long as the modified version is
|
304 |
+
interface-compatible with the version that the work was made with.
|
305 |
+
|
306 |
+
c) Accompany the work with a written offer, valid for at
|
307 |
+
least three years, to give the same user the materials
|
308 |
+
specified in Subsection 6a, above, for a charge no more
|
309 |
+
than the cost of performing this distribution.
|
310 |
+
|
311 |
+
d) If distribution of the work is made by offering access to copy
|
312 |
+
from a designated place, offer equivalent access to copy the above
|
313 |
+
specified materials from the same place.
|
314 |
+
|
315 |
+
e) Verify that the user has already received a copy of these
|
316 |
+
materials or that you have already sent this user a copy.
|
317 |
+
|
318 |
+
For an executable, the required form of the "work that uses the
|
319 |
+
Library" must include any data and utility programs needed for
|
320 |
+
reproducing the executable from it. However, as a special exception,
|
321 |
+
the materials to be distributed need not include anything that is
|
322 |
+
normally distributed (in either source or binary form) with the major
|
323 |
+
components (compiler, kernel, and so on) of the operating system on
|
324 |
+
which the executable runs, unless that component itself accompanies
|
325 |
+
the executable.
|
326 |
+
|
327 |
+
It may happen that this requirement contradicts the license
|
328 |
+
restrictions of other proprietary libraries that do not normally
|
329 |
+
accompany the operating system. Such a contradiction means you cannot
|
330 |
+
use both them and the Library together in an executable that you
|
331 |
+
distribute.
|
332 |
+
|
333 |
+
7. You may place library facilities that are a work based on the
|
334 |
+
Library side-by-side in a single library together with other library
|
335 |
+
facilities not covered by this License, and distribute such a combined
|
336 |
+
library, provided that the separate distribution of the work based on
|
337 |
+
the Library and of the other library facilities is otherwise
|
338 |
+
permitted, and provided that you do these two things:
|
339 |
+
|
340 |
+
a) Accompany the combined library with a copy of the same work
|
341 |
+
based on the Library, uncombined with any other library
|
342 |
+
facilities. This must be distributed under the terms of the
|
343 |
+
Sections above.
|
344 |
+
|
345 |
+
b) Give prominent notice with the combined library of the fact
|
346 |
+
that part of it is a work based on the Library, and explaining
|
347 |
+
where to find the accompanying uncombined form of the same work.
|
348 |
+
|
349 |
+
8. You may not copy, modify, sublicense, link with, or distribute
|
350 |
+
the Library except as expressly provided under this License. Any
|
351 |
+
attempt otherwise to copy, modify, sublicense, link with, or
|
352 |
+
distribute the Library is void, and will automatically terminate your
|
353 |
+
rights under this License. However, parties who have received copies,
|
354 |
+
or rights, from you under this License will not have their licenses
|
355 |
+
terminated so long as such parties remain in full compliance.
|
356 |
+
|
357 |
+
9. You are not required to accept this License, since you have not
|
358 |
+
signed it. However, nothing else grants you permission to modify or
|
359 |
+
distribute the Library or its derivative works. These actions are
|
360 |
+
prohibited by law if you do not accept this License. Therefore, by
|
361 |
+
modifying or distributing the Library (or any work based on the
|
362 |
+
Library), you indicate your acceptance of this License to do so, and
|
363 |
+
all its terms and conditions for copying, distributing or modifying
|
364 |
+
the Library or works based on it.
|
365 |
+
|
366 |
+
10. Each time you redistribute the Library (or any work based on the
|
367 |
+
Library), the recipient automatically receives a license from the
|
368 |
+
original licensor to copy, distribute, link with or modify the Library
|
369 |
+
subject to these terms and conditions. You may not impose any further
|
370 |
+
restrictions on the recipients' exercise of the rights granted herein.
|
371 |
+
You are not responsible for enforcing compliance by third parties with
|
372 |
+
this License.
|
373 |
+
|
374 |
+
11. If, as a consequence of a court judgment or allegation of patent
|
375 |
+
infringement or for any other reason (not limited to patent issues),
|
376 |
+
conditions are imposed on you (whether by court order, agreement or
|
377 |
+
otherwise) that contradict the conditions of this License, they do not
|
378 |
+
excuse you from the conditions of this License. If you cannot
|
379 |
+
distribute so as to satisfy simultaneously your obligations under this
|
380 |
+
License and any other pertinent obligations, then as a consequence you
|
381 |
+
may not distribute the Library at all. For example, if a patent
|
382 |
+
license would not permit royalty-free redistribution of the Library by
|
383 |
+
all those who receive copies directly or indirectly through you, then
|
384 |
+
the only way you could satisfy both it and this License would be to
|
385 |
+
refrain entirely from distribution of the Library.
|
386 |
+
|
387 |
+
If any portion of this section is held invalid or unenforceable under any
|
388 |
+
particular circumstance, the balance of the section is intended to apply,
|
389 |
+
and the section as a whole is intended to apply in other circumstances.
|
390 |
+
|
391 |
+
It is not the purpose of this section to induce you to infringe any
|
392 |
+
patents or other property right claims or to contest validity of any
|
393 |
+
such claims; this section has the sole purpose of protecting the
|
394 |
+
integrity of the free software distribution system which is
|
395 |
+
implemented by public license practices. Many people have made
|
396 |
+
generous contributions to the wide range of software distributed
|
397 |
+
through that system in reliance on consistent application of that
|
398 |
+
system; it is up to the author/donor to decide if he or she is willing
|
399 |
+
to distribute software through any other system and a licensee cannot
|
400 |
+
impose that choice.
|
401 |
+
|
402 |
+
This section is intended to make thoroughly clear what is believed to
|
403 |
+
be a consequence of the rest of this License.
|
404 |
+
|
405 |
+
12. If the distribution and/or use of the Library is restricted in
|
406 |
+
certain countries either by patents or by copyrighted interfaces, the
|
407 |
+
original copyright holder who places the Library under this License may add
|
408 |
+
an explicit geographical distribution limitation excluding those countries,
|
409 |
+
so that distribution is permitted only in or among countries not thus
|
410 |
+
excluded. In such case, this License incorporates the limitation as if
|
411 |
+
written in the body of this License.
|
412 |
+
|
413 |
+
13. The Free Software Foundation may publish revised and/or new
|
414 |
+
versions of the Lesser General Public License from time to time.
|
415 |
+
Such new versions will be similar in spirit to the present version,
|
416 |
+
but may differ in detail to address new problems or concerns.
|
417 |
+
|
418 |
+
Each version is given a distinguishing version number. If the Library
|
419 |
+
specifies a version number of this License which applies to it and
|
420 |
+
"any later version", you have the option of following the terms and
|
421 |
+
conditions either of that version or of any later version published by
|
422 |
+
the Free Software Foundation. If the Library does not specify a
|
423 |
+
license version number, you may choose any version ever published by
|
424 |
+
the Free Software Foundation.
|
425 |
+
|
426 |
+
14. If you wish to incorporate parts of the Library into other free
|
427 |
+
programs whose distribution conditions are incompatible with these,
|
428 |
+
write to the author to ask for permission. For software which is
|
429 |
+
copyrighted by the Free Software Foundation, write to the Free
|
430 |
+
Software Foundation; we sometimes make exceptions for this. Our
|
431 |
+
decision will be guided by the two goals of preserving the free status
|
432 |
+
of all derivatives of our free software and of promoting the sharing
|
433 |
+
and reuse of software generally.
|
434 |
+
|
435 |
+
NO WARRANTY
|
436 |
+
|
437 |
+
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
438 |
+
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
439 |
+
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
440 |
+
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
441 |
+
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
442 |
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
443 |
+
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
444 |
+
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
445 |
+
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
446 |
+
|
447 |
+
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
448 |
+
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
449 |
+
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
450 |
+
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
451 |
+
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
452 |
+
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
453 |
+
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
454 |
+
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
455 |
+
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
456 |
+
DAMAGES.
|
457 |
+
|
458 |
+
END OF TERMS AND CONDITIONS
|
459 |
+
|
460 |
+
How to Apply These Terms to Your New Libraries
|
461 |
+
|
462 |
+
If you develop a new library, and you want it to be of the greatest
|
463 |
+
possible use to the public, we recommend making it free software that
|
464 |
+
everyone can redistribute and change. You can do so by permitting
|
465 |
+
redistribution under these terms (or, alternatively, under the terms of the
|
466 |
+
ordinary General Public License).
|
467 |
+
|
468 |
+
To apply these terms, attach the following notices to the library. It is
|
469 |
+
safest to attach them to the start of each source file to most effectively
|
470 |
+
convey the exclusion of warranty; and each file should have at least the
|
471 |
+
"copyright" line and a pointer to where the full notice is found.
|
472 |
+
|
473 |
+
<one line to give the library's name and a brief idea of what it does.>
|
474 |
+
Copyright (C) <year> <name of author>
|
475 |
+
|
476 |
+
This library is free software; you can redistribute it and/or
|
477 |
+
modify it under the terms of the GNU Lesser General Public
|
478 |
+
License as published by the Free Software Foundation; either
|
479 |
+
version 2.1 of the License, or (at your option) any later version.
|
480 |
+
|
481 |
+
This library is distributed in the hope that it will be useful,
|
482 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
483 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
484 |
+
Lesser General Public License for more details.
|
485 |
+
|
486 |
+
You should have received a copy of the GNU Lesser General Public
|
487 |
+
License along with this library; if not, write to the Free Software
|
488 |
+
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
489 |
+
|
490 |
+
Also add information on how to contact you by electronic and paper mail.
|
491 |
+
|
492 |
+
You should also get your employer (if you work as a programmer) or your
|
493 |
+
school, if any, to sign a "copyright disclaimer" for the library, if
|
494 |
+
necessary. Here is a sample; alter the names:
|
495 |
+
|
496 |
+
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
497 |
+
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
498 |
+
|
499 |
+
<signature of Ty Coon>, 1 April 1990
|
500 |
+
Ty Coon, President of Vice
|
501 |
+
|
502 |
+
That's all there is to it!
|
503 |
+
|
504 |
+
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/advhr/css/advhr.css
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
input.radio {border:1px none #000; background:transparent; vertical-align:middle;}
|
2 |
+
.panel_wrapper div.current {height:80px;}
|
3 |
+
#width {width:50px; vertical-align:middle;}
|
4 |
+
#width2 {width:50px; vertical-align:middle;}
|
5 |
+
#size {width:100px;}
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/advhr/editor_plugin.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(function(){tinymce.create("tinymce.plugins.AdvancedHRPlugin",{init:function(a,b){a.addCommand("mceAdvancedHr",function(){a.windowManager.open({file:b+"/rule.htm",width:250+parseInt(a.getLang("advhr.delta_width",0)),height:160+parseInt(a.getLang("advhr.delta_height",0)),inline:1},{plugin_url:b})});a.addButton("advhr",{title:"advhr.advhr_desc",cmd:"mceAdvancedHr"});a.onNodeChange.add(function(d,c,e){c.setActive("advhr",e.nodeName=="HR")});a.onClick.add(function(c,d){d=d.target;if(d.nodeName==="HR"){c.selection.select(d)}})},getInfo:function(){return{longname:"Advanced HR",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advhr",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("advhr",tinymce.plugins.AdvancedHRPlugin)})();
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/advhr/editor_plugin_src.js
ADDED
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
tinymce.create('tinymce.plugins.AdvancedHRPlugin', {
|
13 |
+
init : function(ed, url) {
|
14 |
+
// Register commands
|
15 |
+
ed.addCommand('mceAdvancedHr', function() {
|
16 |
+
ed.windowManager.open({
|
17 |
+
file : url + '/rule.htm',
|
18 |
+
width : 250 + parseInt(ed.getLang('advhr.delta_width', 0)),
|
19 |
+
height : 160 + parseInt(ed.getLang('advhr.delta_height', 0)),
|
20 |
+
inline : 1
|
21 |
+
}, {
|
22 |
+
plugin_url : url
|
23 |
+
});
|
24 |
+
});
|
25 |
+
|
26 |
+
// Register buttons
|
27 |
+
ed.addButton('advhr', {
|
28 |
+
title : 'advhr.advhr_desc',
|
29 |
+
cmd : 'mceAdvancedHr'
|
30 |
+
});
|
31 |
+
|
32 |
+
ed.onNodeChange.add(function(ed, cm, n) {
|
33 |
+
cm.setActive('advhr', n.nodeName == 'HR');
|
34 |
+
});
|
35 |
+
|
36 |
+
ed.onClick.add(function(ed, e) {
|
37 |
+
e = e.target;
|
38 |
+
|
39 |
+
if (e.nodeName === 'HR')
|
40 |
+
ed.selection.select(e);
|
41 |
+
});
|
42 |
+
},
|
43 |
+
|
44 |
+
getInfo : function() {
|
45 |
+
return {
|
46 |
+
longname : 'Advanced HR',
|
47 |
+
author : 'Moxiecode Systems AB',
|
48 |
+
authorurl : 'http://tinymce.moxiecode.com',
|
49 |
+
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advhr',
|
50 |
+
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
51 |
+
};
|
52 |
+
}
|
53 |
+
});
|
54 |
+
|
55 |
+
// Register plugin
|
56 |
+
tinymce.PluginManager.add('advhr', tinymce.plugins.AdvancedHRPlugin);
|
57 |
+
})();
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/advhr/js/rule.js
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var AdvHRDialog = {
|
2 |
+
init : function(ed) {
|
3 |
+
var dom = ed.dom, f = document.forms[0], n = ed.selection.getNode(), w;
|
4 |
+
|
5 |
+
w = dom.getAttrib(n, 'width');
|
6 |
+
f.width.value = w ? parseInt(w) : (dom.getStyle('width') || '');
|
7 |
+
f.size.value = dom.getAttrib(n, 'size') || parseInt(dom.getStyle('height')) || '';
|
8 |
+
f.noshade.checked = !!dom.getAttrib(n, 'noshade') || !!dom.getStyle('border-width');
|
9 |
+
selectByValue(f, 'width2', w.indexOf('%') != -1 ? '%' : 'px');
|
10 |
+
},
|
11 |
+
|
12 |
+
update : function() {
|
13 |
+
var ed = tinyMCEPopup.editor, h, f = document.forms[0], st = '';
|
14 |
+
|
15 |
+
h = '<hr';
|
16 |
+
|
17 |
+
if (f.size.value) {
|
18 |
+
h += ' size="' + f.size.value + '"';
|
19 |
+
st += ' height:' + f.size.value + 'px;';
|
20 |
+
}
|
21 |
+
|
22 |
+
if (f.width.value) {
|
23 |
+
h += ' width="' + f.width.value + (f.width2.value == '%' ? '%' : '') + '"';
|
24 |
+
st += ' width:' + f.width.value + (f.width2.value == '%' ? '%' : 'px') + ';';
|
25 |
+
}
|
26 |
+
|
27 |
+
if (f.noshade.checked) {
|
28 |
+
h += ' noshade="noshade"';
|
29 |
+
st += ' border-width: 1px; border-style: solid; border-color: #CCCCCC; color: #ffffff;';
|
30 |
+
}
|
31 |
+
|
32 |
+
if (ed.settings.inline_styles)
|
33 |
+
h += ' style="' + tinymce.trim(st) + '"';
|
34 |
+
|
35 |
+
h += ' />';
|
36 |
+
|
37 |
+
ed.execCommand("mceInsertContent", false, h);
|
38 |
+
tinyMCEPopup.close();
|
39 |
+
}
|
40 |
+
};
|
41 |
+
|
42 |
+
tinyMCEPopup.requireLangPack();
|
43 |
+
tinyMCEPopup.onInit.add(AdvHRDialog.init, AdvHRDialog);
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/advhr/langs/en_dlg.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
tinyMCE.addI18n('en.advhr_dlg',{size:"Height",noshade:"No Shadow",width:"Width",normal:"Normal",widthunits:"Units"});
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/advhr/rule.htm
ADDED
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2 |
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
+
<head>
|
4 |
+
<title>{#advhr.advhr_desc}</title>
|
5 |
+
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
6 |
+
<script type="text/javascript" src="js/rule.js"></script>
|
7 |
+
<script type="text/javascript" src="../../utils/mctabs.js"></script>
|
8 |
+
<script type="text/javascript" src="../../utils/form_utils.js"></script>
|
9 |
+
<link href="css/advhr.css" rel="stylesheet" type="text/css" />
|
10 |
+
</head>
|
11 |
+
<body role="application">
|
12 |
+
<form onsubmit="AdvHRDialog.update();return false;" action="#">
|
13 |
+
<div class="tabs">
|
14 |
+
<ul>
|
15 |
+
<li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advhr.advhr_desc}</a></span></li>
|
16 |
+
</ul>
|
17 |
+
</div>
|
18 |
+
|
19 |
+
<div class="panel_wrapper">
|
20 |
+
<div id="general_panel" class="panel current">
|
21 |
+
<table role="presentation" border="0" cellpadding="4" cellspacing="0">
|
22 |
+
<tr role="group" aria-labelledby="width_label">
|
23 |
+
<td><label id="width_label" for="width">{#advhr_dlg.width}</label></td>
|
24 |
+
<td class="nowrap">
|
25 |
+
<input id="width" name="width" type="text" value="" class="mceFocus" />
|
26 |
+
<span style="display:none;" id="width_unit_label">{#advhr_dlg.widthunits}</span>
|
27 |
+
<select name="width2" id="width2" aria-labelledby="width_unit_label">
|
28 |
+
<option value="">px</option>
|
29 |
+
<option value="%">%</option>
|
30 |
+
</select>
|
31 |
+
</td>
|
32 |
+
</tr>
|
33 |
+
<tr>
|
34 |
+
<td><label for="size">{#advhr_dlg.size}</label></td>
|
35 |
+
<td><select id="size" name="size">
|
36 |
+
<option value="">{#advhr_dlg.normal}</option>
|
37 |
+
<option value="1">1</option>
|
38 |
+
<option value="2">2</option>
|
39 |
+
<option value="3">3</option>
|
40 |
+
<option value="4">4</option>
|
41 |
+
<option value="5">5</option>
|
42 |
+
</select></td>
|
43 |
+
</tr>
|
44 |
+
<tr>
|
45 |
+
<td><label for="noshade">{#advhr_dlg.noshade}</label></td>
|
46 |
+
<td><input type="checkbox" name="noshade" id="noshade" class="radio" /></td>
|
47 |
+
</tr>
|
48 |
+
</table>
|
49 |
+
</div>
|
50 |
+
</div>
|
51 |
+
|
52 |
+
<div class="mceActionPanel">
|
53 |
+
<input type="submit" id="insert" name="insert" value="{#insert}" />
|
54 |
+
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
55 |
+
</div>
|
56 |
+
</form>
|
57 |
+
</body>
|
58 |
+
</html>
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/advimage/css/advimage.css
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#src_list, #over_list, #out_list {width:280px;}
|
2 |
+
.mceActionPanel {margin-top:7px;}
|
3 |
+
.alignPreview {border:1px solid #000; width:140px; height:140px; overflow:hidden; padding:5px;}
|
4 |
+
.checkbox {border:0;}
|
5 |
+
.panel_wrapper div.current {height:305px;}
|
6 |
+
#prev {margin:0; border:1px solid #000; width:428px; height:150px; overflow:auto;}
|
7 |
+
#align, #classlist {width:150px;}
|
8 |
+
#width, #height {vertical-align:middle; width:50px; text-align:center;}
|
9 |
+
#vspace, #hspace, #border {vertical-align:middle; width:30px; text-align:center;}
|
10 |
+
#class_list {width:180px;}
|
11 |
+
input {width: 280px;}
|
12 |
+
#constrain, #onmousemovecheck {width:auto;}
|
13 |
+
#id, #dir, #lang, #usemap, #longdesc {width:200px;}
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/advimage/editor_plugin.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(function(){tinymce.create("tinymce.plugins.AdvancedImagePlugin",{init:function(a,b){a.addCommand("mceAdvImage",function(){if(a.dom.getAttrib(a.selection.getNode(),"class","").indexOf("mceItem")!=-1){return}a.windowManager.open({file:b+"/image.htm",width:480+parseInt(a.getLang("advimage.delta_width",0)),height:385+parseInt(a.getLang("advimage.delta_height",0)),inline:1},{plugin_url:b})});a.addButton("image",{title:"advimage.image_desc",cmd:"mceAdvImage"})},getInfo:function(){return{longname:"Advanced image",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advimage",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("advimage",tinymce.plugins.AdvancedImagePlugin)})();
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/advimage/editor_plugin_src.js
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
tinymce.create('tinymce.plugins.AdvancedImagePlugin', {
|
13 |
+
init : function(ed, url) {
|
14 |
+
// Register commands
|
15 |
+
ed.addCommand('mceAdvImage', function() {
|
16 |
+
// Internal image object like a flash placeholder
|
17 |
+
if (ed.dom.getAttrib(ed.selection.getNode(), 'class', '').indexOf('mceItem') != -1)
|
18 |
+
return;
|
19 |
+
|
20 |
+
ed.windowManager.open({
|
21 |
+
file : url + '/image.htm',
|
22 |
+
width : 480 + parseInt(ed.getLang('advimage.delta_width', 0)),
|
23 |
+
height : 385 + parseInt(ed.getLang('advimage.delta_height', 0)),
|
24 |
+
inline : 1
|
25 |
+
}, {
|
26 |
+
plugin_url : url
|
27 |
+
});
|
28 |
+
});
|
29 |
+
|
30 |
+
// Register buttons
|
31 |
+
ed.addButton('image', {
|
32 |
+
title : 'advimage.image_desc',
|
33 |
+
cmd : 'mceAdvImage'
|
34 |
+
});
|
35 |
+
},
|
36 |
+
|
37 |
+
getInfo : function() {
|
38 |
+
return {
|
39 |
+
longname : 'Advanced image',
|
40 |
+
author : 'Moxiecode Systems AB',
|
41 |
+
authorurl : 'http://tinymce.moxiecode.com',
|
42 |
+
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advimage',
|
43 |
+
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
44 |
+
};
|
45 |
+
}
|
46 |
+
});
|
47 |
+
|
48 |
+
// Register plugin
|
49 |
+
tinymce.PluginManager.add('advimage', tinymce.plugins.AdvancedImagePlugin);
|
50 |
+
})();
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/advimage/image.htm
ADDED
@@ -0,0 +1,235 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2 |
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
+
<head>
|
4 |
+
<title>{#advimage_dlg.dialog_title}</title>
|
5 |
+
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
6 |
+
<script type="text/javascript" src="../../utils/mctabs.js"></script>
|
7 |
+
<script type="text/javascript" src="../../utils/form_utils.js"></script>
|
8 |
+
<script type="text/javascript" src="../../utils/validate.js"></script>
|
9 |
+
<script type="text/javascript" src="../../utils/editable_selects.js"></script>
|
10 |
+
<script type="text/javascript" src="js/image.js"></script>
|
11 |
+
<link href="css/advimage.css" rel="stylesheet" type="text/css" />
|
12 |
+
</head>
|
13 |
+
<body id="advimage" style="display: none" role="application" aria-labelledby="app_title">
|
14 |
+
<span id="app_title" style="display:none">{#advimage_dlg.dialog_title}</span>
|
15 |
+
<form onsubmit="ImageDialog.insert();return false;" action="#">
|
16 |
+
<div class="tabs">
|
17 |
+
<ul>
|
18 |
+
<li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advimage_dlg.tab_general}</a></span></li>
|
19 |
+
<li id="appearance_tab" aria-controls="appearance_panel"><span><a href="javascript:mcTabs.displayTab('appearance_tab','appearance_panel');" onmousedown="return false;">{#advimage_dlg.tab_appearance}</a></span></li>
|
20 |
+
<li id="advanced_tab" aria-controls="advanced_panel"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#advimage_dlg.tab_advanced}</a></span></li>
|
21 |
+
</ul>
|
22 |
+
</div>
|
23 |
+
|
24 |
+
<div class="panel_wrapper">
|
25 |
+
<div id="general_panel" class="panel current">
|
26 |
+
<fieldset>
|
27 |
+
<legend>{#advimage_dlg.general}</legend>
|
28 |
+
|
29 |
+
<table role="presentation" class="properties">
|
30 |
+
<tr>
|
31 |
+
<td class="column1"><label id="srclabel" for="src">{#advimage_dlg.src}</label></td>
|
32 |
+
<td colspan="2"><table role="presentation" border="0" cellspacing="0" cellpadding="0">
|
33 |
+
<tr>
|
34 |
+
<td><input name="src" type="text" id="src" value="" class="mceFocus" onchange="ImageDialog.showPreviewImage(this.value);" aria-required="true" /></td>
|
35 |
+
<td id="srcbrowsercontainer"> </td>
|
36 |
+
</tr>
|
37 |
+
</table></td>
|
38 |
+
</tr>
|
39 |
+
<tr>
|
40 |
+
<td><label for="src_list">{#advimage_dlg.image_list}</label></td>
|
41 |
+
<td><select id="src_list" name="src_list" onchange="document.getElementById('src').value=this.options[this.selectedIndex].value;document.getElementById('alt').value=this.options[this.selectedIndex].text;document.getElementById('title').value=this.options[this.selectedIndex].text;ImageDialog.showPreviewImage(this.options[this.selectedIndex].value);"><option value=""></option></select></td>
|
42 |
+
</tr>
|
43 |
+
<tr>
|
44 |
+
<td class="column1"><label id="altlabel" for="alt">{#advimage_dlg.alt}</label></td>
|
45 |
+
<td colspan="2"><input id="alt" name="alt" type="text" value="" /></td>
|
46 |
+
</tr>
|
47 |
+
<tr>
|
48 |
+
<td class="column1"><label id="titlelabel" for="title">{#advimage_dlg.title}</label></td>
|
49 |
+
<td colspan="2"><input id="title" name="title" type="text" value="" /></td>
|
50 |
+
</tr>
|
51 |
+
</table>
|
52 |
+
</fieldset>
|
53 |
+
|
54 |
+
<fieldset>
|
55 |
+
<legend>{#advimage_dlg.preview}</legend>
|
56 |
+
<div id="prev"></div>
|
57 |
+
</fieldset>
|
58 |
+
</div>
|
59 |
+
|
60 |
+
<div id="appearance_panel" class="panel">
|
61 |
+
<fieldset>
|
62 |
+
<legend>{#advimage_dlg.tab_appearance}</legend>
|
63 |
+
|
64 |
+
<table role="presentation" border="0" cellpadding="4" cellspacing="0">
|
65 |
+
<tr>
|
66 |
+
<td class="column1"><label id="alignlabel" for="align">{#advimage_dlg.align}</label></td>
|
67 |
+
<td><select id="align" name="align" onchange="ImageDialog.updateStyle('align');ImageDialog.changeAppearance();">
|
68 |
+
<option value="">{#not_set}</option>
|
69 |
+
<option value="baseline">{#advimage_dlg.align_baseline}</option>
|
70 |
+
<option value="top">{#advimage_dlg.align_top}</option>
|
71 |
+
<option value="middle">{#advimage_dlg.align_middle}</option>
|
72 |
+
<option value="bottom">{#advimage_dlg.align_bottom}</option>
|
73 |
+
<option value="text-top">{#advimage_dlg.align_texttop}</option>
|
74 |
+
<option value="text-bottom">{#advimage_dlg.align_textbottom}</option>
|
75 |
+
<option value="left">{#advimage_dlg.align_left}</option>
|
76 |
+
<option value="right">{#advimage_dlg.align_right}</option>
|
77 |
+
</select>
|
78 |
+
</td>
|
79 |
+
<td rowspan="6" valign="top">
|
80 |
+
<div class="alignPreview">
|
81 |
+
<img id="alignSampleImg" src="img/sample.gif" alt="{#advimage_dlg.example_img}" />
|
82 |
+
Lorem ipsum, Dolor sit amet, consectetuer adipiscing loreum ipsum edipiscing elit, sed diam
|
83 |
+
nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.Loreum ipsum
|
84 |
+
edipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam
|
85 |
+
erat volutpat.
|
86 |
+
</div>
|
87 |
+
</td>
|
88 |
+
</tr>
|
89 |
+
|
90 |
+
<tr role="group" aria-labelledby="widthlabel">
|
91 |
+
<td class="column1"><label id="widthlabel" for="width">{#advimage_dlg.dimensions}</label></td>
|
92 |
+
<td class="nowrap">
|
93 |
+
<span style="display:none" id="width_voiceLabel">{#advimage_dlg.width}</span>
|
94 |
+
<input name="width" type="text" id="width" value="" size="5" maxlength="5" class="size" onchange="ImageDialog.changeHeight();" aria-labelledby="width_voiceLabel" /> x
|
95 |
+
<span style="display:none" id="height_voiceLabel">{#advimage_dlg.height}</span>
|
96 |
+
<input name="height" type="text" id="height" value="" size="5" maxlength="5" class="size" onchange="ImageDialog.changeWidth();" aria-labelledby="height_voiceLabel" /> px
|
97 |
+
</td>
|
98 |
+
</tr>
|
99 |
+
|
100 |
+
<tr>
|
101 |
+
<td> </td>
|
102 |
+
<td><table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
103 |
+
<tr>
|
104 |
+
<td><input id="constrain" type="checkbox" name="constrain" class="checkbox" /></td>
|
105 |
+
<td><label id="constrainlabel" for="constrain">{#advimage_dlg.constrain_proportions}</label></td>
|
106 |
+
</tr>
|
107 |
+
</table></td>
|
108 |
+
</tr>
|
109 |
+
|
110 |
+
<tr>
|
111 |
+
<td class="column1"><label id="vspacelabel" for="vspace">{#advimage_dlg.vspace}</label></td>
|
112 |
+
<td><input name="vspace" type="text" id="vspace" value="" size="3" maxlength="3" class="number" onchange="ImageDialog.updateStyle('vspace');ImageDialog.changeAppearance();" onblur="ImageDialog.updateStyle('vspace');ImageDialog.changeAppearance();" />
|
113 |
+
</td>
|
114 |
+
</tr>
|
115 |
+
|
116 |
+
<tr>
|
117 |
+
<td class="column1"><label id="hspacelabel" for="hspace">{#advimage_dlg.hspace}</label></td>
|
118 |
+
<td><input name="hspace" type="text" id="hspace" value="" size="3" maxlength="3" class="number" onchange="ImageDialog.updateStyle('hspace');ImageDialog.changeAppearance();" onblur="ImageDialog.updateStyle('hspace');ImageDialog.changeAppearance();" /></td>
|
119 |
+
</tr>
|
120 |
+
|
121 |
+
<tr>
|
122 |
+
<td class="column1"><label id="borderlabel" for="border">{#advimage_dlg.border}</label></td>
|
123 |
+
<td><input id="border" name="border" type="text" value="" size="3" maxlength="3" class="number" onchange="ImageDialog.updateStyle('border');ImageDialog.changeAppearance();" onblur="ImageDialog.updateStyle('border');ImageDialog.changeAppearance();" /></td>
|
124 |
+
</tr>
|
125 |
+
|
126 |
+
<tr>
|
127 |
+
<td><label for="class_list">{#class_name}</label></td>
|
128 |
+
<td colspan="2"><select id="class_list" name="class_list" class="mceEditableSelect"><option value=""></option></select></td>
|
129 |
+
</tr>
|
130 |
+
|
131 |
+
<tr>
|
132 |
+
<td class="column1"><label id="stylelabel" for="style">{#advimage_dlg.style}</label></td>
|
133 |
+
<td colspan="2"><input id="style" name="style" type="text" value="" onchange="ImageDialog.changeAppearance();" /></td>
|
134 |
+
</tr>
|
135 |
+
|
136 |
+
<!-- <tr>
|
137 |
+
<td class="column1"><label id="classeslabel" for="classes">{#advimage_dlg.classes}</label></td>
|
138 |
+
<td colspan="2"><input id="classes" name="classes" type="text" value="" onchange="selectByValue(this.form,'classlist',this.value,true);" /></td>
|
139 |
+
</tr> -->
|
140 |
+
</table>
|
141 |
+
</fieldset>
|
142 |
+
</div>
|
143 |
+
|
144 |
+
<div id="advanced_panel" class="panel">
|
145 |
+
<fieldset>
|
146 |
+
<legend>{#advimage_dlg.swap_image}</legend>
|
147 |
+
|
148 |
+
<input type="checkbox" id="onmousemovecheck" name="onmousemovecheck" class="checkbox" onclick="ImageDialog.setSwapImage(this.checked);" aria-controls="onmouseoversrc onmouseoutsrc" />
|
149 |
+
<label id="onmousemovechecklabel" for="onmousemovecheck">{#advimage_dlg.alt_image}</label>
|
150 |
+
|
151 |
+
<table role="presentation" border="0" cellpadding="4" cellspacing="0" width="100%">
|
152 |
+
<tr>
|
153 |
+
<td class="column1"><label id="onmouseoversrclabel" for="onmouseoversrc">{#advimage_dlg.mouseover}</label></td>
|
154 |
+
<td><table role="presentation" border="0" cellspacing="0" cellpadding="0">
|
155 |
+
<tr>
|
156 |
+
<td><input id="onmouseoversrc" name="onmouseoversrc" type="text" value="" /></td>
|
157 |
+
<td id="onmouseoversrccontainer"> </td>
|
158 |
+
</tr>
|
159 |
+
</table></td>
|
160 |
+
</tr>
|
161 |
+
<tr>
|
162 |
+
<td><label for="over_list">{#advimage_dlg.image_list}</label></td>
|
163 |
+
<td><select id="over_list" name="over_list" onchange="document.getElementById('onmouseoversrc').value=this.options[this.selectedIndex].value;"><option value=""></option></select></td>
|
164 |
+
</tr>
|
165 |
+
<tr>
|
166 |
+
<td class="column1"><label id="onmouseoutsrclabel" for="onmouseoutsrc">{#advimage_dlg.mouseout}</label></td>
|
167 |
+
<td class="column2"><table role="presentation" border="0" cellspacing="0" cellpadding="0">
|
168 |
+
<tr>
|
169 |
+
<td><input id="onmouseoutsrc" name="onmouseoutsrc" type="text" value="" /></td>
|
170 |
+
<td id="onmouseoutsrccontainer"> </td>
|
171 |
+
</tr>
|
172 |
+
</table></td>
|
173 |
+
</tr>
|
174 |
+
<tr>
|
175 |
+
<td><label for="out_list">{#advimage_dlg.image_list}</label></td>
|
176 |
+
<td><select id="out_list" name="out_list" onchange="document.getElementById('onmouseoutsrc').value=this.options[this.selectedIndex].value;"><option value=""></option></select></td>
|
177 |
+
</tr>
|
178 |
+
</table>
|
179 |
+
</fieldset>
|
180 |
+
|
181 |
+
<fieldset>
|
182 |
+
<legend>{#advimage_dlg.misc}</legend>
|
183 |
+
|
184 |
+
<table role="presentation" border="0" cellpadding="4" cellspacing="0">
|
185 |
+
<tr>
|
186 |
+
<td class="column1"><label id="idlabel" for="id">{#advimage_dlg.id}</label></td>
|
187 |
+
<td><input id="id" name="id" type="text" value="" /></td>
|
188 |
+
</tr>
|
189 |
+
|
190 |
+
<tr>
|
191 |
+
<td class="column1"><label id="dirlabel" for="dir">{#advimage_dlg.langdir}</label></td>
|
192 |
+
<td>
|
193 |
+
<select id="dir" name="dir" onchange="ImageDialog.changeAppearance();">
|
194 |
+
<option value="">{#not_set}</option>
|
195 |
+
<option value="ltr">{#advimage_dlg.ltr}</option>
|
196 |
+
<option value="rtl">{#advimage_dlg.rtl}</option>
|
197 |
+
</select>
|
198 |
+
</td>
|
199 |
+
</tr>
|
200 |
+
|
201 |
+
<tr>
|
202 |
+
<td class="column1"><label id="langlabel" for="lang">{#advimage_dlg.langcode}</label></td>
|
203 |
+
<td>
|
204 |
+
<input id="lang" name="lang" type="text" value="" />
|
205 |
+
</td>
|
206 |
+
</tr>
|
207 |
+
|
208 |
+
<tr>
|
209 |
+
<td class="column1"><label id="usemaplabel" for="usemap">{#advimage_dlg.map}</label></td>
|
210 |
+
<td>
|
211 |
+
<input id="usemap" name="usemap" type="text" value="" />
|
212 |
+
</td>
|
213 |
+
</tr>
|
214 |
+
|
215 |
+
<tr>
|
216 |
+
<td class="column1"><label id="longdesclabel" for="longdesc">{#advimage_dlg.long_desc}</label></td>
|
217 |
+
<td><table role="presentation" border="0" cellspacing="0" cellpadding="0">
|
218 |
+
<tr>
|
219 |
+
<td><input id="longdesc" name="longdesc" type="text" value="" /></td>
|
220 |
+
<td id="longdesccontainer"> </td>
|
221 |
+
</tr>
|
222 |
+
</table></td>
|
223 |
+
</tr>
|
224 |
+
</table>
|
225 |
+
</fieldset>
|
226 |
+
</div>
|
227 |
+
</div>
|
228 |
+
|
229 |
+
<div class="mceActionPanel">
|
230 |
+
<input type="submit" id="insert" name="insert" value="{#insert}" />
|
231 |
+
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
232 |
+
</div>
|
233 |
+
</form>
|
234 |
+
</body>
|
235 |
+
</html>
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/advimage/img/sample.gif
ADDED
Binary file
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/advimage/js/image.js
ADDED
@@ -0,0 +1,462 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var ImageDialog = {
|
2 |
+
preInit : function() {
|
3 |
+
var url;
|
4 |
+
|
5 |
+
tinyMCEPopup.requireLangPack();
|
6 |
+
|
7 |
+
if (url = tinyMCEPopup.getParam("external_image_list_url"))
|
8 |
+
document.write('<script language="javascript" type="text/javascript" src="' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '"></script>');
|
9 |
+
},
|
10 |
+
|
11 |
+
init : function(ed) {
|
12 |
+
var f = document.forms[0], nl = f.elements, ed = tinyMCEPopup.editor, dom = ed.dom, n = ed.selection.getNode(), fl = tinyMCEPopup.getParam('external_image_list', 'tinyMCEImageList');
|
13 |
+
|
14 |
+
tinyMCEPopup.resizeToInnerSize();
|
15 |
+
this.fillClassList('class_list');
|
16 |
+
this.fillFileList('src_list', fl);
|
17 |
+
this.fillFileList('over_list', fl);
|
18 |
+
this.fillFileList('out_list', fl);
|
19 |
+
TinyMCE_EditableSelects.init();
|
20 |
+
|
21 |
+
if (n.nodeName == 'IMG') {
|
22 |
+
nl.src.value = dom.getAttrib(n, 'src');
|
23 |
+
nl.width.value = dom.getAttrib(n, 'width');
|
24 |
+
nl.height.value = dom.getAttrib(n, 'height');
|
25 |
+
nl.alt.value = dom.getAttrib(n, 'alt');
|
26 |
+
nl.title.value = dom.getAttrib(n, 'title');
|
27 |
+
nl.vspace.value = this.getAttrib(n, 'vspace');
|
28 |
+
nl.hspace.value = this.getAttrib(n, 'hspace');
|
29 |
+
nl.border.value = this.getAttrib(n, 'border');
|
30 |
+
selectByValue(f, 'align', this.getAttrib(n, 'align'));
|
31 |
+
selectByValue(f, 'class_list', dom.getAttrib(n, 'class'), true, true);
|
32 |
+
nl.style.value = dom.getAttrib(n, 'style');
|
33 |
+
nl.id.value = dom.getAttrib(n, 'id');
|
34 |
+
nl.dir.value = dom.getAttrib(n, 'dir');
|
35 |
+
nl.lang.value = dom.getAttrib(n, 'lang');
|
36 |
+
nl.usemap.value = dom.getAttrib(n, 'usemap');
|
37 |
+
nl.longdesc.value = dom.getAttrib(n, 'longdesc');
|
38 |
+
nl.insert.value = ed.getLang('update');
|
39 |
+
|
40 |
+
if (/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/.test(dom.getAttrib(n, 'onmouseover')))
|
41 |
+
nl.onmouseoversrc.value = dom.getAttrib(n, 'onmouseover').replace(/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/, '$1');
|
42 |
+
|
43 |
+
if (/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/.test(dom.getAttrib(n, 'onmouseout')))
|
44 |
+
nl.onmouseoutsrc.value = dom.getAttrib(n, 'onmouseout').replace(/^\s*this.src\s*=\s*\'([^\']+)\';?\s*$/, '$1');
|
45 |
+
|
46 |
+
if (ed.settings.inline_styles) {
|
47 |
+
// Move attribs to styles
|
48 |
+
if (dom.getAttrib(n, 'align'))
|
49 |
+
this.updateStyle('align');
|
50 |
+
|
51 |
+
if (dom.getAttrib(n, 'hspace'))
|
52 |
+
this.updateStyle('hspace');
|
53 |
+
|
54 |
+
if (dom.getAttrib(n, 'border'))
|
55 |
+
this.updateStyle('border');
|
56 |
+
|
57 |
+
if (dom.getAttrib(n, 'vspace'))
|
58 |
+
this.updateStyle('vspace');
|
59 |
+
}
|
60 |
+
}
|
61 |
+
|
62 |
+
// Setup browse button
|
63 |
+
document.getElementById('srcbrowsercontainer').innerHTML = getBrowserHTML('srcbrowser','src','image','theme_advanced_image');
|
64 |
+
if (isVisible('srcbrowser'))
|
65 |
+
document.getElementById('src').style.width = '260px';
|
66 |
+
|
67 |
+
// Setup browse button
|
68 |
+
document.getElementById('onmouseoversrccontainer').innerHTML = getBrowserHTML('overbrowser','onmouseoversrc','image','theme_advanced_image');
|
69 |
+
if (isVisible('overbrowser'))
|
70 |
+
document.getElementById('onmouseoversrc').style.width = '260px';
|
71 |
+
|
72 |
+
// Setup browse button
|
73 |
+
document.getElementById('onmouseoutsrccontainer').innerHTML = getBrowserHTML('outbrowser','onmouseoutsrc','image','theme_advanced_image');
|
74 |
+
if (isVisible('outbrowser'))
|
75 |
+
document.getElementById('onmouseoutsrc').style.width = '260px';
|
76 |
+
|
77 |
+
// If option enabled default contrain proportions to checked
|
78 |
+
if (ed.getParam("advimage_constrain_proportions", true))
|
79 |
+
f.constrain.checked = true;
|
80 |
+
|
81 |
+
// Check swap image if valid data
|
82 |
+
if (nl.onmouseoversrc.value || nl.onmouseoutsrc.value)
|
83 |
+
this.setSwapImage(true);
|
84 |
+
else
|
85 |
+
this.setSwapImage(false);
|
86 |
+
|
87 |
+
this.changeAppearance();
|
88 |
+
this.showPreviewImage(nl.src.value, 1);
|
89 |
+
},
|
90 |
+
|
91 |
+
insert : function(file, title) {
|
92 |
+
var ed = tinyMCEPopup.editor, t = this, f = document.forms[0];
|
93 |
+
|
94 |
+
if (f.src.value === '') {
|
95 |
+
if (ed.selection.getNode().nodeName == 'IMG') {
|
96 |
+
ed.dom.remove(ed.selection.getNode());
|
97 |
+
ed.execCommand('mceRepaint');
|
98 |
+
}
|
99 |
+
|
100 |
+
tinyMCEPopup.close();
|
101 |
+
return;
|
102 |
+
}
|
103 |
+
|
104 |
+
if (tinyMCEPopup.getParam("accessibility_warnings", 1)) {
|
105 |
+
if (!f.alt.value) {
|
106 |
+
tinyMCEPopup.confirm(tinyMCEPopup.getLang('advimage_dlg.missing_alt'), function(s) {
|
107 |
+
if (s)
|
108 |
+
t.insertAndClose();
|
109 |
+
});
|
110 |
+
|
111 |
+
return;
|
112 |
+
}
|
113 |
+
}
|
114 |
+
|
115 |
+
t.insertAndClose();
|
116 |
+
},
|
117 |
+
|
118 |
+
insertAndClose : function() {
|
119 |
+
var ed = tinyMCEPopup.editor, f = document.forms[0], nl = f.elements, v, args = {}, el;
|
120 |
+
|
121 |
+
tinyMCEPopup.restoreSelection();
|
122 |
+
|
123 |
+
// Fixes crash in Safari
|
124 |
+
if (tinymce.isWebKit)
|
125 |
+
ed.getWin().focus();
|
126 |
+
|
127 |
+
if (!ed.settings.inline_styles) {
|
128 |
+
args = {
|
129 |
+
vspace : nl.vspace.value,
|
130 |
+
hspace : nl.hspace.value,
|
131 |
+
border : nl.border.value,
|
132 |
+
align : getSelectValue(f, 'align')
|
133 |
+
};
|
134 |
+
} else {
|
135 |
+
// Remove deprecated values
|
136 |
+
args = {
|
137 |
+
vspace : '',
|
138 |
+
hspace : '',
|
139 |
+
border : '',
|
140 |
+
align : ''
|
141 |
+
};
|
142 |
+
}
|
143 |
+
|
144 |
+
tinymce.extend(args, {
|
145 |
+
src : nl.src.value.replace(/ /g, '%20'),
|
146 |
+
width : nl.width.value,
|
147 |
+
height : nl.height.value,
|
148 |
+
alt : nl.alt.value,
|
149 |
+
title : nl.title.value,
|
150 |
+
'class' : getSelectValue(f, 'class_list'),
|
151 |
+
style : nl.style.value,
|
152 |
+
id : nl.id.value,
|
153 |
+
dir : nl.dir.value,
|
154 |
+
lang : nl.lang.value,
|
155 |
+
usemap : nl.usemap.value,
|
156 |
+
longdesc : nl.longdesc.value
|
157 |
+
});
|
158 |
+
|
159 |
+
args.onmouseover = args.onmouseout = '';
|
160 |
+
|
161 |
+
if (f.onmousemovecheck.checked) {
|
162 |
+
if (nl.onmouseoversrc.value)
|
163 |
+
args.onmouseover = "this.src='" + nl.onmouseoversrc.value + "';";
|
164 |
+
|
165 |
+
if (nl.onmouseoutsrc.value)
|
166 |
+
args.onmouseout = "this.src='" + nl.onmouseoutsrc.value + "';";
|
167 |
+
}
|
168 |
+
|
169 |
+
el = ed.selection.getNode();
|
170 |
+
|
171 |
+
if (el && el.nodeName == 'IMG') {
|
172 |
+
ed.dom.setAttribs(el, args);
|
173 |
+
} else {
|
174 |
+
tinymce.each(args, function(value, name) {
|
175 |
+
if (value === "") {
|
176 |
+
delete args[name];
|
177 |
+
}
|
178 |
+
});
|
179 |
+
|
180 |
+
ed.execCommand('mceInsertContent', false, tinyMCEPopup.editor.dom.createHTML('img', args), {skip_undo : 1});
|
181 |
+
ed.undoManager.add();
|
182 |
+
}
|
183 |
+
|
184 |
+
tinyMCEPopup.editor.execCommand('mceRepaint');
|
185 |
+
tinyMCEPopup.editor.focus();
|
186 |
+
tinyMCEPopup.close();
|
187 |
+
},
|
188 |
+
|
189 |
+
getAttrib : function(e, at) {
|
190 |
+
var ed = tinyMCEPopup.editor, dom = ed.dom, v, v2;
|
191 |
+
|
192 |
+
if (ed.settings.inline_styles) {
|
193 |
+
switch (at) {
|
194 |
+
case 'align':
|
195 |
+
if (v = dom.getStyle(e, 'float'))
|
196 |
+
return v;
|
197 |
+
|
198 |
+
if (v = dom.getStyle(e, 'vertical-align'))
|
199 |
+
return v;
|
200 |
+
|
201 |
+
break;
|
202 |
+
|
203 |
+
case 'hspace':
|
204 |
+
v = dom.getStyle(e, 'margin-left')
|
205 |
+
v2 = dom.getStyle(e, 'margin-right');
|
206 |
+
|
207 |
+
if (v && v == v2)
|
208 |
+
return parseInt(v.replace(/[^0-9]/g, ''));
|
209 |
+
|
210 |
+
break;
|
211 |
+
|
212 |
+
case 'vspace':
|
213 |
+
v = dom.getStyle(e, 'margin-top')
|
214 |
+
v2 = dom.getStyle(e, 'margin-bottom');
|
215 |
+
if (v && v == v2)
|
216 |
+
return parseInt(v.replace(/[^0-9]/g, ''));
|
217 |
+
|
218 |
+
break;
|
219 |
+
|
220 |
+
case 'border':
|
221 |
+
v = 0;
|
222 |
+
|
223 |
+
tinymce.each(['top', 'right', 'bottom', 'left'], function(sv) {
|
224 |
+
sv = dom.getStyle(e, 'border-' + sv + '-width');
|
225 |
+
|
226 |
+
// False or not the same as prev
|
227 |
+
if (!sv || (sv != v && v !== 0)) {
|
228 |
+
v = 0;
|
229 |
+
return false;
|
230 |
+
}
|
231 |
+
|
232 |
+
if (sv)
|
233 |
+
v = sv;
|
234 |
+
});
|
235 |
+
|
236 |
+
if (v)
|
237 |
+
return parseInt(v.replace(/[^0-9]/g, ''));
|
238 |
+
|
239 |
+
break;
|
240 |
+
}
|
241 |
+
}
|
242 |
+
|
243 |
+
if (v = dom.getAttrib(e, at))
|
244 |
+
return v;
|
245 |
+
|
246 |
+
return '';
|
247 |
+
},
|
248 |
+
|
249 |
+
setSwapImage : function(st) {
|
250 |
+
var f = document.forms[0];
|
251 |
+
|
252 |
+
f.onmousemovecheck.checked = st;
|
253 |
+
setBrowserDisabled('overbrowser', !st);
|
254 |
+
setBrowserDisabled('outbrowser', !st);
|
255 |
+
|
256 |
+
if (f.over_list)
|
257 |
+
f.over_list.disabled = !st;
|
258 |
+
|
259 |
+
if (f.out_list)
|
260 |
+
f.out_list.disabled = !st;
|
261 |
+
|
262 |
+
f.onmouseoversrc.disabled = !st;
|
263 |
+
f.onmouseoutsrc.disabled = !st;
|
264 |
+
},
|
265 |
+
|
266 |
+
fillClassList : function(id) {
|
267 |
+
var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl;
|
268 |
+
|
269 |
+
if (v = tinyMCEPopup.getParam('theme_advanced_styles')) {
|
270 |
+
cl = [];
|
271 |
+
|
272 |
+
tinymce.each(v.split(';'), function(v) {
|
273 |
+
var p = v.split('=');
|
274 |
+
|
275 |
+
cl.push({'title' : p[0], 'class' : p[1]});
|
276 |
+
});
|
277 |
+
} else
|
278 |
+
cl = tinyMCEPopup.editor.dom.getClasses();
|
279 |
+
|
280 |
+
if (cl.length > 0) {
|
281 |
+
lst.options.length = 0;
|
282 |
+
lst.options[lst.options.length] = new Option(tinyMCEPopup.getLang('not_set'), '');
|
283 |
+
|
284 |
+
tinymce.each(cl, function(o) {
|
285 |
+
lst.options[lst.options.length] = new Option(o.title || o['class'], o['class']);
|
286 |
+
});
|
287 |
+
} else
|
288 |
+
dom.remove(dom.getParent(id, 'tr'));
|
289 |
+
},
|
290 |
+
|
291 |
+
fillFileList : function(id, l) {
|
292 |
+
var dom = tinyMCEPopup.dom, lst = dom.get(id), v, cl;
|
293 |
+
|
294 |
+
l = typeof(l) === 'function' ? l() : window[l];
|
295 |
+
lst.options.length = 0;
|
296 |
+
|
297 |
+
if (l && l.length > 0) {
|
298 |
+
lst.options[lst.options.length] = new Option('', '');
|
299 |
+
|
300 |
+
tinymce.each(l, function(o) {
|
301 |
+
lst.options[lst.options.length] = new Option(o[0], o[1]);
|
302 |
+
});
|
303 |
+
} else
|
304 |
+
dom.remove(dom.getParent(id, 'tr'));
|
305 |
+
},
|
306 |
+
|
307 |
+
resetImageData : function() {
|
308 |
+
var f = document.forms[0];
|
309 |
+
|
310 |
+
f.elements.width.value = f.elements.height.value = '';
|
311 |
+
},
|
312 |
+
|
313 |
+
updateImageData : function(img, st) {
|
314 |
+
var f = document.forms[0];
|
315 |
+
|
316 |
+
if (!st) {
|
317 |
+
f.elements.width.value = img.width;
|
318 |
+
f.elements.height.value = img.height;
|
319 |
+
}
|
320 |
+
|
321 |
+
this.preloadImg = img;
|
322 |
+
},
|
323 |
+
|
324 |
+
changeAppearance : function() {
|
325 |
+
var ed = tinyMCEPopup.editor, f = document.forms[0], img = document.getElementById('alignSampleImg');
|
326 |
+
|
327 |
+
if (img) {
|
328 |
+
if (ed.getParam('inline_styles')) {
|
329 |
+
ed.dom.setAttrib(img, 'style', f.style.value);
|
330 |
+
} else {
|
331 |
+
img.align = f.align.value;
|
332 |
+
img.border = f.border.value;
|
333 |
+
img.hspace = f.hspace.value;
|
334 |
+
img.vspace = f.vspace.value;
|
335 |
+
}
|
336 |
+
}
|
337 |
+
},
|
338 |
+
|
339 |
+
changeHeight : function() {
|
340 |
+
var f = document.forms[0], tp, t = this;
|
341 |
+
|
342 |
+
if (!f.constrain.checked || !t.preloadImg) {
|
343 |
+
return;
|
344 |
+
}
|
345 |
+
|
346 |
+
if (f.width.value == "" || f.height.value == "")
|
347 |
+
return;
|
348 |
+
|
349 |
+
tp = (parseInt(f.width.value) / parseInt(t.preloadImg.width)) * t.preloadImg.height;
|
350 |
+
f.height.value = tp.toFixed(0);
|
351 |
+
},
|
352 |
+
|
353 |
+
changeWidth : function() {
|
354 |
+
var f = document.forms[0], tp, t = this;
|
355 |
+
|
356 |
+
if (!f.constrain.checked || !t.preloadImg) {
|
357 |
+
return;
|
358 |
+
}
|
359 |
+
|
360 |
+
if (f.width.value == "" || f.height.value == "")
|
361 |
+
return;
|
362 |
+
|
363 |
+
tp = (parseInt(f.height.value) / parseInt(t.preloadImg.height)) * t.preloadImg.width;
|
364 |
+
f.width.value = tp.toFixed(0);
|
365 |
+
},
|
366 |
+
|
367 |
+
updateStyle : function(ty) {
|
368 |
+
var dom = tinyMCEPopup.dom, b, bStyle, bColor, v, isIE = tinymce.isIE, f = document.forms[0], img = dom.create('img', {style : dom.get('style').value});
|
369 |
+
|
370 |
+
if (tinyMCEPopup.editor.settings.inline_styles) {
|
371 |
+
// Handle align
|
372 |
+
if (ty == 'align') {
|
373 |
+
dom.setStyle(img, 'float', '');
|
374 |
+
dom.setStyle(img, 'vertical-align', '');
|
375 |
+
|
376 |
+
v = getSelectValue(f, 'align');
|
377 |
+
if (v) {
|
378 |
+
if (v == 'left' || v == 'right')
|
379 |
+
dom.setStyle(img, 'float', v);
|
380 |
+
else
|
381 |
+
img.style.verticalAlign = v;
|
382 |
+
}
|
383 |
+
}
|
384 |
+
|
385 |
+
// Handle border
|
386 |
+
if (ty == 'border') {
|
387 |
+
b = img.style.border ? img.style.border.split(' ') : [];
|
388 |
+
bStyle = dom.getStyle(img, 'border-style');
|
389 |
+
bColor = dom.getStyle(img, 'border-color');
|
390 |
+
|
391 |
+
dom.setStyle(img, 'border', '');
|
392 |
+
|
393 |
+
v = f.border.value;
|
394 |
+
if (v || v == '0') {
|
395 |
+
if (v == '0')
|
396 |
+
img.style.border = isIE ? '0' : '0 none none';
|
397 |
+
else {
|
398 |
+
if (b.length == 3 && b[isIE ? 2 : 1])
|
399 |
+
bStyle = b[isIE ? 2 : 1];
|
400 |
+
else if (!bStyle || bStyle == 'none')
|
401 |
+
bStyle = 'solid';
|
402 |
+
if (b.length == 3 && b[isIE ? 0 : 2])
|
403 |
+
bColor = b[isIE ? 0 : 2];
|
404 |
+
else if (!bColor || bColor == 'none')
|
405 |
+
bColor = 'black';
|
406 |
+
img.style.border = v + 'px ' + bStyle + ' ' + bColor;
|
407 |
+
}
|
408 |
+
}
|
409 |
+
}
|
410 |
+
|
411 |
+
// Handle hspace
|
412 |
+
if (ty == 'hspace') {
|
413 |
+
dom.setStyle(img, 'marginLeft', '');
|
414 |
+
dom.setStyle(img, 'marginRight', '');
|
415 |
+
|
416 |
+
v = f.hspace.value;
|
417 |
+
if (v) {
|
418 |
+
img.style.marginLeft = v + 'px';
|
419 |
+
img.style.marginRight = v + 'px';
|
420 |
+
}
|
421 |
+
}
|
422 |
+
|
423 |
+
// Handle vspace
|
424 |
+
if (ty == 'vspace') {
|
425 |
+
dom.setStyle(img, 'marginTop', '');
|
426 |
+
dom.setStyle(img, 'marginBottom', '');
|
427 |
+
|
428 |
+
v = f.vspace.value;
|
429 |
+
if (v) {
|
430 |
+
img.style.marginTop = v + 'px';
|
431 |
+
img.style.marginBottom = v + 'px';
|
432 |
+
}
|
433 |
+
}
|
434 |
+
|
435 |
+
// Merge
|
436 |
+
dom.get('style').value = dom.serializeStyle(dom.parseStyle(img.style.cssText), 'img');
|
437 |
+
}
|
438 |
+
},
|
439 |
+
|
440 |
+
changeMouseMove : function() {
|
441 |
+
},
|
442 |
+
|
443 |
+
showPreviewImage : function(u, st) {
|
444 |
+
if (!u) {
|
445 |
+
tinyMCEPopup.dom.setHTML('prev', '');
|
446 |
+
return;
|
447 |
+
}
|
448 |
+
|
449 |
+
if (!st && tinyMCEPopup.getParam("advimage_update_dimensions_onchange", true))
|
450 |
+
this.resetImageData();
|
451 |
+
|
452 |
+
u = tinyMCEPopup.editor.documentBaseURI.toAbsolute(u);
|
453 |
+
|
454 |
+
if (!st)
|
455 |
+
tinyMCEPopup.dom.setHTML('prev', '<img id="previewImg" src="' + u + '" border="0" onload="ImageDialog.updateImageData(this);" onerror="ImageDialog.resetImageData();" />');
|
456 |
+
else
|
457 |
+
tinyMCEPopup.dom.setHTML('prev', '<img id="previewImg" src="' + u + '" border="0" onload="ImageDialog.updateImageData(this, 1);" />');
|
458 |
+
}
|
459 |
+
};
|
460 |
+
|
461 |
+
ImageDialog.preInit();
|
462 |
+
tinyMCEPopup.onInit.add(ImageDialog.init, ImageDialog);
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/advimage/langs/en_dlg.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
tinyMCE.addI18n('en.advimage_dlg',{"image_list":"Image List","align_right":"Right","align_left":"Left","align_textbottom":"Text Bottom","align_texttop":"Text Top","align_bottom":"Bottom","align_middle":"Middle","align_top":"Top","align_baseline":"Baseline",align:"Alignment",hspace:"Horizontal Space",vspace:"Vertical Space",dimensions:"Dimensions",border:"Border",list:"Image List",alt:"Image Description",src:"Image URL","dialog_title":"Insert/Edit Image","missing_alt":"Are you sure you want to continue without including an Image Description? Without it the image may not be accessible to some users with disabilities, or to those using a text browser, or browsing the Web with images turned off.","example_img":"Appearance Preview Image",misc:"Miscellaneous",mouseout:"For Mouse Out",mouseover:"For Mouse Over","alt_image":"Alternative Image","swap_image":"Swap Image",map:"Image Map",id:"ID",rtl:"Right to Left",ltr:"Left to Right",classes:"Classes",style:"Style","long_desc":"Long Description Link",langcode:"Language Code",langdir:"Language Direction","constrain_proportions":"Constrain Proportions",preview:"Preview",title:"Title",general:"General","tab_advanced":"Advanced","tab_appearance":"Appearance","tab_general":"General",width:"Width",height:"Height"});
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/advlink/css/advlink.css
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.mceLinkList, .mceAnchorList, #targetlist {width:280px;}
|
2 |
+
.mceActionPanel {margin-top:7px;}
|
3 |
+
.panel_wrapper div.current {height:320px;}
|
4 |
+
#classlist, #title, #href {width:280px;}
|
5 |
+
#popupurl, #popupname {width:200px;}
|
6 |
+
#popupwidth, #popupheight, #popupleft, #popuptop {width:30px;vertical-align:middle;text-align:center;}
|
7 |
+
#id, #style, #classes, #target, #dir, #hreflang, #lang, #charset, #type, #rel, #rev, #tabindex, #accesskey {width:200px;}
|
8 |
+
#events_panel input {width:200px;}
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/advlink/editor_plugin.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(function(){tinymce.create("tinymce.plugins.AdvancedLinkPlugin",{init:function(a,b){this.editor=a;a.addCommand("mceAdvLink",function(){var c=a.selection;if(c.isCollapsed()&&!a.dom.getParent(c.getNode(),"A")){return}a.windowManager.open({file:b+"/link.htm",width:480+parseInt(a.getLang("advlink.delta_width",0)),height:400+parseInt(a.getLang("advlink.delta_height",0)),inline:1},{plugin_url:b})});a.addButton("link",{title:"advlink.link_desc",cmd:"mceAdvLink"});a.addShortcut("ctrl+k","advlink.advlink_desc","mceAdvLink");a.onNodeChange.add(function(d,c,f,e){c.setDisabled("link",e&&f.nodeName!="A");c.setActive("link",f.nodeName=="A"&&!f.name)})},getInfo:function(){return{longname:"Advanced link",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlink",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("advlink",tinymce.plugins.AdvancedLinkPlugin)})();
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/advlink/editor_plugin_src.js
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
tinymce.create('tinymce.plugins.AdvancedLinkPlugin', {
|
13 |
+
init : function(ed, url) {
|
14 |
+
this.editor = ed;
|
15 |
+
|
16 |
+
// Register commands
|
17 |
+
ed.addCommand('mceAdvLink', function() {
|
18 |
+
var se = ed.selection;
|
19 |
+
|
20 |
+
// No selection and not in link
|
21 |
+
if (se.isCollapsed() && !ed.dom.getParent(se.getNode(), 'A'))
|
22 |
+
return;
|
23 |
+
|
24 |
+
ed.windowManager.open({
|
25 |
+
file : url + '/link.htm',
|
26 |
+
width : 480 + parseInt(ed.getLang('advlink.delta_width', 0)),
|
27 |
+
height : 400 + parseInt(ed.getLang('advlink.delta_height', 0)),
|
28 |
+
inline : 1
|
29 |
+
}, {
|
30 |
+
plugin_url : url
|
31 |
+
});
|
32 |
+
});
|
33 |
+
|
34 |
+
// Register buttons
|
35 |
+
ed.addButton('link', {
|
36 |
+
title : 'advlink.link_desc',
|
37 |
+
cmd : 'mceAdvLink'
|
38 |
+
});
|
39 |
+
|
40 |
+
ed.addShortcut('ctrl+k', 'advlink.advlink_desc', 'mceAdvLink');
|
41 |
+
|
42 |
+
ed.onNodeChange.add(function(ed, cm, n, co) {
|
43 |
+
cm.setDisabled('link', co && n.nodeName != 'A');
|
44 |
+
cm.setActive('link', n.nodeName == 'A' && !n.name);
|
45 |
+
});
|
46 |
+
},
|
47 |
+
|
48 |
+
getInfo : function() {
|
49 |
+
return {
|
50 |
+
longname : 'Advanced link',
|
51 |
+
author : 'Moxiecode Systems AB',
|
52 |
+
authorurl : 'http://tinymce.moxiecode.com',
|
53 |
+
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlink',
|
54 |
+
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
55 |
+
};
|
56 |
+
}
|
57 |
+
});
|
58 |
+
|
59 |
+
// Register plugin
|
60 |
+
tinymce.PluginManager.add('advlink', tinymce.plugins.AdvancedLinkPlugin);
|
61 |
+
})();
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/advlink/js/advlink.js
ADDED
@@ -0,0 +1,539 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Functions for the advlink plugin popup */
|
2 |
+
|
3 |
+
tinyMCEPopup.requireLangPack();
|
4 |
+
|
5 |
+
var templates = {
|
6 |
+
"window.open" : "window.open('${url}','${target}','${options}')"
|
7 |
+
};
|
8 |
+
|
9 |
+
function preinit() {
|
10 |
+
var url;
|
11 |
+
|
12 |
+
if (url = tinyMCEPopup.getParam("external_link_list_url"))
|
13 |
+
document.write('<script language="javascript" type="text/javascript" src="' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '"></script>');
|
14 |
+
}
|
15 |
+
|
16 |
+
function changeClass() {
|
17 |
+
var f = document.forms[0];
|
18 |
+
|
19 |
+
f.classes.value = getSelectValue(f, 'classlist');
|
20 |
+
}
|
21 |
+
|
22 |
+
function init() {
|
23 |
+
tinyMCEPopup.resizeToInnerSize();
|
24 |
+
|
25 |
+
var formObj = document.forms[0];
|
26 |
+
var inst = tinyMCEPopup.editor;
|
27 |
+
var elm = inst.selection.getNode();
|
28 |
+
var action = "insert";
|
29 |
+
var html;
|
30 |
+
|
31 |
+
document.getElementById('hrefbrowsercontainer').innerHTML = getBrowserHTML('hrefbrowser','href','file','advlink');
|
32 |
+
document.getElementById('popupurlbrowsercontainer').innerHTML = getBrowserHTML('popupurlbrowser','popupurl','file','advlink');
|
33 |
+
document.getElementById('targetlistcontainer').innerHTML = getTargetListHTML('targetlist','target');
|
34 |
+
|
35 |
+
// Link list
|
36 |
+
html = getLinkListHTML('linklisthref','href');
|
37 |
+
if (html == "")
|
38 |
+
document.getElementById("linklisthrefrow").style.display = 'none';
|
39 |
+
else
|
40 |
+
document.getElementById("linklisthrefcontainer").innerHTML = html;
|
41 |
+
|
42 |
+
// Anchor list
|
43 |
+
html = getAnchorListHTML('anchorlist','href');
|
44 |
+
if (html == "")
|
45 |
+
document.getElementById("anchorlistrow").style.display = 'none';
|
46 |
+
else
|
47 |
+
document.getElementById("anchorlistcontainer").innerHTML = html;
|
48 |
+
|
49 |
+
// Resize some elements
|
50 |
+
if (isVisible('hrefbrowser'))
|
51 |
+
document.getElementById('href').style.width = '260px';
|
52 |
+
|
53 |
+
if (isVisible('popupurlbrowser'))
|
54 |
+
document.getElementById('popupurl').style.width = '180px';
|
55 |
+
|
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 |
+
|
64 |
+
if (elm != null && elm.nodeName == "A")
|
65 |
+
action = "update";
|
66 |
+
|
67 |
+
formObj.insert.value = tinyMCEPopup.getLang(action, 'Insert', true);
|
68 |
+
|
69 |
+
setPopupControlsDisabled(true);
|
70 |
+
|
71 |
+
if (action == "update") {
|
72 |
+
var href = inst.dom.getAttrib(elm, 'href');
|
73 |
+
var onclick = inst.dom.getAttrib(elm, 'onclick');
|
74 |
+
|
75 |
+
// Setup form data
|
76 |
+
setFormValue('href', href);
|
77 |
+
setFormValue('title', inst.dom.getAttrib(elm, 'title'));
|
78 |
+
setFormValue('id', inst.dom.getAttrib(elm, 'id'));
|
79 |
+
setFormValue('style', inst.dom.getAttrib(elm, "style"));
|
80 |
+
setFormValue('rel', inst.dom.getAttrib(elm, 'rel'));
|
81 |
+
setFormValue('rev', inst.dom.getAttrib(elm, 'rev'));
|
82 |
+
setFormValue('charset', inst.dom.getAttrib(elm, 'charset'));
|
83 |
+
setFormValue('hreflang', inst.dom.getAttrib(elm, 'hreflang'));
|
84 |
+
setFormValue('dir', inst.dom.getAttrib(elm, 'dir'));
|
85 |
+
setFormValue('lang', inst.dom.getAttrib(elm, 'lang'));
|
86 |
+
setFormValue('tabindex', inst.dom.getAttrib(elm, 'tabindex', typeof(elm.tabindex) != "undefined" ? elm.tabindex : ""));
|
87 |
+
setFormValue('accesskey', inst.dom.getAttrib(elm, 'accesskey', typeof(elm.accesskey) != "undefined" ? elm.accesskey : ""));
|
88 |
+
setFormValue('type', inst.dom.getAttrib(elm, 'type'));
|
89 |
+
setFormValue('onfocus', inst.dom.getAttrib(elm, 'onfocus'));
|
90 |
+
setFormValue('onblur', inst.dom.getAttrib(elm, 'onblur'));
|
91 |
+
setFormValue('onclick', onclick);
|
92 |
+
setFormValue('ondblclick', inst.dom.getAttrib(elm, 'ondblclick'));
|
93 |
+
setFormValue('onmousedown', inst.dom.getAttrib(elm, 'onmousedown'));
|
94 |
+
setFormValue('onmouseup', inst.dom.getAttrib(elm, 'onmouseup'));
|
95 |
+
setFormValue('onmouseover', inst.dom.getAttrib(elm, 'onmouseover'));
|
96 |
+
setFormValue('onmousemove', inst.dom.getAttrib(elm, 'onmousemove'));
|
97 |
+
setFormValue('onmouseout', inst.dom.getAttrib(elm, 'onmouseout'));
|
98 |
+
setFormValue('onkeypress', inst.dom.getAttrib(elm, 'onkeypress'));
|
99 |
+
setFormValue('onkeydown', inst.dom.getAttrib(elm, 'onkeydown'));
|
100 |
+
setFormValue('onkeyup', inst.dom.getAttrib(elm, 'onkeyup'));
|
101 |
+
setFormValue('target', inst.dom.getAttrib(elm, 'target'));
|
102 |
+
setFormValue('classes', inst.dom.getAttrib(elm, 'class'));
|
103 |
+
|
104 |
+
// Parse onclick data
|
105 |
+
if (onclick != null && onclick.indexOf('window.open') != -1)
|
106 |
+
parseWindowOpen(onclick);
|
107 |
+
else
|
108 |
+
parseFunction(onclick);
|
109 |
+
|
110 |
+
// Select by the values
|
111 |
+
selectByValue(formObj, 'dir', inst.dom.getAttrib(elm, 'dir'));
|
112 |
+
selectByValue(formObj, 'rel', inst.dom.getAttrib(elm, 'rel'));
|
113 |
+
selectByValue(formObj, 'rev', inst.dom.getAttrib(elm, 'rev'));
|
114 |
+
selectByValue(formObj, 'linklisthref', href);
|
115 |
+
|
116 |
+
if (href.charAt(0) == '#')
|
117 |
+
selectByValue(formObj, 'anchorlist', href);
|
118 |
+
|
119 |
+
addClassesToList('classlist', 'advlink_styles');
|
120 |
+
|
121 |
+
selectByValue(formObj, 'classlist', inst.dom.getAttrib(elm, 'class'), true);
|
122 |
+
selectByValue(formObj, 'targetlist', inst.dom.getAttrib(elm, 'target'), true);
|
123 |
+
} else
|
124 |
+
addClassesToList('classlist', 'advlink_styles');
|
125 |
+
}
|
126 |
+
|
127 |
+
function checkPrefix(n) {
|
128 |
+
if (n.value && Validator.isEmail(n) && !/^\s*mailto:/i.test(n.value) && confirm(tinyMCEPopup.getLang('advlink_dlg.is_email')))
|
129 |
+
n.value = 'mailto:' + n.value;
|
130 |
+
|
131 |
+
if (/^\s*www\./i.test(n.value) && confirm(tinyMCEPopup.getLang('advlink_dlg.is_external')))
|
132 |
+
n.value = 'http://' + n.value;
|
133 |
+
}
|
134 |
+
|
135 |
+
function setFormValue(name, value) {
|
136 |
+
document.forms[0].elements[name].value = value;
|
137 |
+
}
|
138 |
+
|
139 |
+
function parseWindowOpen(onclick) {
|
140 |
+
var formObj = document.forms[0];
|
141 |
+
|
142 |
+
// Preprocess center code
|
143 |
+
if (onclick.indexOf('return false;') != -1) {
|
144 |
+
formObj.popupreturn.checked = true;
|
145 |
+
onclick = onclick.replace('return false;', '');
|
146 |
+
} else
|
147 |
+
formObj.popupreturn.checked = false;
|
148 |
+
|
149 |
+
var onClickData = parseLink(onclick);
|
150 |
+
|
151 |
+
if (onClickData != null) {
|
152 |
+
formObj.ispopup.checked = true;
|
153 |
+
setPopupControlsDisabled(false);
|
154 |
+
|
155 |
+
var onClickWindowOptions = parseOptions(onClickData['options']);
|
156 |
+
var url = onClickData['url'];
|
157 |
+
|
158 |
+
formObj.popupname.value = onClickData['target'];
|
159 |
+
formObj.popupurl.value = url;
|
160 |
+
formObj.popupwidth.value = getOption(onClickWindowOptions, 'width');
|
161 |
+
formObj.popupheight.value = getOption(onClickWindowOptions, 'height');
|
162 |
+
|
163 |
+
formObj.popupleft.value = getOption(onClickWindowOptions, 'left');
|
164 |
+
formObj.popuptop.value = getOption(onClickWindowOptions, 'top');
|
165 |
+
|
166 |
+
if (formObj.popupleft.value.indexOf('screen') != -1)
|
167 |
+
formObj.popupleft.value = "c";
|
168 |
+
|
169 |
+
if (formObj.popuptop.value.indexOf('screen') != -1)
|
170 |
+
formObj.popuptop.value = "c";
|
171 |
+
|
172 |
+
formObj.popuplocation.checked = getOption(onClickWindowOptions, 'location') == "yes";
|
173 |
+
formObj.popupscrollbars.checked = getOption(onClickWindowOptions, 'scrollbars') == "yes";
|
174 |
+
formObj.popupmenubar.checked = getOption(onClickWindowOptions, 'menubar') == "yes";
|
175 |
+
formObj.popupresizable.checked = getOption(onClickWindowOptions, 'resizable') == "yes";
|
176 |
+
formObj.popuptoolbar.checked = getOption(onClickWindowOptions, 'toolbar') == "yes";
|
177 |
+
formObj.popupstatus.checked = getOption(onClickWindowOptions, 'status') == "yes";
|
178 |
+
formObj.popupdependent.checked = getOption(onClickWindowOptions, 'dependent') == "yes";
|
179 |
+
|
180 |
+
buildOnClick();
|
181 |
+
}
|
182 |
+
}
|
183 |
+
|
184 |
+
function parseFunction(onclick) {
|
185 |
+
var formObj = document.forms[0];
|
186 |
+
var onClickData = parseLink(onclick);
|
187 |
+
|
188 |
+
// TODO: Add stuff here
|
189 |
+
}
|
190 |
+
|
191 |
+
function getOption(opts, name) {
|
192 |
+
return typeof(opts[name]) == "undefined" ? "" : opts[name];
|
193 |
+
}
|
194 |
+
|
195 |
+
function setPopupControlsDisabled(state) {
|
196 |
+
var formObj = document.forms[0];
|
197 |
+
|
198 |
+
formObj.popupname.disabled = state;
|
199 |
+
formObj.popupurl.disabled = state;
|
200 |
+
formObj.popupwidth.disabled = state;
|
201 |
+
formObj.popupheight.disabled = state;
|
202 |
+
formObj.popupleft.disabled = state;
|
203 |
+
formObj.popuptop.disabled = state;
|
204 |
+
formObj.popuplocation.disabled = state;
|
205 |
+
formObj.popupscrollbars.disabled = state;
|
206 |
+
formObj.popupmenubar.disabled = state;
|
207 |
+
formObj.popupresizable.disabled = state;
|
208 |
+
formObj.popuptoolbar.disabled = state;
|
209 |
+
formObj.popupstatus.disabled = state;
|
210 |
+
formObj.popupreturn.disabled = state;
|
211 |
+
formObj.popupdependent.disabled = state;
|
212 |
+
|
213 |
+
setBrowserDisabled('popupurlbrowser', state);
|
214 |
+
}
|
215 |
+
|
216 |
+
function parseLink(link) {
|
217 |
+
link = link.replace(new RegExp(''', 'g'), "'");
|
218 |
+
|
219 |
+
var fnName = link.replace(new RegExp("\\s*([A-Za-z0-9\.]*)\\s*\\(.*", "gi"), "$1");
|
220 |
+
|
221 |
+
// Is function name a template function
|
222 |
+
var template = templates[fnName];
|
223 |
+
if (template) {
|
224 |
+
// Build regexp
|
225 |
+
var variableNames = template.match(new RegExp("'?\\$\\{[A-Za-z0-9\.]*\\}'?", "gi"));
|
226 |
+
var regExp = "\\s*[A-Za-z0-9\.]*\\s*\\(";
|
227 |
+
var replaceStr = "";
|
228 |
+
for (var i=0; i<variableNames.length; i++) {
|
229 |
+
// Is string value
|
230 |
+
if (variableNames[i].indexOf("'${") != -1)
|
231 |
+
regExp += "'(.*)'";
|
232 |
+
else // Number value
|
233 |
+
regExp += "([0-9]*)";
|
234 |
+
|
235 |
+
replaceStr += "$" + (i+1);
|
236 |
+
|
237 |
+
// Cleanup variable name
|
238 |
+
variableNames[i] = variableNames[i].replace(new RegExp("[^A-Za-z0-9]", "gi"), "");
|
239 |
+
|
240 |
+
if (i != variableNames.length-1) {
|
241 |
+
regExp += "\\s*,\\s*";
|
242 |
+
replaceStr += "<delim>";
|
243 |
+
} else
|
244 |
+
regExp += ".*";
|
245 |
+
}
|
246 |
+
|
247 |
+
regExp += "\\);?";
|
248 |
+
|
249 |
+
// Build variable array
|
250 |
+
var variables = [];
|
251 |
+
variables["_function"] = fnName;
|
252 |
+
var variableValues = link.replace(new RegExp(regExp, "gi"), replaceStr).split('<delim>');
|
253 |
+
for (var i=0; i<variableNames.length; i++)
|
254 |
+
variables[variableNames[i]] = variableValues[i];
|
255 |
+
|
256 |
+
return variables;
|
257 |
+
}
|
258 |
+
|
259 |
+
return null;
|
260 |
+
}
|
261 |
+
|
262 |
+
function parseOptions(opts) {
|
263 |
+
if (opts == null || opts == "")
|
264 |
+
return [];
|
265 |
+
|
266 |
+
// Cleanup the options
|
267 |
+
opts = opts.toLowerCase();
|
268 |
+
opts = opts.replace(/;/g, ",");
|
269 |
+
opts = opts.replace(/[^0-9a-z=,]/g, "");
|
270 |
+
|
271 |
+
var optionChunks = opts.split(',');
|
272 |
+
var options = [];
|
273 |
+
|
274 |
+
for (var i=0; i<optionChunks.length; i++) {
|
275 |
+
var parts = optionChunks[i].split('=');
|
276 |
+
|
277 |
+
if (parts.length == 2)
|
278 |
+
options[parts[0]] = parts[1];
|
279 |
+
}
|
280 |
+
|
281 |
+
return options;
|
282 |
+
}
|
283 |
+
|
284 |
+
function buildOnClick() {
|
285 |
+
var formObj = document.forms[0];
|
286 |
+
|
287 |
+
if (!formObj.ispopup.checked) {
|
288 |
+
formObj.onclick.value = "";
|
289 |
+
return;
|
290 |
+
}
|
291 |
+
|
292 |
+
var onclick = "window.open('";
|
293 |
+
var url = formObj.popupurl.value;
|
294 |
+
|
295 |
+
onclick += url + "','";
|
296 |
+
onclick += formObj.popupname.value + "','";
|
297 |
+
|
298 |
+
if (formObj.popuplocation.checked)
|
299 |
+
onclick += "location=yes,";
|
300 |
+
|
301 |
+
if (formObj.popupscrollbars.checked)
|
302 |
+
onclick += "scrollbars=yes,";
|
303 |
+
|
304 |
+
if (formObj.popupmenubar.checked)
|
305 |
+
onclick += "menubar=yes,";
|
306 |
+
|
307 |
+
if (formObj.popupresizable.checked)
|
308 |
+
onclick += "resizable=yes,";
|
309 |
+
|
310 |
+
if (formObj.popuptoolbar.checked)
|
311 |
+
onclick += "toolbar=yes,";
|
312 |
+
|
313 |
+
if (formObj.popupstatus.checked)
|
314 |
+
onclick += "status=yes,";
|
315 |
+
|
316 |
+
if (formObj.popupdependent.checked)
|
317 |
+
onclick += "dependent=yes,";
|
318 |
+
|
319 |
+
if (formObj.popupwidth.value != "")
|
320 |
+
onclick += "width=" + formObj.popupwidth.value + ",";
|
321 |
+
|
322 |
+
if (formObj.popupheight.value != "")
|
323 |
+
onclick += "height=" + formObj.popupheight.value + ",";
|
324 |
+
|
325 |
+
if (formObj.popupleft.value != "") {
|
326 |
+
if (formObj.popupleft.value != "c")
|
327 |
+
onclick += "left=" + formObj.popupleft.value + ",";
|
328 |
+
else
|
329 |
+
onclick += "left='+(screen.availWidth/2-" + (formObj.popupwidth.value/2) + ")+',";
|
330 |
+
}
|
331 |
+
|
332 |
+
if (formObj.popuptop.value != "") {
|
333 |
+
if (formObj.popuptop.value != "c")
|
334 |
+
onclick += "top=" + formObj.popuptop.value + ",";
|
335 |
+
else
|
336 |
+
onclick += "top='+(screen.availHeight/2-" + (formObj.popupheight.value/2) + ")+',";
|
337 |
+
}
|
338 |
+
|
339 |
+
if (onclick.charAt(onclick.length-1) == ',')
|
340 |
+
onclick = onclick.substring(0, onclick.length-1);
|
341 |
+
|
342 |
+
onclick += "');";
|
343 |
+
|
344 |
+
if (formObj.popupreturn.checked)
|
345 |
+
onclick += "return false;";
|
346 |
+
|
347 |
+
// tinyMCE.debug(onclick);
|
348 |
+
|
349 |
+
formObj.onclick.value = onclick;
|
350 |
+
|
351 |
+
if (formObj.href.value == "")
|
352 |
+
formObj.href.value = url;
|
353 |
+
}
|
354 |
+
|
355 |
+
function setAttrib(elm, attrib, value) {
|
356 |
+
var formObj = document.forms[0];
|
357 |
+
var valueElm = formObj.elements[attrib.toLowerCase()];
|
358 |
+
var dom = tinyMCEPopup.editor.dom;
|
359 |
+
|
360 |
+
if (typeof(value) == "undefined" || value == null) {
|
361 |
+
value = "";
|
362 |
+
|
363 |
+
if (valueElm)
|
364 |
+
value = valueElm.value;
|
365 |
+
}
|
366 |
+
|
367 |
+
// Clean up the style
|
368 |
+
if (attrib == 'style')
|
369 |
+
value = dom.serializeStyle(dom.parseStyle(value), 'a');
|
370 |
+
|
371 |
+
dom.setAttrib(elm, attrib, value);
|
372 |
+
}
|
373 |
+
|
374 |
+
function getAnchorListHTML(id, target) {
|
375 |
+
var ed = tinyMCEPopup.editor, nodes = ed.dom.select('a'), name, i, len, html = "";
|
376 |
+
|
377 |
+
for (i=0, len=nodes.length; i<len; i++) {
|
378 |
+
if ((name = ed.dom.getAttrib(nodes[i], "name")) != "")
|
379 |
+
html += '<option value="#' + name + '">' + name + '</option>';
|
380 |
+
}
|
381 |
+
|
382 |
+
if (html == "")
|
383 |
+
return "";
|
384 |
+
|
385 |
+
html = '<select id="' + id + '" name="' + id + '" class="mceAnchorList"'
|
386 |
+
+ ' onchange="this.form.' + target + '.value=this.options[this.selectedIndex].value"'
|
387 |
+
+ '>'
|
388 |
+
+ '<option value="">---</option>'
|
389 |
+
+ html
|
390 |
+
+ '</select>';
|
391 |
+
|
392 |
+
return html;
|
393 |
+
}
|
394 |
+
|
395 |
+
function insertAction() {
|
396 |
+
var inst = tinyMCEPopup.editor;
|
397 |
+
var elm, elementArray, i;
|
398 |
+
|
399 |
+
elm = inst.selection.getNode();
|
400 |
+
checkPrefix(document.forms[0].href);
|
401 |
+
|
402 |
+
elm = inst.dom.getParent(elm, "A");
|
403 |
+
|
404 |
+
// Remove element if there is no href
|
405 |
+
if (!document.forms[0].href.value) {
|
406 |
+
i = inst.selection.getBookmark();
|
407 |
+
inst.dom.remove(elm, 1);
|
408 |
+
inst.selection.moveToBookmark(i);
|
409 |
+
tinyMCEPopup.execCommand("mceEndUndoLevel");
|
410 |
+
tinyMCEPopup.close();
|
411 |
+
return;
|
412 |
+
}
|
413 |
+
|
414 |
+
// Create new anchor elements
|
415 |
+
if (elm == null) {
|
416 |
+
inst.getDoc().execCommand("unlink", false, null);
|
417 |
+
tinyMCEPopup.execCommand("mceInsertLink", false, "#mce_temp_url#", {skip_undo : 1});
|
418 |
+
|
419 |
+
elementArray = tinymce.grep(inst.dom.select("a"), function(n) {return inst.dom.getAttrib(n, 'href') == '#mce_temp_url#';});
|
420 |
+
for (i=0; i<elementArray.length; i++)
|
421 |
+
setAllAttribs(elm = elementArray[i]);
|
422 |
+
} else
|
423 |
+
setAllAttribs(elm);
|
424 |
+
|
425 |
+
// Don't move caret if selection was image
|
426 |
+
if (elm.childNodes.length != 1 || elm.firstChild.nodeName != 'IMG') {
|
427 |
+
inst.focus();
|
428 |
+
inst.selection.select(elm);
|
429 |
+
inst.selection.collapse(0);
|
430 |
+
tinyMCEPopup.storeSelection();
|
431 |
+
}
|
432 |
+
|
433 |
+
tinyMCEPopup.execCommand("mceEndUndoLevel");
|
434 |
+
tinyMCEPopup.close();
|
435 |
+
}
|
436 |
+
|
437 |
+
function setAllAttribs(elm) {
|
438 |
+
var formObj = document.forms[0];
|
439 |
+
var href = formObj.href.value.replace(/ /g, '%20');
|
440 |
+
var target = getSelectValue(formObj, 'targetlist');
|
441 |
+
|
442 |
+
setAttrib(elm, 'href', href);
|
443 |
+
setAttrib(elm, 'title');
|
444 |
+
setAttrib(elm, 'target', target == '_self' ? '' : target);
|
445 |
+
setAttrib(elm, 'id');
|
446 |
+
setAttrib(elm, 'style');
|
447 |
+
setAttrib(elm, 'class', getSelectValue(formObj, 'classlist'));
|
448 |
+
setAttrib(elm, 'rel');
|
449 |
+
setAttrib(elm, 'rev');
|
450 |
+
setAttrib(elm, 'charset');
|
451 |
+
setAttrib(elm, 'hreflang');
|
452 |
+
setAttrib(elm, 'dir');
|
453 |
+
setAttrib(elm, 'lang');
|
454 |
+
setAttrib(elm, 'tabindex');
|
455 |
+
setAttrib(elm, 'accesskey');
|
456 |
+
setAttrib(elm, 'type');
|
457 |
+
setAttrib(elm, 'onfocus');
|
458 |
+
setAttrib(elm, 'onblur');
|
459 |
+
setAttrib(elm, 'onclick');
|
460 |
+
setAttrib(elm, 'ondblclick');
|
461 |
+
setAttrib(elm, 'onmousedown');
|
462 |
+
setAttrib(elm, 'onmouseup');
|
463 |
+
setAttrib(elm, 'onmouseover');
|
464 |
+
setAttrib(elm, 'onmousemove');
|
465 |
+
setAttrib(elm, 'onmouseout');
|
466 |
+
setAttrib(elm, 'onkeypress');
|
467 |
+
setAttrib(elm, 'onkeydown');
|
468 |
+
setAttrib(elm, 'onkeyup');
|
469 |
+
|
470 |
+
// Refresh in old MSIE
|
471 |
+
if (tinyMCE.isMSIE5)
|
472 |
+
elm.outerHTML = elm.outerHTML;
|
473 |
+
}
|
474 |
+
|
475 |
+
function getSelectValue(form_obj, field_name) {
|
476 |
+
var elm = form_obj.elements[field_name];
|
477 |
+
|
478 |
+
if (!elm || elm.options == null || elm.selectedIndex == -1)
|
479 |
+
return "";
|
480 |
+
|
481 |
+
return elm.options[elm.selectedIndex].value;
|
482 |
+
}
|
483 |
+
|
484 |
+
function getLinkListHTML(elm_id, target_form_element, onchange_func) {
|
485 |
+
if (typeof(tinyMCELinkList) == "undefined" || tinyMCELinkList.length == 0)
|
486 |
+
return "";
|
487 |
+
|
488 |
+
var html = "";
|
489 |
+
|
490 |
+
html += '<select id="' + elm_id + '" name="' + elm_id + '"';
|
491 |
+
html += ' class="mceLinkList" onchange="this.form.' + target_form_element + '.value=';
|
492 |
+
html += 'this.options[this.selectedIndex].value;';
|
493 |
+
|
494 |
+
if (typeof(onchange_func) != "undefined")
|
495 |
+
html += onchange_func + '(\'' + target_form_element + '\',this.options[this.selectedIndex].text,this.options[this.selectedIndex].value);';
|
496 |
+
|
497 |
+
html += '"><option value="">---</option>';
|
498 |
+
|
499 |
+
for (var i=0; i<tinyMCELinkList.length; i++)
|
500 |
+
html += '<option value="' + tinyMCELinkList[i][1] + '">' + tinyMCELinkList[i][0] + '</option>';
|
501 |
+
|
502 |
+
html += '</select>';
|
503 |
+
|
504 |
+
return html;
|
505 |
+
|
506 |
+
// tinyMCE.debug('-- image list start --', html, '-- image list end --');
|
507 |
+
}
|
508 |
+
|
509 |
+
function getTargetListHTML(elm_id, target_form_element) {
|
510 |
+
var targets = tinyMCEPopup.getParam('theme_advanced_link_targets', '').split(';');
|
511 |
+
var html = '';
|
512 |
+
|
513 |
+
html += '<select id="' + elm_id + '" name="' + elm_id + '" onchange="this.form.' + target_form_element + '.value=';
|
514 |
+
html += 'this.options[this.selectedIndex].value;">';
|
515 |
+
html += '<option value="_self">' + tinyMCEPopup.getLang('advlink_dlg.target_same') + '</option>';
|
516 |
+
html += '<option value="_blank">' + tinyMCEPopup.getLang('advlink_dlg.target_blank') + ' (_blank)</option>';
|
517 |
+
html += '<option value="_parent">' + tinyMCEPopup.getLang('advlink_dlg.target_parent') + ' (_parent)</option>';
|
518 |
+
html += '<option value="_top">' + tinyMCEPopup.getLang('advlink_dlg.target_top') + ' (_top)</option>';
|
519 |
+
|
520 |
+
for (var i=0; i<targets.length; i++) {
|
521 |
+
var key, value;
|
522 |
+
|
523 |
+
if (targets[i] == "")
|
524 |
+
continue;
|
525 |
+
|
526 |
+
key = targets[i].split('=')[0];
|
527 |
+
value = targets[i].split('=')[1];
|
528 |
+
|
529 |
+
html += '<option value="' + key + '">' + value + ' (' + key + ')</option>';
|
530 |
+
}
|
531 |
+
|
532 |
+
html += '</select>';
|
533 |
+
|
534 |
+
return html;
|
535 |
+
}
|
536 |
+
|
537 |
+
// While loading
|
538 |
+
preinit();
|
539 |
+
tinyMCEPopup.onInit.add(init);
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/advlink/langs/en_dlg.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
tinyMCE.addI18n('en.advlink_dlg',{"target_name":"Target Name",classes:"Classes",style:"Style",id:"ID","popup_position":"Position (X/Y)",langdir:"Language Direction","popup_size":"Size","popup_dependent":"Dependent (Mozilla/Firefox Only)","popup_resizable":"Make Window Resizable","popup_location":"Show Location Bar","popup_menubar":"Show Menu Bar","popup_toolbar":"Show Toolbars","popup_statusbar":"Show Status Bar","popup_scrollbars":"Show Scrollbars","popup_return":"Insert \'return false\'","popup_name":"Window Name","popup_url":"Popup URL",popup:"JavaScript Popup","target_blank":"Open in New Window","target_top":"Open in Top Frame (Replaces All Frames)","target_parent":"Open in Parent Window/Frame","target_same":"Open in This Window/Frame","anchor_names":"Anchors","popup_opts":"Options","advanced_props":"Advanced Properties","event_props":"Events","popup_props":"Popup Properties","general_props":"General Properties","advanced_tab":"Advanced","events_tab":"Events","popup_tab":"Popup","general_tab":"General",list:"Link List","is_external":"The URL you entered seems to be an external link. Do you want to add the required http:// prefix?","is_email":"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",titlefield:"Title",target:"Target",url:"Link URL",title:"Insert/Edit Link","link_list":"Link List",rtl:"Right to Left",ltr:"Left to Right",accesskey:"AccessKey",tabindex:"TabIndex",rev:"Relationship Target to Page",rel:"Relationship Page to Target",mime:"Target MIME Type",encoding:"Target Character Encoding",langcode:"Language Code","target_langcode":"Target Language",width:"Width",height:"Height"});
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/advlink/link.htm
ADDED
@@ -0,0 +1,338 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2 |
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
+
<head>
|
4 |
+
<title>{#advlink_dlg.title}</title>
|
5 |
+
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
6 |
+
<script type="text/javascript" src="../../utils/mctabs.js"></script>
|
7 |
+
<script type="text/javascript" src="../../utils/form_utils.js"></script>
|
8 |
+
<script type="text/javascript" src="../../utils/validate.js"></script>
|
9 |
+
<script type="text/javascript" src="js/advlink.js"></script>
|
10 |
+
<link href="css/advlink.css" rel="stylesheet" type="text/css" />
|
11 |
+
</head>
|
12 |
+
<body id="advlink" style="display: none" role="application" onload="javascript:mcTabs.displayTab('general_tab','general_panel', true);" aria-labelledby="app_label">
|
13 |
+
<span class="mceVoiceLabel" id="app_label" style="display:none;">{#advlink_dlg.title}</span>
|
14 |
+
<form onsubmit="insertAction();return false;" action="#">
|
15 |
+
<div class="tabs" role="presentation">
|
16 |
+
<ul>
|
17 |
+
<li id="general_tab" class="current" aria-controls="general_panel" ><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advlink_dlg.general_tab}</a></span></li>
|
18 |
+
<li id="popup_tab" aria-controls="popup_panel" ><span><a href="javascript:mcTabs.displayTab('popup_tab','popup_panel');" onmousedown="return false;">{#advlink_dlg.popup_tab}</a></span></li>
|
19 |
+
<li id="events_tab" aria-controls="events_panel"><span><a href="javascript:mcTabs.displayTab('events_tab','events_panel');" onmousedown="return false;">{#advlink_dlg.events_tab}</a></span></li>
|
20 |
+
<li id="advanced_tab" aria-controls="advanced_panel"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#advlink_dlg.advanced_tab}</a></span></li>
|
21 |
+
</ul>
|
22 |
+
</div>
|
23 |
+
|
24 |
+
<div class="panel_wrapper" role="presentation">
|
25 |
+
<div id="general_panel" class="panel current">
|
26 |
+
<fieldset>
|
27 |
+
<legend>{#advlink_dlg.general_props}</legend>
|
28 |
+
|
29 |
+
<table border="0" cellpadding="4" cellspacing="0" role="presentation">
|
30 |
+
<tr>
|
31 |
+
<td class="nowrap"><label id="hreflabel" for="href">{#advlink_dlg.url}</label></td>
|
32 |
+
<td><table border="0" cellspacing="0" cellpadding="0">
|
33 |
+
<tr>
|
34 |
+
<td><input id="href" name="href" type="text" class="mceFocus" value="" onchange="selectByValue(this.form,'linklisthref',this.value);" aria-required="true" /></td>
|
35 |
+
<td id="hrefbrowsercontainer"> </td>
|
36 |
+
</tr>
|
37 |
+
</table></td>
|
38 |
+
</tr>
|
39 |
+
<tr id="linklisthrefrow">
|
40 |
+
<td class="column1"><label for="linklisthref">{#advlink_dlg.list}</label></td>
|
41 |
+
<td colspan="2" id="linklisthrefcontainer"><select id="linklisthref"><option value=""></option></select></td>
|
42 |
+
</tr>
|
43 |
+
<tr id="anchorlistrow">
|
44 |
+
<td class="column1"><label for="anchorlist">{#advlink_dlg.anchor_names}</label></td>
|
45 |
+
<td colspan="2" id="anchorlistcontainer"><select id="anchorlist"><option value=""></option></select></td>
|
46 |
+
</tr>
|
47 |
+
<tr>
|
48 |
+
<td><label id="targetlistlabel" for="targetlist">{#advlink_dlg.target}</label></td>
|
49 |
+
<td id="targetlistcontainer"><select id="targetlist"><option value=""></option></select></td>
|
50 |
+
</tr>
|
51 |
+
<tr>
|
52 |
+
<td class="nowrap"><label id="titlelabel" for="title">{#advlink_dlg.titlefield}</label></td>
|
53 |
+
<td><input id="title" name="title" type="text" value="" /></td>
|
54 |
+
</tr>
|
55 |
+
<tr>
|
56 |
+
<td><label id="classlabel" for="classlist">{#class_name}</label></td>
|
57 |
+
<td>
|
58 |
+
<select id="classlist" name="classlist" onchange="changeClass();">
|
59 |
+
<option value="" selected="selected">{#not_set}</option>
|
60 |
+
</select>
|
61 |
+
</td>
|
62 |
+
</tr>
|
63 |
+
</table>
|
64 |
+
</fieldset>
|
65 |
+
</div>
|
66 |
+
|
67 |
+
<div id="popup_panel" class="panel">
|
68 |
+
<fieldset>
|
69 |
+
<legend>{#advlink_dlg.popup_props}</legend>
|
70 |
+
|
71 |
+
<input type="checkbox" id="ispopup" name="ispopup" class="radio" onclick="setPopupControlsDisabled(!this.checked);buildOnClick();" />
|
72 |
+
<label id="ispopuplabel" for="ispopup">{#advlink_dlg.popup}</label>
|
73 |
+
|
74 |
+
<table border="0" cellpadding="0" cellspacing="4" role="presentation" >
|
75 |
+
<tr>
|
76 |
+
<td class="nowrap"><label for="popupurl">{#advlink_dlg.popup_url}</label> </td>
|
77 |
+
<td>
|
78 |
+
<table border="0" cellspacing="0" cellpadding="0">
|
79 |
+
<tr>
|
80 |
+
<td><input type="text" name="popupurl" id="popupurl" value="" onchange="buildOnClick();" /></td>
|
81 |
+
<td id="popupurlbrowsercontainer"> </td>
|
82 |
+
</tr>
|
83 |
+
</table>
|
84 |
+
</td>
|
85 |
+
</tr>
|
86 |
+
<tr>
|
87 |
+
<td class="nowrap"><label for="popupname">{#advlink_dlg.popup_name}</label> </td>
|
88 |
+
<td><input type="text" name="popupname" id="popupname" value="" onchange="buildOnClick();" /></td>
|
89 |
+
</tr>
|
90 |
+
<tr role="group" aria-labelledby="popup_size_label">
|
91 |
+
<td class="nowrap"><label id="popup_size_label">{#advlink_dlg.popup_size}</label> </td>
|
92 |
+
<td class="nowrap">
|
93 |
+
<span style="display:none" id="width_voiceLabel">{#advlink_dlg.width}</span>
|
94 |
+
<input type="text" id="popupwidth" name="popupwidth" value="" onchange="buildOnClick();" aria-labelledby="width_voiceLabel" /> x
|
95 |
+
<span style="display:none" id="height_voiceLabel">{#advlink_dlg.height}</span>
|
96 |
+
<input type="text" id="popupheight" name="popupheight" value="" onchange="buildOnClick();" aria-labelledby="height_voiceLabel" /> px
|
97 |
+
</td>
|
98 |
+
</tr>
|
99 |
+
<tr role="group" aria-labelledby="popup_position_label center_hint">
|
100 |
+
<td class="nowrap" id="labelleft"><label id="popup_position_label">{#advlink_dlg.popup_position}</label> </td>
|
101 |
+
<td class="nowrap">
|
102 |
+
<span style="display:none" id="x_voiceLabel">X</span>
|
103 |
+
<input type="text" id="popupleft" name="popupleft" value="" onchange="buildOnClick();" aria-labelledby="x_voiceLabel" /> /
|
104 |
+
<span style="display:none" id="y_voiceLabel">Y</span>
|
105 |
+
<input type="text" id="popuptop" name="popuptop" value="" onchange="buildOnClick();" aria-labelledby="y_voiceLabel" /> <span id="center_hint">(c /c = center)</span>
|
106 |
+
</td>
|
107 |
+
</tr>
|
108 |
+
</table>
|
109 |
+
|
110 |
+
<fieldset>
|
111 |
+
<legend>{#advlink_dlg.popup_opts}</legend>
|
112 |
+
|
113 |
+
<table border="0" cellpadding="0" cellspacing="4" role="presentation" >
|
114 |
+
<tr>
|
115 |
+
<td><input type="checkbox" id="popuplocation" name="popuplocation" class="checkbox" onchange="buildOnClick();" /></td>
|
116 |
+
<td class="nowrap"><label id="popuplocationlabel" for="popuplocation">{#advlink_dlg.popup_location}</label></td>
|
117 |
+
<td><input type="checkbox" id="popupscrollbars" name="popupscrollbars" class="checkbox" onchange="buildOnClick();" /></td>
|
118 |
+
<td class="nowrap"><label id="popupscrollbarslabel" for="popupscrollbars">{#advlink_dlg.popup_scrollbars}</label></td>
|
119 |
+
</tr>
|
120 |
+
<tr>
|
121 |
+
<td><input type="checkbox" id="popupmenubar" name="popupmenubar" class="checkbox" onchange="buildOnClick();" /></td>
|
122 |
+
<td class="nowrap"><label id="popupmenubarlabel" for="popupmenubar">{#advlink_dlg.popup_menubar}</label></td>
|
123 |
+
<td><input type="checkbox" id="popupresizable" name="popupresizable" class="checkbox" onchange="buildOnClick();" /></td>
|
124 |
+
<td class="nowrap"><label id="popupresizablelabel" for="popupresizable">{#advlink_dlg.popup_resizable}</label></td>
|
125 |
+
</tr>
|
126 |
+
<tr>
|
127 |
+
<td><input type="checkbox" id="popuptoolbar" name="popuptoolbar" class="checkbox" onchange="buildOnClick();" /></td>
|
128 |
+
<td class="nowrap"><label id="popuptoolbarlabel" for="popuptoolbar">{#advlink_dlg.popup_toolbar}</label></td>
|
129 |
+
<td><input type="checkbox" id="popupdependent" name="popupdependent" class="checkbox" onchange="buildOnClick();" /></td>
|
130 |
+
<td class="nowrap"><label id="popupdependentlabel" for="popupdependent">{#advlink_dlg.popup_dependent}</label></td>
|
131 |
+
</tr>
|
132 |
+
<tr>
|
133 |
+
<td><input type="checkbox" id="popupstatus" name="popupstatus" class="checkbox" onchange="buildOnClick();" /></td>
|
134 |
+
<td class="nowrap"><label id="popupstatuslabel" for="popupstatus">{#advlink_dlg.popup_statusbar}</label></td>
|
135 |
+
<td><input type="checkbox" id="popupreturn" name="popupreturn" class="checkbox" onchange="buildOnClick();" checked="checked" /></td>
|
136 |
+
<td class="nowrap"><label id="popupreturnlabel" for="popupreturn">{#advlink_dlg.popup_return}</label></td>
|
137 |
+
</tr>
|
138 |
+
</table>
|
139 |
+
</fieldset>
|
140 |
+
</fieldset>
|
141 |
+
</div>
|
142 |
+
|
143 |
+
<div id="advanced_panel" class="panel">
|
144 |
+
<fieldset>
|
145 |
+
<legend>{#advlink_dlg.advanced_props}</legend>
|
146 |
+
|
147 |
+
<table border="0" cellpadding="0" cellspacing="4" role="presentation" >
|
148 |
+
<tr>
|
149 |
+
<td class="column1"><label id="idlabel" for="id">{#advlink_dlg.id}</label></td>
|
150 |
+
<td><input id="id" name="id" type="text" value="" /></td>
|
151 |
+
</tr>
|
152 |
+
|
153 |
+
<tr>
|
154 |
+
<td><label id="stylelabel" for="style">{#advlink_dlg.style}</label></td>
|
155 |
+
<td><input type="text" id="style" name="style" value="" /></td>
|
156 |
+
</tr>
|
157 |
+
|
158 |
+
<tr>
|
159 |
+
<td><label id="classeslabel" for="classes">{#advlink_dlg.classes}</label></td>
|
160 |
+
<td><input type="text" id="classes" name="classes" value="" onchange="selectByValue(this.form,'classlist',this.value,true);" /></td>
|
161 |
+
</tr>
|
162 |
+
|
163 |
+
<tr>
|
164 |
+
<td><label id="targetlabel" for="target">{#advlink_dlg.target_name}</label></td>
|
165 |
+
<td><input type="text" id="target" name="target" value="" onchange="selectByValue(this.form,'targetlist',this.value,true);" /></td>
|
166 |
+
</tr>
|
167 |
+
|
168 |
+
<tr>
|
169 |
+
<td class="column1"><label id="dirlabel" for="dir">{#advlink_dlg.langdir}</label></td>
|
170 |
+
<td>
|
171 |
+
<select id="dir" name="dir">
|
172 |
+
<option value="">{#not_set}</option>
|
173 |
+
<option value="ltr">{#advlink_dlg.ltr}</option>
|
174 |
+
<option value="rtl">{#advlink_dlg.rtl}</option>
|
175 |
+
</select>
|
176 |
+
</td>
|
177 |
+
</tr>
|
178 |
+
|
179 |
+
<tr>
|
180 |
+
<td><label id="hreflanglabel" for="hreflang">{#advlink_dlg.target_langcode}</label></td>
|
181 |
+
<td><input type="text" id="hreflang" name="hreflang" value="" /></td>
|
182 |
+
</tr>
|
183 |
+
|
184 |
+
<tr>
|
185 |
+
<td class="column1"><label id="langlabel" for="lang">{#advlink_dlg.langcode}</label></td>
|
186 |
+
<td>
|
187 |
+
<input id="lang" name="lang" type="text" value="" />
|
188 |
+
</td>
|
189 |
+
</tr>
|
190 |
+
|
191 |
+
<tr>
|
192 |
+
<td><label id="charsetlabel" for="charset">{#advlink_dlg.encoding}</label></td>
|
193 |
+
<td><input type="text" id="charset" name="charset" value="" /></td>
|
194 |
+
</tr>
|
195 |
+
|
196 |
+
<tr>
|
197 |
+
<td><label id="typelabel" for="type">{#advlink_dlg.mime}</label></td>
|
198 |
+
<td><input type="text" id="type" name="type" value="" /></td>
|
199 |
+
</tr>
|
200 |
+
|
201 |
+
<tr>
|
202 |
+
<td><label id="rellabel" for="rel">{#advlink_dlg.rel}</label></td>
|
203 |
+
<td><select id="rel" name="rel">
|
204 |
+
<option value="">{#not_set}</option>
|
205 |
+
<option value="lightbox">Lightbox</option>
|
206 |
+
<option value="alternate">Alternate</option>
|
207 |
+
<option value="designates">Designates</option>
|
208 |
+
<option value="stylesheet">Stylesheet</option>
|
209 |
+
<option value="start">Start</option>
|
210 |
+
<option value="next">Next</option>
|
211 |
+
<option value="prev">Prev</option>
|
212 |
+
<option value="contents">Contents</option>
|
213 |
+
<option value="index">Index</option>
|
214 |
+
<option value="glossary">Glossary</option>
|
215 |
+
<option value="copyright">Copyright</option>
|
216 |
+
<option value="chapter">Chapter</option>
|
217 |
+
<option value="subsection">Subsection</option>
|
218 |
+
<option value="appendix">Appendix</option>
|
219 |
+
<option value="help">Help</option>
|
220 |
+
<option value="bookmark">Bookmark</option>
|
221 |
+
<option value="nofollow">No Follow</option>
|
222 |
+
<option value="tag">Tag</option>
|
223 |
+
</select>
|
224 |
+
</td>
|
225 |
+
</tr>
|
226 |
+
|
227 |
+
<tr>
|
228 |
+
<td><label id="revlabel" for="rev">{#advlink_dlg.rev}</label></td>
|
229 |
+
<td><select id="rev" name="rev">
|
230 |
+
<option value="">{#not_set}</option>
|
231 |
+
<option value="alternate">Alternate</option>
|
232 |
+
<option value="designates">Designates</option>
|
233 |
+
<option value="stylesheet">Stylesheet</option>
|
234 |
+
<option value="start">Start</option>
|
235 |
+
<option value="next">Next</option>
|
236 |
+
<option value="prev">Prev</option>
|
237 |
+
<option value="contents">Contents</option>
|
238 |
+
<option value="index">Index</option>
|
239 |
+
<option value="glossary">Glossary</option>
|
240 |
+
<option value="copyright">Copyright</option>
|
241 |
+
<option value="chapter">Chapter</option>
|
242 |
+
<option value="subsection">Subsection</option>
|
243 |
+
<option value="appendix">Appendix</option>
|
244 |
+
<option value="help">Help</option>
|
245 |
+
<option value="bookmark">Bookmark</option>
|
246 |
+
</select>
|
247 |
+
</td>
|
248 |
+
</tr>
|
249 |
+
|
250 |
+
<tr>
|
251 |
+
<td><label id="tabindexlabel" for="tabindex">{#advlink_dlg.tabindex}</label></td>
|
252 |
+
<td><input type="text" id="tabindex" name="tabindex" value="" /></td>
|
253 |
+
</tr>
|
254 |
+
|
255 |
+
<tr>
|
256 |
+
<td><label id="accesskeylabel" for="accesskey">{#advlink_dlg.accesskey}</label></td>
|
257 |
+
<td><input type="text" id="accesskey" name="accesskey" value="" /></td>
|
258 |
+
</tr>
|
259 |
+
</table>
|
260 |
+
</fieldset>
|
261 |
+
</div>
|
262 |
+
|
263 |
+
<div id="events_panel" class="panel">
|
264 |
+
<fieldset>
|
265 |
+
<legend>{#advlink_dlg.event_props}</legend>
|
266 |
+
|
267 |
+
<table border="0" cellpadding="0" cellspacing="4" role="presentation" >
|
268 |
+
<tr>
|
269 |
+
<td class="column1"><label for="onfocus">onfocus</label></td>
|
270 |
+
<td><input id="onfocus" name="onfocus" type="text" value="" /></td>
|
271 |
+
</tr>
|
272 |
+
|
273 |
+
<tr>
|
274 |
+
<td class="column1"><label for="onblur">onblur</label></td>
|
275 |
+
<td><input id="onblur" name="onblur" type="text" value="" /></td>
|
276 |
+
</tr>
|
277 |
+
|
278 |
+
<tr>
|
279 |
+
<td class="column1"><label for="onclick">onclick</label></td>
|
280 |
+
<td><input id="onclick" name="onclick" type="text" value="" /></td>
|
281 |
+
</tr>
|
282 |
+
|
283 |
+
<tr>
|
284 |
+
<td class="column1"><label for="ondblclick">ondblclick</label></td>
|
285 |
+
<td><input id="ondblclick" name="ondblclick" type="text" value="" /></td>
|
286 |
+
</tr>
|
287 |
+
|
288 |
+
<tr>
|
289 |
+
<td class="column1"><label for="onmousedown">onmousedown</label></td>
|
290 |
+
<td><input id="onmousedown" name="onmousedown" type="text" value="" /></td>
|
291 |
+
</tr>
|
292 |
+
|
293 |
+
<tr>
|
294 |
+
<td class="column1"><label for="onmouseup">onmouseup</label></td>
|
295 |
+
<td><input id="onmouseup" name="onmouseup" type="text" value="" /></td>
|
296 |
+
</tr>
|
297 |
+
|
298 |
+
<tr>
|
299 |
+
<td class="column1"><label for="onmouseover">onmouseover</label></td>
|
300 |
+
<td><input id="onmouseover" name="onmouseover" type="text" value="" /></td>
|
301 |
+
</tr>
|
302 |
+
|
303 |
+
<tr>
|
304 |
+
<td class="column1"><label for="onmousemove">onmousemove</label></td>
|
305 |
+
<td><input id="onmousemove" name="onmousemove" type="text" value="" /></td>
|
306 |
+
</tr>
|
307 |
+
|
308 |
+
<tr>
|
309 |
+
<td class="column1"><label for="onmouseout">onmouseout</label></td>
|
310 |
+
<td><input id="onmouseout" name="onmouseout" type="text" value="" /></td>
|
311 |
+
</tr>
|
312 |
+
|
313 |
+
<tr>
|
314 |
+
<td class="column1"><label for="onkeypress">onkeypress</label></td>
|
315 |
+
<td><input id="onkeypress" name="onkeypress" type="text" value="" /></td>
|
316 |
+
</tr>
|
317 |
+
|
318 |
+
<tr>
|
319 |
+
<td class="column1"><label for="onkeydown">onkeydown</label></td>
|
320 |
+
<td><input id="onkeydown" name="onkeydown" type="text" value="" /></td>
|
321 |
+
</tr>
|
322 |
+
|
323 |
+
<tr>
|
324 |
+
<td class="column1"><label for="onkeyup">onkeyup</label></td>
|
325 |
+
<td><input id="onkeyup" name="onkeyup" type="text" value="" /></td>
|
326 |
+
</tr>
|
327 |
+
</table>
|
328 |
+
</fieldset>
|
329 |
+
</div>
|
330 |
+
</div>
|
331 |
+
|
332 |
+
<div class="mceActionPanel">
|
333 |
+
<input type="submit" id="insert" name="insert" value="{#insert}" />
|
334 |
+
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
335 |
+
</div>
|
336 |
+
</form>
|
337 |
+
</body>
|
338 |
+
</html>
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/advlist/editor_plugin.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(function(){var a=tinymce.each;tinymce.create("tinymce.plugins.AdvListPlugin",{init:function(b,c){var d=this;d.editor=b;function e(g){var f=[];a(g.split(/,/),function(h){f.push({title:"advlist."+(h=="default"?"def":h.replace(/-/g,"_")),styles:{listStyleType:h=="default"?"":h}})});return f}d.numlist=b.getParam("advlist_number_styles")||e("default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman");d.bullist=b.getParam("advlist_bullet_styles")||e("default,circle,disc,square");if(tinymce.isIE&&/MSIE [2-7]/.test(navigator.userAgent)){d.isIE7=true}},createControl:function(d,b){var f=this,e,i,g=f.editor;if(d=="numlist"||d=="bullist"){if(f[d][0].title=="advlist.def"){i=f[d][0]}function c(j,l){var k=true;a(l.styles,function(n,m){if(g.dom.getStyle(j,m)!=n){k=false;return false}});return k}function h(){var k,l=g.dom,j=g.selection;k=l.getParent(j.getNode(),"ol,ul");if(!k||k.nodeName==(d=="bullist"?"OL":"UL")||c(k,i)){g.execCommand(d=="bullist"?"InsertUnorderedList":"InsertOrderedList")}if(i){k=l.getParent(j.getNode(),"ol,ul");if(k){l.setStyles(k,i.styles);k.removeAttribute("data-mce-style")}}g.focus()}e=b.createSplitButton(d,{title:"advanced."+d+"_desc","class":"mce_"+d,onclick:function(){h()}});e.onRenderMenu.add(function(j,k){k.onHideMenu.add(function(){if(f.bookmark){g.selection.moveToBookmark(f.bookmark);f.bookmark=0}});k.onShowMenu.add(function(){var n=g.dom,m=n.getParent(g.selection.getNode(),"ol,ul"),l;if(m||i){l=f[d];a(k.items,function(o){var p=true;o.setSelected(0);if(m&&!o.isDisabled()){a(l,function(q){if(q.id==o.id){if(!c(m,q)){p=false;return false}}});if(p){o.setSelected(1)}}});if(!m){k.items[i.id].setSelected(1)}}g.focus();if(tinymce.isIE){f.bookmark=g.selection.getBookmark(1)}});k.add({id:g.dom.uniqueId(),title:"advlist.types","class":"mceMenuItemTitle",titleItem:true}).setDisabled(1);a(f[d],function(l){if(f.isIE7&&l.styles.listStyleType=="lower-greek"){return}l.id=g.dom.uniqueId();k.add({id:l.id,title:l.title,onclick:function(){i=l;h()}})})});return e}},getInfo:function(){return{longname:"Advanced lists",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlist",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("advlist",tinymce.plugins.AdvListPlugin)})();
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/advlist/editor_plugin_src.js
ADDED
@@ -0,0 +1,176 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 each = tinymce.each;
|
13 |
+
|
14 |
+
tinymce.create('tinymce.plugins.AdvListPlugin', {
|
15 |
+
init : function(ed, url) {
|
16 |
+
var t = this;
|
17 |
+
|
18 |
+
t.editor = ed;
|
19 |
+
|
20 |
+
function buildFormats(str) {
|
21 |
+
var formats = [];
|
22 |
+
|
23 |
+
each(str.split(/,/), function(type) {
|
24 |
+
formats.push({
|
25 |
+
title : 'advlist.' + (type == 'default' ? 'def' : type.replace(/-/g, '_')),
|
26 |
+
styles : {
|
27 |
+
listStyleType : type == 'default' ? '' : type
|
28 |
+
}
|
29 |
+
});
|
30 |
+
});
|
31 |
+
|
32 |
+
return formats;
|
33 |
+
};
|
34 |
+
|
35 |
+
// Setup number formats from config or default
|
36 |
+
t.numlist = ed.getParam("advlist_number_styles") || buildFormats("default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman");
|
37 |
+
t.bullist = ed.getParam("advlist_bullet_styles") || buildFormats("default,circle,disc,square");
|
38 |
+
|
39 |
+
if (tinymce.isIE && /MSIE [2-7]/.test(navigator.userAgent))
|
40 |
+
t.isIE7 = true;
|
41 |
+
},
|
42 |
+
|
43 |
+
createControl: function(name, cm) {
|
44 |
+
var t = this, btn, format, editor = t.editor;
|
45 |
+
|
46 |
+
if (name == 'numlist' || name == 'bullist') {
|
47 |
+
// Default to first item if it's a default item
|
48 |
+
if (t[name][0].title == 'advlist.def')
|
49 |
+
format = t[name][0];
|
50 |
+
|
51 |
+
function hasFormat(node, format) {
|
52 |
+
var state = true;
|
53 |
+
|
54 |
+
each(format.styles, function(value, name) {
|
55 |
+
// Format doesn't match
|
56 |
+
if (editor.dom.getStyle(node, name) != value) {
|
57 |
+
state = false;
|
58 |
+
return false;
|
59 |
+
}
|
60 |
+
});
|
61 |
+
|
62 |
+
return state;
|
63 |
+
};
|
64 |
+
|
65 |
+
function applyListFormat() {
|
66 |
+
var list, dom = editor.dom, sel = editor.selection;
|
67 |
+
|
68 |
+
// Check for existing list element
|
69 |
+
list = dom.getParent(sel.getNode(), 'ol,ul');
|
70 |
+
|
71 |
+
// Switch/add list type if needed
|
72 |
+
if (!list || list.nodeName == (name == 'bullist' ? 'OL' : 'UL') || hasFormat(list, format))
|
73 |
+
editor.execCommand(name == 'bullist' ? 'InsertUnorderedList' : 'InsertOrderedList');
|
74 |
+
|
75 |
+
// Append styles to new list element
|
76 |
+
if (format) {
|
77 |
+
list = dom.getParent(sel.getNode(), 'ol,ul');
|
78 |
+
if (list) {
|
79 |
+
dom.setStyles(list, format.styles);
|
80 |
+
list.removeAttribute('data-mce-style');
|
81 |
+
}
|
82 |
+
}
|
83 |
+
|
84 |
+
editor.focus();
|
85 |
+
};
|
86 |
+
|
87 |
+
btn = cm.createSplitButton(name, {
|
88 |
+
title : 'advanced.' + name + '_desc',
|
89 |
+
'class' : 'mce_' + name,
|
90 |
+
onclick : function() {
|
91 |
+
applyListFormat();
|
92 |
+
}
|
93 |
+
});
|
94 |
+
|
95 |
+
btn.onRenderMenu.add(function(btn, menu) {
|
96 |
+
menu.onHideMenu.add(function() {
|
97 |
+
if (t.bookmark) {
|
98 |
+
editor.selection.moveToBookmark(t.bookmark);
|
99 |
+
t.bookmark = 0;
|
100 |
+
}
|
101 |
+
});
|
102 |
+
|
103 |
+
menu.onShowMenu.add(function() {
|
104 |
+
var dom = editor.dom, list = dom.getParent(editor.selection.getNode(), 'ol,ul'), fmtList;
|
105 |
+
|
106 |
+
if (list || format) {
|
107 |
+
fmtList = t[name];
|
108 |
+
|
109 |
+
// Unselect existing items
|
110 |
+
each(menu.items, function(item) {
|
111 |
+
var state = true;
|
112 |
+
|
113 |
+
item.setSelected(0);
|
114 |
+
|
115 |
+
if (list && !item.isDisabled()) {
|
116 |
+
each(fmtList, function(fmt) {
|
117 |
+
if (fmt.id == item.id) {
|
118 |
+
if (!hasFormat(list, fmt)) {
|
119 |
+
state = false;
|
120 |
+
return false;
|
121 |
+
}
|
122 |
+
}
|
123 |
+
});
|
124 |
+
|
125 |
+
if (state)
|
126 |
+
item.setSelected(1);
|
127 |
+
}
|
128 |
+
});
|
129 |
+
|
130 |
+
// Select the current format
|
131 |
+
if (!list)
|
132 |
+
menu.items[format.id].setSelected(1);
|
133 |
+
}
|
134 |
+
|
135 |
+
editor.focus();
|
136 |
+
|
137 |
+
// IE looses it's selection so store it away and restore it later
|
138 |
+
if (tinymce.isIE) {
|
139 |
+
t.bookmark = editor.selection.getBookmark(1);
|
140 |
+
}
|
141 |
+
});
|
142 |
+
|
143 |
+
menu.add({id : editor.dom.uniqueId(), title : 'advlist.types', 'class' : 'mceMenuItemTitle', titleItem: true}).setDisabled(1);
|
144 |
+
|
145 |
+
each(t[name], function(item) {
|
146 |
+
// IE<8 doesn't support lower-greek, skip it
|
147 |
+
if (t.isIE7 && item.styles.listStyleType == 'lower-greek')
|
148 |
+
return;
|
149 |
+
|
150 |
+
item.id = editor.dom.uniqueId();
|
151 |
+
|
152 |
+
menu.add({id : item.id, title : item.title, onclick : function() {
|
153 |
+
format = item;
|
154 |
+
applyListFormat();
|
155 |
+
}});
|
156 |
+
});
|
157 |
+
});
|
158 |
+
|
159 |
+
return btn;
|
160 |
+
}
|
161 |
+
},
|
162 |
+
|
163 |
+
getInfo : function() {
|
164 |
+
return {
|
165 |
+
longname : 'Advanced lists',
|
166 |
+
author : 'Moxiecode Systems AB',
|
167 |
+
authorurl : 'http://tinymce.moxiecode.com',
|
168 |
+
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlist',
|
169 |
+
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
170 |
+
};
|
171 |
+
}
|
172 |
+
});
|
173 |
+
|
174 |
+
// Register plugin
|
175 |
+
tinymce.PluginManager.add('advlist', tinymce.plugins.AdvListPlugin);
|
176 |
+
})();
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/autolink/editor_plugin.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(function(){tinymce.create("tinymce.plugins.AutolinkPlugin",{init:function(a,b){var c=this;if(tinyMCE.isIE){return}a.onKeyDown.add(function(d,f){if(f.keyCode==13){return c.handleEnter(d)}});a.onKeyPress.add(function(d,f){if(f.which==41){return c.handleEclipse(d)}});a.onKeyUp.add(function(d,f){if(f.keyCode==32){return c.handleSpacebar(d)}})},handleEclipse:function(a){this.parseCurrentLine(a,-1,"(",true)},handleSpacebar:function(a){this.parseCurrentLine(a,0,"",true)},handleEnter:function(a){this.parseCurrentLine(a,-1,"",false)},parseCurrentLine:function(i,d,b,g){var a,f,c,n,k,m,h,e,j;a=i.selection.getRng().cloneRange();if(a.startOffset<5){e=a.endContainer.previousSibling;if(e==null){if(a.endContainer.firstChild==null||a.endContainer.firstChild.nextSibling==null){return}e=a.endContainer.firstChild.nextSibling}j=e.length;a.setStart(e,j);a.setEnd(e,j);if(a.endOffset<5){return}f=a.endOffset;n=e}else{n=a.endContainer;if(n.nodeType!=3&&n.firstChild){while(n.nodeType!=3&&n.firstChild){n=n.firstChild}a.setStart(n,0);a.setEnd(n,n.nodeValue.length)}if(a.endOffset==1){f=2}else{f=a.endOffset-1-d}}c=f;do{a.setStart(n,f-2);a.setEnd(n,f-1);f-=1}while(a.toString()!=" "&&a.toString()!=""&&a.toString().charCodeAt(0)!=160&&(f-2)>=0&&a.toString()!=b);if(a.toString()==b||a.toString().charCodeAt(0)==160){a.setStart(n,f);a.setEnd(n,c);f+=1}else{if(a.startOffset==0){a.setStart(n,0);a.setEnd(n,c)}else{a.setStart(n,f);a.setEnd(n,c)}}m=a.toString();h=m.match(/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|[A-Z0-9._%+-]+@)(.+)$/i);if(h){if(h[1]=="www."){h[1]="http://www."}else{if(/@$/.test(h[1])){h[1]="mailto:"+h[1]}}k=i.selection.getBookmark();i.selection.setRng(a);tinyMCE.execCommand("createlink",false,h[1]+h[2]);i.selection.moveToBookmark(k);if(tinyMCE.isWebKit){i.selection.collapse(false);var l=Math.min(n.length,c+1);a.setStart(n,l);a.setEnd(n,l);i.selection.setRng(a)}}},getInfo:function(){return{longname:"Autolink",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autolink",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("autolink",tinymce.plugins.AutolinkPlugin)})();
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/autolink/editor_plugin_src.js
ADDED
@@ -0,0 +1,174 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* editor_plugin_src.js
|
3 |
+
*
|
4 |
+
* Copyright 2011, 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 |
+
tinymce.create('tinymce.plugins.AutolinkPlugin', {
|
13 |
+
/**
|
14 |
+
* Initializes the plugin, this will be executed after the plugin has been created.
|
15 |
+
* This call is done before the editor instance has finished it's initialization so use the onInit event
|
16 |
+
* of the editor instance to intercept that event.
|
17 |
+
*
|
18 |
+
* @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
|
19 |
+
* @param {string} url Absolute URL to where the plugin is located.
|
20 |
+
*/
|
21 |
+
|
22 |
+
init : function(ed, url) {
|
23 |
+
var t = this;
|
24 |
+
|
25 |
+
// Internet Explorer has built-in automatic linking
|
26 |
+
if (tinyMCE.isIE)
|
27 |
+
return;
|
28 |
+
|
29 |
+
// Add a key down handler
|
30 |
+
ed.onKeyDown.add(function(ed, e) {
|
31 |
+
if (e.keyCode == 13)
|
32 |
+
return t.handleEnter(ed);
|
33 |
+
});
|
34 |
+
|
35 |
+
ed.onKeyPress.add(function(ed, e) {
|
36 |
+
if (e.which == 41)
|
37 |
+
return t.handleEclipse(ed);
|
38 |
+
});
|
39 |
+
|
40 |
+
// Add a key up handler
|
41 |
+
ed.onKeyUp.add(function(ed, e) {
|
42 |
+
if (e.keyCode == 32)
|
43 |
+
return t.handleSpacebar(ed);
|
44 |
+
});
|
45 |
+
},
|
46 |
+
|
47 |
+
handleEclipse : function(ed) {
|
48 |
+
this.parseCurrentLine(ed, -1, '(', true);
|
49 |
+
},
|
50 |
+
|
51 |
+
handleSpacebar : function(ed) {
|
52 |
+
this.parseCurrentLine(ed, 0, '', true);
|
53 |
+
},
|
54 |
+
|
55 |
+
handleEnter : function(ed) {
|
56 |
+
this.parseCurrentLine(ed, -1, '', false);
|
57 |
+
},
|
58 |
+
|
59 |
+
parseCurrentLine : function(ed, end_offset, delimiter, goback) {
|
60 |
+
var r, end, start, endContainer, bookmark, text, matches, prev, len;
|
61 |
+
|
62 |
+
// We need at least five characters to form a URL,
|
63 |
+
// hence, at minimum, five characters from the beginning of the line.
|
64 |
+
r = ed.selection.getRng().cloneRange();
|
65 |
+
if (r.startOffset < 5) {
|
66 |
+
// During testing, the caret is placed inbetween two text nodes.
|
67 |
+
// The previous text node contains the URL.
|
68 |
+
prev = r.endContainer.previousSibling;
|
69 |
+
if (prev == null) {
|
70 |
+
if (r.endContainer.firstChild == null || r.endContainer.firstChild.nextSibling == null)
|
71 |
+
return;
|
72 |
+
|
73 |
+
prev = r.endContainer.firstChild.nextSibling;
|
74 |
+
}
|
75 |
+
len = prev.length;
|
76 |
+
r.setStart(prev, len);
|
77 |
+
r.setEnd(prev, len);
|
78 |
+
|
79 |
+
if (r.endOffset < 5)
|
80 |
+
return;
|
81 |
+
|
82 |
+
end = r.endOffset;
|
83 |
+
endContainer = prev;
|
84 |
+
} else {
|
85 |
+
endContainer = r.endContainer;
|
86 |
+
|
87 |
+
// Get a text node
|
88 |
+
if (endContainer.nodeType != 3 && endContainer.firstChild) {
|
89 |
+
while (endContainer.nodeType != 3 && endContainer.firstChild)
|
90 |
+
endContainer = endContainer.firstChild;
|
91 |
+
|
92 |
+
r.setStart(endContainer, 0);
|
93 |
+
r.setEnd(endContainer, endContainer.nodeValue.length);
|
94 |
+
}
|
95 |
+
|
96 |
+
if (r.endOffset == 1)
|
97 |
+
end = 2;
|
98 |
+
else
|
99 |
+
end = r.endOffset - 1 - end_offset;
|
100 |
+
}
|
101 |
+
|
102 |
+
start = end;
|
103 |
+
|
104 |
+
do
|
105 |
+
{
|
106 |
+
// Move the selection one character backwards.
|
107 |
+
r.setStart(endContainer, end - 2);
|
108 |
+
r.setEnd(endContainer, end - 1);
|
109 |
+
end -= 1;
|
110 |
+
|
111 |
+
// Loop until one of the following is found: a blank space, , delimeter, (end-2) >= 0
|
112 |
+
} while (r.toString() != ' ' && r.toString() != '' && r.toString().charCodeAt(0) != 160 && (end -2) >= 0 && r.toString() != delimiter);
|
113 |
+
|
114 |
+
if (r.toString() == delimiter || r.toString().charCodeAt(0) == 160) {
|
115 |
+
r.setStart(endContainer, end);
|
116 |
+
r.setEnd(endContainer, start);
|
117 |
+
end += 1;
|
118 |
+
} else if (r.startOffset == 0) {
|
119 |
+
r.setStart(endContainer, 0);
|
120 |
+
r.setEnd(endContainer, start);
|
121 |
+
}
|
122 |
+
else {
|
123 |
+
r.setStart(endContainer, end);
|
124 |
+
r.setEnd(endContainer, start);
|
125 |
+
}
|
126 |
+
|
127 |
+
text = r.toString();
|
128 |
+
matches = text.match(/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|[A-Z0-9._%+-]+@)(.+)$/i);
|
129 |
+
|
130 |
+
if (matches) {
|
131 |
+
if (matches[1] == 'www.') {
|
132 |
+
matches[1] = 'http://www.';
|
133 |
+
} else if (/@$/.test(matches[1])) {
|
134 |
+
matches[1] = 'mailto:' + matches[1];
|
135 |
+
}
|
136 |
+
|
137 |
+
bookmark = ed.selection.getBookmark();
|
138 |
+
|
139 |
+
ed.selection.setRng(r);
|
140 |
+
tinyMCE.execCommand('createlink',false, matches[1] + matches[2]);
|
141 |
+
ed.selection.moveToBookmark(bookmark);
|
142 |
+
|
143 |
+
// TODO: Determine if this is still needed.
|
144 |
+
if (tinyMCE.isWebKit) {
|
145 |
+
// move the caret to its original position
|
146 |
+
ed.selection.collapse(false);
|
147 |
+
var max = Math.min(endContainer.length, start + 1);
|
148 |
+
r.setStart(endContainer, max);
|
149 |
+
r.setEnd(endContainer, max);
|
150 |
+
ed.selection.setRng(r);
|
151 |
+
}
|
152 |
+
}
|
153 |
+
},
|
154 |
+
|
155 |
+
/**
|
156 |
+
* Returns information about the plugin as a name/value array.
|
157 |
+
* The current keys are longname, author, authorurl, infourl and version.
|
158 |
+
*
|
159 |
+
* @return {Object} Name/value array containing information about the plugin.
|
160 |
+
*/
|
161 |
+
getInfo : function() {
|
162 |
+
return {
|
163 |
+
longname : 'Autolink',
|
164 |
+
author : 'Moxiecode Systems AB',
|
165 |
+
authorurl : 'http://tinymce.moxiecode.com',
|
166 |
+
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autolink',
|
167 |
+
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
168 |
+
};
|
169 |
+
}
|
170 |
+
});
|
171 |
+
|
172 |
+
// Register plugin
|
173 |
+
tinymce.PluginManager.add('autolink', tinymce.plugins.AutolinkPlugin);
|
174 |
+
})();
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/autoresize/editor_plugin.js
ADDED
@@ -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)})();
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/autoresize/editor_plugin_src.js
ADDED
@@ -0,0 +1,119 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
/**
|
13 |
+
* Auto Resize
|
14 |
+
*
|
15 |
+
* This plugin automatically resizes the content area to fit its content height.
|
16 |
+
* It will retain a minimum height, which is the height of the content area when
|
17 |
+
* it's initialized.
|
18 |
+
*/
|
19 |
+
tinymce.create('tinymce.plugins.AutoResizePlugin', {
|
20 |
+
/**
|
21 |
+
* Initializes the plugin, this will be executed after the plugin has been created.
|
22 |
+
* This call is done before the editor instance has finished it's initialization so use the onInit event
|
23 |
+
* of the editor instance to intercept that event.
|
24 |
+
*
|
25 |
+
* @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
|
26 |
+
* @param {string} url Absolute URL to where the plugin is located.
|
27 |
+
*/
|
28 |
+
init : function(ed, url) {
|
29 |
+
var t = this, oldSize = 0;
|
30 |
+
|
31 |
+
if (ed.getParam('fullscreen_is_enabled'))
|
32 |
+
return;
|
33 |
+
|
34 |
+
/**
|
35 |
+
* This method gets executed each time the editor needs to resize.
|
36 |
+
*/
|
37 |
+
function resize() {
|
38 |
+
var deltaSize, d = ed.getDoc(), body = d.body, de = d.documentElement, DOM = tinymce.DOM, resizeHeight = t.autoresize_min_height, myHeight;
|
39 |
+
|
40 |
+
// Get height differently depending on the browser used
|
41 |
+
myHeight = tinymce.isIE ? body.scrollHeight : (tinymce.isWebKit && body.clientHeight == 0 ? 0 : body.offsetHeight);
|
42 |
+
|
43 |
+
// Don't make it smaller than the minimum height
|
44 |
+
if (myHeight > t.autoresize_min_height)
|
45 |
+
resizeHeight = myHeight;
|
46 |
+
|
47 |
+
// If a maximum height has been defined don't exceed this height
|
48 |
+
if (t.autoresize_max_height && myHeight > t.autoresize_max_height) {
|
49 |
+
resizeHeight = t.autoresize_max_height;
|
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 |
+
}
|
57 |
+
|
58 |
+
// Resize content element
|
59 |
+
if (resizeHeight !== oldSize) {
|
60 |
+
deltaSize = resizeHeight - oldSize;
|
61 |
+
DOM.setStyle(DOM.get(ed.id + '_ifr'), 'height', resizeHeight + 'px');
|
62 |
+
oldSize = resizeHeight;
|
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();
|
68 |
+
}
|
69 |
+
};
|
70 |
+
|
71 |
+
t.editor = ed;
|
72 |
+
|
73 |
+
// Define minimum height
|
74 |
+
t.autoresize_min_height = parseInt(ed.getParam('autoresize_min_height', ed.getElement().offsetHeight));
|
75 |
+
|
76 |
+
// Define maximum height
|
77 |
+
t.autoresize_max_height = parseInt(ed.getParam('autoresize_max_height', 0));
|
78 |
+
|
79 |
+
// Add padding at the bottom for better UX
|
80 |
+
ed.onInit.add(function(ed){
|
81 |
+
ed.dom.setStyle(ed.getBody(), 'paddingBottom', ed.getParam('autoresize_bottom_margin', 50) + 'px');
|
82 |
+
});
|
83 |
+
|
84 |
+
// Add appropriate listeners for resizing content area
|
85 |
+
ed.onChange.add(resize);
|
86 |
+
ed.onSetContent.add(resize);
|
87 |
+
ed.onPaste.add(resize);
|
88 |
+
ed.onKeyUp.add(resize);
|
89 |
+
ed.onPostRender.add(resize);
|
90 |
+
|
91 |
+
if (ed.getParam('autoresize_on_init', true)) {
|
92 |
+
ed.onLoad.add(resize);
|
93 |
+
ed.onLoadContent.add(resize);
|
94 |
+
}
|
95 |
+
|
96 |
+
// Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('mceExample');
|
97 |
+
ed.addCommand('mceAutoResize', resize);
|
98 |
+
},
|
99 |
+
|
100 |
+
/**
|
101 |
+
* Returns information about the plugin as a name/value array.
|
102 |
+
* The current keys are longname, author, authorurl, infourl and version.
|
103 |
+
*
|
104 |
+
* @return {Object} Name/value array containing information about the plugin.
|
105 |
+
*/
|
106 |
+
getInfo : function() {
|
107 |
+
return {
|
108 |
+
longname : 'Auto Resize',
|
109 |
+
author : 'Moxiecode Systems AB',
|
110 |
+
authorurl : 'http://tinymce.moxiecode.com',
|
111 |
+
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autoresize',
|
112 |
+
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
113 |
+
};
|
114 |
+
}
|
115 |
+
});
|
116 |
+
|
117 |
+
// Register plugin
|
118 |
+
tinymce.PluginManager.add('autoresize', tinymce.plugins.AutoResizePlugin);
|
119 |
+
})();
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/autosave/editor_plugin.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(function(e){var c="autosave",g="restoredraft",b=true,f,d,a=e.util.Dispatcher;e.create("tinymce.plugins.AutoSave",{init:function(i,j){var h=this,l=i.settings;h.editor=i;function k(n){var m={s:1000,m:60000};n=/^(\d+)([ms]?)$/.exec(""+n);return(n[2]?m[n[2]]:1)*parseInt(n)}e.each({ask_before_unload:b,interval:"30s",retention:"20m",minlength:50},function(n,m){m=c+"_"+m;if(l[m]===f){l[m]=n}});l.autosave_interval=k(l.autosave_interval);l.autosave_retention=k(l.autosave_retention);i.addButton(g,{title:c+".restore_content",onclick:function(){if(i.getContent({draft:true}).replace(/\s| |<\/?p[^>]*>|<br[^>]*>/gi,"").length>0){i.windowManager.confirm(c+".warning_message",function(m){if(m){h.restoreDraft()}})}else{h.restoreDraft()}}});i.onNodeChange.add(function(){var m=i.controlManager;if(m.get(g)){m.setDisabled(g,!h.hasDraft())}});i.onInit.add(function(){if(i.controlManager.get(g)){h.setupStorage(i);setInterval(function(){h.storeDraft();i.nodeChanged()},l.autosave_interval)}});h.onStoreDraft=new a(h);h.onRestoreDraft=new a(h);h.onRemoveDraft=new a(h);if(!d){window.onbeforeunload=e.plugins.AutoSave._beforeUnloadHandler;d=b}},getInfo:function(){return{longname:"Auto save",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autosave",version:e.majorVersion+"."+e.minorVersion}},getExpDate:function(){return new Date(new Date().getTime()+this.editor.settings.autosave_retention).toUTCString()},setupStorage:function(i){var h=this,k=c+"_test",j="OK";h.key=c+i.id;e.each([function(){if(localStorage){localStorage.setItem(k,j);if(localStorage.getItem(k)===j){localStorage.removeItem(k);return localStorage}}},function(){if(sessionStorage){sessionStorage.setItem(k,j);if(sessionStorage.getItem(k)===j){sessionStorage.removeItem(k);return sessionStorage}}},function(){if(e.isIE){i.getElement().style.behavior="url('#default#userData')";return{autoExpires:b,setItem:function(l,n){var m=i.getElement();m.setAttribute(l,n);m.expires=h.getExpDate();try{m.save("TinyMCE")}catch(o){}},getItem:function(l){var m=i.getElement();try{m.load("TinyMCE");return m.getAttribute(l)}catch(n){return null}},removeItem:function(l){i.getElement().removeAttribute(l)}}}},],function(l){try{h.storage=l();if(h.storage){return false}}catch(m){}})},storeDraft:function(){var i=this,l=i.storage,j=i.editor,h,k;if(l){if(!l.getItem(i.key)&&!j.isDirty()){return}k=j.getContent({draft:true});if(k.length>j.settings.autosave_minlength){h=i.getExpDate();if(!i.storage.autoExpires){i.storage.setItem(i.key+"_expires",h)}i.storage.setItem(i.key,k);i.onStoreDraft.dispatch(i,{expires:h,content:k})}}},restoreDraft:function(){var h=this,j=h.storage,i;if(j){i=j.getItem(h.key);if(i){h.editor.setContent(i);h.onRestoreDraft.dispatch(h,{content:i})}}},hasDraft:function(){var h=this,k=h.storage,i,j;if(k){j=!!k.getItem(h.key);if(j){if(!h.storage.autoExpires){i=new Date(k.getItem(h.key+"_expires"));if(new Date().getTime()<i.getTime()){return b}h.removeDraft()}else{return b}}}return false},removeDraft:function(){var h=this,k=h.storage,i=h.key,j;if(k){j=k.getItem(i);k.removeItem(i);k.removeItem(i+"_expires");if(j){h.onRemoveDraft.dispatch(h,{content:j})}}},"static":{_beforeUnloadHandler:function(h){var i;e.each(tinyMCE.editors,function(j){if(j.plugins.autosave){j.plugins.autosave.storeDraft()}if(j.getParam("fullscreen_is_enabled")){return}if(!i&&j.isDirty()&&j.getParam("autosave_ask_before_unload")){i=j.getLang("autosave.unload_msg")}});return i}}});e.PluginManager.add("autosave",e.plugins.AutoSave)})(tinymce);
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/autosave/editor_plugin_src.js
ADDED
@@ -0,0 +1,431 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
* Adds auto-save capability to the TinyMCE text editor to rescue content
|
11 |
+
* inadvertently lost. This plugin was originally developed by Speednet
|
12 |
+
* and that project can be found here: http://code.google.com/p/tinyautosave/
|
13 |
+
*
|
14 |
+
* TECHNOLOGY DISCUSSION:
|
15 |
+
*
|
16 |
+
* The plugin attempts to use the most advanced features available in the current browser to save
|
17 |
+
* as much content as possible. There are a total of four different methods used to autosave the
|
18 |
+
* content. In order of preference, they are:
|
19 |
+
*
|
20 |
+
* 1. localStorage - A new feature of HTML 5, localStorage can store megabytes of data per domain
|
21 |
+
* on the client computer. Data stored in the localStorage area has no expiration date, so we must
|
22 |
+
* manage expiring the data ourselves. localStorage is fully supported by IE8, and it is supposed
|
23 |
+
* to be working in Firefox 3 and Safari 3.2, but in reality is is flaky in those browsers. As
|
24 |
+
* HTML 5 gets wider support, the AutoSave plugin will use it automatically. In Windows Vista/7,
|
25 |
+
* localStorage is stored in the following folder:
|
26 |
+
* C:\Users\[username]\AppData\Local\Microsoft\Internet Explorer\DOMStore\[tempFolder]
|
27 |
+
*
|
28 |
+
* 2. sessionStorage - A new feature of HTML 5, sessionStorage works similarly to localStorage,
|
29 |
+
* except it is designed to expire after a certain amount of time. Because the specification
|
30 |
+
* around expiration date/time is very loosely-described, it is preferrable to use locaStorage and
|
31 |
+
* manage the expiration ourselves. sessionStorage has similar storage characteristics to
|
32 |
+
* localStorage, although it seems to have better support by Firefox 3 at the moment. (That will
|
33 |
+
* certainly change as Firefox continues getting better at HTML 5 adoption.)
|
34 |
+
*
|
35 |
+
* 3. UserData - A very under-exploited feature of Microsoft Internet Explorer, UserData is a
|
36 |
+
* way to store up to 128K of data per "document", or up to 1MB of data per domain, on the client
|
37 |
+
* computer. The feature is available for IE 5+, which makes it available for every version of IE
|
38 |
+
* supported by TinyMCE. The content is persistent across browser restarts and expires on the
|
39 |
+
* date/time specified, just like a cookie. However, the data is not cleared when the user clears
|
40 |
+
* cookies on the browser, which makes it well-suited for rescuing autosaved content. UserData,
|
41 |
+
* like other Microsoft IE browser technologies, is implemented as a behavior attached to a
|
42 |
+
* specific DOM object, so in this case we attach the behavior to the same DOM element that the
|
43 |
+
* TinyMCE editor instance is attached to.
|
44 |
+
*/
|
45 |
+
|
46 |
+
(function(tinymce) {
|
47 |
+
// Setup constants to help the compressor to reduce script size
|
48 |
+
var PLUGIN_NAME = 'autosave',
|
49 |
+
RESTORE_DRAFT = 'restoredraft',
|
50 |
+
TRUE = true,
|
51 |
+
undefined,
|
52 |
+
unloadHandlerAdded,
|
53 |
+
Dispatcher = tinymce.util.Dispatcher;
|
54 |
+
|
55 |
+
/**
|
56 |
+
* This plugin adds auto-save capability to the TinyMCE text editor to rescue content
|
57 |
+
* inadvertently lost. By using localStorage.
|
58 |
+
*
|
59 |
+
* @class tinymce.plugins.AutoSave
|
60 |
+
*/
|
61 |
+
tinymce.create('tinymce.plugins.AutoSave', {
|
62 |
+
/**
|
63 |
+
* Initializes the plugin, this will be executed after the plugin has been created.
|
64 |
+
* This call is done before the editor instance has finished it's initialization so use the onInit event
|
65 |
+
* of the editor instance to intercept that event.
|
66 |
+
*
|
67 |
+
* @method init
|
68 |
+
* @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
|
69 |
+
* @param {string} url Absolute URL to where the plugin is located.
|
70 |
+
*/
|
71 |
+
init : function(ed, url) {
|
72 |
+
var self = this, settings = ed.settings;
|
73 |
+
|
74 |
+
self.editor = ed;
|
75 |
+
|
76 |
+
// Parses the specified time string into a milisecond number 10m, 10s etc.
|
77 |
+
function parseTime(time) {
|
78 |
+
var multipels = {
|
79 |
+
s : 1000,
|
80 |
+
m : 60000
|
81 |
+
};
|
82 |
+
|
83 |
+
time = /^(\d+)([ms]?)$/.exec('' + time);
|
84 |
+
|
85 |
+
return (time[2] ? multipels[time[2]] : 1) * parseInt(time);
|
86 |
+
};
|
87 |
+
|
88 |
+
// Default config
|
89 |
+
tinymce.each({
|
90 |
+
ask_before_unload : TRUE,
|
91 |
+
interval : '30s',
|
92 |
+
retention : '20m',
|
93 |
+
minlength : 50
|
94 |
+
}, function(value, key) {
|
95 |
+
key = PLUGIN_NAME + '_' + key;
|
96 |
+
|
97 |
+
if (settings[key] === undefined)
|
98 |
+
settings[key] = value;
|
99 |
+
});
|
100 |
+
|
101 |
+
// Parse times
|
102 |
+
settings.autosave_interval = parseTime(settings.autosave_interval);
|
103 |
+
settings.autosave_retention = parseTime(settings.autosave_retention);
|
104 |
+
|
105 |
+
// Register restore button
|
106 |
+
ed.addButton(RESTORE_DRAFT, {
|
107 |
+
title : PLUGIN_NAME + ".restore_content",
|
108 |
+
onclick : function() {
|
109 |
+
if (ed.getContent({draft: true}).replace(/\s| |<\/?p[^>]*>|<br[^>]*>/gi, "").length > 0) {
|
110 |
+
// Show confirm dialog if the editor isn't empty
|
111 |
+
ed.windowManager.confirm(
|
112 |
+
PLUGIN_NAME + ".warning_message",
|
113 |
+
function(ok) {
|
114 |
+
if (ok)
|
115 |
+
self.restoreDraft();
|
116 |
+
}
|
117 |
+
);
|
118 |
+
} else
|
119 |
+
self.restoreDraft();
|
120 |
+
}
|
121 |
+
});
|
122 |
+
|
123 |
+
// Enable/disable restoredraft button depending on if there is a draft stored or not
|
124 |
+
ed.onNodeChange.add(function() {
|
125 |
+
var controlManager = ed.controlManager;
|
126 |
+
|
127 |
+
if (controlManager.get(RESTORE_DRAFT))
|
128 |
+
controlManager.setDisabled(RESTORE_DRAFT, !self.hasDraft());
|
129 |
+
});
|
130 |
+
|
131 |
+
ed.onInit.add(function() {
|
132 |
+
// Check if the user added the restore button, then setup auto storage logic
|
133 |
+
if (ed.controlManager.get(RESTORE_DRAFT)) {
|
134 |
+
// Setup storage engine
|
135 |
+
self.setupStorage(ed);
|
136 |
+
|
137 |
+
// Auto save contents each interval time
|
138 |
+
setInterval(function() {
|
139 |
+
self.storeDraft();
|
140 |
+
ed.nodeChanged();
|
141 |
+
}, settings.autosave_interval);
|
142 |
+
}
|
143 |
+
});
|
144 |
+
|
145 |
+
/**
|
146 |
+
* This event gets fired when a draft is stored to local storage.
|
147 |
+
*
|
148 |
+
* @event onStoreDraft
|
149 |
+
* @param {tinymce.plugins.AutoSave} sender Plugin instance sending the event.
|
150 |
+
* @param {Object} draft Draft object containing the HTML contents of the editor.
|
151 |
+
*/
|
152 |
+
self.onStoreDraft = new Dispatcher(self);
|
153 |
+
|
154 |
+
/**
|
155 |
+
* This event gets fired when a draft is restored from local storage.
|
156 |
+
*
|
157 |
+
* @event onStoreDraft
|
158 |
+
* @param {tinymce.plugins.AutoSave} sender Plugin instance sending the event.
|
159 |
+
* @param {Object} draft Draft object containing the HTML contents of the editor.
|
160 |
+
*/
|
161 |
+
self.onRestoreDraft = new Dispatcher(self);
|
162 |
+
|
163 |
+
/**
|
164 |
+
* This event gets fired when a draft removed/expired.
|
165 |
+
*
|
166 |
+
* @event onRemoveDraft
|
167 |
+
* @param {tinymce.plugins.AutoSave} sender Plugin instance sending the event.
|
168 |
+
* @param {Object} draft Draft object containing the HTML contents of the editor.
|
169 |
+
*/
|
170 |
+
self.onRemoveDraft = new Dispatcher(self);
|
171 |
+
|
172 |
+
// Add ask before unload dialog only add one unload handler
|
173 |
+
if (!unloadHandlerAdded) {
|
174 |
+
window.onbeforeunload = tinymce.plugins.AutoSave._beforeUnloadHandler;
|
175 |
+
unloadHandlerAdded = TRUE;
|
176 |
+
}
|
177 |
+
},
|
178 |
+
|
179 |
+
/**
|
180 |
+
* Returns information about the plugin as a name/value array.
|
181 |
+
* The current keys are longname, author, authorurl, infourl and version.
|
182 |
+
*
|
183 |
+
* @method getInfo
|
184 |
+
* @return {Object} Name/value array containing information about the plugin.
|
185 |
+
*/
|
186 |
+
getInfo : function() {
|
187 |
+
return {
|
188 |
+
longname : 'Auto save',
|
189 |
+
author : 'Moxiecode Systems AB',
|
190 |
+
authorurl : 'http://tinymce.moxiecode.com',
|
191 |
+
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/autosave',
|
192 |
+
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
193 |
+
};
|
194 |
+
},
|
195 |
+
|
196 |
+
/**
|
197 |
+
* Returns an expiration date UTC string.
|
198 |
+
*
|
199 |
+
* @method getExpDate
|
200 |
+
* @return {String} Expiration date UTC string.
|
201 |
+
*/
|
202 |
+
getExpDate : function() {
|
203 |
+
return new Date(
|
204 |
+
new Date().getTime() + this.editor.settings.autosave_retention
|
205 |
+
).toUTCString();
|
206 |
+
},
|
207 |
+
|
208 |
+
/**
|
209 |
+
* This method will setup the storage engine. If the browser has support for it.
|
210 |
+
*
|
211 |
+
* @method setupStorage
|
212 |
+
*/
|
213 |
+
setupStorage : function(ed) {
|
214 |
+
var self = this, testKey = PLUGIN_NAME + '_test', testVal = "OK";
|
215 |
+
|
216 |
+
self.key = PLUGIN_NAME + ed.id;
|
217 |
+
|
218 |
+
// Loop though each storage engine type until we find one that works
|
219 |
+
tinymce.each([
|
220 |
+
function() {
|
221 |
+
// Try HTML5 Local Storage
|
222 |
+
if (localStorage) {
|
223 |
+
localStorage.setItem(testKey, testVal);
|
224 |
+
|
225 |
+
if (localStorage.getItem(testKey) === testVal) {
|
226 |
+
localStorage.removeItem(testKey);
|
227 |
+
|
228 |
+
return localStorage;
|
229 |
+
}
|
230 |
+
}
|
231 |
+
},
|
232 |
+
|
233 |
+
function() {
|
234 |
+
// Try HTML5 Session Storage
|
235 |
+
if (sessionStorage) {
|
236 |
+
sessionStorage.setItem(testKey, testVal);
|
237 |
+
|
238 |
+
if (sessionStorage.getItem(testKey) === testVal) {
|
239 |
+
sessionStorage.removeItem(testKey);
|
240 |
+
|
241 |
+
return sessionStorage;
|
242 |
+
}
|
243 |
+
}
|
244 |
+
},
|
245 |
+
|
246 |
+
function() {
|
247 |
+
// Try IE userData
|
248 |
+
if (tinymce.isIE) {
|
249 |
+
ed.getElement().style.behavior = "url('#default#userData')";
|
250 |
+
|
251 |
+
// Fake localStorage on old IE
|
252 |
+
return {
|
253 |
+
autoExpires : TRUE,
|
254 |
+
|
255 |
+
setItem : function(key, value) {
|
256 |
+
var userDataElement = ed.getElement();
|
257 |
+
|
258 |
+
userDataElement.setAttribute(key, value);
|
259 |
+
userDataElement.expires = self.getExpDate();
|
260 |
+
|
261 |
+
try {
|
262 |
+
userDataElement.save("TinyMCE");
|
263 |
+
} catch (e) {
|
264 |
+
// Ignore, saving might fail if "Userdata Persistence" is disabled in IE
|
265 |
+
}
|
266 |
+
},
|
267 |
+
|
268 |
+
getItem : function(key) {
|
269 |
+
var userDataElement = ed.getElement();
|
270 |
+
|
271 |
+
try {
|
272 |
+
userDataElement.load("TinyMCE");
|
273 |
+
return userDataElement.getAttribute(key);
|
274 |
+
} catch (e) {
|
275 |
+
// Ignore, loading might fail if "Userdata Persistence" is disabled in IE
|
276 |
+
return null;
|
277 |
+
}
|
278 |
+
},
|
279 |
+
|
280 |
+
removeItem : function(key) {
|
281 |
+
ed.getElement().removeAttribute(key);
|
282 |
+
}
|
283 |
+
};
|
284 |
+
}
|
285 |
+
},
|
286 |
+
], function(setup) {
|
287 |
+
// Try executing each function to find a suitable storage engine
|
288 |
+
try {
|
289 |
+
self.storage = setup();
|
290 |
+
|
291 |
+
if (self.storage)
|
292 |
+
return false;
|
293 |
+
} catch (e) {
|
294 |
+
// Ignore
|
295 |
+
}
|
296 |
+
});
|
297 |
+
},
|
298 |
+
|
299 |
+
/**
|
300 |
+
* This method will store the current contents in the the storage engine.
|
301 |
+
*
|
302 |
+
* @method storeDraft
|
303 |
+
*/
|
304 |
+
storeDraft : function() {
|
305 |
+
var self = this, storage = self.storage, editor = self.editor, expires, content;
|
306 |
+
|
307 |
+
// Is the contents dirty
|
308 |
+
if (storage) {
|
309 |
+
// If there is no existing key and the contents hasn't been changed since
|
310 |
+
// it's original value then there is no point in saving a draft
|
311 |
+
if (!storage.getItem(self.key) && !editor.isDirty())
|
312 |
+
return;
|
313 |
+
|
314 |
+
// Store contents if the contents if longer than the minlength of characters
|
315 |
+
content = editor.getContent({draft: true});
|
316 |
+
if (content.length > editor.settings.autosave_minlength) {
|
317 |
+
expires = self.getExpDate();
|
318 |
+
|
319 |
+
// Store expiration date if needed IE userData has auto expire built in
|
320 |
+
if (!self.storage.autoExpires)
|
321 |
+
self.storage.setItem(self.key + "_expires", expires);
|
322 |
+
|
323 |
+
self.storage.setItem(self.key, content);
|
324 |
+
self.onStoreDraft.dispatch(self, {
|
325 |
+
expires : expires,
|
326 |
+
content : content
|
327 |
+
});
|
328 |
+
}
|
329 |
+
}
|
330 |
+
},
|
331 |
+
|
332 |
+
/**
|
333 |
+
* This method will restore the contents from the storage engine back to the editor.
|
334 |
+
*
|
335 |
+
* @method restoreDraft
|
336 |
+
*/
|
337 |
+
restoreDraft : function() {
|
338 |
+
var self = this, storage = self.storage, content;
|
339 |
+
|
340 |
+
if (storage) {
|
341 |
+
content = storage.getItem(self.key);
|
342 |
+
|
343 |
+
if (content) {
|
344 |
+
self.editor.setContent(content);
|
345 |
+
self.onRestoreDraft.dispatch(self, {
|
346 |
+
content : content
|
347 |
+
});
|
348 |
+
}
|
349 |
+
}
|
350 |
+
},
|
351 |
+
|
352 |
+
/**
|
353 |
+
* This method will return true/false if there is a local storage draft available.
|
354 |
+
*
|
355 |
+
* @method hasDraft
|
356 |
+
* @return {boolean} true/false state if there is a local draft.
|
357 |
+
*/
|
358 |
+
hasDraft : function() {
|
359 |
+
var self = this, storage = self.storage, expDate, exists;
|
360 |
+
|
361 |
+
if (storage) {
|
362 |
+
// Does the item exist at all
|
363 |
+
exists = !!storage.getItem(self.key);
|
364 |
+
if (exists) {
|
365 |
+
// Storage needs autoexpire
|
366 |
+
if (!self.storage.autoExpires) {
|
367 |
+
expDate = new Date(storage.getItem(self.key + "_expires"));
|
368 |
+
|
369 |
+
// Contents hasn't expired
|
370 |
+
if (new Date().getTime() < expDate.getTime())
|
371 |
+
return TRUE;
|
372 |
+
|
373 |
+
// Remove it if it has
|
374 |
+
self.removeDraft();
|
375 |
+
} else
|
376 |
+
return TRUE;
|
377 |
+
}
|
378 |
+
}
|
379 |
+
|
380 |
+
return false;
|
381 |
+
},
|
382 |
+
|
383 |
+
/**
|
384 |
+
* Removes the currently stored draft.
|
385 |
+
*
|
386 |
+
* @method removeDraft
|
387 |
+
*/
|
388 |
+
removeDraft : function() {
|
389 |
+
var self = this, storage = self.storage, key = self.key, content;
|
390 |
+
|
391 |
+
if (storage) {
|
392 |
+
// Get current contents and remove the existing draft
|
393 |
+
content = storage.getItem(key);
|
394 |
+
storage.removeItem(key);
|
395 |
+
storage.removeItem(key + "_expires");
|
396 |
+
|
397 |
+
// Dispatch remove event if we had any contents
|
398 |
+
if (content) {
|
399 |
+
self.onRemoveDraft.dispatch(self, {
|
400 |
+
content : content
|
401 |
+
});
|
402 |
+
}
|
403 |
+
}
|
404 |
+
},
|
405 |
+
|
406 |
+
"static" : {
|
407 |
+
// Internal unload handler will be called before the page is unloaded
|
408 |
+
_beforeUnloadHandler : function(e) {
|
409 |
+
var msg;
|
410 |
+
|
411 |
+
tinymce.each(tinyMCE.editors, function(ed) {
|
412 |
+
// Store a draft for each editor instance
|
413 |
+
if (ed.plugins.autosave)
|
414 |
+
ed.plugins.autosave.storeDraft();
|
415 |
+
|
416 |
+
// Never ask in fullscreen mode
|
417 |
+
if (ed.getParam("fullscreen_is_enabled"))
|
418 |
+
return;
|
419 |
+
|
420 |
+
// Setup a return message if the editor is dirty
|
421 |
+
if (!msg && ed.isDirty() && ed.getParam("autosave_ask_before_unload"))
|
422 |
+
msg = ed.getLang("autosave.unload_msg");
|
423 |
+
});
|
424 |
+
|
425 |
+
return msg;
|
426 |
+
}
|
427 |
+
}
|
428 |
+
});
|
429 |
+
|
430 |
+
tinymce.PluginManager.add('autosave', tinymce.plugins.AutoSave);
|
431 |
+
})(tinymce);
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/autosave/langs/en.js
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
tinyMCE.addI18n('en.autosave',{
|
2 |
+
restore_content: "Restore auto-saved content",
|
3 |
+
warning_message: "If you restore the saved content, you will lose all the content that is currently in the editor.\n\nAre you sure you want to restore the saved content?"
|
4 |
+
});
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(function(){tinymce.create("tinymce.plugins.BBCodePlugin",{init:function(a,b){var d=this,c=a.getParam("bbcode_dialect","punbb").toLowerCase();a.onBeforeSetContent.add(function(e,f){f.content=d["_"+c+"_bbcode2html"](f.content)});a.onPostProcess.add(function(e,f){if(f.set){f.content=d["_"+c+"_bbcode2html"](f.content)}if(f.get){f.content=d["_"+c+"_html2bbcode"](f.content)}})},getInfo:function(){return{longname:"BBCode Plugin",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/bbcode",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_punbb_html2bbcode:function(a){a=tinymce.trim(a);function b(c,d){a=a.replace(c,d)}b(/<a.*?href=\"(.*?)\".*?>(.*?)<\/a>/gi,"[url=$1]$2[/url]");b(/<font.*?color=\"(.*?)\".*?class=\"codeStyle\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]");b(/<font.*?color=\"(.*?)\".*?class=\"quoteStyle\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]");b(/<font.*?class=\"codeStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]");b(/<font.*?class=\"quoteStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]");b(/<span style=\"color: ?(.*?);\">(.*?)<\/span>/gi,"[color=$1]$2[/color]");b(/<font.*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[color=$1]$2[/color]");b(/<span style=\"font-size:(.*?);\">(.*?)<\/span>/gi,"[size=$1]$2[/size]");b(/<font>(.*?)<\/font>/gi,"$1");b(/<img.*?src=\"(.*?)\".*?\/>/gi,"[img]$1[/img]");b(/<span class=\"codeStyle\">(.*?)<\/span>/gi,"[code]$1[/code]");b(/<span class=\"quoteStyle\">(.*?)<\/span>/gi,"[quote]$1[/quote]");b(/<strong class=\"codeStyle\">(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]");b(/<strong class=\"quoteStyle\">(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]");b(/<em class=\"codeStyle\">(.*?)<\/em>/gi,"[code][i]$1[/i][/code]");b(/<em class=\"quoteStyle\">(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]");b(/<u class=\"codeStyle\">(.*?)<\/u>/gi,"[code][u]$1[/u][/code]");b(/<u class=\"quoteStyle\">(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]");b(/<\/(strong|b)>/gi,"[/b]");b(/<(strong|b)>/gi,"[b]");b(/<\/(em|i)>/gi,"[/i]");b(/<(em|i)>/gi,"[i]");b(/<\/u>/gi,"[/u]");b(/<span style=\"text-decoration: ?underline;\">(.*?)<\/span>/gi,"[u]$1[/u]");b(/<u>/gi,"[u]");b(/<blockquote[^>]*>/gi,"[quote]");b(/<\/blockquote>/gi,"[/quote]");b(/<br \/>/gi,"\n");b(/<br\/>/gi,"\n");b(/<br>/gi,"\n");b(/<p>/gi,"");b(/<\/p>/gi,"\n");b(/ |\u00a0/gi," ");b(/"/gi,'"');b(/</gi,"<");b(/>/gi,">");b(/&/gi,"&");return a},_punbb_bbcode2html:function(a){a=tinymce.trim(a);function b(c,d){a=a.replace(c,d)}b(/\n/gi,"<br />");b(/\[b\]/gi,"<strong>");b(/\[\/b\]/gi,"</strong>");b(/\[i\]/gi,"<em>");b(/\[\/i\]/gi,"</em>");b(/\[u\]/gi,"<u>");b(/\[\/u\]/gi,"</u>");b(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,'<a href="$1">$2</a>');b(/\[url\](.*?)\[\/url\]/gi,'<a href="$1">$1</a>');b(/\[img\](.*?)\[\/img\]/gi,'<img src="$1" />');b(/\[color=(.*?)\](.*?)\[\/color\]/gi,'<font color="$1">$2</font>');b(/\[code\](.*?)\[\/code\]/gi,'<span class="codeStyle">$1</span> ');b(/\[quote.*?\](.*?)\[\/quote\]/gi,'<span class="quoteStyle">$1</span> ');return a}});tinymce.PluginManager.add("bbcode",tinymce.plugins.BBCodePlugin)})();
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/bbcode/editor_plugin_src.js
ADDED
@@ -0,0 +1,120 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
tinymce.create('tinymce.plugins.BBCodePlugin', {
|
13 |
+
init : function(ed, url) {
|
14 |
+
var t = this, dialect = ed.getParam('bbcode_dialect', 'punbb').toLowerCase();
|
15 |
+
|
16 |
+
ed.onBeforeSetContent.add(function(ed, o) {
|
17 |
+
o.content = t['_' + dialect + '_bbcode2html'](o.content);
|
18 |
+
});
|
19 |
+
|
20 |
+
ed.onPostProcess.add(function(ed, o) {
|
21 |
+
if (o.set)
|
22 |
+
o.content = t['_' + dialect + '_bbcode2html'](o.content);
|
23 |
+
|
24 |
+
if (o.get)
|
25 |
+
o.content = t['_' + dialect + '_html2bbcode'](o.content);
|
26 |
+
});
|
27 |
+
},
|
28 |
+
|
29 |
+
getInfo : function() {
|
30 |
+
return {
|
31 |
+
longname : 'BBCode Plugin',
|
32 |
+
author : 'Moxiecode Systems AB',
|
33 |
+
authorurl : 'http://tinymce.moxiecode.com',
|
34 |
+
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/bbcode',
|
35 |
+
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
36 |
+
};
|
37 |
+
},
|
38 |
+
|
39 |
+
// Private methods
|
40 |
+
|
41 |
+
// HTML -> BBCode in PunBB dialect
|
42 |
+
_punbb_html2bbcode : function(s) {
|
43 |
+
s = tinymce.trim(s);
|
44 |
+
|
45 |
+
function rep(re, str) {
|
46 |
+
s = s.replace(re, str);
|
47 |
+
};
|
48 |
+
|
49 |
+
// example: <strong> to [b]
|
50 |
+
rep(/<a.*?href=\"(.*?)\".*?>(.*?)<\/a>/gi,"[url=$1]$2[/url]");
|
51 |
+
rep(/<font.*?color=\"(.*?)\".*?class=\"codeStyle\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]");
|
52 |
+
rep(/<font.*?color=\"(.*?)\".*?class=\"quoteStyle\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]");
|
53 |
+
rep(/<font.*?class=\"codeStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]");
|
54 |
+
rep(/<font.*?class=\"quoteStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]");
|
55 |
+
rep(/<span style=\"color: ?(.*?);\">(.*?)<\/span>/gi,"[color=$1]$2[/color]");
|
56 |
+
rep(/<font.*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[color=$1]$2[/color]");
|
57 |
+
rep(/<span style=\"font-size:(.*?);\">(.*?)<\/span>/gi,"[size=$1]$2[/size]");
|
58 |
+
rep(/<font>(.*?)<\/font>/gi,"$1");
|
59 |
+
rep(/<img.*?src=\"(.*?)\".*?\/>/gi,"[img]$1[/img]");
|
60 |
+
rep(/<span class=\"codeStyle\">(.*?)<\/span>/gi,"[code]$1[/code]");
|
61 |
+
rep(/<span class=\"quoteStyle\">(.*?)<\/span>/gi,"[quote]$1[/quote]");
|
62 |
+
rep(/<strong class=\"codeStyle\">(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]");
|
63 |
+
rep(/<strong class=\"quoteStyle\">(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]");
|
64 |
+
rep(/<em class=\"codeStyle\">(.*?)<\/em>/gi,"[code][i]$1[/i][/code]");
|
65 |
+
rep(/<em class=\"quoteStyle\">(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]");
|
66 |
+
rep(/<u class=\"codeStyle\">(.*?)<\/u>/gi,"[code][u]$1[/u][/code]");
|
67 |
+
rep(/<u class=\"quoteStyle\">(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]");
|
68 |
+
rep(/<\/(strong|b)>/gi,"[/b]");
|
69 |
+
rep(/<(strong|b)>/gi,"[b]");
|
70 |
+
rep(/<\/(em|i)>/gi,"[/i]");
|
71 |
+
rep(/<(em|i)>/gi,"[i]");
|
72 |
+
rep(/<\/u>/gi,"[/u]");
|
73 |
+
rep(/<span style=\"text-decoration: ?underline;\">(.*?)<\/span>/gi,"[u]$1[/u]");
|
74 |
+
rep(/<u>/gi,"[u]");
|
75 |
+
rep(/<blockquote[^>]*>/gi,"[quote]");
|
76 |
+
rep(/<\/blockquote>/gi,"[/quote]");
|
77 |
+
rep(/<br \/>/gi,"\n");
|
78 |
+
rep(/<br\/>/gi,"\n");
|
79 |
+
rep(/<br>/gi,"\n");
|
80 |
+
rep(/<p>/gi,"");
|
81 |
+
rep(/<\/p>/gi,"\n");
|
82 |
+
rep(/ |\u00a0/gi," ");
|
83 |
+
rep(/"/gi,"\"");
|
84 |
+
rep(/</gi,"<");
|
85 |
+
rep(/>/gi,">");
|
86 |
+
rep(/&/gi,"&");
|
87 |
+
|
88 |
+
return s;
|
89 |
+
},
|
90 |
+
|
91 |
+
// BBCode -> HTML from PunBB dialect
|
92 |
+
_punbb_bbcode2html : function(s) {
|
93 |
+
s = tinymce.trim(s);
|
94 |
+
|
95 |
+
function rep(re, str) {
|
96 |
+
s = s.replace(re, str);
|
97 |
+
};
|
98 |
+
|
99 |
+
// example: [b] to <strong>
|
100 |
+
rep(/\n/gi,"<br />");
|
101 |
+
rep(/\[b\]/gi,"<strong>");
|
102 |
+
rep(/\[\/b\]/gi,"</strong>");
|
103 |
+
rep(/\[i\]/gi,"<em>");
|
104 |
+
rep(/\[\/i\]/gi,"</em>");
|
105 |
+
rep(/\[u\]/gi,"<u>");
|
106 |
+
rep(/\[\/u\]/gi,"</u>");
|
107 |
+
rep(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,"<a href=\"$1\">$2</a>");
|
108 |
+
rep(/\[url\](.*?)\[\/url\]/gi,"<a href=\"$1\">$1</a>");
|
109 |
+
rep(/\[img\](.*?)\[\/img\]/gi,"<img src=\"$1\" />");
|
110 |
+
rep(/\[color=(.*?)\](.*?)\[\/color\]/gi,"<font color=\"$1\">$2</font>");
|
111 |
+
rep(/\[code\](.*?)\[\/code\]/gi,"<span class=\"codeStyle\">$1</span> ");
|
112 |
+
rep(/\[quote.*?\](.*?)\[\/quote\]/gi,"<span class=\"quoteStyle\">$1</span> ");
|
113 |
+
|
114 |
+
return s;
|
115 |
+
}
|
116 |
+
});
|
117 |
+
|
118 |
+
// Register plugin
|
119 |
+
tinymce.PluginManager.add('bbcode', tinymce.plugins.BBCodePlugin);
|
120 |
+
})();
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/contextmenu/editor_plugin.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(function(){var a=tinymce.dom.Event,c=tinymce.each,b=tinymce.DOM;tinymce.create("tinymce.plugins.ContextMenu",{init:function(e){var h=this,f,d,i;h.editor=e;d=e.settings.contextmenu_never_use_native;h.onContextMenu=new tinymce.util.Dispatcher(this);f=e.onContextMenu.add(function(j,k){if((i!==0?i:k.ctrlKey)&&!d){return}a.cancel(k);if(k.target.nodeName=="IMG"){j.selection.select(k.target)}h._getMenu(j).showMenu(k.clientX||k.pageX,k.clientY||k.pageY);a.add(j.getDoc(),"click",function(l){g(j,l)});j.nodeChanged()});e.onRemove.add(function(){if(h._menu){h._menu.removeAll()}});function g(j,k){i=0;if(k&&k.button==2){i=k.ctrlKey;return}if(h._menu){h._menu.removeAll();h._menu.destroy();a.remove(j.getDoc(),"click",g);h._menu=null}}e.onMouseDown.add(g);e.onKeyDown.add(g);e.onKeyDown.add(function(j,k){if(k.shiftKey&&!k.ctrlKey&&!k.altKey&&k.keyCode===121){a.cancel(k);f(j,k)}})},getInfo:function(){return{longname:"Contextmenu",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/contextmenu",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_getMenu:function(e){var g=this,d=g._menu,j=e.selection,f=j.isCollapsed(),h=j.getNode()||e.getBody(),i,k;if(d){d.removeAll();d.destroy()}k=b.getPos(e.getContentAreaContainer());d=e.controlManager.createDropMenu("contextmenu",{offset_x:k.x+e.getParam("contextmenu_offset_x",0),offset_y:k.y+e.getParam("contextmenu_offset_y",0),constrain:1,keyboard_focus:true});g._menu=d;d.add({title:"advanced.cut_desc",icon:"cut",cmd:"Cut"}).setDisabled(f);d.add({title:"advanced.copy_desc",icon:"copy",cmd:"Copy"}).setDisabled(f);d.add({title:"advanced.paste_desc",icon:"paste",cmd:"Paste"});if((h.nodeName=="A"&&!e.dom.getAttrib(h,"name"))||!f){d.addSeparator();d.add({title:"advanced.link_desc",icon:"link",cmd:e.plugins.advlink?"mceAdvLink":"mceLink",ui:true});d.add({title:"advanced.unlink_desc",icon:"unlink",cmd:"UnLink"})}d.addSeparator();d.add({title:"advanced.image_desc",icon:"image",cmd:e.plugins.advimage?"mceAdvImage":"mceImage",ui:true});d.addSeparator();i=d.addMenu({title:"contextmenu.align"});i.add({title:"contextmenu.left",icon:"justifyleft",cmd:"JustifyLeft"});i.add({title:"contextmenu.center",icon:"justifycenter",cmd:"JustifyCenter"});i.add({title:"contextmenu.right",icon:"justifyright",cmd:"JustifyRight"});i.add({title:"contextmenu.full",icon:"justifyfull",cmd:"JustifyFull"});g.onContextMenu.dispatch(g,d,h,f);return d}});tinymce.PluginManager.add("contextmenu",tinymce.plugins.ContextMenu)})();
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/contextmenu/editor_plugin_src.js
ADDED
@@ -0,0 +1,161 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 Event = tinymce.dom.Event, each = tinymce.each, DOM = tinymce.DOM;
|
13 |
+
|
14 |
+
/**
|
15 |
+
* This plugin a context menu to TinyMCE editor instances.
|
16 |
+
*
|
17 |
+
* @class tinymce.plugins.ContextMenu
|
18 |
+
*/
|
19 |
+
tinymce.create('tinymce.plugins.ContextMenu', {
|
20 |
+
/**
|
21 |
+
* Initializes the plugin, this will be executed after the plugin has been created.
|
22 |
+
* This call is done before the editor instance has finished it's initialization so use the onInit event
|
23 |
+
* of the editor instance to intercept that event.
|
24 |
+
*
|
25 |
+
* @method init
|
26 |
+
* @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
|
27 |
+
* @param {string} url Absolute URL to where the plugin is located.
|
28 |
+
*/
|
29 |
+
init : function(ed) {
|
30 |
+
var t = this, showMenu, contextmenuNeverUseNative, realCtrlKey;
|
31 |
+
|
32 |
+
t.editor = ed;
|
33 |
+
|
34 |
+
contextmenuNeverUseNative = ed.settings.contextmenu_never_use_native;
|
35 |
+
|
36 |
+
/**
|
37 |
+
* This event gets fired when the context menu is shown.
|
38 |
+
*
|
39 |
+
* @event onContextMenu
|
40 |
+
* @param {tinymce.plugins.ContextMenu} sender Plugin instance sending the event.
|
41 |
+
* @param {tinymce.ui.DropMenu} menu Drop down menu to fill with more items if needed.
|
42 |
+
*/
|
43 |
+
t.onContextMenu = new tinymce.util.Dispatcher(this);
|
44 |
+
|
45 |
+
showMenu = ed.onContextMenu.add(function(ed, e) {
|
46 |
+
// Block TinyMCE menu on ctrlKey and work around Safari issue
|
47 |
+
if ((realCtrlKey !== 0 ? realCtrlKey : e.ctrlKey) && !contextmenuNeverUseNative)
|
48 |
+
return;
|
49 |
+
|
50 |
+
Event.cancel(e);
|
51 |
+
|
52 |
+
// Select the image if it's clicked. WebKit would other wise expand the selection
|
53 |
+
if (e.target.nodeName == 'IMG')
|
54 |
+
ed.selection.select(e.target);
|
55 |
+
|
56 |
+
t._getMenu(ed).showMenu(e.clientX || e.pageX, e.clientY || e.pageY);
|
57 |
+
Event.add(ed.getDoc(), 'click', function(e) {
|
58 |
+
hide(ed, e);
|
59 |
+
});
|
60 |
+
|
61 |
+
ed.nodeChanged();
|
62 |
+
});
|
63 |
+
|
64 |
+
ed.onRemove.add(function() {
|
65 |
+
if (t._menu)
|
66 |
+
t._menu.removeAll();
|
67 |
+
});
|
68 |
+
|
69 |
+
function hide(ed, e) {
|
70 |
+
realCtrlKey = 0;
|
71 |
+
|
72 |
+
// Since the contextmenu event moves
|
73 |
+
// the selection we need to store it away
|
74 |
+
if (e && e.button == 2) {
|
75 |
+
realCtrlKey = e.ctrlKey;
|
76 |
+
return;
|
77 |
+
}
|
78 |
+
|
79 |
+
if (t._menu) {
|
80 |
+
t._menu.removeAll();
|
81 |
+
t._menu.destroy();
|
82 |
+
Event.remove(ed.getDoc(), 'click', hide);
|
83 |
+
t._menu = null;
|
84 |
+
}
|
85 |
+
};
|
86 |
+
|
87 |
+
ed.onMouseDown.add(hide);
|
88 |
+
ed.onKeyDown.add(hide);
|
89 |
+
ed.onKeyDown.add(function(ed, e) {
|
90 |
+
if (e.shiftKey && !e.ctrlKey && !e.altKey && e.keyCode === 121) {
|
91 |
+
Event.cancel(e);
|
92 |
+
showMenu(ed, e);
|
93 |
+
}
|
94 |
+
});
|
95 |
+
},
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Returns information about the plugin as a name/value array.
|
99 |
+
* The current keys are longname, author, authorurl, infourl and version.
|
100 |
+
*
|
101 |
+
* @method getInfo
|
102 |
+
* @return {Object} Name/value array containing information about the plugin.
|
103 |
+
*/
|
104 |
+
getInfo : function() {
|
105 |
+
return {
|
106 |
+
longname : 'Contextmenu',
|
107 |
+
author : 'Moxiecode Systems AB',
|
108 |
+
authorurl : 'http://tinymce.moxiecode.com',
|
109 |
+
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/contextmenu',
|
110 |
+
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
111 |
+
};
|
112 |
+
},
|
113 |
+
|
114 |
+
_getMenu : function(ed) {
|
115 |
+
var t = this, m = t._menu, se = ed.selection, col = se.isCollapsed(), el = se.getNode() || ed.getBody(), am, p;
|
116 |
+
|
117 |
+
if (m) {
|
118 |
+
m.removeAll();
|
119 |
+
m.destroy();
|
120 |
+
}
|
121 |
+
|
122 |
+
p = DOM.getPos(ed.getContentAreaContainer());
|
123 |
+
|
124 |
+
m = ed.controlManager.createDropMenu('contextmenu', {
|
125 |
+
offset_x : p.x + ed.getParam('contextmenu_offset_x', 0),
|
126 |
+
offset_y : p.y + ed.getParam('contextmenu_offset_y', 0),
|
127 |
+
constrain : 1,
|
128 |
+
keyboard_focus: true
|
129 |
+
});
|
130 |
+
|
131 |
+
t._menu = m;
|
132 |
+
|
133 |
+
m.add({title : 'advanced.cut_desc', icon : 'cut', cmd : 'Cut'}).setDisabled(col);
|
134 |
+
m.add({title : 'advanced.copy_desc', icon : 'copy', cmd : 'Copy'}).setDisabled(col);
|
135 |
+
m.add({title : 'advanced.paste_desc', icon : 'paste', cmd : 'Paste'});
|
136 |
+
|
137 |
+
if ((el.nodeName == 'A' && !ed.dom.getAttrib(el, 'name')) || !col) {
|
138 |
+
m.addSeparator();
|
139 |
+
m.add({title : 'advanced.link_desc', icon : 'link', cmd : ed.plugins.advlink ? 'mceAdvLink' : 'mceLink', ui : true});
|
140 |
+
m.add({title : 'advanced.unlink_desc', icon : 'unlink', cmd : 'UnLink'});
|
141 |
+
}
|
142 |
+
|
143 |
+
m.addSeparator();
|
144 |
+
m.add({title : 'advanced.image_desc', icon : 'image', cmd : ed.plugins.advimage ? 'mceAdvImage' : 'mceImage', ui : true});
|
145 |
+
|
146 |
+
m.addSeparator();
|
147 |
+
am = m.addMenu({title : 'contextmenu.align'});
|
148 |
+
am.add({title : 'contextmenu.left', icon : 'justifyleft', cmd : 'JustifyLeft'});
|
149 |
+
am.add({title : 'contextmenu.center', icon : 'justifycenter', cmd : 'JustifyCenter'});
|
150 |
+
am.add({title : 'contextmenu.right', icon : 'justifyright', cmd : 'JustifyRight'});
|
151 |
+
am.add({title : 'contextmenu.full', icon : 'justifyfull', cmd : 'JustifyFull'});
|
152 |
+
|
153 |
+
t.onContextMenu.dispatch(t, m, el, col);
|
154 |
+
|
155 |
+
return m;
|
156 |
+
}
|
157 |
+
});
|
158 |
+
|
159 |
+
// Register plugin
|
160 |
+
tinymce.PluginManager.add('contextmenu', tinymce.plugins.ContextMenu);
|
161 |
+
})();
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/directionality/editor_plugin.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(function(){tinymce.create("tinymce.plugins.Directionality",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceDirectionLTR",function(){var d=a.dom.getParent(a.selection.getNode(),a.dom.isBlock);if(d){if(a.dom.getAttrib(d,"dir")!="ltr"){a.dom.setAttrib(d,"dir","ltr")}else{a.dom.setAttrib(d,"dir","")}}a.nodeChanged()});a.addCommand("mceDirectionRTL",function(){var d=a.dom.getParent(a.selection.getNode(),a.dom.isBlock);if(d){if(a.dom.getAttrib(d,"dir")!="rtl"){a.dom.setAttrib(d,"dir","rtl")}else{a.dom.setAttrib(d,"dir","")}}a.nodeChanged()});a.addButton("ltr",{title:"directionality.ltr_desc",cmd:"mceDirectionLTR"});a.addButton("rtl",{title:"directionality.rtl_desc",cmd:"mceDirectionRTL"});a.onNodeChange.add(c._nodeChange,c)},getInfo:function(){return{longname:"Directionality",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/directionality",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_nodeChange:function(b,a,e){var d=b.dom,c;e=d.getParent(e,d.isBlock);if(!e){a.setDisabled("ltr",1);a.setDisabled("rtl",1);return}c=d.getAttrib(e,"dir");a.setActive("ltr",c=="ltr");a.setDisabled("ltr",0);a.setActive("rtl",c=="rtl");a.setDisabled("rtl",0)}});tinymce.PluginManager.add("directionality",tinymce.plugins.Directionality)})();
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/directionality/editor_plugin_src.js
ADDED
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
tinymce.create('tinymce.plugins.Directionality', {
|
13 |
+
init : function(ed, url) {
|
14 |
+
var t = this;
|
15 |
+
|
16 |
+
t.editor = ed;
|
17 |
+
|
18 |
+
ed.addCommand('mceDirectionLTR', function() {
|
19 |
+
var e = ed.dom.getParent(ed.selection.getNode(), ed.dom.isBlock);
|
20 |
+
|
21 |
+
if (e) {
|
22 |
+
if (ed.dom.getAttrib(e, "dir") != "ltr")
|
23 |
+
ed.dom.setAttrib(e, "dir", "ltr");
|
24 |
+
else
|
25 |
+
ed.dom.setAttrib(e, "dir", "");
|
26 |
+
}
|
27 |
+
|
28 |
+
ed.nodeChanged();
|
29 |
+
});
|
30 |
+
|
31 |
+
ed.addCommand('mceDirectionRTL', function() {
|
32 |
+
var e = ed.dom.getParent(ed.selection.getNode(), ed.dom.isBlock);
|
33 |
+
|
34 |
+
if (e) {
|
35 |
+
if (ed.dom.getAttrib(e, "dir") != "rtl")
|
36 |
+
ed.dom.setAttrib(e, "dir", "rtl");
|
37 |
+
else
|
38 |
+
ed.dom.setAttrib(e, "dir", "");
|
39 |
+
}
|
40 |
+
|
41 |
+
ed.nodeChanged();
|
42 |
+
});
|
43 |
+
|
44 |
+
ed.addButton('ltr', {title : 'directionality.ltr_desc', cmd : 'mceDirectionLTR'});
|
45 |
+
ed.addButton('rtl', {title : 'directionality.rtl_desc', cmd : 'mceDirectionRTL'});
|
46 |
+
|
47 |
+
ed.onNodeChange.add(t._nodeChange, t);
|
48 |
+
},
|
49 |
+
|
50 |
+
getInfo : function() {
|
51 |
+
return {
|
52 |
+
longname : 'Directionality',
|
53 |
+
author : 'Moxiecode Systems AB',
|
54 |
+
authorurl : 'http://tinymce.moxiecode.com',
|
55 |
+
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/directionality',
|
56 |
+
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
57 |
+
};
|
58 |
+
},
|
59 |
+
|
60 |
+
// Private methods
|
61 |
+
|
62 |
+
_nodeChange : function(ed, cm, n) {
|
63 |
+
var dom = ed.dom, dir;
|
64 |
+
|
65 |
+
n = dom.getParent(n, dom.isBlock);
|
66 |
+
if (!n) {
|
67 |
+
cm.setDisabled('ltr', 1);
|
68 |
+
cm.setDisabled('rtl', 1);
|
69 |
+
return;
|
70 |
+
}
|
71 |
+
|
72 |
+
dir = dom.getAttrib(n, 'dir');
|
73 |
+
cm.setActive('ltr', dir == "ltr");
|
74 |
+
cm.setDisabled('ltr', 0);
|
75 |
+
cm.setActive('rtl', dir == "rtl");
|
76 |
+
cm.setDisabled('rtl', 0);
|
77 |
+
}
|
78 |
+
});
|
79 |
+
|
80 |
+
// Register plugin
|
81 |
+
tinymce.PluginManager.add('directionality', tinymce.plugins.Directionality);
|
82 |
+
})();
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/emotions/editor_plugin.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(function(a){a.create("tinymce.plugins.EmotionsPlugin",{init:function(b,c){b.addCommand("mceEmotion",function(){b.windowManager.open({file:c+"/emotions.htm",width:250+parseInt(b.getLang("emotions.delta_width",0)),height:160+parseInt(b.getLang("emotions.delta_height",0)),inline:1},{plugin_url:c})});b.addButton("emotions",{title:"emotions.emotions_desc",cmd:"mceEmotion"})},getInfo:function(){return{longname:"Emotions",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/emotions",version:a.majorVersion+"."+a.minorVersion}}});a.PluginManager.add("emotions",a.plugins.EmotionsPlugin)})(tinymce);
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/emotions/editor_plugin_src.js
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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(tinymce) {
|
12 |
+
tinymce.create('tinymce.plugins.EmotionsPlugin', {
|
13 |
+
init : function(ed, url) {
|
14 |
+
// Register commands
|
15 |
+
ed.addCommand('mceEmotion', function() {
|
16 |
+
ed.windowManager.open({
|
17 |
+
file : url + '/emotions.htm',
|
18 |
+
width : 250 + parseInt(ed.getLang('emotions.delta_width', 0)),
|
19 |
+
height : 160 + parseInt(ed.getLang('emotions.delta_height', 0)),
|
20 |
+
inline : 1
|
21 |
+
}, {
|
22 |
+
plugin_url : url
|
23 |
+
});
|
24 |
+
});
|
25 |
+
|
26 |
+
// Register buttons
|
27 |
+
ed.addButton('emotions', {title : 'emotions.emotions_desc', cmd : 'mceEmotion'});
|
28 |
+
},
|
29 |
+
|
30 |
+
getInfo : function() {
|
31 |
+
return {
|
32 |
+
longname : 'Emotions',
|
33 |
+
author : 'Moxiecode Systems AB',
|
34 |
+
authorurl : 'http://tinymce.moxiecode.com',
|
35 |
+
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/emotions',
|
36 |
+
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
37 |
+
};
|
38 |
+
}
|
39 |
+
});
|
40 |
+
|
41 |
+
// Register plugin
|
42 |
+
tinymce.PluginManager.add('emotions', tinymce.plugins.EmotionsPlugin);
|
43 |
+
})(tinymce);
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/emotions/emotions.htm
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2 |
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
+
<head>
|
4 |
+
<title>{#emotions_dlg.title}</title>
|
5 |
+
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
6 |
+
<script type="text/javascript" src="js/emotions.js"></script>
|
7 |
+
</head>
|
8 |
+
<body style="display: none" role="application" aria-labelledby="app_title">
|
9 |
+
<span style="display:none;" id="app_title">{#emotions_dlg.title}</span>
|
10 |
+
<div align="center">
|
11 |
+
<div class="title">{#emotions_dlg.title}:<br /><br /></div>
|
12 |
+
|
13 |
+
<table id="emoticon_table" role="presentation" border="0" cellspacing="0" cellpadding="4">
|
14 |
+
<tr>
|
15 |
+
<td><a class="emoticon_link" role="button" title="{#emotions_dlg.cool}. {#emotions_dlg.usage}" href="javascript:EmotionsDialog.insert('smiley-cool.gif','emotions_dlg.cool');"><img src="img/smiley-cool.gif" width="18" height="18" border="0" alt="{#emotions_dlg.cool}. {#emotions_dlg.usage}" /></a></td>
|
16 |
+
<td><a class="emoticon_link" role="button" title="{#emotions_dlg.cry}. {#emotions_dlg.usage}" href="javascript:EmotionsDialog.insert('smiley-cry.gif','emotions_dlg.cry');"><img src="img/smiley-cry.gif" width="18" height="18" border="0" alt="{#emotions_dlg.cry}. {#emotions_dlg.usage}" /></a></td>
|
17 |
+
<td><a class="emoticon_link" role="button" title="{#emotions_dlg.embarassed}. {#emotions_dlg.usage}" href="javascript:EmotionsDialog.insert('smiley-embarassed.gif','emotions_dlg.embarassed');"><img src="img/smiley-embarassed.gif" width="18" height="18" border="0" alt="{#emotions_dlg.embarassed}. {#emotions_dlg.usage}" /></a></td>
|
18 |
+
<td><a class="emoticon_link" role="button" title="{#emotions_dlg.foot_in_mouth}. {#emotions_dlg.usage}" href="javascript:EmotionsDialog.insert('smiley-foot-in-mouth.gif','emotions_dlg.foot_in_mouth');"><img src="img/smiley-foot-in-mouth.gif" width="18" height="18" border="0" alt="{#emotions_dlg.foot_in_mouth}. {#emotions_dlg.usage}" /></a></td>
|
19 |
+
</tr>
|
20 |
+
<tr>
|
21 |
+
<td><a class="emoticon_link" role="button" title="{#emotions_dlg.frown}. {#emotions_dlg.usage}" href="javascript:EmotionsDialog.insert('smiley-frown.gif','emotions_dlg.frown');"><img src="img/smiley-frown.gif" width="18" height="18" border="0" alt="{#emotions_dlg.frown}. {#emotions_dlg.usage}" /></a></td>
|
22 |
+
<td><a class="emoticon_link" role="button" title="{#emotions_dlg.innocent}. {#emotions_dlg.usage}" href="javascript:EmotionsDialog.insert('smiley-innocent.gif','emotions_dlg.innocent');"><img src="img/smiley-innocent.gif" width="18" height="18" border="0" alt="{#emotions_dlg.innocent}. {#emotions_dlg.usage}" /></a></td>
|
23 |
+
<td><a class="emoticon_link" role="button" title="{#emotions_dlg.kiss}. {#emotions_dlg.usage}" href="javascript:EmotionsDialog.insert('smiley-kiss.gif','emotions_dlg.kiss');"><img src="img/smiley-kiss.gif" width="18" height="18" border="0" alt="{#emotions_dlg.kiss}. {#emotions_dlg.usage}" /></a></td>
|
24 |
+
<td><a class="emoticon_link" role="button" title="{#emotions_dlg.laughing}. {#emotions_dlg.usage}" href="javascript:EmotionsDialog.insert('smiley-laughing.gif','emotions_dlg.laughing');"><img src="img/smiley-laughing.gif" width="18" height="18" border="0" alt="{#emotions_dlg.laughing}. {#emotions_dlg.usage}" /></a></td>
|
25 |
+
</tr>
|
26 |
+
<tr>
|
27 |
+
<td><a class="emoticon_link" role="button" title="{#emotions_dlg.money_mouth}. {#emotions_dlg.usage}" href="javascript:EmotionsDialog.insert('smiley-money-mouth.gif','emotions_dlg.money_mouth');"><img src="img/smiley-money-mouth.gif" width="18" height="18" border="0" alt="{#emotions_dlg.money_mouth}. {#emotions_dlg.usage}"/></a></td>
|
28 |
+
<td><a class="emoticon_link" role="button" title="{#emotions_dlg.sealed}. {#emotions_dlg.usage}" href="javascript:EmotionsDialog.insert('smiley-sealed.gif','emotions_dlg.sealed');"><img src="img/smiley-sealed.gif" width="18" height="18" border="0" alt="{#emotions_dlg.sealed}. {#emotions_dlg.usage}" /></a></td>
|
29 |
+
<td><a class="emoticon_link" role="button" title="{#emotions_dlg.smile}. {#emotions_dlg.usage}" href="javascript:EmotionsDialog.insert('smiley-smile.gif','emotions_dlg.smile');"><img src="img/smiley-smile.gif" width="18" height="18" border="0" alt="{#emotions_dlg.smile}. {#emotions_dlg.usage}" /></a></td>
|
30 |
+
<td><a class="emoticon_link" role="button" title="{#emotions_dlg.surprised}. {#emotions_dlg.usage}" href="javascript:EmotionsDialog.insert('smiley-surprised.gif','emotions_dlg.surprised');"><img src="img/smiley-surprised.gif" width="18" height="18" border="0" alt="{#emotions_dlg.surprised}. {#emotions_dlg.usage}" /></a></td>
|
31 |
+
</tr>
|
32 |
+
<tr>
|
33 |
+
<td><a class="emoticon_link" role="button" title="{#emotions_dlg.tongue_out}. {#emotions_dlg.usage}" href="javascript:EmotionsDialog.insert('smiley-tongue-out.gif','emotions_dlg.tongue_out');"><img src="img/smiley-tongue-out.gif" width="18" height="18" border="0" alt="{#emotions_dlg.tongue-out}. {#emotions_dlg.usage}" /></a></td>
|
34 |
+
<td><a class="emoticon_link" role="button" title="{#emotions_dlg.undecided}. {#emotions_dlg.usage}" href="javascript:EmotionsDialog.insert('smiley-undecided.gif','emotions_dlg.undecided');"><img src="img/smiley-undecided.gif" width="18" height="18" border="0" alt="{#emotions_dlg.undecided}. {#emotions_dlg.usage}" /></a></td>
|
35 |
+
<td><a class="emoticon_link" role="button" title="{#emotions_dlg.wink}. {#emotions_dlg.usage}" href="javascript:EmotionsDialog.insert('smiley-wink.gif','emotions_dlg.wink');"><img src="img/smiley-wink.gif" width="18" height="18" border="0" alt="{#emotions_dlg.wink}. {#emotions_dlg.usage}" /></a></td>
|
36 |
+
<td><a class="emoticon_link" role="button" title="{#emotions_dlg.yell}. {#emotions_dlg.usage}" href="javascript:EmotionsDialog.insert('smiley-yell.gif','emotions_dlg.yell');"><img src="img/smiley-yell.gif" width="18" height="18" border="0" alt="{#emotions_dlg.yell}. {#emotions_dlg.usage}" /></a></td>
|
37 |
+
</tr>
|
38 |
+
</table>
|
39 |
+
<div>{#emotions_dlg.usage}</div>
|
40 |
+
</div>
|
41 |
+
</body>
|
42 |
+
</html>
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-cool.gif
ADDED
Binary file
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-cry.gif
ADDED
Binary file
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-embarassed.gif
ADDED
Binary file
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-foot-in-mouth.gif
ADDED
Binary file
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-frown.gif
ADDED
Binary file
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-innocent.gif
ADDED
Binary file
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-kiss.gif
ADDED
Binary file
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-laughing.gif
ADDED
Binary file
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-money-mouth.gif
ADDED
Binary file
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-sealed.gif
ADDED
Binary file
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-smile.gif
ADDED
Binary file
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-surprised.gif
ADDED
Binary file
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-tongue-out.gif
ADDED
Binary file
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-undecided.gif
ADDED
Binary file
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-wink.gif
ADDED
Binary file
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/emotions/img/smiley-yell.gif
ADDED
Binary file
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/emotions/js/emotions.js
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
tinyMCEPopup.requireLangPack();
|
2 |
+
|
3 |
+
var EmotionsDialog = {
|
4 |
+
addKeyboardNavigation: function(){
|
5 |
+
var tableElm, cells, settings;
|
6 |
+
|
7 |
+
cells = tinyMCEPopup.dom.select("a.emoticon_link", "emoticon_table");
|
8 |
+
|
9 |
+
settings ={
|
10 |
+
root: "emoticon_table",
|
11 |
+
items: cells
|
12 |
+
};
|
13 |
+
cells[0].tabindex=0;
|
14 |
+
tinyMCEPopup.dom.addClass(cells[0], "mceFocus");
|
15 |
+
if (tinymce.isGecko) {
|
16 |
+
cells[0].focus();
|
17 |
+
} else {
|
18 |
+
setTimeout(function(){
|
19 |
+
cells[0].focus();
|
20 |
+
}, 100);
|
21 |
+
}
|
22 |
+
tinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', settings, tinyMCEPopup.dom);
|
23 |
+
},
|
24 |
+
init : function(ed) {
|
25 |
+
tinyMCEPopup.resizeToInnerSize();
|
26 |
+
this.addKeyboardNavigation();
|
27 |
+
},
|
28 |
+
|
29 |
+
insert : function(file, title) {
|
30 |
+
var ed = tinyMCEPopup.editor, dom = ed.dom;
|
31 |
+
|
32 |
+
tinyMCEPopup.execCommand('mceInsertContent', false, dom.createHTML('img', {
|
33 |
+
src : tinyMCEPopup.getWindowArg('plugin_url') + '/img/' + file,
|
34 |
+
alt : ed.getLang(title),
|
35 |
+
title : ed.getLang(title),
|
36 |
+
border : 0
|
37 |
+
}));
|
38 |
+
|
39 |
+
tinyMCEPopup.close();
|
40 |
+
}
|
41 |
+
};
|
42 |
+
|
43 |
+
tinyMCEPopup.onInit.add(EmotionsDialog.init, EmotionsDialog);
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/emotions/langs/en_dlg.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
tinyMCE.addI18n('en.emotions_dlg',{cry:"Cry",cool:"Cool",desc:"Emotions",title:"Insert Emotion",usage:"Use left and right arrows to navigate.",yell:"Yell",wink:"Wink",undecided:"Undecided","tongue_out":"Tongue Out",surprised:"Surprised",smile:"Smile",sealed:"Sealed","money_mouth":"Money Mouth",laughing:"Laughing",kiss:"Kiss",innocent:"Innocent",frown:"Frown","foot_in_mouth":"Foot in Mouth",embarassed:"Embarassed"});
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/example/dialog.htm
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2 |
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
+
<head>
|
4 |
+
<title>{#example_dlg.title}</title>
|
5 |
+
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
6 |
+
<script type="text/javascript" src="js/dialog.js"></script>
|
7 |
+
</head>
|
8 |
+
<body>
|
9 |
+
|
10 |
+
<form onsubmit="ExampleDialog.insert();return false;" action="#">
|
11 |
+
<p>Here is a example dialog.</p>
|
12 |
+
<p>Selected text: <input id="someval" name="someval" type="text" class="text" /></p>
|
13 |
+
<p>Custom arg: <input id="somearg" name="somearg" type="text" class="text" /></p>
|
14 |
+
|
15 |
+
<div class="mceActionPanel">
|
16 |
+
<input type="button" id="insert" name="insert" value="{#insert}" onclick="ExampleDialog.insert();" />
|
17 |
+
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
18 |
+
</div>
|
19 |
+
</form>
|
20 |
+
|
21 |
+
</body>
|
22 |
+
</html>
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/example/editor_plugin.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(function(){tinymce.PluginManager.requireLangPack("example");tinymce.create("tinymce.plugins.ExamplePlugin",{init:function(a,b){a.addCommand("mceExample",function(){a.windowManager.open({file:b+"/dialog.htm",width:320+parseInt(a.getLang("example.delta_width",0)),height:120+parseInt(a.getLang("example.delta_height",0)),inline:1},{plugin_url:b,some_custom_arg:"custom arg"})});a.addButton("example",{title:"example.desc",cmd:"mceExample",image:b+"/img/example.gif"});a.onNodeChange.add(function(d,c,e){c.setActive("example",e.nodeName=="IMG")})},createControl:function(b,a){return null},getInfo:function(){return{longname:"Example plugin",author:"Some author",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/example",version:"1.0"}}});tinymce.PluginManager.add("example",tinymce.plugins.ExamplePlugin)})();
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/example/editor_plugin_src.js
ADDED
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
// Load plugin specific language pack
|
13 |
+
tinymce.PluginManager.requireLangPack('example');
|
14 |
+
|
15 |
+
tinymce.create('tinymce.plugins.ExamplePlugin', {
|
16 |
+
/**
|
17 |
+
* Initializes the plugin, this will be executed after the plugin has been created.
|
18 |
+
* This call is done before the editor instance has finished it's initialization so use the onInit event
|
19 |
+
* of the editor instance to intercept that event.
|
20 |
+
*
|
21 |
+
* @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
|
22 |
+
* @param {string} url Absolute URL to where the plugin is located.
|
23 |
+
*/
|
24 |
+
init : function(ed, url) {
|
25 |
+
// Register the command so that it can be invoked by using tinyMCE.activeEditor.execCommand('mceExample');
|
26 |
+
ed.addCommand('mceExample', function() {
|
27 |
+
ed.windowManager.open({
|
28 |
+
file : url + '/dialog.htm',
|
29 |
+
width : 320 + parseInt(ed.getLang('example.delta_width', 0)),
|
30 |
+
height : 120 + parseInt(ed.getLang('example.delta_height', 0)),
|
31 |
+
inline : 1
|
32 |
+
}, {
|
33 |
+
plugin_url : url, // Plugin absolute URL
|
34 |
+
some_custom_arg : 'custom arg' // Custom argument
|
35 |
+
});
|
36 |
+
});
|
37 |
+
|
38 |
+
// Register example button
|
39 |
+
ed.addButton('example', {
|
40 |
+
title : 'example.desc',
|
41 |
+
cmd : 'mceExample',
|
42 |
+
image : url + '/img/example.gif'
|
43 |
+
});
|
44 |
+
|
45 |
+
// Add a node change handler, selects the button in the UI when a image is selected
|
46 |
+
ed.onNodeChange.add(function(ed, cm, n) {
|
47 |
+
cm.setActive('example', n.nodeName == 'IMG');
|
48 |
+
});
|
49 |
+
},
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Creates control instances based in the incomming name. This method is normally not
|
53 |
+
* needed since the addButton method of the tinymce.Editor class is a more easy way of adding buttons
|
54 |
+
* but you sometimes need to create more complex controls like listboxes, split buttons etc then this
|
55 |
+
* method can be used to create those.
|
56 |
+
*
|
57 |
+
* @param {String} n Name of the control to create.
|
58 |
+
* @param {tinymce.ControlManager} cm Control manager to use inorder to create new control.
|
59 |
+
* @return {tinymce.ui.Control} New control instance or null if no control was created.
|
60 |
+
*/
|
61 |
+
createControl : function(n, cm) {
|
62 |
+
return null;
|
63 |
+
},
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Returns information about the plugin as a name/value array.
|
67 |
+
* The current keys are longname, author, authorurl, infourl and version.
|
68 |
+
*
|
69 |
+
* @return {Object} Name/value array containing information about the plugin.
|
70 |
+
*/
|
71 |
+
getInfo : function() {
|
72 |
+
return {
|
73 |
+
longname : 'Example plugin',
|
74 |
+
author : 'Some author',
|
75 |
+
authorurl : 'http://tinymce.moxiecode.com',
|
76 |
+
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/example',
|
77 |
+
version : "1.0"
|
78 |
+
};
|
79 |
+
}
|
80 |
+
});
|
81 |
+
|
82 |
+
// Register plugin
|
83 |
+
tinymce.PluginManager.add('example', tinymce.plugins.ExamplePlugin);
|
84 |
+
})();
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/example/img/example.gif
ADDED
Binary file
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/example/js/dialog.js
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
tinyMCEPopup.requireLangPack();
|
2 |
+
|
3 |
+
var ExampleDialog = {
|
4 |
+
init : function() {
|
5 |
+
var f = document.forms[0];
|
6 |
+
|
7 |
+
// Get the selected contents as text and place it in the input
|
8 |
+
f.someval.value = tinyMCEPopup.editor.selection.getContent({format : 'text'});
|
9 |
+
f.somearg.value = tinyMCEPopup.getWindowArg('some_custom_arg');
|
10 |
+
},
|
11 |
+
|
12 |
+
insert : function() {
|
13 |
+
// Insert the contents from the input into the document
|
14 |
+
tinyMCEPopup.editor.execCommand('mceInsertContent', false, document.forms[0].someval.value);
|
15 |
+
tinyMCEPopup.close();
|
16 |
+
}
|
17 |
+
};
|
18 |
+
|
19 |
+
tinyMCEPopup.onInit.add(ExampleDialog.init, ExampleDialog);
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/example/langs/en.js
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
tinyMCE.addI18n('en.example',{
|
2 |
+
desc : 'This is just a template button'
|
3 |
+
});
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/example/langs/en_dlg.js
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
tinyMCE.addI18n('en.example_dlg',{
|
2 |
+
title : 'This is just a example title'
|
3 |
+
});
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/example_dependency/editor_plugin.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(function(){tinymce.create("tinymce.plugins.ExampleDependencyPlugin",{init:function(a,b){},getInfo:function(){return{longname:"Example Dependency plugin",author:"Some author",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/example_dependency",version:"1.0"}}});tinymce.PluginManager.add("example_dependency",tinymce.plugins.ExampleDependencyPlugin,["example"])})();
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/example_dependency/editor_plugin_src.js
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
|
13 |
+
tinymce.create('tinymce.plugins.ExampleDependencyPlugin', {
|
14 |
+
/**
|
15 |
+
* Initializes the plugin, this will be executed after the plugin has been created.
|
16 |
+
* This call is done before the editor instance has finished it's initialization so use the onInit event
|
17 |
+
* of the editor instance to intercept that event.
|
18 |
+
*
|
19 |
+
* @param {tinymce.Editor} ed Editor instance that the plugin is initialized in.
|
20 |
+
* @param {string} url Absolute URL to where the plugin is located.
|
21 |
+
*/
|
22 |
+
init : function(ed, url) {
|
23 |
+
},
|
24 |
+
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Returns information about the plugin as a name/value array.
|
28 |
+
* The current keys are longname, author, authorurl, infourl and version.
|
29 |
+
*
|
30 |
+
* @return {Object} Name/value array containing information about the plugin.
|
31 |
+
*/
|
32 |
+
getInfo : function() {
|
33 |
+
return {
|
34 |
+
longname : 'Example Dependency plugin',
|
35 |
+
author : 'Some author',
|
36 |
+
authorurl : 'http://tinymce.moxiecode.com',
|
37 |
+
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/example_dependency',
|
38 |
+
version : "1.0"
|
39 |
+
};
|
40 |
+
}
|
41 |
+
});
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Register the plugin, specifying the list of the plugins that this plugin depends on. They are specified in a list, with the list loaded in order.
|
45 |
+
* plugins in this list will be initialised when this plugin is initialized. (before the init method is called).
|
46 |
+
* plugins in a depends list should typically be specified using the short name). If neccesary this can be done
|
47 |
+
* with an object which has the url to the plugin and the shortname.
|
48 |
+
*/
|
49 |
+
tinymce.PluginManager.add('example_dependency', tinymce.plugins.ExampleDependencyPlugin, ['example']);
|
50 |
+
})();
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/fullpage/css/fullpage.css
ADDED
@@ -0,0 +1,143 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Hide the advanced tab */
|
2 |
+
#advanced_tab {
|
3 |
+
display: none;
|
4 |
+
}
|
5 |
+
|
6 |
+
#metatitle, #metakeywords, #metadescription, #metaauthor, #metacopyright {
|
7 |
+
width: 280px;
|
8 |
+
}
|
9 |
+
|
10 |
+
#doctype, #docencoding {
|
11 |
+
width: 200px;
|
12 |
+
}
|
13 |
+
|
14 |
+
#langcode {
|
15 |
+
width: 30px;
|
16 |
+
}
|
17 |
+
|
18 |
+
#bgimage {
|
19 |
+
width: 220px;
|
20 |
+
}
|
21 |
+
|
22 |
+
#fontface {
|
23 |
+
width: 240px;
|
24 |
+
}
|
25 |
+
|
26 |
+
#leftmargin, #rightmargin, #topmargin, #bottommargin {
|
27 |
+
width: 50px;
|
28 |
+
}
|
29 |
+
|
30 |
+
.panel_wrapper div.current {
|
31 |
+
height: 400px;
|
32 |
+
}
|
33 |
+
|
34 |
+
#stylesheet, #style {
|
35 |
+
width: 240px;
|
36 |
+
}
|
37 |
+
|
38 |
+
#doctypes {
|
39 |
+
width: 200px;
|
40 |
+
}
|
41 |
+
|
42 |
+
/* Head list classes */
|
43 |
+
|
44 |
+
.headlistwrapper {
|
45 |
+
width: 100%;
|
46 |
+
}
|
47 |
+
|
48 |
+
.selected {
|
49 |
+
border: 1px solid #0A246A;
|
50 |
+
background-color: #B6BDD2;
|
51 |
+
}
|
52 |
+
|
53 |
+
.toolbar {
|
54 |
+
width: 100%;
|
55 |
+
}
|
56 |
+
|
57 |
+
#headlist {
|
58 |
+
width: 100%;
|
59 |
+
margin-top: 3px;
|
60 |
+
font-size: 11px;
|
61 |
+
}
|
62 |
+
|
63 |
+
#info, #title_element, #meta_element, #script_element, #style_element, #base_element, #link_element, #comment_element, #unknown_element {
|
64 |
+
display: none;
|
65 |
+
}
|
66 |
+
|
67 |
+
#addmenu {
|
68 |
+
position: absolute;
|
69 |
+
border: 1px solid gray;
|
70 |
+
display: none;
|
71 |
+
z-index: 100;
|
72 |
+
background-color: white;
|
73 |
+
}
|
74 |
+
|
75 |
+
#addmenu a {
|
76 |
+
display: block;
|
77 |
+
width: 100%;
|
78 |
+
line-height: 20px;
|
79 |
+
text-decoration: none;
|
80 |
+
background-color: white;
|
81 |
+
}
|
82 |
+
|
83 |
+
#addmenu a:hover {
|
84 |
+
background-color: #B6BDD2;
|
85 |
+
color: black;
|
86 |
+
}
|
87 |
+
|
88 |
+
#addmenu span {
|
89 |
+
padding-left: 10px;
|
90 |
+
padding-right: 10px;
|
91 |
+
}
|
92 |
+
|
93 |
+
#updateElementPanel {
|
94 |
+
display: none;
|
95 |
+
}
|
96 |
+
|
97 |
+
#script_element .panel_wrapper div.current {
|
98 |
+
height: 108px;
|
99 |
+
}
|
100 |
+
|
101 |
+
#style_element .panel_wrapper div.current {
|
102 |
+
height: 108px;
|
103 |
+
}
|
104 |
+
|
105 |
+
#link_element .panel_wrapper div.current {
|
106 |
+
height: 140px;
|
107 |
+
}
|
108 |
+
|
109 |
+
#element_script_value {
|
110 |
+
width: 100%;
|
111 |
+
height: 100px;
|
112 |
+
}
|
113 |
+
|
114 |
+
#element_comment_value {
|
115 |
+
width: 100%;
|
116 |
+
height: 120px;
|
117 |
+
}
|
118 |
+
|
119 |
+
#element_style_value {
|
120 |
+
width: 100%;
|
121 |
+
height: 100px;
|
122 |
+
}
|
123 |
+
|
124 |
+
#element_title, #element_script_src, #element_meta_name, #element_meta_content, #element_base_href, #element_link_href, #element_link_title {
|
125 |
+
width: 250px;
|
126 |
+
}
|
127 |
+
|
128 |
+
.updateElementButton {
|
129 |
+
margin-top: 3px;
|
130 |
+
}
|
131 |
+
|
132 |
+
/* MSIE specific styles */
|
133 |
+
|
134 |
+
* html .addbutton, * html .removebutton, * html .moveupbutton, * html .movedownbutton {
|
135 |
+
width: 22px;
|
136 |
+
height: 22px;
|
137 |
+
}
|
138 |
+
|
139 |
+
textarea {
|
140 |
+
height: 55px;
|
141 |
+
}
|
142 |
+
|
143 |
+
.panel_wrapper div.current {height:420px;}
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/fullpage/editor_plugin.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(function(){var b=tinymce.each,a=tinymce.html.Node;tinymce.create("tinymce.plugins.FullPagePlugin",{init:function(c,d){var e=this;e.editor=c;c.addCommand("mceFullPageProperties",function(){c.windowManager.open({file:d+"/fullpage.htm",width:430+parseInt(c.getLang("fullpage.delta_width",0)),height:495+parseInt(c.getLang("fullpage.delta_height",0)),inline:1},{plugin_url:d,data:e._htmlToData()})});c.addButton("fullpage",{title:"fullpage.desc",cmd:"mceFullPageProperties"});c.onBeforeSetContent.add(e._setContent,e);c.onGetContent.add(e._getContent,e)},getInfo:function(){return{longname:"Fullpage",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullpage",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_htmlToData:function(){var f=this._parseHeader(),h={},c,i,g,e=this.editor;function d(l,j){var k=l.attr(j);return k||""}h.fontface=e.getParam("fullpage_default_fontface","");h.fontsize=e.getParam("fullpage_default_fontsize","");i=f.firstChild;if(i.type==7){h.xml_pi=true;g=/encoding="([^"]+)"/.exec(i.value);if(g){h.docencoding=g[1]}}i=f.getAll("#doctype")[0];if(i){h.doctype="<!DOCTYPE"+i.value+">"}i=f.getAll("title")[0];if(i&&i.firstChild){h.metatitle=i.firstChild.value}b(f.getAll("meta"),function(m){var k=m.attr("name"),j=m.attr("http-equiv"),l;if(k){h["meta"+k.toLowerCase()]=m.attr("content")}else{if(j=="Content-Type"){l=/charset\s*=\s*(.*)\s*/gi.exec(m.attr("content"));if(l){h.docencoding=l[1]}}}});i=f.getAll("html")[0];if(i){h.langcode=d(i,"lang")||d(i,"xml:lang")}i=f.getAll("link")[0];if(i&&i.attr("rel")=="stylesheet"){h.stylesheet=i.attr("href")}i=f.getAll("body")[0];if(i){h.langdir=d(i,"dir");h.style=d(i,"style");h.visited_color=d(i,"vlink");h.link_color=d(i,"link");h.active_color=d(i,"alink")}return h},_dataToHtml:function(g){var f,d,h,j,k,e=this.editor.dom;function c(n,l,m){n.attr(l,m?m:undefined)}function i(l){if(d.firstChild){d.insert(l,d.firstChild)}else{d.append(l)}}f=this._parseHeader();d=f.getAll("head")[0];if(!d){j=f.getAll("html")[0];d=new a("head",1);if(j.firstChild){j.insert(d,j.firstChild,true)}else{j.append(d)}}j=f.firstChild;if(g.xml_pi){k='version="1.0"';if(g.docencoding){k+=' encoding="'+g.docencoding+'"'}if(j.type!=7){j=new a("xml",7);f.insert(j,f.firstChild,true)}j.value=k}else{if(j&&j.type==7){j.remove()}}j=f.getAll("#doctype")[0];if(g.doctype){if(!j){j=new a("#doctype",10);if(g.xml_pi){f.insert(j,f.firstChild)}else{i(j)}}j.value=g.doctype.substring(9,g.doctype.length-1)}else{if(j){j.remove()}}j=f.getAll("title")[0];if(g.metatitle){if(!j){j=new a("title",1);j.append(new a("#text",3)).value=g.metatitle;i(j)}}if(g.docencoding){j=null;b(f.getAll("meta"),function(l){if(l.attr("http-equiv")=="Content-Type"){j=l}});if(!j){j=new a("meta",1);j.attr("http-equiv","Content-Type");j.shortEnded=true;i(j)}j.attr("content","text/html; charset="+g.docencoding)}b("keywords,description,author,copyright,robots".split(","),function(m){var l=f.getAll("meta"),n,p,o=g["meta"+m];for(n=0;n<l.length;n++){p=l[n];if(p.attr("name")==m){if(o){p.attr("content",o)}else{p.remove()}return}}if(o){j=new a("meta",1);j.attr("name",m);j.attr("content",o);j.shortEnded=true;i(j)}});j=f.getAll("link")[0];if(j&&j.attr("rel")=="stylesheet"){if(g.stylesheet){j.attr("href",g.stylesheet)}else{j.remove()}}else{if(g.stylesheet){j=new a("link",1);j.attr({rel:"stylesheet",text:"text/css",href:g.stylesheet});j.shortEnded=true;i(j)}}j=f.getAll("body")[0];if(j){c(j,"dir",g.langdir);c(j,"style",g.style);c(j,"vlink",g.visited_color);c(j,"link",g.link_color);c(j,"alink",g.active_color);e.setAttribs(this.editor.getBody(),{style:g.style,dir:g.dir,vLink:g.visited_color,link:g.link_color,aLink:g.active_color})}j=f.getAll("html")[0];if(j){c(j,"lang",g.langcode);c(j,"xml:lang",g.langcode)}h=new tinymce.html.Serializer({validate:false,indent:true,apply_source_formatting:true,indent_before:"head,html,body,meta,title,script,link,style",indent_after:"head,html,body,meta,title,script,link,style"}).serialize(f);this.head=h.substring(0,h.indexOf("</body>"))},_parseHeader:function(){return new tinymce.html.DomParser({validate:false,root_name:"#document"}).parse(this.head)},_setContent:function(g,d){var m=this,i,c,h=d.content,f,l="",e=m.editor.dom,j;function k(n){return n.replace(/<\/?[A-Z]+/g,function(o){return o.toLowerCase()})}if(d.format=="raw"&&m.head){return}if(d.source_view&&g.getParam("fullpage_hide_in_source_view")){return}h=h.replace(/<(\/?)BODY/gi,"<$1body");i=h.indexOf("<body");if(i!=-1){i=h.indexOf(">",i);m.head=k(h.substring(0,i+1));c=h.indexOf("</body",i);if(c==-1){c=h.length}d.content=h.substring(i+1,c);m.foot=k(h.substring(c))}else{m.head=this._getDefaultHeader();m.foot="\n</body>\n</html>"}f=m._parseHeader();b(f.getAll("style"),function(n){if(n.firstChild){l+=n.firstChild.value}});j=f.getAll("body")[0];if(j){e.setAttribs(m.editor.getBody(),{style:j.attr("style")||"",dir:j.attr("dir")||"",vLink:j.attr("vlink")||"",link:j.attr("link")||"",aLink:j.attr("alink")||""})}e.remove("fullpage_styles");if(l){e.add(m.editor.getDoc().getElementsByTagName("head")[0],"style",{id:"fullpage_styles"},l);j=e.get("fullpage_styles");if(j.styleSheet){j.styleSheet.cssText=l}}},_getDefaultHeader:function(){var f="",c=this.editor,e,d="";if(c.getParam("fullpage_default_xml_pi")){f+='<?xml version="1.0" encoding="'+c.getParam("fullpage_default_encoding","ISO-8859-1")+'" ?>\n'}f+=c.getParam("fullpage_default_doctype",'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">');f+="\n<html>\n<head>\n";if(e=c.getParam("fullpage_default_title")){f+="<title>"+e+"</title>\n"}if(e=c.getParam("fullpage_default_encoding")){f+='<meta http-equiv="Content-Type" content="text/html; charset='+e+'" />\n'}if(e=c.getParam("fullpage_default_font_family")){d+="font-family: "+e+";"}if(e=c.getParam("fullpage_default_font_size")){d+="font-size: "+e+";"}if(e=c.getParam("fullpage_default_text_color")){d+="color: "+e+";"}f+="</head>\n<body"+(d?' style="'+d+'"':"")+">\n";return f},_getContent:function(d,e){var c=this;if(!e.source_view||!d.getParam("fullpage_hide_in_source_view")){e.content=tinymce.trim(c.head)+"\n"+tinymce.trim(e.content)+"\n"+tinymce.trim(c.foot)}}});tinymce.PluginManager.add("fullpage",tinymce.plugins.FullPagePlugin)})();
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/fullpage/editor_plugin_src.js
ADDED
@@ -0,0 +1,405 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 each = tinymce.each, Node = tinymce.html.Node;
|
13 |
+
|
14 |
+
tinymce.create('tinymce.plugins.FullPagePlugin', {
|
15 |
+
init : function(ed, url) {
|
16 |
+
var t = this;
|
17 |
+
|
18 |
+
t.editor = ed;
|
19 |
+
|
20 |
+
// Register commands
|
21 |
+
ed.addCommand('mceFullPageProperties', function() {
|
22 |
+
ed.windowManager.open({
|
23 |
+
file : url + '/fullpage.htm',
|
24 |
+
width : 430 + parseInt(ed.getLang('fullpage.delta_width', 0)),
|
25 |
+
height : 495 + parseInt(ed.getLang('fullpage.delta_height', 0)),
|
26 |
+
inline : 1
|
27 |
+
}, {
|
28 |
+
plugin_url : url,
|
29 |
+
data : t._htmlToData()
|
30 |
+
});
|
31 |
+
});
|
32 |
+
|
33 |
+
// Register buttons
|
34 |
+
ed.addButton('fullpage', {title : 'fullpage.desc', cmd : 'mceFullPageProperties'});
|
35 |
+
|
36 |
+
ed.onBeforeSetContent.add(t._setContent, t);
|
37 |
+
ed.onGetContent.add(t._getContent, t);
|
38 |
+
},
|
39 |
+
|
40 |
+
getInfo : function() {
|
41 |
+
return {
|
42 |
+
longname : 'Fullpage',
|
43 |
+
author : 'Moxiecode Systems AB',
|
44 |
+
authorurl : 'http://tinymce.moxiecode.com',
|
45 |
+
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullpage',
|
46 |
+
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
47 |
+
};
|
48 |
+
},
|
49 |
+
|
50 |
+
// Private plugin internal methods
|
51 |
+
|
52 |
+
_htmlToData : function() {
|
53 |
+
var headerFragment = this._parseHeader(), data = {}, nodes, elm, matches, editor = this.editor;
|
54 |
+
|
55 |
+
function getAttr(elm, name) {
|
56 |
+
var value = elm.attr(name);
|
57 |
+
|
58 |
+
return value || '';
|
59 |
+
};
|
60 |
+
|
61 |
+
// Default some values
|
62 |
+
data.fontface = editor.getParam("fullpage_default_fontface", "");
|
63 |
+
data.fontsize = editor.getParam("fullpage_default_fontsize", "");
|
64 |
+
|
65 |
+
// Parse XML PI
|
66 |
+
elm = headerFragment.firstChild;
|
67 |
+
if (elm.type == 7) {
|
68 |
+
data.xml_pi = true;
|
69 |
+
matches = /encoding="([^"]+)"/.exec(elm.value);
|
70 |
+
if (matches)
|
71 |
+
data.docencoding = matches[1];
|
72 |
+
}
|
73 |
+
|
74 |
+
// Parse doctype
|
75 |
+
elm = headerFragment.getAll('#doctype')[0];
|
76 |
+
if (elm)
|
77 |
+
data.doctype = '<!DOCTYPE' + elm.value + ">";
|
78 |
+
|
79 |
+
// Parse title element
|
80 |
+
elm = headerFragment.getAll('title')[0];
|
81 |
+
if (elm && elm.firstChild) {
|
82 |
+
data.metatitle = elm.firstChild.value;
|
83 |
+
}
|
84 |
+
|
85 |
+
// Parse meta elements
|
86 |
+
each(headerFragment.getAll('meta'), function(meta) {
|
87 |
+
var name = meta.attr('name'), httpEquiv = meta.attr('http-equiv'), matches;
|
88 |
+
|
89 |
+
if (name)
|
90 |
+
data['meta' + name.toLowerCase()] = meta.attr('content');
|
91 |
+
else if (httpEquiv == "Content-Type") {
|
92 |
+
matches = /charset\s*=\s*(.*)\s*/gi.exec(meta.attr('content'));
|
93 |
+
|
94 |
+
if (matches)
|
95 |
+
data.docencoding = matches[1];
|
96 |
+
}
|
97 |
+
});
|
98 |
+
|
99 |
+
// Parse html attribs
|
100 |
+
elm = headerFragment.getAll('html')[0];
|
101 |
+
if (elm)
|
102 |
+
data.langcode = getAttr(elm, 'lang') || getAttr(elm, 'xml:lang');
|
103 |
+
|
104 |
+
// Parse stylesheet
|
105 |
+
elm = headerFragment.getAll('link')[0];
|
106 |
+
if (elm && elm.attr('rel') == 'stylesheet')
|
107 |
+
data.stylesheet = elm.attr('href');
|
108 |
+
|
109 |
+
// Parse body parts
|
110 |
+
elm = headerFragment.getAll('body')[0];
|
111 |
+
if (elm) {
|
112 |
+
data.langdir = getAttr(elm, 'dir');
|
113 |
+
data.style = getAttr(elm, 'style');
|
114 |
+
data.visited_color = getAttr(elm, 'vlink');
|
115 |
+
data.link_color = getAttr(elm, 'link');
|
116 |
+
data.active_color = getAttr(elm, 'alink');
|
117 |
+
}
|
118 |
+
|
119 |
+
return data;
|
120 |
+
},
|
121 |
+
|
122 |
+
_dataToHtml : function(data) {
|
123 |
+
var headerFragment, headElement, html, elm, value, dom = this.editor.dom;
|
124 |
+
|
125 |
+
function setAttr(elm, name, value) {
|
126 |
+
elm.attr(name, value ? value : undefined);
|
127 |
+
};
|
128 |
+
|
129 |
+
function addHeadNode(node) {
|
130 |
+
if (headElement.firstChild)
|
131 |
+
headElement.insert(node, headElement.firstChild);
|
132 |
+
else
|
133 |
+
headElement.append(node);
|
134 |
+
};
|
135 |
+
|
136 |
+
headerFragment = this._parseHeader();
|
137 |
+
headElement = headerFragment.getAll('head')[0];
|
138 |
+
if (!headElement) {
|
139 |
+
elm = headerFragment.getAll('html')[0];
|
140 |
+
headElement = new Node('head', 1);
|
141 |
+
|
142 |
+
if (elm.firstChild)
|
143 |
+
elm.insert(headElement, elm.firstChild, true);
|
144 |
+
else
|
145 |
+
elm.append(headElement);
|
146 |
+
}
|
147 |
+
|
148 |
+
// Add/update/remove XML-PI
|
149 |
+
elm = headerFragment.firstChild;
|
150 |
+
if (data.xml_pi) {
|
151 |
+
value = 'version="1.0"';
|
152 |
+
|
153 |
+
if (data.docencoding)
|
154 |
+
value += ' encoding="' + data.docencoding + '"';
|
155 |
+
|
156 |
+
if (elm.type != 7) {
|
157 |
+
elm = new Node('xml', 7);
|
158 |
+
headerFragment.insert(elm, headerFragment.firstChild, true);
|
159 |
+
}
|
160 |
+
|
161 |
+
elm.value = value;
|
162 |
+
} else if (elm && elm.type == 7)
|
163 |
+
elm.remove();
|
164 |
+
|
165 |
+
// Add/update/remove doctype
|
166 |
+
elm = headerFragment.getAll('#doctype')[0];
|
167 |
+
if (data.doctype) {
|
168 |
+
if (!elm) {
|
169 |
+
elm = new Node('#doctype', 10);
|
170 |
+
|
171 |
+
if (data.xml_pi)
|
172 |
+
headerFragment.insert(elm, headerFragment.firstChild);
|
173 |
+
else
|
174 |
+
addHeadNode(elm);
|
175 |
+
}
|
176 |
+
|
177 |
+
elm.value = data.doctype.substring(9, data.doctype.length - 1);
|
178 |
+
} else if (elm)
|
179 |
+
elm.remove();
|
180 |
+
|
181 |
+
// Add/update/remove title
|
182 |
+
elm = headerFragment.getAll('title')[0];
|
183 |
+
if (data.metatitle) {
|
184 |
+
if (!elm) {
|
185 |
+
elm = new Node('title', 1);
|
186 |
+
elm.append(new Node('#text', 3)).value = data.metatitle;
|
187 |
+
addHeadNode(elm);
|
188 |
+
}
|
189 |
+
}
|
190 |
+
|
191 |
+
// Add meta encoding
|
192 |
+
if (data.docencoding) {
|
193 |
+
elm = null;
|
194 |
+
each(headerFragment.getAll('meta'), function(meta) {
|
195 |
+
if (meta.attr('http-equiv') == 'Content-Type')
|
196 |
+
elm = meta;
|
197 |
+
});
|
198 |
+
|
199 |
+
if (!elm) {
|
200 |
+
elm = new Node('meta', 1);
|
201 |
+
elm.attr('http-equiv', 'Content-Type');
|
202 |
+
elm.shortEnded = true;
|
203 |
+
addHeadNode(elm);
|
204 |
+
}
|
205 |
+
|
206 |
+
elm.attr('content', 'text/html; charset=' + data.docencoding);
|
207 |
+
}
|
208 |
+
|
209 |
+
// Add/update/remove meta
|
210 |
+
each('keywords,description,author,copyright,robots'.split(','), function(name) {
|
211 |
+
var nodes = headerFragment.getAll('meta'), i, meta, value = data['meta' + name];
|
212 |
+
|
213 |
+
for (i = 0; i < nodes.length; i++) {
|
214 |
+
meta = nodes[i];
|
215 |
+
|
216 |
+
if (meta.attr('name') == name) {
|
217 |
+
if (value)
|
218 |
+
meta.attr('content', value);
|
219 |
+
else
|
220 |
+
meta.remove();
|
221 |
+
|
222 |
+
return;
|
223 |
+
}
|
224 |
+
}
|
225 |
+
|
226 |
+
if (value) {
|
227 |
+
elm = new Node('meta', 1);
|
228 |
+
elm.attr('name', name);
|
229 |
+
elm.attr('content', value);
|
230 |
+
elm.shortEnded = true;
|
231 |
+
|
232 |
+
addHeadNode(elm);
|
233 |
+
}
|
234 |
+
});
|
235 |
+
|
236 |
+
// Add/update/delete link
|
237 |
+
elm = headerFragment.getAll('link')[0];
|
238 |
+
if (elm && elm.attr('rel') == 'stylesheet') {
|
239 |
+
if (data.stylesheet)
|
240 |
+
elm.attr('href', data.stylesheet);
|
241 |
+
else
|
242 |
+
elm.remove();
|
243 |
+
} else if (data.stylesheet) {
|
244 |
+
elm = new Node('link', 1);
|
245 |
+
elm.attr({
|
246 |
+
rel : 'stylesheet',
|
247 |
+
text : 'text/css',
|
248 |
+
href : data.stylesheet
|
249 |
+
});
|
250 |
+
elm.shortEnded = true;
|
251 |
+
|
252 |
+
addHeadNode(elm);
|
253 |
+
}
|
254 |
+
|
255 |
+
// Update body attributes
|
256 |
+
elm = headerFragment.getAll('body')[0];
|
257 |
+
if (elm) {
|
258 |
+
setAttr(elm, 'dir', data.langdir);
|
259 |
+
setAttr(elm, 'style', data.style);
|
260 |
+
setAttr(elm, 'vlink', data.visited_color);
|
261 |
+
setAttr(elm, 'link', data.link_color);
|
262 |
+
setAttr(elm, 'alink', data.active_color);
|
263 |
+
|
264 |
+
// Update iframe body as well
|
265 |
+
dom.setAttribs(this.editor.getBody(), {
|
266 |
+
style : data.style,
|
267 |
+
dir : data.dir,
|
268 |
+
vLink : data.visited_color,
|
269 |
+
link : data.link_color,
|
270 |
+
aLink : data.active_color
|
271 |
+
});
|
272 |
+
}
|
273 |
+
|
274 |
+
// Set html attributes
|
275 |
+
elm = headerFragment.getAll('html')[0];
|
276 |
+
if (elm) {
|
277 |
+
setAttr(elm, 'lang', data.langcode);
|
278 |
+
setAttr(elm, 'xml:lang', data.langcode);
|
279 |
+
}
|
280 |
+
|
281 |
+
// Serialize header fragment and crop away body part
|
282 |
+
html = new tinymce.html.Serializer({
|
283 |
+
validate: false,
|
284 |
+
indent: true,
|
285 |
+
apply_source_formatting : true,
|
286 |
+
indent_before: 'head,html,body,meta,title,script,link,style',
|
287 |
+
indent_after: 'head,html,body,meta,title,script,link,style'
|
288 |
+
}).serialize(headerFragment);
|
289 |
+
|
290 |
+
this.head = html.substring(0, html.indexOf('</body>'));
|
291 |
+
},
|
292 |
+
|
293 |
+
_parseHeader : function() {
|
294 |
+
// Parse the contents with a DOM parser
|
295 |
+
return new tinymce.html.DomParser({
|
296 |
+
validate: false,
|
297 |
+
root_name: '#document'
|
298 |
+
}).parse(this.head);
|
299 |
+
},
|
300 |
+
|
301 |
+
_setContent : function(ed, o) {
|
302 |
+
var self = this, startPos, endPos, content = o.content, headerFragment, styles = '', dom = self.editor.dom, elm;
|
303 |
+
|
304 |
+
function low(s) {
|
305 |
+
return s.replace(/<\/?[A-Z]+/g, function(a) {
|
306 |
+
return a.toLowerCase();
|
307 |
+
})
|
308 |
+
};
|
309 |
+
|
310 |
+
// Ignore raw updated if we already have a head, this will fix issues with undo/redo keeping the head/foot separate
|
311 |
+
if (o.format == 'raw' && self.head)
|
312 |
+
return;
|
313 |
+
|
314 |
+
if (o.source_view && ed.getParam('fullpage_hide_in_source_view'))
|
315 |
+
return;
|
316 |
+
|
317 |
+
// Parse out head, body and footer
|
318 |
+
content = content.replace(/<(\/?)BODY/gi, '<$1body');
|
319 |
+
startPos = content.indexOf('<body');
|
320 |
+
|
321 |
+
if (startPos != -1) {
|
322 |
+
startPos = content.indexOf('>', startPos);
|
323 |
+
self.head = low(content.substring(0, startPos + 1));
|
324 |
+
|
325 |
+
endPos = content.indexOf('</body', startPos);
|
326 |
+
if (endPos == -1)
|
327 |
+
endPos = content.length;
|
328 |
+
|
329 |
+
o.content = content.substring(startPos + 1, endPos);
|
330 |
+
self.foot = low(content.substring(endPos));
|
331 |
+
} else {
|
332 |
+
self.head = this._getDefaultHeader();
|
333 |
+
self.foot = '\n</body>\n</html>';
|
334 |
+
}
|
335 |
+
|
336 |
+
// Parse header and update iframe
|
337 |
+
headerFragment = self._parseHeader();
|
338 |
+
each(headerFragment.getAll('style'), function(node) {
|
339 |
+
if (node.firstChild)
|
340 |
+
styles += node.firstChild.value;
|
341 |
+
});
|
342 |
+
|
343 |
+
elm = headerFragment.getAll('body')[0];
|
344 |
+
if (elm) {
|
345 |
+
dom.setAttribs(self.editor.getBody(), {
|
346 |
+
style : elm.attr('style') || '',
|
347 |
+
dir : elm.attr('dir') || '',
|
348 |
+
vLink : elm.attr('vlink') || '',
|
349 |
+
link : elm.attr('link') || '',
|
350 |
+
aLink : elm.attr('alink') || ''
|
351 |
+
});
|
352 |
+
}
|
353 |
+
|
354 |
+
dom.remove('fullpage_styles');
|
355 |
+
|
356 |
+
if (styles) {
|
357 |
+
dom.add(self.editor.getDoc().getElementsByTagName('head')[0], 'style', {id : 'fullpage_styles'}, styles);
|
358 |
+
|
359 |
+
// Needed for IE 6/7
|
360 |
+
elm = dom.get('fullpage_styles');
|
361 |
+
if (elm.styleSheet)
|
362 |
+
elm.styleSheet.cssText = styles;
|
363 |
+
}
|
364 |
+
},
|
365 |
+
|
366 |
+
_getDefaultHeader : function() {
|
367 |
+
var header = '', editor = this.editor, value, styles = '';
|
368 |
+
|
369 |
+
if (editor.getParam('fullpage_default_xml_pi'))
|
370 |
+
header += '<?xml version="1.0" encoding="' + editor.getParam('fullpage_default_encoding', 'ISO-8859-1') + '" ?>\n';
|
371 |
+
|
372 |
+
header += editor.getParam('fullpage_default_doctype', '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">');
|
373 |
+
header += '\n<html>\n<head>\n';
|
374 |
+
|
375 |
+
if (value = editor.getParam('fullpage_default_title'))
|
376 |
+
header += '<title>' + value + '</title>\n';
|
377 |
+
|
378 |
+
if (value = editor.getParam('fullpage_default_encoding'))
|
379 |
+
header += '<meta http-equiv="Content-Type" content="text/html; charset=' + value + '" />\n';
|
380 |
+
|
381 |
+
if (value = editor.getParam('fullpage_default_font_family'))
|
382 |
+
styles += 'font-family: ' + value + ';';
|
383 |
+
|
384 |
+
if (value = editor.getParam('fullpage_default_font_size'))
|
385 |
+
styles += 'font-size: ' + value + ';';
|
386 |
+
|
387 |
+
if (value = editor.getParam('fullpage_default_text_color'))
|
388 |
+
styles += 'color: ' + value + ';';
|
389 |
+
|
390 |
+
header += '</head>\n<body' + (styles ? ' style="' + styles + '"' : '') + '>\n';
|
391 |
+
|
392 |
+
return header;
|
393 |
+
},
|
394 |
+
|
395 |
+
_getContent : function(ed, o) {
|
396 |
+
var self = this;
|
397 |
+
|
398 |
+
if (!o.source_view || !ed.getParam('fullpage_hide_in_source_view'))
|
399 |
+
o.content = tinymce.trim(self.head) + '\n' + tinymce.trim(o.content) + '\n' + tinymce.trim(self.foot);
|
400 |
+
}
|
401 |
+
});
|
402 |
+
|
403 |
+
// Register plugin
|
404 |
+
tinymce.PluginManager.add('fullpage', tinymce.plugins.FullPagePlugin);
|
405 |
+
})();
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/fullpage/fullpage.htm
ADDED
@@ -0,0 +1,259 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2 |
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
+
<head>
|
4 |
+
<title>{#fullpage_dlg.title}</title>
|
5 |
+
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
6 |
+
<script type="text/javascript" src="../../utils/mctabs.js"></script>
|
7 |
+
<script type="text/javascript" src="../../utils/form_utils.js"></script>
|
8 |
+
<script type="text/javascript" src="js/fullpage.js"></script>
|
9 |
+
<link href="css/fullpage.css" rel="stylesheet" type="text/css" />
|
10 |
+
</head>
|
11 |
+
<body id="fullpage" style="display: none">
|
12 |
+
<form onsubmit="FullPageDialog.update();return false;" name="fullpage" action="#">
|
13 |
+
<div class="tabs">
|
14 |
+
<ul>
|
15 |
+
<li id="meta_tab" class="current"><span><a href="javascript:mcTabs.displayTab('meta_tab','meta_panel');" onmousedown="return false;">{#fullpage_dlg.meta_tab}</a></span></li>
|
16 |
+
<li id="appearance_tab"><span><a href="javascript:mcTabs.displayTab('appearance_tab','appearance_panel');" onmousedown="return false;">{#fullpage_dlg.appearance_tab}</a></span></li>
|
17 |
+
</ul>
|
18 |
+
</div>
|
19 |
+
|
20 |
+
<div class="panel_wrapper">
|
21 |
+
<div id="meta_panel" class="panel current">
|
22 |
+
<fieldset>
|
23 |
+
<legend>{#fullpage_dlg.meta_props}</legend>
|
24 |
+
|
25 |
+
<table border="0" cellpadding="4" cellspacing="0">
|
26 |
+
<tr>
|
27 |
+
<td class="nowrap"><label for="metatitle">{#fullpage_dlg.meta_title}</label> </td>
|
28 |
+
<td><input type="text" id="metatitle" name="metatitle" value="" class="mceFocus" /></td>
|
29 |
+
</tr>
|
30 |
+
<tr>
|
31 |
+
<td class="nowrap"><label for="metakeywords">{#fullpage_dlg.meta_keywords}</label> </td>
|
32 |
+
<td><textarea id="metakeywords" name="metakeywords" rows="4"></textarea></td>
|
33 |
+
</tr>
|
34 |
+
<tr>
|
35 |
+
<td class="nowrap"><label for="metadescription">{#fullpage_dlg.meta_description}</label> </td>
|
36 |
+
<td><textarea id="metadescription" name="metadescription" rows="4"></textarea></td>
|
37 |
+
</tr>
|
38 |
+
<tr>
|
39 |
+
<td class="nowrap"><label for="metaauthor">{#fullpage_dlg.author}</label> </td>
|
40 |
+
<td><input type="text" id="metaauthor" name="metaauthor" value="" /></td>
|
41 |
+
</tr>
|
42 |
+
<tr>
|
43 |
+
<td class="nowrap"><label for="metacopyright">{#fullpage_dlg.copyright}</label> </td>
|
44 |
+
<td><input type="text" id="metacopyright" name="metacopyright" value="" /></td>
|
45 |
+
</tr>
|
46 |
+
<tr>
|
47 |
+
<td class="nowrap"><label for="metarobots">{#fullpage_dlg.meta_robots}</label> </td>
|
48 |
+
<td>
|
49 |
+
<select id="metarobots" name="metarobots">
|
50 |
+
<option value="">{#not_set}</option>
|
51 |
+
<option value="index,follow">{#fullpage_dlg.meta_index_follow}</option>
|
52 |
+
<option value="index,nofollow">{#fullpage_dlg.meta_index_nofollow}</option>
|
53 |
+
<option value="noindex,follow">{#fullpage_dlg.meta_noindex_follow}</option>
|
54 |
+
<option value="noindex,nofollow">{#fullpage_dlg.meta_noindex_nofollow}</option>
|
55 |
+
</select>
|
56 |
+
</td>
|
57 |
+
</tr>
|
58 |
+
</table>
|
59 |
+
</fieldset>
|
60 |
+
|
61 |
+
<fieldset>
|
62 |
+
<legend>{#fullpage_dlg.langprops}</legend>
|
63 |
+
|
64 |
+
<table border="0" cellpadding="4" cellspacing="0">
|
65 |
+
<tr>
|
66 |
+
<td class="column1"><label for="docencoding">{#fullpage_dlg.encoding}</label></td>
|
67 |
+
<td>
|
68 |
+
<select id="docencoding" name="docencoding">
|
69 |
+
<option value="">{#not_set}</option>
|
70 |
+
</select>
|
71 |
+
</td>
|
72 |
+
</tr>
|
73 |
+
<tr>
|
74 |
+
<td class="nowrap"><label for="doctype">{#fullpage_dlg.doctypes}</label> </td>
|
75 |
+
<td>
|
76 |
+
<select id="doctype" name="doctype">
|
77 |
+
<option value="">{#not_set}</option>
|
78 |
+
</select>
|
79 |
+
</td>
|
80 |
+
</tr>
|
81 |
+
<tr>
|
82 |
+
<td class="nowrap"><label for="langcode">{#fullpage_dlg.langcode}</label> </td>
|
83 |
+
<td><input type="text" id="langcode" name="langcode" value="" /></td>
|
84 |
+
</tr>
|
85 |
+
<tr>
|
86 |
+
<td class="column1"><label for="langdir">{#fullpage_dlg.langdir}</label></td>
|
87 |
+
<td>
|
88 |
+
<select id="langdir" name="langdir">
|
89 |
+
<option value="">{#not_set}</option>
|
90 |
+
<option value="ltr">{#fullpage_dlg.ltr}</option>
|
91 |
+
<option value="rtl">{#fullpage_dlg.rtl}</option>
|
92 |
+
</select>
|
93 |
+
</td>
|
94 |
+
</tr>
|
95 |
+
<tr>
|
96 |
+
<td class="nowrap"><label for="xml_pi">{#fullpage_dlg.xml_pi}</label> </td>
|
97 |
+
<td><input type="checkbox" id="xml_pi" name="xml_pi" class="checkbox" /></td>
|
98 |
+
</tr>
|
99 |
+
</table>
|
100 |
+
</fieldset>
|
101 |
+
</div>
|
102 |
+
|
103 |
+
<div id="appearance_panel" class="panel">
|
104 |
+
<fieldset>
|
105 |
+
<legend>{#fullpage_dlg.appearance_textprops}</legend>
|
106 |
+
|
107 |
+
<table border="0" cellpadding="4" cellspacing="0">
|
108 |
+
<tr>
|
109 |
+
<td class="column1"><label for="fontface">{#fullpage_dlg.fontface}</label></td>
|
110 |
+
<td>
|
111 |
+
<select id="fontface" name="fontface" onchange="FullPageDialog.changedStyleProp();">
|
112 |
+
<option value="">{#not_set}</option>
|
113 |
+
</select>
|
114 |
+
</td>
|
115 |
+
</tr>
|
116 |
+
|
117 |
+
<tr>
|
118 |
+
<td class="column1"><label for="fontsize">{#fullpage_dlg.fontsize}</label></td>
|
119 |
+
<td>
|
120 |
+
<select id="fontsize" name="fontsize" onchange="FullPageDialog.changedStyleProp();">
|
121 |
+
<option value="">{#not_set}</option>
|
122 |
+
</select>
|
123 |
+
</td>
|
124 |
+
</tr>
|
125 |
+
|
126 |
+
<tr>
|
127 |
+
<td class="column1"><label for="textcolor">{#fullpage_dlg.textcolor}</label></td>
|
128 |
+
<td>
|
129 |
+
<table border="0" cellpadding="0" cellspacing="0">
|
130 |
+
<tr>
|
131 |
+
<td><input id="textcolor" name="textcolor" type="text" value="" size="9" onchange="updateColor('textcolor_pick','textcolor');FullPageDialog.changedStyleProp();" /></td>
|
132 |
+
<td id="textcolor_pickcontainer"> </td>
|
133 |
+
</tr>
|
134 |
+
</table>
|
135 |
+
</td>
|
136 |
+
</tr>
|
137 |
+
</table>
|
138 |
+
</fieldset>
|
139 |
+
|
140 |
+
<fieldset>
|
141 |
+
<legend>{#fullpage_dlg.appearance_bgprops}</legend>
|
142 |
+
|
143 |
+
<table border="0" cellpadding="4" cellspacing="0">
|
144 |
+
<tr>
|
145 |
+
<td class="column1"><label for="bgimage">{#fullpage_dlg.bgimage}</label></td>
|
146 |
+
<td>
|
147 |
+
<table border="0" cellpadding="0" cellspacing="0">
|
148 |
+
<tr>
|
149 |
+
<td><input id="bgimage" name="bgimage" type="text" value="" onchange="FullPageDialog.changedStyleProp();" /></td>
|
150 |
+
<td id="bgimage_pickcontainer"> </td>
|
151 |
+
</tr>
|
152 |
+
</table>
|
153 |
+
</td>
|
154 |
+
</tr>
|
155 |
+
<tr>
|
156 |
+
<td class="column1"><label for="bgcolor">{#fullpage_dlg.bgcolor}</label></td>
|
157 |
+
<td>
|
158 |
+
<table border="0" cellpadding="0" cellspacing="0">
|
159 |
+
<tr>
|
160 |
+
<td><input id="bgcolor" name="bgcolor" type="text" value="" size="9" onchange="updateColor('bgcolor_pick','bgcolor');FullPageDialog.changedStyleProp();" /></td>
|
161 |
+
<td id="bgcolor_pickcontainer"> </td>
|
162 |
+
</tr>
|
163 |
+
</table>
|
164 |
+
</td>
|
165 |
+
</tr>
|
166 |
+
</table>
|
167 |
+
</fieldset>
|
168 |
+
|
169 |
+
<fieldset>
|
170 |
+
<legend>{#fullpage_dlg.appearance_marginprops}</legend>
|
171 |
+
|
172 |
+
<table border="0" cellpadding="4" cellspacing="0">
|
173 |
+
<tr>
|
174 |
+
<td class="column1"><label for="leftmargin">{#fullpage_dlg.left_margin}</label></td>
|
175 |
+
<td><input id="leftmargin" name="leftmargin" type="text" value="" onchange="FullPageDialog.changedStyleProp();" /></td>
|
176 |
+
<td class="column1"><label for="rightmargin">{#fullpage_dlg.right_margin}</label></td>
|
177 |
+
<td><input id="rightmargin" name="rightmargin" type="text" value="" onchange="FullPageDialog.changedStyleProp();" /></td>
|
178 |
+
</tr>
|
179 |
+
<tr>
|
180 |
+
<td class="column1"><label for="topmargin">{#fullpage_dlg.top_margin}</label></td>
|
181 |
+
<td><input id="topmargin" name="topmargin" type="text" value="" onchange="FullPageDialog.changedStyleProp();" /></td>
|
182 |
+
<td class="column1"><label for="bottommargin">{#fullpage_dlg.bottom_margin}</label></td>
|
183 |
+
<td><input id="bottommargin" name="bottommargin" type="text" value="" onchange="FullPageDialog.changedStyleProp();" /></td>
|
184 |
+
</tr>
|
185 |
+
</table>
|
186 |
+
</fieldset>
|
187 |
+
|
188 |
+
<fieldset>
|
189 |
+
<legend>{#fullpage_dlg.appearance_linkprops}</legend>
|
190 |
+
|
191 |
+
<table border="0" cellpadding="4" cellspacing="0">
|
192 |
+
<tr>
|
193 |
+
<td class="column1"><label for="link_color">{#fullpage_dlg.link_color}</label></td>
|
194 |
+
<td>
|
195 |
+
<table border="0" cellpadding="0" cellspacing="0">
|
196 |
+
<tr>
|
197 |
+
<td><input id="link_color" name="link_color" type="text" value="" size="9" onchange="updateColor('link_color_pick','link_color');FullPageDialog.changedStyleProp();" /></td>
|
198 |
+
<td id="link_color_pickcontainer"> </td>
|
199 |
+
</tr>
|
200 |
+
</table>
|
201 |
+
</td>
|
202 |
+
|
203 |
+
<td class="column1"><label for="visited_color">{#fullpage_dlg.visited_color}</label></td>
|
204 |
+
<td>
|
205 |
+
<table border="0" cellpadding="0" cellspacing="0">
|
206 |
+
<tr>
|
207 |
+
<td><input id="visited_color" name="visited_color" type="text" value="" size="9" onchange="updateColor('visited_color_pick','visited_color');FullPageDialog.changedStyleProp();" /></td>
|
208 |
+
<td id="visited_color_pickcontainer"> </td>
|
209 |
+
</tr>
|
210 |
+
</table>
|
211 |
+
</td>
|
212 |
+
</tr>
|
213 |
+
|
214 |
+
<tr>
|
215 |
+
<td class="column1"><label for="active_color">{#fullpage_dlg.active_color}</label></td>
|
216 |
+
<td>
|
217 |
+
<table border="0" cellpadding="0" cellspacing="0">
|
218 |
+
<tr>
|
219 |
+
<td><input id="active_color" name="active_color" type="text" value="" size="9" onchange="updateColor('active_color_pick','active_color');FullPageDialog.changedStyleProp();" /></td>
|
220 |
+
<td id="active_color_pickcontainer"> </td>
|
221 |
+
</tr>
|
222 |
+
</table>
|
223 |
+
</td>
|
224 |
+
|
225 |
+
<td> </td>
|
226 |
+
<td> </td>
|
227 |
+
</tr>
|
228 |
+
</table>
|
229 |
+
</fieldset>
|
230 |
+
|
231 |
+
<fieldset>
|
232 |
+
<legend>{#fullpage_dlg.appearance_style}</legend>
|
233 |
+
|
234 |
+
<table border="0" cellpadding="4" cellspacing="0">
|
235 |
+
<tr>
|
236 |
+
<td class="column1"><label for="stylesheet">{#fullpage_dlg.stylesheet}</label></td>
|
237 |
+
<td><table border="0" cellpadding="0" cellspacing="0">
|
238 |
+
<tr>
|
239 |
+
<td><input id="stylesheet" name="stylesheet" type="text" value="" /></td>
|
240 |
+
<td id="stylesheet_browsercontainer"> </td>
|
241 |
+
</tr>
|
242 |
+
</table></td>
|
243 |
+
</tr>
|
244 |
+
<tr>
|
245 |
+
<td class="column1"><label for="style">{#fullpage_dlg.style}</label></td>
|
246 |
+
<td><input id="style" name="style" type="text" value="" onchange="FullPageDialog.changedStyle();" /></td>
|
247 |
+
</tr>
|
248 |
+
</table>
|
249 |
+
</fieldset>
|
250 |
+
</div>
|
251 |
+
</div>
|
252 |
+
|
253 |
+
<div class="mceActionPanel">
|
254 |
+
<input type="submit" id="insert" name="update" value="{#update}" />
|
255 |
+
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
256 |
+
</div>
|
257 |
+
</form>
|
258 |
+
</body>
|
259 |
+
</html>
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/fullpage/js/fullpage.js
ADDED
@@ -0,0 +1,232 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* fullpage.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 |
+
tinyMCEPopup.requireLangPack();
|
13 |
+
|
14 |
+
var defaultDocTypes =
|
15 |
+
'XHTML 1.0 Transitional=<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">,' +
|
16 |
+
'XHTML 1.0 Frameset=<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">,' +
|
17 |
+
'XHTML 1.0 Strict=<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">,' +
|
18 |
+
'XHTML 1.1=<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">,' +
|
19 |
+
'HTML 4.01 Transitional=<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">,' +
|
20 |
+
'HTML 4.01 Strict=<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">,' +
|
21 |
+
'HTML 4.01 Frameset=<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">';
|
22 |
+
|
23 |
+
var defaultEncodings =
|
24 |
+
'Western european (iso-8859-1)=iso-8859-1,' +
|
25 |
+
'Central European (iso-8859-2)=iso-8859-2,' +
|
26 |
+
'Unicode (UTF-8)=utf-8,' +
|
27 |
+
'Chinese traditional (Big5)=big5,' +
|
28 |
+
'Cyrillic (iso-8859-5)=iso-8859-5,' +
|
29 |
+
'Japanese (iso-2022-jp)=iso-2022-jp,' +
|
30 |
+
'Greek (iso-8859-7)=iso-8859-7,' +
|
31 |
+
'Korean (iso-2022-kr)=iso-2022-kr,' +
|
32 |
+
'ASCII (us-ascii)=us-ascii';
|
33 |
+
|
34 |
+
var defaultFontNames = 'Arial=arial,helvetica,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,times new roman,times,serif;Tahoma=tahoma,arial,helvetica,sans-serif;Times New Roman=times new roman,times,serif;Verdana=verdana,arial,helvetica,sans-serif;Impact=impact;WingDings=wingdings';
|
35 |
+
var defaultFontSizes = '10px,11px,12px,13px,14px,15px,16px';
|
36 |
+
|
37 |
+
function setVal(id, value) {
|
38 |
+
var elm = document.getElementById(id);
|
39 |
+
|
40 |
+
if (elm) {
|
41 |
+
value = value || '';
|
42 |
+
|
43 |
+
if (elm.nodeName == "SELECT")
|
44 |
+
selectByValue(document.forms[0], id, value);
|
45 |
+
else if (elm.type == "checkbox")
|
46 |
+
elm.checked = !!value;
|
47 |
+
else
|
48 |
+
elm.value = value;
|
49 |
+
}
|
50 |
+
};
|
51 |
+
|
52 |
+
function getVal(id) {
|
53 |
+
var elm = document.getElementById(id);
|
54 |
+
|
55 |
+
if (elm.nodeName == "SELECT")
|
56 |
+
return elm.options[elm.selectedIndex].value;
|
57 |
+
|
58 |
+
if (elm.type == "checkbox")
|
59 |
+
return elm.checked;
|
60 |
+
|
61 |
+
return elm.value;
|
62 |
+
};
|
63 |
+
|
64 |
+
window.FullPageDialog = {
|
65 |
+
changedStyle : function() {
|
66 |
+
var val, styles = tinyMCEPopup.editor.dom.parseStyle(getVal('style'));
|
67 |
+
|
68 |
+
setVal('fontface', styles['font-face']);
|
69 |
+
setVal('fontsize', styles['font-size']);
|
70 |
+
setVal('textcolor', styles['color']);
|
71 |
+
|
72 |
+
if (val = styles['background-image'])
|
73 |
+
setVal('bgimage', val.replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1"));
|
74 |
+
else
|
75 |
+
setVal('bgimage', '');
|
76 |
+
|
77 |
+
setVal('bgcolor', styles['background-color']);
|
78 |
+
|
79 |
+
// Reset margin form elements
|
80 |
+
setVal('topmargin', '');
|
81 |
+
setVal('rightmargin', '');
|
82 |
+
setVal('bottommargin', '');
|
83 |
+
setVal('leftmargin', '');
|
84 |
+
|
85 |
+
// Expand margin
|
86 |
+
if (val = styles['margin']) {
|
87 |
+
val = val.split(' ');
|
88 |
+
styles['margin-top'] = val[0] || '';
|
89 |
+
styles['margin-right'] = val[1] || val[0] || '';
|
90 |
+
styles['margin-bottom'] = val[2] || val[0] || '';
|
91 |
+
styles['margin-left'] = val[3] || val[0] || '';
|
92 |
+
}
|
93 |
+
|
94 |
+
if (val = styles['margin-top'])
|
95 |
+
setVal('topmargin', val.replace(/px/, ''));
|
96 |
+
|
97 |
+
if (val = styles['margin-right'])
|
98 |
+
setVal('rightmargin', val.replace(/px/, ''));
|
99 |
+
|
100 |
+
if (val = styles['margin-bottom'])
|
101 |
+
setVal('bottommargin', val.replace(/px/, ''));
|
102 |
+
|
103 |
+
if (val = styles['margin-left'])
|
104 |
+
setVal('leftmargin', val.replace(/px/, ''));
|
105 |
+
|
106 |
+
updateColor('bgcolor_pick', 'bgcolor');
|
107 |
+
updateColor('textcolor_pick', 'textcolor');
|
108 |
+
},
|
109 |
+
|
110 |
+
changedStyleProp : function() {
|
111 |
+
var val, dom = tinyMCEPopup.editor.dom, styles = dom.parseStyle(getVal('style'));
|
112 |
+
|
113 |
+
styles['font-face'] = getVal('fontface');
|
114 |
+
styles['font-size'] = getVal('fontsize');
|
115 |
+
styles['color'] = getVal('textcolor');
|
116 |
+
styles['background-color'] = getVal('bgcolor');
|
117 |
+
|
118 |
+
if (val = getVal('bgimage'))
|
119 |
+
styles['background-image'] = "url('" + val + "')";
|
120 |
+
else
|
121 |
+
styles['background-image'] = '';
|
122 |
+
|
123 |
+
delete styles['margin'];
|
124 |
+
|
125 |
+
if (val = getVal('topmargin'))
|
126 |
+
styles['margin-top'] = val + "px";
|
127 |
+
else
|
128 |
+
styles['margin-top'] = '';
|
129 |
+
|
130 |
+
if (val = getVal('rightmargin'))
|
131 |
+
styles['margin-right'] = val + "px";
|
132 |
+
else
|
133 |
+
styles['margin-right'] = '';
|
134 |
+
|
135 |
+
if (val = getVal('bottommargin'))
|
136 |
+
styles['margin-bottom'] = val + "px";
|
137 |
+
else
|
138 |
+
styles['margin-bottom'] = '';
|
139 |
+
|
140 |
+
if (val = getVal('leftmargin'))
|
141 |
+
styles['margin-left'] = val + "px";
|
142 |
+
else
|
143 |
+
styles['margin-left'] = '';
|
144 |
+
|
145 |
+
// Serialize, parse and reserialize this will compress redundant styles
|
146 |
+
setVal('style', dom.serializeStyle(dom.parseStyle(dom.serializeStyle(styles))));
|
147 |
+
this.changedStyle();
|
148 |
+
},
|
149 |
+
|
150 |
+
update : function() {
|
151 |
+
var data = {};
|
152 |
+
|
153 |
+
tinymce.each(tinyMCEPopup.dom.select('select,input,textarea'), function(node) {
|
154 |
+
data[node.id] = getVal(node.id);
|
155 |
+
});
|
156 |
+
|
157 |
+
tinyMCEPopup.editor.plugins.fullpage._dataToHtml(data);
|
158 |
+
tinyMCEPopup.close();
|
159 |
+
}
|
160 |
+
};
|
161 |
+
|
162 |
+
function init() {
|
163 |
+
var form = document.forms[0], i, item, list, editor = tinyMCEPopup.editor;
|
164 |
+
|
165 |
+
// Setup doctype select box
|
166 |
+
list = editor.getParam("fullpage_doctypes", defaultDocTypes).split(',');
|
167 |
+
for (i = 0; i < list.length; i++) {
|
168 |
+
item = list[i].split('=');
|
169 |
+
|
170 |
+
if (item.length > 1)
|
171 |
+
addSelectValue(form, 'doctype', item[0], item[1]);
|
172 |
+
}
|
173 |
+
|
174 |
+
// Setup fonts select box
|
175 |
+
list = editor.getParam("fullpage_fonts", defaultFontNames).split(';');
|
176 |
+
for (i = 0; i < list.length; i++) {
|
177 |
+
item = list[i].split('=');
|
178 |
+
|
179 |
+
if (item.length > 1)
|
180 |
+
addSelectValue(form, 'fontface', item[0], item[1]);
|
181 |
+
}
|
182 |
+
|
183 |
+
// Setup fontsize select box
|
184 |
+
list = editor.getParam("fullpage_fontsizes", defaultFontSizes).split(',');
|
185 |
+
for (i = 0; i < list.length; i++)
|
186 |
+
addSelectValue(form, 'fontsize', list[i], list[i]);
|
187 |
+
|
188 |
+
// Setup encodings select box
|
189 |
+
list = editor.getParam("fullpage_encodings", defaultEncodings).split(',');
|
190 |
+
for (i = 0; i < list.length; i++) {
|
191 |
+
item = list[i].split('=');
|
192 |
+
|
193 |
+
if (item.length > 1)
|
194 |
+
addSelectValue(form, 'docencoding', item[0], item[1]);
|
195 |
+
}
|
196 |
+
|
197 |
+
// Setup color pickers
|
198 |
+
document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor');
|
199 |
+
document.getElementById('link_color_pickcontainer').innerHTML = getColorPickerHTML('link_color_pick','link_color');
|
200 |
+
document.getElementById('visited_color_pickcontainer').innerHTML = getColorPickerHTML('visited_color_pick','visited_color');
|
201 |
+
document.getElementById('active_color_pickcontainer').innerHTML = getColorPickerHTML('active_color_pick','active_color');
|
202 |
+
document.getElementById('textcolor_pickcontainer').innerHTML = getColorPickerHTML('textcolor_pick','textcolor');
|
203 |
+
document.getElementById('stylesheet_browsercontainer').innerHTML = getBrowserHTML('stylesheetbrowser','stylesheet','file','fullpage');
|
204 |
+
document.getElementById('bgimage_pickcontainer').innerHTML = getBrowserHTML('bgimage_browser','bgimage','image','fullpage');
|
205 |
+
|
206 |
+
// Resize some elements
|
207 |
+
if (isVisible('stylesheetbrowser'))
|
208 |
+
document.getElementById('stylesheet').style.width = '220px';
|
209 |
+
|
210 |
+
if (isVisible('link_href_browser'))
|
211 |
+
document.getElementById('element_link_href').style.width = '230px';
|
212 |
+
|
213 |
+
if (isVisible('bgimage_browser'))
|
214 |
+
document.getElementById('bgimage').style.width = '210px';
|
215 |
+
|
216 |
+
// Update form
|
217 |
+
tinymce.each(tinyMCEPopup.getWindowArg('data'), function(value, key) {
|
218 |
+
setVal(key, value);
|
219 |
+
});
|
220 |
+
|
221 |
+
FullPageDialog.changedStyle();
|
222 |
+
|
223 |
+
// Update colors
|
224 |
+
updateColor('textcolor_pick', 'textcolor');
|
225 |
+
updateColor('bgcolor_pick', 'bgcolor');
|
226 |
+
updateColor('visited_color_pick', 'visited_color');
|
227 |
+
updateColor('active_color_pick', 'active_color');
|
228 |
+
updateColor('link_color_pick', 'link_color');
|
229 |
+
};
|
230 |
+
|
231 |
+
tinyMCEPopup.onInit.add(init);
|
232 |
+
})();
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/fullpage/langs/en_dlg.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
tinyMCE.addI18n('en.fullpage_dlg',{title:"Document Properties","meta_tab":"General","appearance_tab":"Appearance","advanced_tab":"Advanced","meta_props":"Meta Information",langprops:"Language and Encoding","meta_title":"Title","meta_keywords":"Keywords","meta_description":"Description","meta_robots":"Robots",doctypes:"Doctype",langcode:"Language Code",langdir:"Language Direction",ltr:"Left to Right",rtl:"Right to Left","xml_pi":"XML Declaration",encoding:"Character Encoding","appearance_bgprops":"Background Properties","appearance_marginprops":"Body Margins","appearance_linkprops":"Link Colors","appearance_textprops":"Text Properties",bgcolor:"Background Color",bgimage:"Background Image","left_margin":"Left Margin","right_margin":"Right Margin","top_margin":"Top Margin","bottom_margin":"Bottom Margin","text_color":"Text Color","font_size":"Font Size","font_face":"Font Face","link_color":"Link Color","hover_color":"Hover Color","visited_color":"Visited Color","active_color":"Active Color",textcolor:"Color",fontsize:"Font Size",fontface:"Font Family","meta_index_follow":"Index and Follow the Links","meta_index_nofollow":"Index and Don\'t Follow the Links","meta_noindex_follow":"Do Not Index but Follow the Links","meta_noindex_nofollow":"Do Not Index and Don\'t Follow the Links","appearance_style":"Stylesheet and Style Properties",stylesheet:"Stylesheet",style:"Style",author:"Author",copyright:"Copyright",add:"Add New Element",remove:"Remove Selected Element",moveup:"Move Selected Element Up",movedown:"Move Selected Element Down","head_elements":"Head Elements",info:"Information","add_title":"Title Element","add_meta":"Meta Element","add_script":"Script Element","add_style":"Style Element","add_link":"Link Element","add_base":"Base Element","add_comment":"Comment Node","title_element":"Title Element","script_element":"Script Element","style_element":"Style Element","base_element":"Base Element","link_element":"Link Element","meta_element":"Meta Element","comment_element":"Comment",src:"Source",language:"Language",href:"HREF",target:"Target",type:"Type",charset:"Charset",defer:"Defer",media:"Media",properties:"Properties",name:"Name",value:"Value",content:"Content",rel:"Rel",rev:"Rev",hreflang:"HREF Lang","general_props":"General","advanced_props":"Advanced"});
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/fullscreen/editor_plugin.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(function(){var a=tinymce.DOM;tinymce.create("tinymce.plugins.FullScreenPlugin",{init:function(d,e){var f=this,g={},c,b;f.editor=d;d.addCommand("mceFullScreen",function(){var i,j=a.doc.documentElement;if(d.getParam("fullscreen_is_enabled")){if(d.getParam("fullscreen_new_window")){closeFullscreen()}else{a.win.setTimeout(function(){tinymce.dom.Event.remove(a.win,"resize",f.resizeFunc);tinyMCE.get(d.getParam("fullscreen_editor_id")).setContent(d.getContent());tinyMCE.remove(d);a.remove("mce_fullscreen_container");j.style.overflow=d.getParam("fullscreen_html_overflow");a.setStyle(a.doc.body,"overflow",d.getParam("fullscreen_overflow"));a.win.scrollTo(d.getParam("fullscreen_scrollx"),d.getParam("fullscreen_scrolly"));tinyMCE.settings=tinyMCE.oldSettings},10)}return}if(d.getParam("fullscreen_new_window")){i=a.win.open(e+"/fullscreen.htm","mceFullScreenPopup","fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width="+screen.availWidth+",height="+screen.availHeight);try{i.resizeTo(screen.availWidth,screen.availHeight)}catch(h){}}else{tinyMCE.oldSettings=tinyMCE.settings;g.fullscreen_overflow=a.getStyle(a.doc.body,"overflow",1)||"auto";g.fullscreen_html_overflow=a.getStyle(j,"overflow",1);c=a.getViewPort();g.fullscreen_scrollx=c.x;g.fullscreen_scrolly=c.y;if(tinymce.isOpera&&g.fullscreen_overflow=="visible"){g.fullscreen_overflow="auto"}if(tinymce.isIE&&g.fullscreen_overflow=="scroll"){g.fullscreen_overflow="auto"}if(tinymce.isIE&&(g.fullscreen_html_overflow=="visible"||g.fullscreen_html_overflow=="scroll")){g.fullscreen_html_overflow="auto"}if(g.fullscreen_overflow=="0px"){g.fullscreen_overflow=""}a.setStyle(a.doc.body,"overflow","hidden");j.style.overflow="hidden";c=a.getViewPort();a.win.scrollTo(0,0);if(tinymce.isIE){c.h-=1}if(tinymce.isIE6){b="absolute;top:"+c.y}else{b="fixed;top:0"}n=a.add(a.doc.body,"div",{id:"mce_fullscreen_container",style:"position:"+b+";left:0;width:"+c.w+"px;height:"+c.h+"px;z-index:200000;"});a.add(n,"div",{id:"mce_fullscreen"});tinymce.each(d.settings,function(k,l){g[l]=k});g.id="mce_fullscreen";g.width=n.clientWidth;g.height=n.clientHeight-15;g.fullscreen_is_enabled=true;g.fullscreen_editor_id=d.id;g.theme_advanced_resizing=false;g.save_onsavecallback=function(){d.setContent(tinyMCE.get(g.id).getContent());d.execCommand("mceSave")};tinymce.each(d.getParam("fullscreen_settings"),function(m,l){g[l]=m});if(g.theme_advanced_toolbar_location==="external"){g.theme_advanced_toolbar_location="top"}f.fullscreenEditor=new tinymce.Editor("mce_fullscreen",g);f.fullscreenEditor.onInit.add(function(){f.fullscreenEditor.setContent(d.getContent());f.fullscreenEditor.focus()});f.fullscreenEditor.render();f.fullscreenElement=new tinymce.dom.Element("mce_fullscreen_container");f.fullscreenElement.update();f.resizeFunc=tinymce.dom.Event.add(a.win,"resize",function(){var o=tinymce.DOM.getViewPort(),l=f.fullscreenEditor,k,m;k=l.dom.getSize(l.getContainer().firstChild);m=l.dom.getSize(l.getContainer().getElementsByTagName("iframe")[0]);l.theme.resizeTo(o.w-k.w+m.w,o.h-k.h+m.h)})}});d.addButton("fullscreen",{title:"fullscreen.desc",cmd:"mceFullScreen"});d.onNodeChange.add(function(i,h){h.setActive("fullscreen",i.getParam("fullscreen_is_enabled"))})},getInfo:function(){return{longname:"Fullscreen",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullscreen",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("fullscreen",tinymce.plugins.FullScreenPlugin)})();
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/fullscreen/editor_plugin_src.js
ADDED
@@ -0,0 +1,159 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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;
|
13 |
+
|
14 |
+
tinymce.create('tinymce.plugins.FullScreenPlugin', {
|
15 |
+
init : function(ed, url) {
|
16 |
+
var t = this, s = {}, vp, posCss;
|
17 |
+
|
18 |
+
t.editor = ed;
|
19 |
+
|
20 |
+
// Register commands
|
21 |
+
ed.addCommand('mceFullScreen', function() {
|
22 |
+
var win, de = DOM.doc.documentElement;
|
23 |
+
|
24 |
+
if (ed.getParam('fullscreen_is_enabled')) {
|
25 |
+
if (ed.getParam('fullscreen_new_window'))
|
26 |
+
closeFullscreen(); // Call to close in new window
|
27 |
+
else {
|
28 |
+
DOM.win.setTimeout(function() {
|
29 |
+
tinymce.dom.Event.remove(DOM.win, 'resize', t.resizeFunc);
|
30 |
+
tinyMCE.get(ed.getParam('fullscreen_editor_id')).setContent(ed.getContent());
|
31 |
+
tinyMCE.remove(ed);
|
32 |
+
DOM.remove('mce_fullscreen_container');
|
33 |
+
de.style.overflow = ed.getParam('fullscreen_html_overflow');
|
34 |
+
DOM.setStyle(DOM.doc.body, 'overflow', ed.getParam('fullscreen_overflow'));
|
35 |
+
DOM.win.scrollTo(ed.getParam('fullscreen_scrollx'), ed.getParam('fullscreen_scrolly'));
|
36 |
+
tinyMCE.settings = tinyMCE.oldSettings; // Restore old settings
|
37 |
+
}, 10);
|
38 |
+
}
|
39 |
+
|
40 |
+
return;
|
41 |
+
}
|
42 |
+
|
43 |
+
if (ed.getParam('fullscreen_new_window')) {
|
44 |
+
win = DOM.win.open(url + "/fullscreen.htm", "mceFullScreenPopup", "fullscreen=yes,menubar=no,toolbar=no,scrollbars=no,resizable=yes,left=0,top=0,width=" + screen.availWidth + ",height=" + screen.availHeight);
|
45 |
+
try {
|
46 |
+
win.resizeTo(screen.availWidth, screen.availHeight);
|
47 |
+
} catch (e) {
|
48 |
+
// Ignore
|
49 |
+
}
|
50 |
+
} else {
|
51 |
+
tinyMCE.oldSettings = tinyMCE.settings; // Store old settings
|
52 |
+
s.fullscreen_overflow = DOM.getStyle(DOM.doc.body, 'overflow', 1) || 'auto';
|
53 |
+
s.fullscreen_html_overflow = DOM.getStyle(de, 'overflow', 1);
|
54 |
+
vp = DOM.getViewPort();
|
55 |
+
s.fullscreen_scrollx = vp.x;
|
56 |
+
s.fullscreen_scrolly = vp.y;
|
57 |
+
|
58 |
+
// Fixes an Opera bug where the scrollbars doesn't reappear
|
59 |
+
if (tinymce.isOpera && s.fullscreen_overflow == 'visible')
|
60 |
+
s.fullscreen_overflow = 'auto';
|
61 |
+
|
62 |
+
// Fixes an IE bug where horizontal scrollbars would appear
|
63 |
+
if (tinymce.isIE && s.fullscreen_overflow == 'scroll')
|
64 |
+
s.fullscreen_overflow = 'auto';
|
65 |
+
|
66 |
+
// Fixes an IE bug where the scrollbars doesn't reappear
|
67 |
+
if (tinymce.isIE && (s.fullscreen_html_overflow == 'visible' || s.fullscreen_html_overflow == 'scroll'))
|
68 |
+
s.fullscreen_html_overflow = 'auto';
|
69 |
+
|
70 |
+
if (s.fullscreen_overflow == '0px')
|
71 |
+
s.fullscreen_overflow = '';
|
72 |
+
|
73 |
+
DOM.setStyle(DOM.doc.body, 'overflow', 'hidden');
|
74 |
+
de.style.overflow = 'hidden'; //Fix for IE6/7
|
75 |
+
vp = DOM.getViewPort();
|
76 |
+
DOM.win.scrollTo(0, 0);
|
77 |
+
|
78 |
+
if (tinymce.isIE)
|
79 |
+
vp.h -= 1;
|
80 |
+
|
81 |
+
// Use fixed position if it exists
|
82 |
+
if (tinymce.isIE6)
|
83 |
+
posCss = 'absolute;top:' + vp.y;
|
84 |
+
else
|
85 |
+
posCss = 'fixed;top:0';
|
86 |
+
|
87 |
+
n = DOM.add(DOM.doc.body, 'div', {
|
88 |
+
id : 'mce_fullscreen_container',
|
89 |
+
style : 'position:' + posCss + ';left:0;width:' + vp.w + 'px;height:' + vp.h + 'px;z-index:200000;'});
|
90 |
+
DOM.add(n, 'div', {id : 'mce_fullscreen'});
|
91 |
+
|
92 |
+
tinymce.each(ed.settings, function(v, n) {
|
93 |
+
s[n] = v;
|
94 |
+
});
|
95 |
+
|
96 |
+
s.id = 'mce_fullscreen';
|
97 |
+
s.width = n.clientWidth;
|
98 |
+
s.height = n.clientHeight - 15;
|
99 |
+
s.fullscreen_is_enabled = true;
|
100 |
+
s.fullscreen_editor_id = ed.id;
|
101 |
+
s.theme_advanced_resizing = false;
|
102 |
+
s.save_onsavecallback = function() {
|
103 |
+
ed.setContent(tinyMCE.get(s.id).getContent());
|
104 |
+
ed.execCommand('mceSave');
|
105 |
+
};
|
106 |
+
|
107 |
+
tinymce.each(ed.getParam('fullscreen_settings'), function(v, k) {
|
108 |
+
s[k] = v;
|
109 |
+
});
|
110 |
+
|
111 |
+
if (s.theme_advanced_toolbar_location === 'external')
|
112 |
+
s.theme_advanced_toolbar_location = 'top';
|
113 |
+
|
114 |
+
t.fullscreenEditor = new tinymce.Editor('mce_fullscreen', s);
|
115 |
+
t.fullscreenEditor.onInit.add(function() {
|
116 |
+
t.fullscreenEditor.setContent(ed.getContent());
|
117 |
+
t.fullscreenEditor.focus();
|
118 |
+
});
|
119 |
+
|
120 |
+
t.fullscreenEditor.render();
|
121 |
+
|
122 |
+
t.fullscreenElement = new tinymce.dom.Element('mce_fullscreen_container');
|
123 |
+
t.fullscreenElement.update();
|
124 |
+
//document.body.overflow = 'hidden';
|
125 |
+
|
126 |
+
t.resizeFunc = tinymce.dom.Event.add(DOM.win, 'resize', function() {
|
127 |
+
var vp = tinymce.DOM.getViewPort(), fed = t.fullscreenEditor, outerSize, innerSize;
|
128 |
+
|
129 |
+
// Get outer/inner size to get a delta size that can be used to calc the new iframe size
|
130 |
+
outerSize = fed.dom.getSize(fed.getContainer().firstChild);
|
131 |
+
innerSize = fed.dom.getSize(fed.getContainer().getElementsByTagName('iframe')[0]);
|
132 |
+
|
133 |
+
fed.theme.resizeTo(vp.w - outerSize.w + innerSize.w, vp.h - outerSize.h + innerSize.h);
|
134 |
+
});
|
135 |
+
}
|
136 |
+
});
|
137 |
+
|
138 |
+
// Register buttons
|
139 |
+
ed.addButton('fullscreen', {title : 'fullscreen.desc', cmd : 'mceFullScreen'});
|
140 |
+
|
141 |
+
ed.onNodeChange.add(function(ed, cm) {
|
142 |
+
cm.setActive('fullscreen', ed.getParam('fullscreen_is_enabled'));
|
143 |
+
});
|
144 |
+
},
|
145 |
+
|
146 |
+
getInfo : function() {
|
147 |
+
return {
|
148 |
+
longname : 'Fullscreen',
|
149 |
+
author : 'Moxiecode Systems AB',
|
150 |
+
authorurl : 'http://tinymce.moxiecode.com',
|
151 |
+
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/fullscreen',
|
152 |
+
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
153 |
+
};
|
154 |
+
}
|
155 |
+
});
|
156 |
+
|
157 |
+
// Register plugin
|
158 |
+
tinymce.PluginManager.add('fullscreen', tinymce.plugins.FullScreenPlugin);
|
159 |
+
})();
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/fullscreen/fullscreen.htm
ADDED
@@ -0,0 +1,110 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
+
<head>
|
4 |
+
<title></title>
|
5 |
+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
6 |
+
<script type="text/javascript" src="../../tiny_mce.js"></script>
|
7 |
+
<script type="text/javascript">
|
8 |
+
function patchCallback(settings, key) {
|
9 |
+
if (settings[key])
|
10 |
+
settings[key] = "window.opener." + settings[key];
|
11 |
+
}
|
12 |
+
|
13 |
+
var settings = {}, paSe = window.opener.tinyMCE.activeEditor.settings, oeID = window.opener.tinyMCE.activeEditor.id;
|
14 |
+
|
15 |
+
// Clone array
|
16 |
+
for (var n in paSe)
|
17 |
+
settings[n] = paSe[n];
|
18 |
+
|
19 |
+
// Override options for fullscreen
|
20 |
+
for (var n in paSe.fullscreen_settings)
|
21 |
+
settings[n] = paSe.fullscreen_settings[n];
|
22 |
+
|
23 |
+
// Patch callbacks, make them point to window.opener
|
24 |
+
patchCallback(settings, 'urlconverter_callback');
|
25 |
+
patchCallback(settings, 'insertlink_callback');
|
26 |
+
patchCallback(settings, 'insertimage_callback');
|
27 |
+
patchCallback(settings, 'setupcontent_callback');
|
28 |
+
patchCallback(settings, 'save_callback');
|
29 |
+
patchCallback(settings, 'onchange_callback');
|
30 |
+
patchCallback(settings, 'init_instance_callback');
|
31 |
+
patchCallback(settings, 'file_browser_callback');
|
32 |
+
patchCallback(settings, 'cleanup_callback');
|
33 |
+
patchCallback(settings, 'execcommand_callback');
|
34 |
+
patchCallback(settings, 'oninit');
|
35 |
+
|
36 |
+
// Set options
|
37 |
+
delete settings.id;
|
38 |
+
settings['mode'] = 'exact';
|
39 |
+
settings['elements'] = 'fullscreenarea';
|
40 |
+
settings['add_unload_trigger'] = false;
|
41 |
+
settings['ask'] = false;
|
42 |
+
settings['document_base_url'] = window.opener.tinyMCE.activeEditor.documentBaseURI.getURI();
|
43 |
+
settings['fullscreen_is_enabled'] = true;
|
44 |
+
settings['fullscreen_editor_id'] = oeID;
|
45 |
+
settings['theme_advanced_resizing'] = false;
|
46 |
+
settings['strict_loading_mode'] = true;
|
47 |
+
|
48 |
+
settings.save_onsavecallback = function() {
|
49 |
+
window.opener.tinyMCE.get(oeID).setContent(tinyMCE.get('fullscreenarea').getContent({format : 'raw'}), {format : 'raw'});
|
50 |
+
window.opener.tinyMCE.get(oeID).execCommand('mceSave');
|
51 |
+
window.close();
|
52 |
+
};
|
53 |
+
|
54 |
+
function unloadHandler(e) {
|
55 |
+
moveContent();
|
56 |
+
}
|
57 |
+
|
58 |
+
function moveContent() {
|
59 |
+
window.opener.tinyMCE.get(oeID).setContent(tinyMCE.activeEditor.getContent());
|
60 |
+
}
|
61 |
+
|
62 |
+
function closeFullscreen() {
|
63 |
+
moveContent();
|
64 |
+
window.close();
|
65 |
+
}
|
66 |
+
|
67 |
+
function doParentSubmit() {
|
68 |
+
moveContent();
|
69 |
+
|
70 |
+
if (window.opener.tinyMCE.selectedInstance.formElement.form)
|
71 |
+
window.opener.tinyMCE.selectedInstance.formElement.form.submit();
|
72 |
+
|
73 |
+
window.close();
|
74 |
+
|
75 |
+
return false;
|
76 |
+
}
|
77 |
+
|
78 |
+
function render() {
|
79 |
+
var e = document.getElementById('fullscreenarea'), vp, ed, ow, oh, dom = tinymce.DOM;
|
80 |
+
|
81 |
+
e.value = window.opener.tinyMCE.get(oeID).getContent();
|
82 |
+
|
83 |
+
vp = dom.getViewPort();
|
84 |
+
settings.width = vp.w;
|
85 |
+
settings.height = vp.h - 15;
|
86 |
+
|
87 |
+
tinymce.dom.Event.add(window, 'resize', function() {
|
88 |
+
var vp = dom.getViewPort();
|
89 |
+
|
90 |
+
tinyMCE.activeEditor.theme.resizeTo(vp.w, vp.h);
|
91 |
+
});
|
92 |
+
|
93 |
+
tinyMCE.init(settings);
|
94 |
+
}
|
95 |
+
|
96 |
+
// Add onunload
|
97 |
+
tinymce.dom.Event.add(window, "beforeunload", unloadHandler);
|
98 |
+
</script>
|
99 |
+
</head>
|
100 |
+
<body style="margin:0;overflow:hidden;width:100%;height:100%" scrolling="no" scroll="no">
|
101 |
+
<form onsubmit="doParentSubmit();">
|
102 |
+
<textarea id="fullscreenarea" style="width:100%; height:100%"></textarea>
|
103 |
+
</form>
|
104 |
+
|
105 |
+
<script type="text/javascript">
|
106 |
+
render();
|
107 |
+
</script>
|
108 |
+
|
109 |
+
</body>
|
110 |
+
</html>
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/iespell/editor_plugin.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(function(){tinymce.create("tinymce.plugins.IESpell",{init:function(a,b){var c=this,d;if(!tinymce.isIE){return}c.editor=a;a.addCommand("mceIESpell",function(){try{d=new ActiveXObject("ieSpell.ieSpellExtension");d.CheckDocumentNode(a.getDoc().documentElement)}catch(f){if(f.number==-2146827859){a.windowManager.confirm(a.getLang("iespell.download"),function(e){if(e){window.open("http://www.iespell.com/download.php","ieSpellDownload","")}})}else{a.windowManager.alert("Error Loading ieSpell: Exception "+f.number)}}});a.addButton("iespell",{title:"iespell.iespell_desc",cmd:"mceIESpell"})},getInfo:function(){return{longname:"IESpell (IE Only)",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/iespell",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("iespell",tinymce.plugins.IESpell)})();
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/iespell/editor_plugin_src.js
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
tinymce.create('tinymce.plugins.IESpell', {
|
13 |
+
init : function(ed, url) {
|
14 |
+
var t = this, sp;
|
15 |
+
|
16 |
+
if (!tinymce.isIE)
|
17 |
+
return;
|
18 |
+
|
19 |
+
t.editor = ed;
|
20 |
+
|
21 |
+
// Register commands
|
22 |
+
ed.addCommand('mceIESpell', function() {
|
23 |
+
try {
|
24 |
+
sp = new ActiveXObject("ieSpell.ieSpellExtension");
|
25 |
+
sp.CheckDocumentNode(ed.getDoc().documentElement);
|
26 |
+
} catch (e) {
|
27 |
+
if (e.number == -2146827859) {
|
28 |
+
ed.windowManager.confirm(ed.getLang("iespell.download"), function(s) {
|
29 |
+
if (s)
|
30 |
+
window.open('http://www.iespell.com/download.php', 'ieSpellDownload', '');
|
31 |
+
});
|
32 |
+
} else
|
33 |
+
ed.windowManager.alert("Error Loading ieSpell: Exception " + e.number);
|
34 |
+
}
|
35 |
+
});
|
36 |
+
|
37 |
+
// Register buttons
|
38 |
+
ed.addButton('iespell', {title : 'iespell.iespell_desc', cmd : 'mceIESpell'});
|
39 |
+
},
|
40 |
+
|
41 |
+
getInfo : function() {
|
42 |
+
return {
|
43 |
+
longname : 'IESpell (IE Only)',
|
44 |
+
author : 'Moxiecode Systems AB',
|
45 |
+
authorurl : 'http://tinymce.moxiecode.com',
|
46 |
+
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/iespell',
|
47 |
+
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
48 |
+
};
|
49 |
+
}
|
50 |
+
});
|
51 |
+
|
52 |
+
// Register plugin
|
53 |
+
tinymce.PluginManager.add('iespell', tinymce.plugins.IESpell);
|
54 |
+
})();
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/inlinepopups/editor_plugin.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(function(){var d=tinymce.DOM,b=tinymce.dom.Element,a=tinymce.dom.Event,e=tinymce.each,c=tinymce.is;tinymce.create("tinymce.plugins.InlinePopups",{init:function(f,g){f.onBeforeRenderUI.add(function(){f.windowManager=new tinymce.InlineWindowManager(f);d.loadCSS(g+"/skins/"+(f.settings.inlinepopups_skin||"clearlooks2")+"/window.css")})},getInfo:function(){return{longname:"InlinePopups",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/inlinepopups",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.create("tinymce.InlineWindowManager:tinymce.WindowManager",{InlineWindowManager:function(f){var g=this;g.parent(f);g.zIndex=300000;g.count=0;g.windows={}},open:function(s,j){var z=this,i,k="",r=z.editor,g=0,v=0,h,m,o,q,l,x,y,n;s=s||{};j=j||{};if(!s.inline){return z.parent(s,j)}n=z._frontWindow();if(n&&d.get(n.id+"_ifr")){n.focussedElement=d.get(n.id+"_ifr").contentWindow.document.activeElement}if(!s.type){z.bookmark=r.selection.getBookmark(1)}i=d.uniqueId();h=d.getViewPort();s.width=parseInt(s.width||320);s.height=parseInt(s.height||240)+(tinymce.isIE?8:0);s.min_width=parseInt(s.min_width||150);s.min_height=parseInt(s.min_height||100);s.max_width=parseInt(s.max_width||2000);s.max_height=parseInt(s.max_height||2000);s.left=s.left||Math.round(Math.max(h.x,h.x+(h.w/2)-(s.width/2)));s.top=s.top||Math.round(Math.max(h.y,h.y+(h.h/2)-(s.height/2)));s.movable=s.resizable=true;j.mce_width=s.width;j.mce_height=s.height;j.mce_inline=true;j.mce_window_id=i;j.mce_auto_focus=s.auto_focus;z.features=s;z.params=j;z.onOpen.dispatch(z,s,j);if(s.type){k+=" mceModal";if(s.type){k+=" mce"+s.type.substring(0,1).toUpperCase()+s.type.substring(1)}s.resizable=false}if(s.statusbar){k+=" mceStatusbar"}if(s.resizable){k+=" mceResizable"}if(s.minimizable){k+=" mceMinimizable"}if(s.maximizable){k+=" mceMaximizable"}if(s.movable){k+=" mceMovable"}z._addAll(d.doc.body,["div",{id:i,role:"dialog","aria-labelledby":s.type?i+"_content":i+"_title","class":(r.settings.inlinepopups_skin||"clearlooks2")+(tinymce.isIE&&window.getSelection?" ie9":""),style:"width:100px;height:100px"},["div",{id:i+"_wrapper","class":"mceWrapper"+k},["div",{id:i+"_top","class":"mceTop"},["div",{"class":"mceLeft"}],["div",{"class":"mceCenter"}],["div",{"class":"mceRight"}],["span",{id:i+"_title"},s.title||""]],["div",{id:i+"_middle","class":"mceMiddle"},["div",{id:i+"_left","class":"mceLeft",tabindex:"0"}],["span",{id:i+"_content"}],["div",{id:i+"_right","class":"mceRight",tabindex:"0"}]],["div",{id:i+"_bottom","class":"mceBottom"},["div",{"class":"mceLeft"}],["div",{"class":"mceCenter"}],["div",{"class":"mceRight"}],["span",{id:i+"_status"},"Content"]],["a",{"class":"mceMove",tabindex:"-1",href:"javascript:;"}],["a",{"class":"mceMin",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceMax",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceMed",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{"class":"mceClose",tabindex:"-1",href:"javascript:;",onmousedown:"return false;"}],["a",{id:i+"_resize_n","class":"mceResize mceResizeN",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_s","class":"mceResize mceResizeS",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_w","class":"mceResize mceResizeW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_e","class":"mceResize mceResizeE",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_nw","class":"mceResize mceResizeNW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_ne","class":"mceResize mceResizeNE",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_sw","class":"mceResize mceResizeSW",tabindex:"-1",href:"javascript:;"}],["a",{id:i+"_resize_se","class":"mceResize mceResizeSE",tabindex:"-1",href:"javascript:;"}]]]);d.setStyles(i,{top:-10000,left:-10000});if(tinymce.isGecko){d.setStyle(i,"overflow","auto")}if(!s.type){g+=d.get(i+"_left").clientWidth;g+=d.get(i+"_right").clientWidth;v+=d.get(i+"_top").clientHeight;v+=d.get(i+"_bottom").clientHeight}d.setStyles(i,{top:s.top,left:s.left,width:s.width+g,height:s.height+v});y=s.url||s.file;if(y){if(tinymce.relaxedDomain){y+=(y.indexOf("?")==-1?"?":"&")+"mce_rdomain="+tinymce.relaxedDomain}y=tinymce._addVer(y)}if(!s.type){d.add(i+"_content","iframe",{id:i+"_ifr",src:'javascript:""',frameBorder:0,style:"border:0;width:10px;height:10px"});d.setStyles(i+"_ifr",{width:s.width,height:s.height});d.setAttrib(i+"_ifr","src",y)}else{d.add(i+"_wrapper","a",{id:i+"_ok","class":"mceButton mceOk",href:"javascript:;",onmousedown:"return false;"},"Ok");if(s.type=="confirm"){d.add(i+"_wrapper","a",{"class":"mceButton mceCancel",href:"javascript:;",onmousedown:"return false;"},"Cancel")}d.add(i+"_middle","div",{"class":"mceIcon"});d.setHTML(i+"_content",s.content.replace("\n","<br />"));a.add(i,"keyup",function(f){var p=27;if(f.keyCode===p){s.button_func(false);return a.cancel(f)}});a.add(i,"keydown",function(f){var t,p=9;if(f.keyCode===p){t=d.select("a.mceCancel",i+"_wrapper")[0];if(t&&t!==f.target){t.focus()}else{d.get(i+"_ok").focus()}return a.cancel(f)}})}o=a.add(i,"mousedown",function(t){var u=t.target,f,p;f=z.windows[i];z.focus(i);if(u.nodeName=="A"||u.nodeName=="a"){if(u.className=="mceClose"){z.close(null,i);return a.cancel(t)}else{if(u.className=="mceMax"){f.oldPos=f.element.getXY();f.oldSize=f.element.getSize();p=d.getViewPort();p.w-=2;p.h-=2;f.element.moveTo(p.x,p.y);f.element.resizeTo(p.w,p.h);d.setStyles(i+"_ifr",{width:p.w-f.deltaWidth,height:p.h-f.deltaHeight});d.addClass(i+"_wrapper","mceMaximized")}else{if(u.className=="mceMed"){f.element.moveTo(f.oldPos.x,f.oldPos.y);f.element.resizeTo(f.oldSize.w,f.oldSize.h);f.iframeElement.resizeTo(f.oldSize.w-f.deltaWidth,f.oldSize.h-f.deltaHeight);d.removeClass(i+"_wrapper","mceMaximized")}else{if(u.className=="mceMove"){return z._startDrag(i,t,u.className)}else{if(d.hasClass(u,"mceResize")){return z._startDrag(i,t,u.className.substring(13))}}}}}}});q=a.add(i,"click",function(f){var p=f.target;z.focus(i);if(p.nodeName=="A"||p.nodeName=="a"){switch(p.className){case"mceClose":z.close(null,i);return a.cancel(f);case"mceButton mceOk":case"mceButton mceCancel":s.button_func(p.className=="mceButton mceOk");return a.cancel(f)}}});a.add([i+"_left",i+"_right"],"focus",function(p){var t=d.get(i+"_ifr");if(t){var f=t.contentWindow.document.body;var u=d.select(":input:enabled,*[tabindex=0]",f);if(p.target.id===(i+"_left")){u[u.length-1].focus()}else{u[0].focus()}}else{d.get(i+"_ok").focus()}});x=z.windows[i]={id:i,mousedown_func:o,click_func:q,element:new b(i,{blocker:1,container:r.getContainer()}),iframeElement:new b(i+"_ifr"),features:s,deltaWidth:g,deltaHeight:v};x.iframeElement.on("focus",function(){z.focus(i)});if(z.count==0&&z.editor.getParam("dialog_type","modal")=="modal"){d.add(d.doc.body,"div",{id:"mceModalBlocker","class":(z.editor.settings.inlinepopups_skin||"clearlooks2")+"_modalBlocker",style:{zIndex:z.zIndex-1}});d.show("mceModalBlocker");d.setAttrib(d.doc.body,"aria-hidden","true")}else{d.setStyle("mceModalBlocker","z-index",z.zIndex-1)}if(tinymce.isIE6||/Firefox\/2\./.test(navigator.userAgent)||(tinymce.isIE&&!d.boxModel)){d.setStyles("mceModalBlocker",{position:"absolute",left:h.x,top:h.y,width:h.w-2,height:h.h-2})}d.setAttrib(i,"aria-hidden","false");z.focus(i);z._fixIELayout(i,1);if(d.get(i+"_ok")){d.get(i+"_ok").focus()}z.count++;return x},focus:function(h){var g=this,f;if(f=g.windows[h]){f.zIndex=this.zIndex++;f.element.setStyle("zIndex",f.zIndex);f.element.update();h=h+"_wrapper";d.removeClass(g.lastId,"mceFocus");d.addClass(h,"mceFocus");g.lastId=h;if(f.focussedElement){f.focussedElement.focus()}else{if(d.get(h+"_ok")){d.get(f.id+"_ok").focus()}else{if(d.get(f.id+"_ifr")){d.get(f.id+"_ifr").focus()}}}}},_addAll:function(k,h){var g,l,f=this,j=tinymce.DOM;if(c(h,"string")){k.appendChild(j.doc.createTextNode(h))}else{if(h.length){k=k.appendChild(j.create(h[0],h[1]));for(g=2;g<h.length;g++){f._addAll(k,h[g])}}}},_startDrag:function(v,G,E){var o=this,u,z,C=d.doc,f,l=o.windows[v],h=l.element,y=h.getXY(),x,q,F,g,A,s,r,j,i,m,k,n,B;g={x:0,y:0};A=d.getViewPort();A.w-=2;A.h-=2;j=G.screenX;i=G.screenY;m=k=n=B=0;u=a.add(C,"mouseup",function(p){a.remove(C,"mouseup",u);a.remove(C,"mousemove",z);if(f){f.remove()}h.moveBy(m,k);h.resizeBy(n,B);q=h.getSize();d.setStyles(v+"_ifr",{width:q.w-l.deltaWidth,height:q.h-l.deltaHeight});o._fixIELayout(v,1);return a.cancel(p)});if(E!="Move"){D()}function D(){if(f){return}o._fixIELayout(v,0);d.add(C.body,"div",{id:"mceEventBlocker","class":"mceEventBlocker "+(o.editor.settings.inlinepopups_skin||"clearlooks2"),style:{zIndex:o.zIndex+1}});if(tinymce.isIE6||(tinymce.isIE&&!d.boxModel)){d.setStyles("mceEventBlocker",{position:"absolute",left:A.x,top:A.y,width:A.w-2,height:A.h-2})}f=new b("mceEventBlocker");f.update();x=h.getXY();q=h.getSize();s=g.x+x.x-A.x;r=g.y+x.y-A.y;d.add(f.get(),"div",{id:"mcePlaceHolder","class":"mcePlaceHolder",style:{left:s,top:r,width:q.w,height:q.h}});F=new b("mcePlaceHolder")}z=a.add(C,"mousemove",function(w){var p,H,t;D();p=w.screenX-j;H=w.screenY-i;switch(E){case"ResizeW":m=p;n=0-p;break;case"ResizeE":n=p;break;case"ResizeN":case"ResizeNW":case"ResizeNE":if(E=="ResizeNW"){m=p;n=0-p}else{if(E=="ResizeNE"){n=p}}k=H;B=0-H;break;case"ResizeS":case"ResizeSW":case"ResizeSE":if(E=="ResizeSW"){m=p;n=0-p}else{if(E=="ResizeSE"){n=p}}B=H;break;case"mceMove":m=p;k=H;break}if(n<(t=l.features.min_width-q.w)){if(m!==0){m+=n-t}n=t}if(B<(t=l.features.min_height-q.h)){if(k!==0){k+=B-t}B=t}n=Math.min(n,l.features.max_width-q.w);B=Math.min(B,l.features.max_height-q.h);m=Math.max(m,A.x-(s+A.x));k=Math.max(k,A.y-(r+A.y));m=Math.min(m,(A.w+A.x)-(s+q.w+A.x));k=Math.min(k,(A.h+A.y)-(r+q.h+A.y));if(m+k!==0){if(s+m<0){m=0}if(r+k<0){k=0}F.moveTo(s+m,r+k)}if(n+B!==0){F.resizeTo(q.w+n,q.h+B)}return a.cancel(w)});return a.cancel(G)},resizeBy:function(g,h,i){var f=this.windows[i];if(f){f.element.resizeBy(g,h);f.iframeElement.resizeBy(g,h)}},close:function(i,k){var g=this,f,j=d.doc,h,k;k=g._findId(k||i);if(!g.windows[k]){g.parent(i);return}g.count--;if(g.count==0){d.remove("mceModalBlocker");d.setAttrib(d.doc.body,"aria-hidden","false");g.editor.focus()}if(f=g.windows[k]){g.onClose.dispatch(g);a.remove(j,"mousedown",f.mousedownFunc);a.remove(j,"click",f.clickFunc);a.clear(k);a.clear(k+"_ifr");d.setAttrib(k+"_ifr","src",'javascript:""');f.element.remove();delete g.windows[k];h=g._frontWindow();if(h){g.focus(h.id)}}},_frontWindow:function(){var g,f=0;e(this.windows,function(h){if(h.zIndex>f){g=h;f=h.zIndex}});return g},setTitle:function(f,g){var h;f=this._findId(f);if(h=d.get(f+"_title")){h.innerHTML=d.encode(g)}},alert:function(g,f,j){var i=this,h;h=i.open({title:i,type:"alert",button_func:function(k){if(f){f.call(k||i,k)}i.close(null,h.id)},content:d.encode(i.editor.getLang(g,g)),inline:1,width:400,height:130})},confirm:function(g,f,j){var i=this,h;h=i.open({title:i,type:"confirm",button_func:function(k){if(f){f.call(k||i,k)}i.close(null,h.id)},content:d.encode(i.editor.getLang(g,g)),inline:1,width:400,height:130})},_findId:function(f){var g=this;if(typeof(f)=="string"){return f}e(g.windows,function(h){var i=d.get(h.id+"_ifr");if(i&&f==i.contentWindow){f=h.id;return false}});return f},_fixIELayout:function(i,h){var f,g;if(!tinymce.isIE6){return}e(["n","s","w","e","nw","ne","sw","se"],function(j){var k=d.get(i+"_resize_"+j);d.setStyles(k,{width:h?k.clientWidth:"",height:h?k.clientHeight:"",cursor:d.getStyle(k,"cursor",1)});d.setStyle(i+"_bottom","bottom","-1px");k=0});if(f=this.windows[i]){f.element.hide();f.element.show();e(d.select("div,a",i),function(k,j){if(k.currentStyle.backgroundImage!="none"){g=new Image();g.src=k.currentStyle.backgroundImage.replace(/url\(\"(.+)\"\)/,"$1")}});d.get(i).style.filter=""}}});tinymce.PluginManager.add("inlinepopups",tinymce.plugins.InlinePopups)})();
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/inlinepopups/editor_plugin_src.js
ADDED
@@ -0,0 +1,699 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 == 'mceClose') {
|
223 |
+
t.close(null, id);
|
224 |
+
return Event.cancel(e);
|
225 |
+
} else if (n.className == 'mceMax') {
|
226 |
+
w.oldPos = w.element.getXY();
|
227 |
+
w.oldSize = w.element.getSize();
|
228 |
+
|
229 |
+
vp = DOM.getViewPort();
|
230 |
+
|
231 |
+
// Reduce viewport size to avoid scrollbars
|
232 |
+
vp.w -= 2;
|
233 |
+
vp.h -= 2;
|
234 |
+
|
235 |
+
w.element.moveTo(vp.x, vp.y);
|
236 |
+
w.element.resizeTo(vp.w, vp.h);
|
237 |
+
DOM.setStyles(id + '_ifr', {width : vp.w - w.deltaWidth, height : vp.h - w.deltaHeight});
|
238 |
+
DOM.addClass(id + '_wrapper', 'mceMaximized');
|
239 |
+
} else if (n.className == 'mceMed') {
|
240 |
+
// Reset to old size
|
241 |
+
w.element.moveTo(w.oldPos.x, w.oldPos.y);
|
242 |
+
w.element.resizeTo(w.oldSize.w, w.oldSize.h);
|
243 |
+
w.iframeElement.resizeTo(w.oldSize.w - w.deltaWidth, w.oldSize.h - w.deltaHeight);
|
244 |
+
|
245 |
+
DOM.removeClass(id + '_wrapper', 'mceMaximized');
|
246 |
+
} else if (n.className == 'mceMove')
|
247 |
+
return t._startDrag(id, e, n.className);
|
248 |
+
else if (DOM.hasClass(n, 'mceResize'))
|
249 |
+
return t._startDrag(id, e, n.className.substring(13));
|
250 |
+
}
|
251 |
+
});
|
252 |
+
|
253 |
+
clf = Event.add(id, 'click', function(e) {
|
254 |
+
var n = e.target;
|
255 |
+
|
256 |
+
t.focus(id);
|
257 |
+
|
258 |
+
if (n.nodeName == 'A' || n.nodeName == 'a') {
|
259 |
+
switch (n.className) {
|
260 |
+
case 'mceClose':
|
261 |
+
t.close(null, id);
|
262 |
+
return Event.cancel(e);
|
263 |
+
|
264 |
+
case 'mceButton mceOk':
|
265 |
+
case 'mceButton mceCancel':
|
266 |
+
f.button_func(n.className == 'mceButton mceOk');
|
267 |
+
return Event.cancel(e);
|
268 |
+
}
|
269 |
+
}
|
270 |
+
});
|
271 |
+
|
272 |
+
// Make sure the tab order loops within the dialog.
|
273 |
+
Event.add([id + '_left', id + '_right'], 'focus', function(evt) {
|
274 |
+
var iframe = DOM.get(id + '_ifr');
|
275 |
+
if (iframe) {
|
276 |
+
var body = iframe.contentWindow.document.body;
|
277 |
+
var focusable = DOM.select(':input:enabled,*[tabindex=0]', body);
|
278 |
+
if (evt.target.id === (id + '_left')) {
|
279 |
+
focusable[focusable.length - 1].focus();
|
280 |
+
} else {
|
281 |
+
focusable[0].focus();
|
282 |
+
}
|
283 |
+
} else {
|
284 |
+
DOM.get(id + '_ok').focus();
|
285 |
+
}
|
286 |
+
});
|
287 |
+
|
288 |
+
// Add window
|
289 |
+
w = t.windows[id] = {
|
290 |
+
id : id,
|
291 |
+
mousedown_func : mdf,
|
292 |
+
click_func : clf,
|
293 |
+
element : new Element(id, {blocker : 1, container : ed.getContainer()}),
|
294 |
+
iframeElement : new Element(id + '_ifr'),
|
295 |
+
features : f,
|
296 |
+
deltaWidth : dw,
|
297 |
+
deltaHeight : dh
|
298 |
+
};
|
299 |
+
|
300 |
+
w.iframeElement.on('focus', function() {
|
301 |
+
t.focus(id);
|
302 |
+
});
|
303 |
+
|
304 |
+
// Setup blocker
|
305 |
+
if (t.count == 0 && t.editor.getParam('dialog_type', 'modal') == 'modal') {
|
306 |
+
DOM.add(DOM.doc.body, 'div', {
|
307 |
+
id : 'mceModalBlocker',
|
308 |
+
'class' : (t.editor.settings.inlinepopups_skin || 'clearlooks2') + '_modalBlocker',
|
309 |
+
style : {zIndex : t.zIndex - 1}
|
310 |
+
});
|
311 |
+
|
312 |
+
DOM.show('mceModalBlocker'); // Reduces flicker in IE
|
313 |
+
DOM.setAttrib(DOM.doc.body, 'aria-hidden', 'true');
|
314 |
+
} else
|
315 |
+
DOM.setStyle('mceModalBlocker', 'z-index', t.zIndex - 1);
|
316 |
+
|
317 |
+
if (tinymce.isIE6 || /Firefox\/2\./.test(navigator.userAgent) || (tinymce.isIE && !DOM.boxModel))
|
318 |
+
DOM.setStyles('mceModalBlocker', {position : 'absolute', left : vp.x, top : vp.y, width : vp.w - 2, height : vp.h - 2});
|
319 |
+
|
320 |
+
DOM.setAttrib(id, 'aria-hidden', 'false');
|
321 |
+
t.focus(id);
|
322 |
+
t._fixIELayout(id, 1);
|
323 |
+
|
324 |
+
// Focus ok button
|
325 |
+
if (DOM.get(id + '_ok'))
|
326 |
+
DOM.get(id + '_ok').focus();
|
327 |
+
t.count++;
|
328 |
+
|
329 |
+
return w;
|
330 |
+
},
|
331 |
+
|
332 |
+
focus : function(id) {
|
333 |
+
var t = this, w;
|
334 |
+
|
335 |
+
if (w = t.windows[id]) {
|
336 |
+
w.zIndex = this.zIndex++;
|
337 |
+
w.element.setStyle('zIndex', w.zIndex);
|
338 |
+
w.element.update();
|
339 |
+
|
340 |
+
id = id + '_wrapper';
|
341 |
+
DOM.removeClass(t.lastId, 'mceFocus');
|
342 |
+
DOM.addClass(id, 'mceFocus');
|
343 |
+
t.lastId = id;
|
344 |
+
|
345 |
+
if (w.focussedElement) {
|
346 |
+
w.focussedElement.focus();
|
347 |
+
} else if (DOM.get(id + '_ok')) {
|
348 |
+
DOM.get(w.id + '_ok').focus();
|
349 |
+
} else if (DOM.get(w.id + '_ifr')) {
|
350 |
+
DOM.get(w.id + '_ifr').focus();
|
351 |
+
}
|
352 |
+
}
|
353 |
+
},
|
354 |
+
|
355 |
+
_addAll : function(te, ne) {
|
356 |
+
var i, n, t = this, dom = tinymce.DOM;
|
357 |
+
|
358 |
+
if (is(ne, 'string'))
|
359 |
+
te.appendChild(dom.doc.createTextNode(ne));
|
360 |
+
else if (ne.length) {
|
361 |
+
te = te.appendChild(dom.create(ne[0], ne[1]));
|
362 |
+
|
363 |
+
for (i=2; i<ne.length; i++)
|
364 |
+
t._addAll(te, ne[i]);
|
365 |
+
}
|
366 |
+
},
|
367 |
+
|
368 |
+
_startDrag : function(id, se, ac) {
|
369 |
+
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;
|
370 |
+
|
371 |
+
// Get positons and sizes
|
372 |
+
// cp = DOM.getPos(t.editor.getContainer());
|
373 |
+
cp = {x : 0, y : 0};
|
374 |
+
vp = DOM.getViewPort();
|
375 |
+
|
376 |
+
// Reduce viewport size to avoid scrollbars while dragging
|
377 |
+
vp.w -= 2;
|
378 |
+
vp.h -= 2;
|
379 |
+
|
380 |
+
sex = se.screenX;
|
381 |
+
sey = se.screenY;
|
382 |
+
dx = dy = dw = dh = 0;
|
383 |
+
|
384 |
+
// Handle mouse up
|
385 |
+
mu = Event.add(d, 'mouseup', function(e) {
|
386 |
+
Event.remove(d, 'mouseup', mu);
|
387 |
+
Event.remove(d, 'mousemove', mm);
|
388 |
+
|
389 |
+
if (eb)
|
390 |
+
eb.remove();
|
391 |
+
|
392 |
+
we.moveBy(dx, dy);
|
393 |
+
we.resizeBy(dw, dh);
|
394 |
+
sz = we.getSize();
|
395 |
+
DOM.setStyles(id + '_ifr', {width : sz.w - w.deltaWidth, height : sz.h - w.deltaHeight});
|
396 |
+
t._fixIELayout(id, 1);
|
397 |
+
|
398 |
+
return Event.cancel(e);
|
399 |
+
});
|
400 |
+
|
401 |
+
if (ac != 'Move')
|
402 |
+
startMove();
|
403 |
+
|
404 |
+
function startMove() {
|
405 |
+
if (eb)
|
406 |
+
return;
|
407 |
+
|
408 |
+
t._fixIELayout(id, 0);
|
409 |
+
|
410 |
+
// Setup event blocker
|
411 |
+
DOM.add(d.body, 'div', {
|
412 |
+
id : 'mceEventBlocker',
|
413 |
+
'class' : 'mceEventBlocker ' + (t.editor.settings.inlinepopups_skin || 'clearlooks2'),
|
414 |
+
style : {zIndex : t.zIndex + 1}
|
415 |
+
});
|
416 |
+
|
417 |
+
if (tinymce.isIE6 || (tinymce.isIE && !DOM.boxModel))
|
418 |
+
DOM.setStyles('mceEventBlocker', {position : 'absolute', left : vp.x, top : vp.y, width : vp.w - 2, height : vp.h - 2});
|
419 |
+
|
420 |
+
eb = new Element('mceEventBlocker');
|
421 |
+
eb.update();
|
422 |
+
|
423 |
+
// Setup placeholder
|
424 |
+
p = we.getXY();
|
425 |
+
sz = we.getSize();
|
426 |
+
sx = cp.x + p.x - vp.x;
|
427 |
+
sy = cp.y + p.y - vp.y;
|
428 |
+
DOM.add(eb.get(), 'div', {id : 'mcePlaceHolder', 'class' : 'mcePlaceHolder', style : {left : sx, top : sy, width : sz.w, height : sz.h}});
|
429 |
+
ph = new Element('mcePlaceHolder');
|
430 |
+
};
|
431 |
+
|
432 |
+
// Handle mouse move/drag
|
433 |
+
mm = Event.add(d, 'mousemove', function(e) {
|
434 |
+
var x, y, v;
|
435 |
+
|
436 |
+
startMove();
|
437 |
+
|
438 |
+
x = e.screenX - sex;
|
439 |
+
y = e.screenY - sey;
|
440 |
+
|
441 |
+
switch (ac) {
|
442 |
+
case 'ResizeW':
|
443 |
+
dx = x;
|
444 |
+
dw = 0 - x;
|
445 |
+
break;
|
446 |
+
|
447 |
+
case 'ResizeE':
|
448 |
+
dw = x;
|
449 |
+
break;
|
450 |
+
|
451 |
+
case 'ResizeN':
|
452 |
+
case 'ResizeNW':
|
453 |
+
case 'ResizeNE':
|
454 |
+
if (ac == "ResizeNW") {
|
455 |
+
dx = x;
|
456 |
+
dw = 0 - x;
|
457 |
+
} else if (ac == "ResizeNE")
|
458 |
+
dw = x;
|
459 |
+
|
460 |
+
dy = y;
|
461 |
+
dh = 0 - y;
|
462 |
+
break;
|
463 |
+
|
464 |
+
case 'ResizeS':
|
465 |
+
case 'ResizeSW':
|
466 |
+
case 'ResizeSE':
|
467 |
+
if (ac == "ResizeSW") {
|
468 |
+
dx = x;
|
469 |
+
dw = 0 - x;
|
470 |
+
} else if (ac == "ResizeSE")
|
471 |
+
dw = x;
|
472 |
+
|
473 |
+
dh = y;
|
474 |
+
break;
|
475 |
+
|
476 |
+
case 'mceMove':
|
477 |
+
dx = x;
|
478 |
+
dy = y;
|
479 |
+
break;
|
480 |
+
}
|
481 |
+
|
482 |
+
// Boundary check
|
483 |
+
if (dw < (v = w.features.min_width - sz.w)) {
|
484 |
+
if (dx !== 0)
|
485 |
+
dx += dw - v;
|
486 |
+
|
487 |
+
dw = v;
|
488 |
+
}
|
489 |
+
|
490 |
+
if (dh < (v = w.features.min_height - sz.h)) {
|
491 |
+
if (dy !== 0)
|
492 |
+
dy += dh - v;
|
493 |
+
|
494 |
+
dh = v;
|
495 |
+
}
|
496 |
+
|
497 |
+
dw = Math.min(dw, w.features.max_width - sz.w);
|
498 |
+
dh = Math.min(dh, w.features.max_height - sz.h);
|
499 |
+
dx = Math.max(dx, vp.x - (sx + vp.x));
|
500 |
+
dy = Math.max(dy, vp.y - (sy + vp.y));
|
501 |
+
dx = Math.min(dx, (vp.w + vp.x) - (sx + sz.w + vp.x));
|
502 |
+
dy = Math.min(dy, (vp.h + vp.y) - (sy + sz.h + vp.y));
|
503 |
+
|
504 |
+
// Move if needed
|
505 |
+
if (dx + dy !== 0) {
|
506 |
+
if (sx + dx < 0)
|
507 |
+
dx = 0;
|
508 |
+
|
509 |
+
if (sy + dy < 0)
|
510 |
+
dy = 0;
|
511 |
+
|
512 |
+
ph.moveTo(sx + dx, sy + dy);
|
513 |
+
}
|
514 |
+
|
515 |
+
// Resize if needed
|
516 |
+
if (dw + dh !== 0)
|
517 |
+
ph.resizeTo(sz.w + dw, sz.h + dh);
|
518 |
+
|
519 |
+
return Event.cancel(e);
|
520 |
+
});
|
521 |
+
|
522 |
+
return Event.cancel(se);
|
523 |
+
},
|
524 |
+
|
525 |
+
resizeBy : function(dw, dh, id) {
|
526 |
+
var w = this.windows[id];
|
527 |
+
|
528 |
+
if (w) {
|
529 |
+
w.element.resizeBy(dw, dh);
|
530 |
+
w.iframeElement.resizeBy(dw, dh);
|
531 |
+
}
|
532 |
+
},
|
533 |
+
|
534 |
+
close : function(win, id) {
|
535 |
+
var t = this, w, d = DOM.doc, fw, id;
|
536 |
+
|
537 |
+
id = t._findId(id || win);
|
538 |
+
|
539 |
+
// Probably not inline
|
540 |
+
if (!t.windows[id]) {
|
541 |
+
t.parent(win);
|
542 |
+
return;
|
543 |
+
}
|
544 |
+
|
545 |
+
t.count--;
|
546 |
+
|
547 |
+
if (t.count == 0) {
|
548 |
+
DOM.remove('mceModalBlocker');
|
549 |
+
DOM.setAttrib(DOM.doc.body, 'aria-hidden', 'false');
|
550 |
+
t.editor.focus();
|
551 |
+
}
|
552 |
+
|
553 |
+
if (w = t.windows[id]) {
|
554 |
+
t.onClose.dispatch(t);
|
555 |
+
Event.remove(d, 'mousedown', w.mousedownFunc);
|
556 |
+
Event.remove(d, 'click', w.clickFunc);
|
557 |
+
Event.clear(id);
|
558 |
+
Event.clear(id + '_ifr');
|
559 |
+
|
560 |
+
DOM.setAttrib(id + '_ifr', 'src', 'javascript:""'); // Prevent leak
|
561 |
+
w.element.remove();
|
562 |
+
delete t.windows[id];
|
563 |
+
|
564 |
+
fw = t._frontWindow();
|
565 |
+
|
566 |
+
if (fw)
|
567 |
+
t.focus(fw.id);
|
568 |
+
}
|
569 |
+
},
|
570 |
+
|
571 |
+
// Find front most window
|
572 |
+
_frontWindow : function() {
|
573 |
+
var fw, ix = 0;
|
574 |
+
// Find front most window and focus that
|
575 |
+
each (this.windows, function(w) {
|
576 |
+
if (w.zIndex > ix) {
|
577 |
+
fw = w;
|
578 |
+
ix = w.zIndex;
|
579 |
+
}
|
580 |
+
});
|
581 |
+
return fw;
|
582 |
+
},
|
583 |
+
|
584 |
+
setTitle : function(w, ti) {
|
585 |
+
var e;
|
586 |
+
|
587 |
+
w = this._findId(w);
|
588 |
+
|
589 |
+
if (e = DOM.get(w + '_title'))
|
590 |
+
e.innerHTML = DOM.encode(ti);
|
591 |
+
},
|
592 |
+
|
593 |
+
alert : function(txt, cb, s) {
|
594 |
+
var t = this, w;
|
595 |
+
|
596 |
+
w = t.open({
|
597 |
+
title : t,
|
598 |
+
type : 'alert',
|
599 |
+
button_func : function(s) {
|
600 |
+
if (cb)
|
601 |
+
cb.call(s || t, s);
|
602 |
+
|
603 |
+
t.close(null, w.id);
|
604 |
+
},
|
605 |
+
content : DOM.encode(t.editor.getLang(txt, txt)),
|
606 |
+
inline : 1,
|
607 |
+
width : 400,
|
608 |
+
height : 130
|
609 |
+
});
|
610 |
+
},
|
611 |
+
|
612 |
+
confirm : function(txt, cb, s) {
|
613 |
+
var t = this, w;
|
614 |
+
|
615 |
+
w = t.open({
|
616 |
+
title : t,
|
617 |
+
type : 'confirm',
|
618 |
+
button_func : function(s) {
|
619 |
+
if (cb)
|
620 |
+
cb.call(s || t, s);
|
621 |
+
|
622 |
+
t.close(null, w.id);
|
623 |
+
},
|
624 |
+
content : DOM.encode(t.editor.getLang(txt, txt)),
|
625 |
+
inline : 1,
|
626 |
+
width : 400,
|
627 |
+
height : 130
|
628 |
+
});
|
629 |
+
},
|
630 |
+
|
631 |
+
// Internal functions
|
632 |
+
|
633 |
+
_findId : function(w) {
|
634 |
+
var t = this;
|
635 |
+
|
636 |
+
if (typeof(w) == 'string')
|
637 |
+
return w;
|
638 |
+
|
639 |
+
each(t.windows, function(wo) {
|
640 |
+
var ifr = DOM.get(wo.id + '_ifr');
|
641 |
+
|
642 |
+
if (ifr && w == ifr.contentWindow) {
|
643 |
+
w = wo.id;
|
644 |
+
return false;
|
645 |
+
}
|
646 |
+
});
|
647 |
+
|
648 |
+
return w;
|
649 |
+
},
|
650 |
+
|
651 |
+
_fixIELayout : function(id, s) {
|
652 |
+
var w, img;
|
653 |
+
|
654 |
+
if (!tinymce.isIE6)
|
655 |
+
return;
|
656 |
+
|
657 |
+
// Fixes the bug where hover flickers and does odd things in IE6
|
658 |
+
each(['n','s','w','e','nw','ne','sw','se'], function(v) {
|
659 |
+
var e = DOM.get(id + '_resize_' + v);
|
660 |
+
|
661 |
+
DOM.setStyles(e, {
|
662 |
+
width : s ? e.clientWidth : '',
|
663 |
+
height : s ? e.clientHeight : '',
|
664 |
+
cursor : DOM.getStyle(e, 'cursor', 1)
|
665 |
+
});
|
666 |
+
|
667 |
+
DOM.setStyle(id + "_bottom", 'bottom', '-1px');
|
668 |
+
|
669 |
+
e = 0;
|
670 |
+
});
|
671 |
+
|
672 |
+
// Fixes graphics glitch
|
673 |
+
if (w = this.windows[id]) {
|
674 |
+
// Fixes rendering bug after resize
|
675 |
+
w.element.hide();
|
676 |
+
w.element.show();
|
677 |
+
|
678 |
+
// Forced a repaint of the window
|
679 |
+
//DOM.get(id).style.filter = '';
|
680 |
+
|
681 |
+
// IE has a bug where images used in CSS won't get loaded
|
682 |
+
// sometimes when the cache in the browser is disabled
|
683 |
+
// This fix tries to solve it by loading the images using the image object
|
684 |
+
each(DOM.select('div,a', id), function(e, i) {
|
685 |
+
if (e.currentStyle.backgroundImage != 'none') {
|
686 |
+
img = new Image();
|
687 |
+
img.src = e.currentStyle.backgroundImage.replace(/url\(\"(.+)\"\)/, '$1');
|
688 |
+
}
|
689 |
+
});
|
690 |
+
|
691 |
+
DOM.get(id).style.filter = '';
|
692 |
+
}
|
693 |
+
}
|
694 |
+
});
|
695 |
+
|
696 |
+
// Register plugin
|
697 |
+
tinymce.PluginManager.add('inlinepopups', tinymce.plugins.InlinePopups);
|
698 |
+
})();
|
699 |
+
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif
ADDED
Binary file
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/button.gif
ADDED
Binary file
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif
ADDED
Binary file
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif
ADDED
Binary file
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif
ADDED
Binary file
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif
ADDED
Binary file
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif
ADDED
Binary file
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/inlinepopups/skins/clearlooks2/window.css
ADDED
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Clearlooks 2 */
|
2 |
+
|
3 |
+
/* Reset */
|
4 |
+
.clearlooks2, .clearlooks2 div, .clearlooks2 span, .clearlooks2 a {vertical-align:baseline; text-align:left; position:absolute; border:0; padding:0; margin:0; background:transparent; font-family:Arial,Verdana; font-size:11px; color:#000; text-decoration:none; font-weight:normal; width:auto; height:auto; overflow:hidden; display:block}
|
5 |
+
|
6 |
+
/* General */
|
7 |
+
.clearlooks2 {position:absolute; direction:ltr}
|
8 |
+
.clearlooks2 .mceWrapper {position:static}
|
9 |
+
.mceEventBlocker {position:fixed; left:0; top:0; background:url(img/horizontal.gif) no-repeat 0 -75px; width:100%; height:100%}
|
10 |
+
.clearlooks2 .mcePlaceHolder {border:1px solid #000; background:#888; top:0; left:0; opacity:0.5; -ms-filter:'alpha(opacity=50)'; filter:alpha(opacity=50)}
|
11 |
+
.clearlooks2_modalBlocker {position:fixed; left:0; top:0; width:100%; height:100%; background:#FFF; opacity:0.6; -ms-filter:'alpha(opacity=60)'; filter:alpha(opacity=60); display:none}
|
12 |
+
|
13 |
+
/* Top */
|
14 |
+
.clearlooks2 .mceTop, .clearlooks2 .mceTop div {top:0; width:100%; height:23px}
|
15 |
+
.clearlooks2 .mceTop .mceLeft {width:6px; background:url(img/corners.gif)}
|
16 |
+
.clearlooks2 .mceTop .mceCenter {right:6px; width:100%; height:23px; background:url(img/horizontal.gif) 12px 0; clip:rect(auto auto auto 12px)}
|
17 |
+
.clearlooks2 .mceTop .mceRight {right:0; width:6px; height:23px; background:url(img/corners.gif) -12px 0}
|
18 |
+
.clearlooks2 .mceTop span {width:100%; text-align:center; vertical-align:middle; line-height:23px; font-weight:bold}
|
19 |
+
.clearlooks2 .mceFocus .mceTop .mceLeft {background:url(img/corners.gif) -6px 0}
|
20 |
+
.clearlooks2 .mceFocus .mceTop .mceCenter {background:url(img/horizontal.gif) 0 -23px}
|
21 |
+
.clearlooks2 .mceFocus .mceTop .mceRight {background:url(img/corners.gif) -18px 0}
|
22 |
+
.clearlooks2 .mceFocus .mceTop span {color:#FFF}
|
23 |
+
|
24 |
+
/* Middle */
|
25 |
+
.clearlooks2 .mceMiddle, .clearlooks2 .mceMiddle div {top:0}
|
26 |
+
.clearlooks2 .mceMiddle {width:100%; height:100%; clip:rect(23px auto auto auto)}
|
27 |
+
.clearlooks2 .mceMiddle .mceLeft {left:0; width:5px; height:100%; background:url(img/vertical.gif) -5px 0}
|
28 |
+
.clearlooks2 .mceMiddle span {top:23px; left:5px; width:100%; height:100%; background:#FFF}
|
29 |
+
.clearlooks2 .mceMiddle .mceRight {right:0; width:5px; height:100%; background:url(img/vertical.gif)}
|
30 |
+
|
31 |
+
/* Bottom */
|
32 |
+
.clearlooks2 .mceBottom, .clearlooks2 .mceBottom div {height:6px}
|
33 |
+
.clearlooks2 .mceBottom {left:0; bottom:0; width:100%}
|
34 |
+
.clearlooks2 .mceBottom div {top:0}
|
35 |
+
.clearlooks2 .mceBottom .mceLeft {left:0; width:5px; background:url(img/corners.gif) -34px -6px}
|
36 |
+
.clearlooks2 .mceBottom .mceCenter {left:5px; width:100%; background:url(img/horizontal.gif) 0 -46px}
|
37 |
+
.clearlooks2 .mceBottom .mceRight {right:0; width:5px; background: url(img/corners.gif) -34px 0}
|
38 |
+
.clearlooks2 .mceBottom span {display:none}
|
39 |
+
.clearlooks2 .mceStatusbar .mceBottom, .clearlooks2 .mceStatusbar .mceBottom div {height:23px}
|
40 |
+
.clearlooks2 .mceStatusbar .mceBottom .mceLeft {background:url(img/corners.gif) -29px 0}
|
41 |
+
.clearlooks2 .mceStatusbar .mceBottom .mceCenter {background:url(img/horizontal.gif) 0 -52px}
|
42 |
+
.clearlooks2 .mceStatusbar .mceBottom .mceRight {background:url(img/corners.gif) -24px 0}
|
43 |
+
.clearlooks2 .mceStatusbar .mceBottom span {display:block; left:7px; font-family:Arial, Verdana; font-size:11px; line-height:23px}
|
44 |
+
|
45 |
+
/* Actions */
|
46 |
+
.clearlooks2 a {width:29px; height:16px; top:3px;}
|
47 |
+
.clearlooks2 .mceClose {right:6px; background:url(img/buttons.gif) -87px 0}
|
48 |
+
.clearlooks2 .mceMin {display:none; right:68px; background:url(img/buttons.gif) 0 0}
|
49 |
+
.clearlooks2 .mceMed {display:none; right:37px; background:url(img/buttons.gif) -29px 0}
|
50 |
+
.clearlooks2 .mceMax {display:none; right:37px; background:url(img/buttons.gif) -58px 0}
|
51 |
+
.clearlooks2 .mceMove {display:none;width:100%;cursor:move;background:url(img/corners.gif) no-repeat -100px -100px}
|
52 |
+
.clearlooks2 .mceMovable .mceMove {display:block}
|
53 |
+
.clearlooks2 .mceFocus .mceClose {right:6px; background:url(img/buttons.gif) -87px -16px}
|
54 |
+
.clearlooks2 .mceFocus .mceMin {right:68px; background:url(img/buttons.gif) 0 -16px}
|
55 |
+
.clearlooks2 .mceFocus .mceMed {right:37px; background:url(img/buttons.gif) -29px -16px}
|
56 |
+
.clearlooks2 .mceFocus .mceMax {right:37px; background:url(img/buttons.gif) -58px -16px}
|
57 |
+
.clearlooks2 .mceFocus .mceClose:hover {right:6px; background:url(img/buttons.gif) -87px -32px}
|
58 |
+
.clearlooks2 .mceFocus .mceClose:hover {right:6px; background:url(img/buttons.gif) -87px -32px}
|
59 |
+
.clearlooks2 .mceFocus .mceMin:hover {right:68px; background:url(img/buttons.gif) 0 -32px}
|
60 |
+
.clearlooks2 .mceFocus .mceMed:hover {right:37px; background:url(img/buttons.gif) -29px -32px}
|
61 |
+
.clearlooks2 .mceFocus .mceMax:hover {right:37px; background:url(img/buttons.gif) -58px -32px}
|
62 |
+
|
63 |
+
/* Resize */
|
64 |
+
.clearlooks2 .mceResize {top:auto; left:auto; display:none; width:5px; height:5px; background:url(img/horizontal.gif) no-repeat 0 -75px}
|
65 |
+
.clearlooks2 .mceResizable .mceResize {display:block}
|
66 |
+
.clearlooks2 .mceResizable .mceMin, .clearlooks2 .mceMax {display:none}
|
67 |
+
.clearlooks2 .mceMinimizable .mceMin {display:block}
|
68 |
+
.clearlooks2 .mceMaximizable .mceMax {display:block}
|
69 |
+
.clearlooks2 .mceMaximized .mceMed {display:block}
|
70 |
+
.clearlooks2 .mceMaximized .mceMax {display:none}
|
71 |
+
.clearlooks2 a.mceResizeN {top:0; left:0; width:100%; cursor:n-resize}
|
72 |
+
.clearlooks2 a.mceResizeNW {top:0; left:0; cursor:nw-resize}
|
73 |
+
.clearlooks2 a.mceResizeNE {top:0; right:0; cursor:ne-resize}
|
74 |
+
.clearlooks2 a.mceResizeW {top:0; left:0; height:100%; cursor:w-resize;}
|
75 |
+
.clearlooks2 a.mceResizeE {top:0; right:0; height:100%; cursor:e-resize}
|
76 |
+
.clearlooks2 a.mceResizeS {bottom:0; left:0; width:100%; cursor:s-resize}
|
77 |
+
.clearlooks2 a.mceResizeSW {bottom:0; left:0; cursor:sw-resize}
|
78 |
+
.clearlooks2 a.mceResizeSE {bottom:0; right:0; cursor:se-resize}
|
79 |
+
|
80 |
+
/* Alert/Confirm */
|
81 |
+
.clearlooks2 .mceButton {font-weight:bold; bottom:10px; width:80px; height:30px; background:url(img/button.gif); line-height:30px; vertical-align:middle; text-align:center; outline:0}
|
82 |
+
.clearlooks2 .mceMiddle .mceIcon {left:15px; top:35px; width:32px; height:32px}
|
83 |
+
.clearlooks2 .mceAlert .mceMiddle span, .clearlooks2 .mceConfirm .mceMiddle span {background:transparent;left:60px; top:35px; width:320px; height:50px; font-weight:bold; overflow:auto; white-space:normal}
|
84 |
+
.clearlooks2 a:hover {font-weight:bold;}
|
85 |
+
.clearlooks2 .mceAlert .mceMiddle, .clearlooks2 .mceConfirm .mceMiddle {background:#D6D7D5}
|
86 |
+
.clearlooks2 .mceAlert .mceOk {left:50%; top:auto; margin-left: -40px}
|
87 |
+
.clearlooks2 .mceAlert .mceIcon {background:url(img/alert.gif)}
|
88 |
+
.clearlooks2 .mceConfirm .mceOk {left:50%; top:auto; margin-left: -90px}
|
89 |
+
.clearlooks2 .mceConfirm .mceCancel {left:50%; top:auto}
|
90 |
+
.clearlooks2 .mceConfirm .mceIcon {background:url(img/confirm.gif)}
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/inlinepopups/template.htm
ADDED
@@ -0,0 +1,387 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!-- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -->
|
2 |
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
+
<head>
|
4 |
+
<title>Template for dialogs</title>
|
5 |
+
<link rel="stylesheet" type="text/css" href="skins/clearlooks2/window.css" />
|
6 |
+
</head>
|
7 |
+
<body>
|
8 |
+
|
9 |
+
<div class="mceEditor">
|
10 |
+
<div class="clearlooks2" style="width:400px; height:100px; left:10px;">
|
11 |
+
<div class="mceWrapper">
|
12 |
+
<div class="mceTop">
|
13 |
+
<div class="mceLeft"></div>
|
14 |
+
<div class="mceCenter"></div>
|
15 |
+
<div class="mceRight"></div>
|
16 |
+
<span>Blured</span>
|
17 |
+
</div>
|
18 |
+
|
19 |
+
<div class="mceMiddle">
|
20 |
+
<div class="mceLeft"></div>
|
21 |
+
<span>Content</span>
|
22 |
+
<div class="mceRight"></div>
|
23 |
+
</div>
|
24 |
+
|
25 |
+
<div class="mceBottom">
|
26 |
+
<div class="mceLeft"></div>
|
27 |
+
<div class="mceCenter"></div>
|
28 |
+
<div class="mceRight"></div>
|
29 |
+
<span>Statusbar text.</span>
|
30 |
+
</div>
|
31 |
+
|
32 |
+
<a class="mceMove" href="#"></a>
|
33 |
+
<a class="mceMin" href="#"></a>
|
34 |
+
<a class="mceMax" href="#"></a>
|
35 |
+
<a class="mceMed" href="#"></a>
|
36 |
+
<a class="mceClose" href="#"></a>
|
37 |
+
<a class="mceResize mceResizeN" href="#"></a>
|
38 |
+
<a class="mceResize mceResizeS" href="#"></a>
|
39 |
+
<a class="mceResize mceResizeW" href="#"></a>
|
40 |
+
<a class="mceResize mceResizeE" href="#"></a>
|
41 |
+
<a class="mceResize mceResizeNW" href="#"></a>
|
42 |
+
<a class="mceResize mceResizeNE" href="#"></a>
|
43 |
+
<a class="mceResize mceResizeSW" href="#"></a>
|
44 |
+
<a class="mceResize mceResizeSE" href="#"></a>
|
45 |
+
</div>
|
46 |
+
</div>
|
47 |
+
|
48 |
+
<div class="clearlooks2" style="width:400px; height:100px; left:420px;">
|
49 |
+
<div class="mceWrapper mceMovable mceFocus">
|
50 |
+
<div class="mceTop">
|
51 |
+
<div class="mceLeft"></div>
|
52 |
+
<div class="mceCenter"></div>
|
53 |
+
<div class="mceRight"></div>
|
54 |
+
<span>Focused</span>
|
55 |
+
</div>
|
56 |
+
|
57 |
+
<div class="mceMiddle">
|
58 |
+
<div class="mceLeft"></div>
|
59 |
+
<span>Content</span>
|
60 |
+
<div class="mceRight"></div>
|
61 |
+
</div>
|
62 |
+
|
63 |
+
<div class="mceBottom">
|
64 |
+
<div class="mceLeft"></div>
|
65 |
+
<div class="mceCenter"></div>
|
66 |
+
<div class="mceRight"></div>
|
67 |
+
<span>Statusbar text.</span>
|
68 |
+
</div>
|
69 |
+
|
70 |
+
<a class="mceMove" href="#"></a>
|
71 |
+
<a class="mceMin" href="#"></a>
|
72 |
+
<a class="mceMax" href="#"></a>
|
73 |
+
<a class="mceMed" href="#"></a>
|
74 |
+
<a class="mceClose" href="#"></a>
|
75 |
+
<a class="mceResize mceResizeN" href="#"></a>
|
76 |
+
<a class="mceResize mceResizeS" href="#"></a>
|
77 |
+
<a class="mceResize mceResizeW" href="#"></a>
|
78 |
+
<a class="mceResize mceResizeE" href="#"></a>
|
79 |
+
<a class="mceResize mceResizeNW" href="#"></a>
|
80 |
+
<a class="mceResize mceResizeNE" href="#"></a>
|
81 |
+
<a class="mceResize mceResizeSW" href="#"></a>
|
82 |
+
<a class="mceResize mceResizeSE" href="#"></a>
|
83 |
+
</div>
|
84 |
+
</div>
|
85 |
+
|
86 |
+
<div class="clearlooks2" style="width:400px; height:100px; left:10px; top:120px;">
|
87 |
+
<div class="mceWrapper mceMovable mceFocus mceStatusbar">
|
88 |
+
<div class="mceTop">
|
89 |
+
<div class="mceLeft"></div>
|
90 |
+
<div class="mceCenter"></div>
|
91 |
+
<div class="mceRight"></div>
|
92 |
+
<span>Statusbar</span>
|
93 |
+
</div>
|
94 |
+
|
95 |
+
<div class="mceMiddle">
|
96 |
+
<div class="mceLeft"></div>
|
97 |
+
<span>Content</span>
|
98 |
+
<div class="mceRight"></div>
|
99 |
+
</div>
|
100 |
+
|
101 |
+
<div class="mceBottom">
|
102 |
+
<div class="mceLeft"></div>
|
103 |
+
<div class="mceCenter"></div>
|
104 |
+
<div class="mceRight"></div>
|
105 |
+
<span>Statusbar text.</span>
|
106 |
+
</div>
|
107 |
+
|
108 |
+
<a class="mceMove" href="#"></a>
|
109 |
+
<a class="mceMin" href="#"></a>
|
110 |
+
<a class="mceMax" href="#"></a>
|
111 |
+
<a class="mceMed" href="#"></a>
|
112 |
+
<a class="mceClose" href="#"></a>
|
113 |
+
<a class="mceResize mceResizeN" href="#"></a>
|
114 |
+
<a class="mceResize mceResizeS" href="#"></a>
|
115 |
+
<a class="mceResize mceResizeW" href="#"></a>
|
116 |
+
<a class="mceResize mceResizeE" href="#"></a>
|
117 |
+
<a class="mceResize mceResizeNW" href="#"></a>
|
118 |
+
<a class="mceResize mceResizeNE" href="#"></a>
|
119 |
+
<a class="mceResize mceResizeSW" href="#"></a>
|
120 |
+
<a class="mceResize mceResizeSE" href="#"></a>
|
121 |
+
</div>
|
122 |
+
</div>
|
123 |
+
|
124 |
+
<div class="clearlooks2" style="width:400px; height:100px; left:420px; top:120px;">
|
125 |
+
<div class="mceWrapper mceMovable mceFocus mceStatusbar mceResizable">
|
126 |
+
<div class="mceTop">
|
127 |
+
<div class="mceLeft"></div>
|
128 |
+
<div class="mceCenter"></div>
|
129 |
+
<div class="mceRight"></div>
|
130 |
+
<span>Statusbar, Resizable</span>
|
131 |
+
</div>
|
132 |
+
|
133 |
+
<div class="mceMiddle">
|
134 |
+
<div class="mceLeft"></div>
|
135 |
+
<span>Content</span>
|
136 |
+
<div class="mceRight"></div>
|
137 |
+
</div>
|
138 |
+
|
139 |
+
<div class="mceBottom">
|
140 |
+
<div class="mceLeft"></div>
|
141 |
+
<div class="mceCenter"></div>
|
142 |
+
<div class="mceRight"></div>
|
143 |
+
<span>Statusbar text.</span>
|
144 |
+
</div>
|
145 |
+
|
146 |
+
<a class="mceMove" href="#"></a>
|
147 |
+
<a class="mceMin" href="#"></a>
|
148 |
+
<a class="mceMax" href="#"></a>
|
149 |
+
<a class="mceMed" href="#"></a>
|
150 |
+
<a class="mceClose" href="#"></a>
|
151 |
+
<a class="mceResize mceResizeN" href="#"></a>
|
152 |
+
<a class="mceResize mceResizeS" href="#"></a>
|
153 |
+
<a class="mceResize mceResizeW" href="#"></a>
|
154 |
+
<a class="mceResize mceResizeE" href="#"></a>
|
155 |
+
<a class="mceResize mceResizeNW" href="#"></a>
|
156 |
+
<a class="mceResize mceResizeNE" href="#"></a>
|
157 |
+
<a class="mceResize mceResizeSW" href="#"></a>
|
158 |
+
<a class="mceResize mceResizeSE" href="#"></a>
|
159 |
+
</div>
|
160 |
+
</div>
|
161 |
+
|
162 |
+
<div class="clearlooks2" style="width:400px; height:100px; left:10px; top:230px;">
|
163 |
+
<div class="mceWrapper mceMovable mceFocus mceResizable mceMaximizable">
|
164 |
+
<div class="mceTop">
|
165 |
+
<div class="mceLeft"></div>
|
166 |
+
<div class="mceCenter"></div>
|
167 |
+
<div class="mceRight"></div>
|
168 |
+
<span>Resizable, Maximizable</span>
|
169 |
+
</div>
|
170 |
+
|
171 |
+
<div class="mceMiddle">
|
172 |
+
<div class="mceLeft"></div>
|
173 |
+
<span>Content</span>
|
174 |
+
<div class="mceRight"></div>
|
175 |
+
</div>
|
176 |
+
|
177 |
+
<div class="mceBottom">
|
178 |
+
<div class="mceLeft"></div>
|
179 |
+
<div class="mceCenter"></div>
|
180 |
+
<div class="mceRight"></div>
|
181 |
+
<span>Statusbar text.</span>
|
182 |
+
</div>
|
183 |
+
|
184 |
+
<a class="mceMove" href="#"></a>
|
185 |
+
<a class="mceMin" href="#"></a>
|
186 |
+
<a class="mceMax" href="#"></a>
|
187 |
+
<a class="mceMed" href="#"></a>
|
188 |
+
<a class="mceClose" href="#"></a>
|
189 |
+
<a class="mceResize mceResizeN" href="#"></a>
|
190 |
+
<a class="mceResize mceResizeS" href="#"></a>
|
191 |
+
<a class="mceResize mceResizeW" href="#"></a>
|
192 |
+
<a class="mceResize mceResizeE" href="#"></a>
|
193 |
+
<a class="mceResize mceResizeNW" href="#"></a>
|
194 |
+
<a class="mceResize mceResizeNE" href="#"></a>
|
195 |
+
<a class="mceResize mceResizeSW" href="#"></a>
|
196 |
+
<a class="mceResize mceResizeSE" href="#"></a>
|
197 |
+
</div>
|
198 |
+
</div>
|
199 |
+
|
200 |
+
<div class="clearlooks2" style="width:400px; height:100px; left:420px; top:230px;">
|
201 |
+
<div class="mceWrapper mceMovable mceStatusbar mceResizable mceMaximizable">
|
202 |
+
<div class="mceTop">
|
203 |
+
<div class="mceLeft"></div>
|
204 |
+
<div class="mceCenter"></div>
|
205 |
+
<div class="mceRight"></div>
|
206 |
+
<span>Blurred, Maximizable, Statusbar, Resizable</span>
|
207 |
+
</div>
|
208 |
+
|
209 |
+
<div class="mceMiddle">
|
210 |
+
<div class="mceLeft"></div>
|
211 |
+
<span>Content</span>
|
212 |
+
<div class="mceRight"></div>
|
213 |
+
</div>
|
214 |
+
|
215 |
+
<div class="mceBottom">
|
216 |
+
<div class="mceLeft"></div>
|
217 |
+
<div class="mceCenter"></div>
|
218 |
+
<div class="mceRight"></div>
|
219 |
+
<span>Statusbar text.</span>
|
220 |
+
</div>
|
221 |
+
|
222 |
+
<a class="mceMove" href="#"></a>
|
223 |
+
<a class="mceMin" href="#"></a>
|
224 |
+
<a class="mceMax" href="#"></a>
|
225 |
+
<a class="mceMed" href="#"></a>
|
226 |
+
<a class="mceClose" href="#"></a>
|
227 |
+
<a class="mceResize mceResizeN" href="#"></a>
|
228 |
+
<a class="mceResize mceResizeS" href="#"></a>
|
229 |
+
<a class="mceResize mceResizeW" href="#"></a>
|
230 |
+
<a class="mceResize mceResizeE" href="#"></a>
|
231 |
+
<a class="mceResize mceResizeNW" href="#"></a>
|
232 |
+
<a class="mceResize mceResizeNE" href="#"></a>
|
233 |
+
<a class="mceResize mceResizeSW" href="#"></a>
|
234 |
+
<a class="mceResize mceResizeSE" href="#"></a>
|
235 |
+
</div>
|
236 |
+
</div>
|
237 |
+
|
238 |
+
<div class="clearlooks2" style="width:400px; height:100px; left:10px; top:340px;">
|
239 |
+
<div class="mceWrapper mceMovable mceFocus mceResizable mceMaximized mceMinimizable mceMaximizable">
|
240 |
+
<div class="mceTop">
|
241 |
+
<div class="mceLeft"></div>
|
242 |
+
<div class="mceCenter"></div>
|
243 |
+
<div class="mceRight"></div>
|
244 |
+
<span>Maximized, Maximizable, Minimizable</span>
|
245 |
+
</div>
|
246 |
+
|
247 |
+
<div class="mceMiddle">
|
248 |
+
<div class="mceLeft"></div>
|
249 |
+
<span>Content</span>
|
250 |
+
<div class="mceRight"></div>
|
251 |
+
</div>
|
252 |
+
|
253 |
+
<div class="mceBottom">
|
254 |
+
<div class="mceLeft"></div>
|
255 |
+
<div class="mceCenter"></div>
|
256 |
+
<div class="mceRight"></div>
|
257 |
+
<span>Statusbar text.</span>
|
258 |
+
</div>
|
259 |
+
|
260 |
+
<a class="mceMove" href="#"></a>
|
261 |
+
<a class="mceMin" href="#"></a>
|
262 |
+
<a class="mceMax" href="#"></a>
|
263 |
+
<a class="mceMed" href="#"></a>
|
264 |
+
<a class="mceClose" href="#"></a>
|
265 |
+
<a class="mceResize mceResizeN" href="#"></a>
|
266 |
+
<a class="mceResize mceResizeS" href="#"></a>
|
267 |
+
<a class="mceResize mceResizeW" href="#"></a>
|
268 |
+
<a class="mceResize mceResizeE" href="#"></a>
|
269 |
+
<a class="mceResize mceResizeNW" href="#"></a>
|
270 |
+
<a class="mceResize mceResizeNE" href="#"></a>
|
271 |
+
<a class="mceResize mceResizeSW" href="#"></a>
|
272 |
+
<a class="mceResize mceResizeSE" href="#"></a>
|
273 |
+
</div>
|
274 |
+
</div>
|
275 |
+
|
276 |
+
<div class="clearlooks2" style="width:400px; height:100px; left:420px; top:340px;">
|
277 |
+
<div class="mceWrapper mceMovable mceStatusbar mceResizable mceMaximized mceMinimizable mceMaximizable">
|
278 |
+
<div class="mceTop">
|
279 |
+
<div class="mceLeft"></div>
|
280 |
+
<div class="mceCenter"></div>
|
281 |
+
<div class="mceRight"></div>
|
282 |
+
<span>Blured</span>
|
283 |
+
</div>
|
284 |
+
|
285 |
+
<div class="mceMiddle">
|
286 |
+
<div class="mceLeft"></div>
|
287 |
+
<span>Content</span>
|
288 |
+
<div class="mceRight"></div>
|
289 |
+
</div>
|
290 |
+
|
291 |
+
<div class="mceBottom">
|
292 |
+
<div class="mceLeft"></div>
|
293 |
+
<div class="mceCenter"></div>
|
294 |
+
<div class="mceRight"></div>
|
295 |
+
<span>Statusbar text.</span>
|
296 |
+
</div>
|
297 |
+
|
298 |
+
<a class="mceMove" href="#"></a>
|
299 |
+
<a class="mceMin" href="#"></a>
|
300 |
+
<a class="mceMax" href="#"></a>
|
301 |
+
<a class="mceMed" href="#"></a>
|
302 |
+
<a class="mceClose" href="#"></a>
|
303 |
+
<a class="mceResize mceResizeN" href="#"></a>
|
304 |
+
<a class="mceResize mceResizeS" href="#"></a>
|
305 |
+
<a class="mceResize mceResizeW" href="#"></a>
|
306 |
+
<a class="mceResize mceResizeE" href="#"></a>
|
307 |
+
<a class="mceResize mceResizeNW" href="#"></a>
|
308 |
+
<a class="mceResize mceResizeNE" href="#"></a>
|
309 |
+
<a class="mceResize mceResizeSW" href="#"></a>
|
310 |
+
<a class="mceResize mceResizeSE" href="#"></a>
|
311 |
+
</div>
|
312 |
+
</div>
|
313 |
+
|
314 |
+
<div class="clearlooks2" style="width:400px; height:130px; left:10px; top:450px;">
|
315 |
+
<div class="mceWrapper mceMovable mceFocus mceModal mceAlert">
|
316 |
+
<div class="mceTop">
|
317 |
+
<div class="mceLeft"></div>
|
318 |
+
<div class="mceCenter"></div>
|
319 |
+
<div class="mceRight"></div>
|
320 |
+
<span>Alert</span>
|
321 |
+
</div>
|
322 |
+
|
323 |
+
<div class="mceMiddle">
|
324 |
+
<div class="mceLeft"></div>
|
325 |
+
<span>
|
326 |
+
This is a very long error message. This is a very long error message.
|
327 |
+
This is a very long error message. This is a very long error message.
|
328 |
+
This is a very long error message. This is a very long error message.
|
329 |
+
This is a very long error message. This is a very long error message.
|
330 |
+
This is a very long error message. This is a very long error message.
|
331 |
+
This is a very long error message. This is a very long error message.
|
332 |
+
</span>
|
333 |
+
<div class="mceRight"></div>
|
334 |
+
<div class="mceIcon"></div>
|
335 |
+
</div>
|
336 |
+
|
337 |
+
<div class="mceBottom">
|
338 |
+
<div class="mceLeft"></div>
|
339 |
+
<div class="mceCenter"></div>
|
340 |
+
<div class="mceRight"></div>
|
341 |
+
</div>
|
342 |
+
|
343 |
+
<a class="mceMove" href="#"></a>
|
344 |
+
<a class="mceButton mceOk" href="#">Ok</a>
|
345 |
+
<a class="mceClose" href="#"></a>
|
346 |
+
</div>
|
347 |
+
</div>
|
348 |
+
|
349 |
+
<div class="clearlooks2" style="width:400px; height:130px; left:420px; top:450px;">
|
350 |
+
<div class="mceWrapper mceMovable mceFocus mceModal mceConfirm">
|
351 |
+
<div class="mceTop">
|
352 |
+
<div class="mceLeft"></div>
|
353 |
+
<div class="mceCenter"></div>
|
354 |
+
<div class="mceRight"></div>
|
355 |
+
<span>Confirm</span>
|
356 |
+
</div>
|
357 |
+
|
358 |
+
<div class="mceMiddle">
|
359 |
+
<div class="mceLeft"></div>
|
360 |
+
<span>
|
361 |
+
This is a very long error message. This is a very long error message.
|
362 |
+
This is a very long error message. This is a very long error message.
|
363 |
+
This is a very long error message. This is a very long error message.
|
364 |
+
This is a very long error message. This is a very long error message.
|
365 |
+
This is a very long error message. This is a very long error message.
|
366 |
+
This is a very long error message. This is a very long error message.
|
367 |
+
</span>
|
368 |
+
<div class="mceRight"></div>
|
369 |
+
<div class="mceIcon"></div>
|
370 |
+
</div>
|
371 |
+
|
372 |
+
<div class="mceBottom">
|
373 |
+
<div class="mceLeft"></div>
|
374 |
+
<div class="mceCenter"></div>
|
375 |
+
<div class="mceRight"></div>
|
376 |
+
</div>
|
377 |
+
|
378 |
+
<a class="mceMove" href="#"></a>
|
379 |
+
<a class="mceButton mceOk" href="#">Ok</a>
|
380 |
+
<a class="mceButton mceCancel" href="#">Cancel</a>
|
381 |
+
<a class="mceClose" href="#"></a>
|
382 |
+
</div>
|
383 |
+
</div>
|
384 |
+
</div>
|
385 |
+
|
386 |
+
</body>
|
387 |
+
</html>
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/insertdatetime/editor_plugin.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(function(){tinymce.create("tinymce.plugins.InsertDateTime",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceInsertDate",function(){var d=c._getDateTime(new Date(),a.getParam("plugin_insertdate_dateFormat",a.getLang("insertdatetime.date_fmt")));a.execCommand("mceInsertContent",false,d)});a.addCommand("mceInsertTime",function(){var d=c._getDateTime(new Date(),a.getParam("plugin_insertdate_timeFormat",a.getLang("insertdatetime.time_fmt")));a.execCommand("mceInsertContent",false,d)});a.addButton("insertdate",{title:"insertdatetime.insertdate_desc",cmd:"mceInsertDate"});a.addButton("inserttime",{title:"insertdatetime.inserttime_desc",cmd:"mceInsertTime"})},getInfo:function(){return{longname:"Insert date/time",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/insertdatetime",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_getDateTime:function(e,a){var c=this.editor;function b(g,d){g=""+g;if(g.length<d){for(var f=0;f<(d-g.length);f++){g="0"+g}}return g}a=a.replace("%D","%m/%d/%y");a=a.replace("%r","%I:%M:%S %p");a=a.replace("%Y",""+e.getFullYear());a=a.replace("%y",""+e.getYear());a=a.replace("%m",b(e.getMonth()+1,2));a=a.replace("%d",b(e.getDate(),2));a=a.replace("%H",""+b(e.getHours(),2));a=a.replace("%M",""+b(e.getMinutes(),2));a=a.replace("%S",""+b(e.getSeconds(),2));a=a.replace("%I",""+((e.getHours()+11)%12+1));a=a.replace("%p",""+(e.getHours()<12?"AM":"PM"));a=a.replace("%B",""+c.getLang("insertdatetime.months_long").split(",")[e.getMonth()]);a=a.replace("%b",""+c.getLang("insertdatetime.months_short").split(",")[e.getMonth()]);a=a.replace("%A",""+c.getLang("insertdatetime.day_long").split(",")[e.getDay()]);a=a.replace("%a",""+c.getLang("insertdatetime.day_short").split(",")[e.getDay()]);a=a.replace("%%","%");return a}});tinymce.PluginManager.add("insertdatetime",tinymce.plugins.InsertDateTime)})();
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/insertdatetime/editor_plugin_src.js
ADDED
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
tinymce.create('tinymce.plugins.InsertDateTime', {
|
13 |
+
init : function(ed, url) {
|
14 |
+
var t = this;
|
15 |
+
|
16 |
+
t.editor = ed;
|
17 |
+
|
18 |
+
ed.addCommand('mceInsertDate', function() {
|
19 |
+
var str = t._getDateTime(new Date(), ed.getParam("plugin_insertdate_dateFormat", ed.getLang('insertdatetime.date_fmt')));
|
20 |
+
|
21 |
+
ed.execCommand('mceInsertContent', false, str);
|
22 |
+
});
|
23 |
+
|
24 |
+
ed.addCommand('mceInsertTime', function() {
|
25 |
+
var str = t._getDateTime(new Date(), ed.getParam("plugin_insertdate_timeFormat", ed.getLang('insertdatetime.time_fmt')));
|
26 |
+
|
27 |
+
ed.execCommand('mceInsertContent', false, str);
|
28 |
+
});
|
29 |
+
|
30 |
+
ed.addButton('insertdate', {title : 'insertdatetime.insertdate_desc', cmd : 'mceInsertDate'});
|
31 |
+
ed.addButton('inserttime', {title : 'insertdatetime.inserttime_desc', cmd : 'mceInsertTime'});
|
32 |
+
},
|
33 |
+
|
34 |
+
getInfo : function() {
|
35 |
+
return {
|
36 |
+
longname : 'Insert date/time',
|
37 |
+
author : 'Moxiecode Systems AB',
|
38 |
+
authorurl : 'http://tinymce.moxiecode.com',
|
39 |
+
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/insertdatetime',
|
40 |
+
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
41 |
+
};
|
42 |
+
},
|
43 |
+
|
44 |
+
// Private methods
|
45 |
+
|
46 |
+
_getDateTime : function(d, fmt) {
|
47 |
+
var ed = this.editor;
|
48 |
+
|
49 |
+
function addZeros(value, len) {
|
50 |
+
value = "" + value;
|
51 |
+
|
52 |
+
if (value.length < len) {
|
53 |
+
for (var i=0; i<(len-value.length); i++)
|
54 |
+
value = "0" + value;
|
55 |
+
}
|
56 |
+
|
57 |
+
return value;
|
58 |
+
};
|
59 |
+
|
60 |
+
fmt = fmt.replace("%D", "%m/%d/%y");
|
61 |
+
fmt = fmt.replace("%r", "%I:%M:%S %p");
|
62 |
+
fmt = fmt.replace("%Y", "" + d.getFullYear());
|
63 |
+
fmt = fmt.replace("%y", "" + d.getYear());
|
64 |
+
fmt = fmt.replace("%m", addZeros(d.getMonth()+1, 2));
|
65 |
+
fmt = fmt.replace("%d", addZeros(d.getDate(), 2));
|
66 |
+
fmt = fmt.replace("%H", "" + addZeros(d.getHours(), 2));
|
67 |
+
fmt = fmt.replace("%M", "" + addZeros(d.getMinutes(), 2));
|
68 |
+
fmt = fmt.replace("%S", "" + addZeros(d.getSeconds(), 2));
|
69 |
+
fmt = fmt.replace("%I", "" + ((d.getHours() + 11) % 12 + 1));
|
70 |
+
fmt = fmt.replace("%p", "" + (d.getHours() < 12 ? "AM" : "PM"));
|
71 |
+
fmt = fmt.replace("%B", "" + ed.getLang("insertdatetime.months_long").split(',')[d.getMonth()]);
|
72 |
+
fmt = fmt.replace("%b", "" + ed.getLang("insertdatetime.months_short").split(',')[d.getMonth()]);
|
73 |
+
fmt = fmt.replace("%A", "" + ed.getLang("insertdatetime.day_long").split(',')[d.getDay()]);
|
74 |
+
fmt = fmt.replace("%a", "" + ed.getLang("insertdatetime.day_short").split(',')[d.getDay()]);
|
75 |
+
fmt = fmt.replace("%%", "%");
|
76 |
+
|
77 |
+
return fmt;
|
78 |
+
}
|
79 |
+
});
|
80 |
+
|
81 |
+
// Register plugin
|
82 |
+
tinymce.PluginManager.add('insertdatetime', tinymce.plugins.InsertDateTime);
|
83 |
+
})();
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/layer/editor_plugin.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(function(){function a(b){do{if(b.className&&b.className.indexOf("mceItemLayer")!=-1){return b}}while(b=b.parentNode)}tinymce.create("tinymce.plugins.Layer",{init:function(b,c){var d=this;d.editor=b;b.addCommand("mceInsertLayer",d._insertLayer,d);b.addCommand("mceMoveForward",function(){d._move(1)});b.addCommand("mceMoveBackward",function(){d._move(-1)});b.addCommand("mceMakeAbsolute",function(){d._toggleAbsolute()});b.addButton("moveforward",{title:"layer.forward_desc",cmd:"mceMoveForward"});b.addButton("movebackward",{title:"layer.backward_desc",cmd:"mceMoveBackward"});b.addButton("absolute",{title:"layer.absolute_desc",cmd:"mceMakeAbsolute"});b.addButton("insertlayer",{title:"layer.insertlayer_desc",cmd:"mceInsertLayer"});b.onInit.add(function(){var e=b.dom;if(tinymce.isIE){b.getDoc().execCommand("2D-Position",false,true)}});b.onMouseUp.add(function(f,h){var g=a(h.target);if(g){f.dom.setAttrib(g,"data-mce-style","")}});b.onMouseDown.add(function(f,j){var h=j.target,i=f.getDoc(),g;if(tinymce.isGecko){if(a(h)){if(i.designMode!=="on"){i.designMode="on";h=i.body;g=h.parentNode;g.removeChild(h);g.appendChild(h)}}else{if(i.designMode=="on"){i.designMode="off"}}}});b.onNodeChange.add(d._nodeChange,d);b.onVisualAid.add(d._visualAid,d)},getInfo:function(){return{longname:"Layer",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/layer",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_nodeChange:function(c,b,f){var d,e;d=this._getParentLayer(f);e=c.dom.getParent(f,"DIV,P,IMG");if(!e){b.setDisabled("absolute",1);b.setDisabled("moveforward",1);b.setDisabled("movebackward",1)}else{b.setDisabled("absolute",0);b.setDisabled("moveforward",!d);b.setDisabled("movebackward",!d);b.setActive("absolute",d&&d.style.position.toLowerCase()=="absolute")}},_visualAid:function(b,d,c){var f=b.dom;tinymce.each(f.select("div,p",d),function(g){if(/^(absolute|relative|fixed)$/i.test(g.style.position)){if(c){f.addClass(g,"mceItemVisualAid")}else{f.removeClass(g,"mceItemVisualAid")}f.addClass(g,"mceItemLayer")}})},_move:function(j){var c=this.editor,g,h=[],f=this._getParentLayer(c.selection.getNode()),e=-1,k=-1,b;b=[];tinymce.walk(c.getBody(),function(d){if(d.nodeType==1&&/^(absolute|relative|static)$/i.test(d.style.position)){b.push(d)}},"childNodes");for(g=0;g<b.length;g++){h[g]=b[g].style.zIndex?parseInt(b[g].style.zIndex):0;if(e<0&&b[g]==f){e=g}}if(j<0){for(g=0;g<h.length;g++){if(h[g]<h[e]){k=g;break}}if(k>-1){b[e].style.zIndex=h[k];b[k].style.zIndex=h[e]}else{if(h[e]>0){b[e].style.zIndex=h[e]-1}}}else{for(g=0;g<h.length;g++){if(h[g]>h[e]){k=g;break}}if(k>-1){b[e].style.zIndex=h[k];b[k].style.zIndex=h[e]}else{b[e].style.zIndex=h[e]+1}}c.execCommand("mceRepaint")},_getParentLayer:function(b){return this.editor.dom.getParent(b,function(c){return c.nodeType==1&&/^(absolute|relative|static)$/i.test(c.style.position)})},_insertLayer:function(){var c=this.editor,e=c.dom,d=e.getPos(e.getParent(c.selection.getNode(),"*")),b=c.getBody();c.dom.add(b,"div",{style:{position:"absolute",left:d.x,top:(d.y>20?d.y:20),width:100,height:100},"class":"mceItemVisualAid mceItemLayer"},c.selection.getContent()||c.getLang("layer.content"));if(tinymce.isIE){e.setHTML(b,b.innerHTML)}},_toggleAbsolute:function(){var b=this.editor,c=this._getParentLayer(b.selection.getNode());if(!c){c=b.dom.getParent(b.selection.getNode(),"DIV,P,IMG")}if(c){if(c.style.position.toLowerCase()=="absolute"){b.dom.setStyles(c,{position:"",left:"",top:"",width:"",height:""});b.dom.removeClass(c,"mceItemVisualAid");b.dom.removeClass(c,"mceItemLayer")}else{if(c.style.left==""){c.style.left=20+"px"}if(c.style.top==""){c.style.top=20+"px"}if(c.style.width==""){c.style.width=c.width?(c.width+"px"):"100px"}if(c.style.height==""){c.style.height=c.height?(c.height+"px"):"100px"}c.style.position="absolute";b.dom.setAttrib(c,"data-mce-style","");b.addVisual(b.getBody())}b.execCommand("mceRepaint");b.nodeChanged()}}});tinymce.PluginManager.add("layer",tinymce.plugins.Layer)})();
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/layer/editor_plugin_src.js
ADDED
@@ -0,0 +1,262 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
function findParentLayer(node) {
|
13 |
+
do {
|
14 |
+
if (node.className && node.className.indexOf('mceItemLayer') != -1) {
|
15 |
+
return node;
|
16 |
+
}
|
17 |
+
} while (node = node.parentNode);
|
18 |
+
};
|
19 |
+
|
20 |
+
tinymce.create('tinymce.plugins.Layer', {
|
21 |
+
init : function(ed, url) {
|
22 |
+
var t = this;
|
23 |
+
|
24 |
+
t.editor = ed;
|
25 |
+
|
26 |
+
// Register commands
|
27 |
+
ed.addCommand('mceInsertLayer', t._insertLayer, t);
|
28 |
+
|
29 |
+
ed.addCommand('mceMoveForward', function() {
|
30 |
+
t._move(1);
|
31 |
+
});
|
32 |
+
|
33 |
+
ed.addCommand('mceMoveBackward', function() {
|
34 |
+
t._move(-1);
|
35 |
+
});
|
36 |
+
|
37 |
+
ed.addCommand('mceMakeAbsolute', function() {
|
38 |
+
t._toggleAbsolute();
|
39 |
+
});
|
40 |
+
|
41 |
+
// Register buttons
|
42 |
+
ed.addButton('moveforward', {title : 'layer.forward_desc', cmd : 'mceMoveForward'});
|
43 |
+
ed.addButton('movebackward', {title : 'layer.backward_desc', cmd : 'mceMoveBackward'});
|
44 |
+
ed.addButton('absolute', {title : 'layer.absolute_desc', cmd : 'mceMakeAbsolute'});
|
45 |
+
ed.addButton('insertlayer', {title : 'layer.insertlayer_desc', cmd : 'mceInsertLayer'});
|
46 |
+
|
47 |
+
ed.onInit.add(function() {
|
48 |
+
var dom = ed.dom;
|
49 |
+
|
50 |
+
if (tinymce.isIE)
|
51 |
+
ed.getDoc().execCommand('2D-Position', false, true);
|
52 |
+
});
|
53 |
+
|
54 |
+
// Remove serialized styles when selecting a layer since it might be changed by a drag operation
|
55 |
+
ed.onMouseUp.add(function(ed, e) {
|
56 |
+
var layer = findParentLayer(e.target);
|
57 |
+
|
58 |
+
if (layer) {
|
59 |
+
ed.dom.setAttrib(layer, 'data-mce-style', '');
|
60 |
+
}
|
61 |
+
});
|
62 |
+
|
63 |
+
// Fixes edit focus issues with layers on Gecko
|
64 |
+
// This will enable designMode while inside a layer and disable it when outside
|
65 |
+
ed.onMouseDown.add(function(ed, e) {
|
66 |
+
var node = e.target, doc = ed.getDoc(), parent;
|
67 |
+
|
68 |
+
if (tinymce.isGecko) {
|
69 |
+
if (findParentLayer(node)) {
|
70 |
+
if (doc.designMode !== 'on') {
|
71 |
+
doc.designMode = 'on';
|
72 |
+
|
73 |
+
// Repaint caret
|
74 |
+
node = doc.body;
|
75 |
+
parent = node.parentNode;
|
76 |
+
parent.removeChild(node);
|
77 |
+
parent.appendChild(node);
|
78 |
+
}
|
79 |
+
} else if (doc.designMode == 'on') {
|
80 |
+
doc.designMode = 'off';
|
81 |
+
}
|
82 |
+
}
|
83 |
+
});
|
84 |
+
|
85 |
+
ed.onNodeChange.add(t._nodeChange, t);
|
86 |
+
ed.onVisualAid.add(t._visualAid, t);
|
87 |
+
},
|
88 |
+
|
89 |
+
getInfo : function() {
|
90 |
+
return {
|
91 |
+
longname : 'Layer',
|
92 |
+
author : 'Moxiecode Systems AB',
|
93 |
+
authorurl : 'http://tinymce.moxiecode.com',
|
94 |
+
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/layer',
|
95 |
+
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
96 |
+
};
|
97 |
+
},
|
98 |
+
|
99 |
+
// Private methods
|
100 |
+
|
101 |
+
_nodeChange : function(ed, cm, n) {
|
102 |
+
var le, p;
|
103 |
+
|
104 |
+
le = this._getParentLayer(n);
|
105 |
+
p = ed.dom.getParent(n, 'DIV,P,IMG');
|
106 |
+
|
107 |
+
if (!p) {
|
108 |
+
cm.setDisabled('absolute', 1);
|
109 |
+
cm.setDisabled('moveforward', 1);
|
110 |
+
cm.setDisabled('movebackward', 1);
|
111 |
+
} else {
|
112 |
+
cm.setDisabled('absolute', 0);
|
113 |
+
cm.setDisabled('moveforward', !le);
|
114 |
+
cm.setDisabled('movebackward', !le);
|
115 |
+
cm.setActive('absolute', le && le.style.position.toLowerCase() == "absolute");
|
116 |
+
}
|
117 |
+
},
|
118 |
+
|
119 |
+
// Private methods
|
120 |
+
|
121 |
+
_visualAid : function(ed, e, s) {
|
122 |
+
var dom = ed.dom;
|
123 |
+
|
124 |
+
tinymce.each(dom.select('div,p', e), function(e) {
|
125 |
+
if (/^(absolute|relative|fixed)$/i.test(e.style.position)) {
|
126 |
+
if (s)
|
127 |
+
dom.addClass(e, 'mceItemVisualAid');
|
128 |
+
else
|
129 |
+
dom.removeClass(e, 'mceItemVisualAid');
|
130 |
+
|
131 |
+
dom.addClass(e, 'mceItemLayer');
|
132 |
+
}
|
133 |
+
});
|
134 |
+
},
|
135 |
+
|
136 |
+
_move : function(d) {
|
137 |
+
var ed = this.editor, i, z = [], le = this._getParentLayer(ed.selection.getNode()), ci = -1, fi = -1, nl;
|
138 |
+
|
139 |
+
nl = [];
|
140 |
+
tinymce.walk(ed.getBody(), function(n) {
|
141 |
+
if (n.nodeType == 1 && /^(absolute|relative|static)$/i.test(n.style.position))
|
142 |
+
nl.push(n);
|
143 |
+
}, 'childNodes');
|
144 |
+
|
145 |
+
// Find z-indexes
|
146 |
+
for (i=0; i<nl.length; i++) {
|
147 |
+
z[i] = nl[i].style.zIndex ? parseInt(nl[i].style.zIndex) : 0;
|
148 |
+
|
149 |
+
if (ci < 0 && nl[i] == le)
|
150 |
+
ci = i;
|
151 |
+
}
|
152 |
+
|
153 |
+
if (d < 0) {
|
154 |
+
// Move back
|
155 |
+
|
156 |
+
// Try find a lower one
|
157 |
+
for (i=0; i<z.length; i++) {
|
158 |
+
if (z[i] < z[ci]) {
|
159 |
+
fi = i;
|
160 |
+
break;
|
161 |
+
}
|
162 |
+
}
|
163 |
+
|
164 |
+
if (fi > -1) {
|
165 |
+
nl[ci].style.zIndex = z[fi];
|
166 |
+
nl[fi].style.zIndex = z[ci];
|
167 |
+
} else {
|
168 |
+
if (z[ci] > 0)
|
169 |
+
nl[ci].style.zIndex = z[ci] - 1;
|
170 |
+
}
|
171 |
+
} else {
|
172 |
+
// Move forward
|
173 |
+
|
174 |
+
// Try find a higher one
|
175 |
+
for (i=0; i<z.length; i++) {
|
176 |
+
if (z[i] > z[ci]) {
|
177 |
+
fi = i;
|
178 |
+
break;
|
179 |
+
}
|
180 |
+
}
|
181 |
+
|
182 |
+
if (fi > -1) {
|
183 |
+
nl[ci].style.zIndex = z[fi];
|
184 |
+
nl[fi].style.zIndex = z[ci];
|
185 |
+
} else
|
186 |
+
nl[ci].style.zIndex = z[ci] + 1;
|
187 |
+
}
|
188 |
+
|
189 |
+
ed.execCommand('mceRepaint');
|
190 |
+
},
|
191 |
+
|
192 |
+
_getParentLayer : function(n) {
|
193 |
+
return this.editor.dom.getParent(n, function(n) {
|
194 |
+
return n.nodeType == 1 && /^(absolute|relative|static)$/i.test(n.style.position);
|
195 |
+
});
|
196 |
+
},
|
197 |
+
|
198 |
+
_insertLayer : function() {
|
199 |
+
var ed = this.editor, dom = ed.dom, p = dom.getPos(dom.getParent(ed.selection.getNode(), '*')), body = ed.getBody();
|
200 |
+
|
201 |
+
ed.dom.add(body, 'div', {
|
202 |
+
style : {
|
203 |
+
position : 'absolute',
|
204 |
+
left : p.x,
|
205 |
+
top : (p.y > 20 ? p.y : 20),
|
206 |
+
width : 100,
|
207 |
+
height : 100
|
208 |
+
},
|
209 |
+
'class' : 'mceItemVisualAid mceItemLayer'
|
210 |
+
}, ed.selection.getContent() || ed.getLang('layer.content'));
|
211 |
+
|
212 |
+
// Workaround for IE where it messes up the JS engine if you insert a layer on IE 6,7
|
213 |
+
if (tinymce.isIE)
|
214 |
+
dom.setHTML(body, body.innerHTML);
|
215 |
+
},
|
216 |
+
|
217 |
+
_toggleAbsolute : function() {
|
218 |
+
var ed = this.editor, le = this._getParentLayer(ed.selection.getNode());
|
219 |
+
|
220 |
+
if (!le)
|
221 |
+
le = ed.dom.getParent(ed.selection.getNode(), 'DIV,P,IMG');
|
222 |
+
|
223 |
+
if (le) {
|
224 |
+
if (le.style.position.toLowerCase() == "absolute") {
|
225 |
+
ed.dom.setStyles(le, {
|
226 |
+
position : '',
|
227 |
+
left : '',
|
228 |
+
top : '',
|
229 |
+
width : '',
|
230 |
+
height : ''
|
231 |
+
});
|
232 |
+
|
233 |
+
ed.dom.removeClass(le, 'mceItemVisualAid');
|
234 |
+
ed.dom.removeClass(le, 'mceItemLayer');
|
235 |
+
} else {
|
236 |
+
if (le.style.left == "")
|
237 |
+
le.style.left = 20 + 'px';
|
238 |
+
|
239 |
+
if (le.style.top == "")
|
240 |
+
le.style.top = 20 + 'px';
|
241 |
+
|
242 |
+
if (le.style.width == "")
|
243 |
+
le.style.width = le.width ? (le.width + 'px') : '100px';
|
244 |
+
|
245 |
+
if (le.style.height == "")
|
246 |
+
le.style.height = le.height ? (le.height + 'px') : '100px';
|
247 |
+
|
248 |
+
le.style.position = "absolute";
|
249 |
+
|
250 |
+
ed.dom.setAttrib(le, 'data-mce-style', '');
|
251 |
+
ed.addVisual(ed.getBody());
|
252 |
+
}
|
253 |
+
|
254 |
+
ed.execCommand('mceRepaint');
|
255 |
+
ed.nodeChanged();
|
256 |
+
}
|
257 |
+
}
|
258 |
+
});
|
259 |
+
|
260 |
+
// Register plugin
|
261 |
+
tinymce.PluginManager.add('layer', tinymce.plugins.Layer);
|
262 |
+
})();
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/legacyoutput/editor_plugin.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(function(a){a.onAddEditor.addToTop(function(c,b){b.settings.inline_styles=false});a.create("tinymce.plugins.LegacyOutput",{init:function(b){b.onInit.add(function(){var c="p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",e=a.explode(b.settings.font_size_style_values),d=b.schema;b.formatter.register({alignleft:{selector:c,attributes:{align:"left"}},aligncenter:{selector:c,attributes:{align:"center"}},alignright:{selector:c,attributes:{align:"right"}},alignfull:{selector:c,attributes:{align:"justify"}},bold:[{inline:"b",remove:"all"},{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}}],italic:[{inline:"i",remove:"all"},{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}}],underline:[{inline:"u",remove:"all"},{inline:"span",styles:{textDecoration:"underline"},exact:true}],strikethrough:[{inline:"strike",remove:"all"},{inline:"span",styles:{textDecoration:"line-through"},exact:true}],fontname:{inline:"font",attributes:{face:"%value"}},fontsize:{inline:"font",attributes:{size:function(f){return a.inArray(e,f.value)+1}}},forecolor:{inline:"font",styles:{color:"%value"}},hilitecolor:{inline:"font",styles:{backgroundColor:"%value"}}});a.each("b,i,u,strike".split(","),function(f){d.addValidElements(f+"[*]")});if(!d.getElementRule("font")){d.addValidElements("font[face|size|color|style]")}a.each(c.split(","),function(f){var h=d.getElementRule(f),g;if(h){if(!h.attributes.align){h.attributes.align={};h.attributesOrder.push("align")}}});b.onNodeChange.add(function(g,k){var j,f,h,i;f=g.dom.getParent(g.selection.getNode(),"font");if(f){h=f.face;i=f.size}if(j=k.get("fontselect")){j.select(function(l){return l==h})}if(j=k.get("fontsizeselect")){j.select(function(m){var l=a.inArray(e,m.fontSize);return l+1==i})}})})},getInfo:function(){return{longname:"LegacyOutput",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/legacyoutput",version:a.majorVersion+"."+a.minorVersion}}});a.PluginManager.add("legacyoutput",a.plugins.LegacyOutput)})(tinymce);
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/legacyoutput/editor_plugin_src.js
ADDED
@@ -0,0 +1,139 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
* This plugin will force TinyMCE to produce deprecated legacy output such as font elements, u elements, align
|
11 |
+
* attributes and so forth. There are a few cases where these old items might be needed for example in email applications or with Flash
|
12 |
+
*
|
13 |
+
* However you should NOT use this plugin if you are building some system that produces web contents such as a CMS. All these elements are
|
14 |
+
* not apart of the newer specifications for HTML and XHTML.
|
15 |
+
*/
|
16 |
+
|
17 |
+
(function(tinymce) {
|
18 |
+
// Override inline_styles setting to force TinyMCE to produce deprecated contents
|
19 |
+
tinymce.onAddEditor.addToTop(function(tinymce, editor) {
|
20 |
+
editor.settings.inline_styles = false;
|
21 |
+
});
|
22 |
+
|
23 |
+
// Create the legacy ouput plugin
|
24 |
+
tinymce.create('tinymce.plugins.LegacyOutput', {
|
25 |
+
init : function(editor) {
|
26 |
+
editor.onInit.add(function() {
|
27 |
+
var alignElements = 'p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img',
|
28 |
+
fontSizes = tinymce.explode(editor.settings.font_size_style_values),
|
29 |
+
schema = editor.schema;
|
30 |
+
|
31 |
+
// Override some internal formats to produce legacy elements and attributes
|
32 |
+
editor.formatter.register({
|
33 |
+
// Change alignment formats to use the deprecated align attribute
|
34 |
+
alignleft : {selector : alignElements, attributes : {align : 'left'}},
|
35 |
+
aligncenter : {selector : alignElements, attributes : {align : 'center'}},
|
36 |
+
alignright : {selector : alignElements, attributes : {align : 'right'}},
|
37 |
+
alignfull : {selector : alignElements, attributes : {align : 'justify'}},
|
38 |
+
|
39 |
+
// Change the basic formatting elements to use deprecated element types
|
40 |
+
bold : [
|
41 |
+
{inline : 'b', remove : 'all'},
|
42 |
+
{inline : 'strong', remove : 'all'},
|
43 |
+
{inline : 'span', styles : {fontWeight : 'bold'}}
|
44 |
+
],
|
45 |
+
italic : [
|
46 |
+
{inline : 'i', remove : 'all'},
|
47 |
+
{inline : 'em', remove : 'all'},
|
48 |
+
{inline : 'span', styles : {fontStyle : 'italic'}}
|
49 |
+
],
|
50 |
+
underline : [
|
51 |
+
{inline : 'u', remove : 'all'},
|
52 |
+
{inline : 'span', styles : {textDecoration : 'underline'}, exact : true}
|
53 |
+
],
|
54 |
+
strikethrough : [
|
55 |
+
{inline : 'strike', remove : 'all'},
|
56 |
+
{inline : 'span', styles : {textDecoration: 'line-through'}, exact : true}
|
57 |
+
],
|
58 |
+
|
59 |
+
// Change font size and font family to use the deprecated font element
|
60 |
+
fontname : {inline : 'font', attributes : {face : '%value'}},
|
61 |
+
fontsize : {
|
62 |
+
inline : 'font',
|
63 |
+
attributes : {
|
64 |
+
size : function(vars) {
|
65 |
+
return tinymce.inArray(fontSizes, vars.value) + 1;
|
66 |
+
}
|
67 |
+
}
|
68 |
+
},
|
69 |
+
|
70 |
+
// Setup font elements for colors as well
|
71 |
+
forecolor : {inline : 'font', styles : {color : '%value'}},
|
72 |
+
hilitecolor : {inline : 'font', styles : {backgroundColor : '%value'}}
|
73 |
+
});
|
74 |
+
|
75 |
+
// Check that deprecated elements are allowed if not add them
|
76 |
+
tinymce.each('b,i,u,strike'.split(','), function(name) {
|
77 |
+
schema.addValidElements(name + '[*]');
|
78 |
+
});
|
79 |
+
|
80 |
+
// Add font element if it's missing
|
81 |
+
if (!schema.getElementRule("font"))
|
82 |
+
schema.addValidElements("font[face|size|color|style]");
|
83 |
+
|
84 |
+
// Add the missing and depreacted align attribute for the serialization engine
|
85 |
+
tinymce.each(alignElements.split(','), function(name) {
|
86 |
+
var rule = schema.getElementRule(name), found;
|
87 |
+
|
88 |
+
if (rule) {
|
89 |
+
if (!rule.attributes.align) {
|
90 |
+
rule.attributes.align = {};
|
91 |
+
rule.attributesOrder.push('align');
|
92 |
+
}
|
93 |
+
}
|
94 |
+
});
|
95 |
+
|
96 |
+
// Listen for the onNodeChange event so that we can do special logic for the font size and font name drop boxes
|
97 |
+
editor.onNodeChange.add(function(editor, control_manager) {
|
98 |
+
var control, fontElm, fontName, fontSize;
|
99 |
+
|
100 |
+
// Find font element get it's name and size
|
101 |
+
fontElm = editor.dom.getParent(editor.selection.getNode(), 'font');
|
102 |
+
if (fontElm) {
|
103 |
+
fontName = fontElm.face;
|
104 |
+
fontSize = fontElm.size;
|
105 |
+
}
|
106 |
+
|
107 |
+
// Select/unselect the font name in droplist
|
108 |
+
if (control = control_manager.get('fontselect')) {
|
109 |
+
control.select(function(value) {
|
110 |
+
return value == fontName;
|
111 |
+
});
|
112 |
+
}
|
113 |
+
|
114 |
+
// Select/unselect the font size in droplist
|
115 |
+
if (control = control_manager.get('fontsizeselect')) {
|
116 |
+
control.select(function(value) {
|
117 |
+
var index = tinymce.inArray(fontSizes, value.fontSize);
|
118 |
+
|
119 |
+
return index + 1 == fontSize;
|
120 |
+
});
|
121 |
+
}
|
122 |
+
});
|
123 |
+
});
|
124 |
+
},
|
125 |
+
|
126 |
+
getInfo : function() {
|
127 |
+
return {
|
128 |
+
longname : 'LegacyOutput',
|
129 |
+
author : 'Moxiecode Systems AB',
|
130 |
+
authorurl : 'http://tinymce.moxiecode.com',
|
131 |
+
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/legacyoutput',
|
132 |
+
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
133 |
+
};
|
134 |
+
}
|
135 |
+
});
|
136 |
+
|
137 |
+
// Register plugin
|
138 |
+
tinymce.PluginManager.add('legacyoutput', tinymce.plugins.LegacyOutput);
|
139 |
+
})(tinymce);
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/lists/editor_plugin.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(function(){var e=tinymce.each,r=tinymce.dom.Event,g;function p(t,s){while(t&&(t.nodeType===8||(t.nodeType===3&&/^[ \t\n\r]*$/.test(t.nodeValue)))){t=s(t)}return t}function b(s){return p(s,function(t){return t.previousSibling})}function i(s){return p(s,function(t){return t.nextSibling})}function d(s,u,t){return s.dom.getParent(u,function(v){return tinymce.inArray(t,v)!==-1})}function n(s){return s&&(s.tagName==="OL"||s.tagName==="UL")}function c(u,v){var t,w,s;t=b(u.lastChild);while(n(t)){w=t;t=b(w.previousSibling)}if(w){s=v.create("li",{style:"list-style-type: none;"});v.split(u,w);v.insertAfter(s,w);s.appendChild(w);s.appendChild(w);u=s.previousSibling}return u}function m(t,s,u){t=a(t,s,u);return o(t,s,u)}function a(u,s,v){var t=b(u.previousSibling);if(t){return h(t,u,s?t:false,v)}else{return u}}function o(u,t,v){var s=i(u.nextSibling);if(s){return h(u,s,t?s:false,v)}else{return u}}function h(u,s,t,v){if(l(u,s,!!t,v)){return f(u,s,t)}else{if(u&&u.tagName==="LI"&&n(s)){u.appendChild(s)}}return s}function l(u,t,s,v){if(!u||!t){return false}else{if(u.tagName==="LI"&&t.tagName==="LI"){return t.style.listStyleType==="none"||j(t)}else{if(n(u)){return(u.tagName===t.tagName&&(s||u.style.listStyleType===t.style.listStyleType))||q(t)}else{return v&&u.tagName==="P"&&t.tagName==="P"}}}}function q(t){var s=i(t.firstChild),u=b(t.lastChild);return s&&u&&n(t)&&s===u&&(n(s)||s.style.listStyleType==="none"||j(s))}function j(u){var t=i(u.firstChild),s=b(u.lastChild);return t&&s&&t===s&&n(t)}function f(w,v,s){var u=b(w.lastChild),t=i(v.firstChild);if(w.tagName==="P"){w.appendChild(w.ownerDocument.createElement("br"))}while(v.firstChild){w.appendChild(v.firstChild)}if(s){w.style.listStyleType=s.style.listStyleType}v.parentNode.removeChild(v);h(u,t,false);return w}function k(t,u){var s;if(!u.is(t,"li,ol,ul")){s=u.getParent(t,"li");if(s){t=s}}return t}tinymce.create("tinymce.plugins.Lists",{init:function(y){var v="TABBING";var s="EMPTY";var J="ESCAPE";var z="PARAGRAPH";var N="UNKNOWN";var x=N;function E(U){return U.keyCode===tinymce.VK.TAB&&!(U.altKey||U.ctrlKey)&&(y.queryCommandState("InsertUnorderedList")||y.queryCommandState("InsertOrderedList"))}function w(){var U=B();var W=U.parentNode.parentNode;var V=U.parentNode.lastChild===U;return V&&!t(W)&&P(U)}function t(U){if(n(U)){return U.parentNode&&U.parentNode.tagName==="LI"}else{return U.tagName==="LI"}}function F(){return y.selection.isCollapsed()&&P(B())}function B(){var U=y.selection.getStart();return((U.tagName=="BR"||U.tagName=="")&&U.parentNode.tagName=="LI")?U.parentNode:U}function P(U){var V=U.childNodes.length;if(U.tagName==="LI"){return V==0?true:V==1&&(U.firstChild.tagName==""||U.firstChild.tagName=="BR"||H(U))}return false}function H(U){var V=tinymce.grep(U.parentNode.childNodes,function(Y){return Y.tagName=="LI"});var W=U==V[V.length-1];var X=U.firstChild;return tinymce.isIE9&&W&&(X.nodeValue==String.fromCharCode(160)||X.nodeValue==String.fromCharCode(32))}function T(U){return U.keyCode===tinymce.VK.ENTER}function A(U){return T(U)&&!U.shiftKey}function M(U){if(E(U)){return v}else{if(A(U)&&w()){return N}else{if(A(U)&&F()){return s}else{return N}}}}function D(U,V){if(x==v||x==s||tinymce.isGecko&&x==J){r.cancel(V)}}function C(){var U=y.selection.getRng(true);var V=U.startContainer;if(V.nodeType==3){var W=V.nodeValue;if(tinymce.isIE9&&W.length>1&&W.charCodeAt(W.length-1)==32){return(U.endOffset==W.length-1)}else{return(U.endOffset==W.length)}}else{if(V.nodeType==1){return U.endOffset==V.childNodes.length}}return false}function I(){var W=y.selection.getNode();var V="h1,h2,h3,h4,h5,h6,p,div";var U=y.dom.is(W,V)&&W.parentNode.tagName==="LI"&&W.parentNode.lastChild===W;return y.selection.isCollapsed()&&U&&C()}function K(W,Y){if(A(Y)&&I()){var X=W.selection.getNode();var V=W.dom.create("li");var U=W.dom.getParent(X,"li");W.dom.insertAfter(V,U);if(tinymce.isIE6||tinymce.isIE7||tinyMCE.isIE8){W.selection.setCursorLocation(V,1)}else{W.selection.setCursorLocation(V,0)}Y.preventDefault()}}function u(X,Z){var ac;if(!tinymce.isGecko){return}var V=X.selection.getStart();if(Z.keyCode!=tinymce.VK.BACKSPACE||V.tagName!=="IMG"){return}function W(ag){var ah=ag.firstChild;var af=null;do{if(!ah){break}if(ah.tagName==="LI"){af=ah}}while(ah=ah.nextSibling);return af}function ae(ag,af){while(ag.childNodes.length>0){af.appendChild(ag.childNodes[0])}}ac=V.parentNode.previousSibling;if(!ac){return}var aa;if(ac.tagName==="UL"||ac.tagName==="OL"){aa=ac}else{if(ac.previousSibling&&(ac.previousSibling.tagName==="UL"||ac.previousSibling.tagName==="OL")){aa=ac.previousSibling}else{return}}var ad=W(aa);var U=X.dom.createRng();U.setStart(ad,1);U.setEnd(ad,1);X.selection.setRng(U);X.selection.collapse(true);var Y=X.selection.getBookmark();var ab=V.parentNode.cloneNode(true);if(ab.tagName==="P"||ab.tagName==="DIV"){ae(ab,ad)}else{ad.appendChild(ab)}V.parentNode.parentNode.removeChild(V.parentNode);X.selection.moveToBookmark(Y)}function G(U){var V=y.dom.getParent(U,"ol,ul");if(V!=null){var W=V.lastChild;y.selection.setCursorLocation(W,0)}}this.ed=y;y.addCommand("Indent",this.indent,this);y.addCommand("Outdent",this.outdent,this);y.addCommand("InsertUnorderedList",function(){this.applyList("UL","OL")},this);y.addCommand("InsertOrderedList",function(){this.applyList("OL","UL")},this);y.onInit.add(function(){y.editorCommands.addCommands({outdent:function(){var V=y.selection,W=y.dom;function U(X){X=W.getParent(X,W.isBlock);return X&&(parseInt(y.dom.getStyle(X,"margin-left")||0,10)+parseInt(y.dom.getStyle(X,"padding-left")||0,10))>0}return U(V.getStart())||U(V.getEnd())||y.queryCommandState("InsertOrderedList")||y.queryCommandState("InsertUnorderedList")}},"state")});y.onKeyUp.add(function(V,W){if(x==v){V.execCommand(W.shiftKey?"Outdent":"Indent",true,null);x=N;return r.cancel(W)}else{if(x==s){var U=B();var Y=V.settings.list_outdent_on_enter===true||W.shiftKey;V.execCommand(Y?"Outdent":"Indent",true,null);if(tinymce.isIE){G(U)}return r.cancel(W)}else{if(x==J){if(tinymce.isIE6||tinymce.isIE7||tinymce.isIE8){var X=V.getDoc().createTextNode("\uFEFF");V.selection.getNode().appendChild(X)}else{if(tinymce.isIE9||tinymce.isGecko){V.execCommand("Outdent");return r.cancel(W)}}}}}});function L(V,U){var W=y.getDoc().createTextNode("\uFEFF");V.insertBefore(W,U);y.selection.setCursorLocation(W,0);y.execCommand("mceRepaint")}function R(V,X){if(T(X)){var U=B();if(U){var W=U.parentNode;var Y=W&&W.parentNode;if(Y&&Y.nodeName=="LI"&&Y.firstChild==W&&U==W.firstChild){L(Y,W)}}}}function S(V,X){if(T(X)){var U=B();if(V.dom.select("ul li",U).length===1){var W=U.firstChild;L(U,W)}}}function Q(V,Z){function W(ad,aa){var ac=[];var ae=new tinymce.dom.TreeWalker(aa,ad);for(var ab=ae.current();ab;ab=ae.next()){if(V.dom.is(ab,"ol,ul,li")){ac.push(ab)}}return ac}if(Z.keyCode==tinymce.VK.BACKSPACE){var U=B();if(U){var Y=V.dom.getParent(U,"ol,ul");if(Y&&Y.firstChild===U){var X=W(Y,U);V.execCommand("Outdent",false,X);V.undoManager.add();return r.cancel(Z)}}}}function O(V,X){var U=B();if(X.keyCode===tinymce.VK.BACKSPACE&&V.dom.is(U,"li")&&U.parentNode.firstChild!==U){if(V.dom.select("ul,ol",U).length===1){var Z=U.previousSibling;V.dom.remove(V.dom.select("br",U));V.dom.remove(U,true);var W=tinymce.grep(Z.childNodes,function(aa){return aa.nodeType===3});if(W.length===1){var Y=W[0];V.selection.setCursorLocation(Y,Y.length)}V.undoManager.add();return r.cancel(X)}}}y.onKeyDown.add(function(U,V){x=M(V)});y.onKeyDown.add(D);y.onKeyDown.add(u);y.onKeyDown.add(K);if(tinymce.isGecko){y.onKeyUp.add(R)}if(tinymce.isIE8){y.onKeyUp.add(S)}if(tinymce.isGecko||tinymce.isWebKit){y.onKeyDown.add(Q)}if(tinymce.isWebKit){y.onKeyDown.add(O)}},applyList:function(y,v){var C=this,z=C.ed,I=z.dom,s=[],H=false,u=false,w=false,B,G=z.selection.getSelectedBlocks();function E(t){if(t&&t.tagName==="BR"){I.remove(t)}}function F(M){var N=I.create(y),t;function L(O){if(O.style.marginLeft||O.style.paddingLeft){C.adjustPaddingFunction(false)(O)}}if(M.tagName==="LI"){}else{if(M.tagName==="P"||M.tagName==="DIV"||M.tagName==="BODY"){K(M,function(P,O){J(P,O,M.tagName==="BODY"?null:P.parentNode);t=P.parentNode;L(t);E(O)});if(t){if(t.tagName==="LI"&&(M.tagName==="P"||G.length>1)){I.split(t.parentNode.parentNode,t.parentNode)}m(t.parentNode,true)}return}else{t=I.create("li");I.insertAfter(t,M);t.appendChild(M);L(M);M=t}}I.insertAfter(N,M);N.appendChild(M);m(N,true);s.push(M)}function J(P,L,N){var t,O=P,M;while(!I.isBlock(P.parentNode)&&P.parentNode!==I.getRoot()){P=I.split(P.parentNode,P.previousSibling);P=P.nextSibling;O=P}if(N){t=N.cloneNode(true);P.parentNode.insertBefore(t,P);while(t.firstChild){I.remove(t.firstChild)}t=I.rename(t,"li")}else{t=I.create("li");P.parentNode.insertBefore(t,P)}while(O&&O!=L){M=O.nextSibling;t.appendChild(O);O=M}if(t.childNodes.length===0){t.innerHTML='<br _mce_bogus="1" />'}F(t)}function K(Q,T){var N,R,O=3,L=1,t="br,ul,ol,p,div,h1,h2,h3,h4,h5,h6,table,blockquote,address,pre,form,center,dl";function P(X,U){var V=I.createRng(),W;g.keep=true;z.selection.moveToBookmark(g);g.keep=false;W=z.selection.getRng(true);if(!U){U=X.parentNode.lastChild}V.setStartBefore(X);V.setEndAfter(U);return !(V.compareBoundaryPoints(O,W)>0||V.compareBoundaryPoints(L,W)<=0)}function S(U){if(U.nextSibling){return U.nextSibling}if(!I.isBlock(U.parentNode)&&U.parentNode!==I.getRoot()){return S(U.parentNode)}}N=Q.firstChild;var M=false;e(I.select(t,Q),function(U){if(U.hasAttribute&&U.hasAttribute("_mce_bogus")){return true}if(P(N,U)){I.addClass(U,"_mce_tagged_br");N=S(U)}});M=(N&&P(N,undefined));N=Q.firstChild;e(I.select(t,Q),function(V){var U=S(V);if(V.hasAttribute&&V.hasAttribute("_mce_bogus")){return true}if(I.hasClass(V,"_mce_tagged_br")){T(N,V,R);R=null}else{R=V}N=U});if(M){T(N,undefined,R)}}function D(t){K(t,function(M,L,N){J(M,L);E(L);E(N)})}function A(t){if(tinymce.inArray(s,t)!==-1){return}if(t.parentNode.tagName===v){I.split(t.parentNode,t);F(t);o(t.parentNode,false)}s.push(t)}function x(M){var O,N,L,t;if(tinymce.inArray(s,M)!==-1){return}M=c(M,I);while(I.is(M.parentNode,"ol,ul,li")){I.split(M.parentNode,M)}s.push(M);M=I.rename(M,"p");L=m(M,false,z.settings.force_br_newlines);if(L===M){O=M.firstChild;while(O){if(I.isBlock(O)){O=I.split(O.parentNode,O);t=true;N=O.nextSibling&&O.nextSibling.firstChild}else{N=O.nextSibling;if(t&&O.tagName==="BR"){I.remove(O)}t=false}O=N}}}e(G,function(t){t=k(t,I);if(t.tagName===v||(t.tagName==="LI"&&t.parentNode.tagName===v)){u=true}else{if(t.tagName===y||(t.tagName==="LI"&&t.parentNode.tagName===y)){H=true}else{w=true}}});if(w&&!H||u||G.length===0){B={LI:A,H1:F,H2:F,H3:F,H4:F,H5:F,H6:F,P:F,BODY:F,DIV:G.length>1?F:D,defaultAction:D,elements:this.selectedBlocks()}}else{B={defaultAction:x,elements:this.selectedBlocks()}}this.process(B)},indent:function(){var u=this.ed,w=u.dom,x=[];function s(z){var y=w.create("li",{style:"list-style-type: none;"});w.insertAfter(y,z);return y}function t(B){var y=s(B),D=w.getParent(B,"ol,ul"),C=D.tagName,E=w.getStyle(D,"list-style-type"),A={},z;if(E!==""){A.style="list-style-type: "+E+";"}z=w.create(C,A);y.appendChild(z);return z}function v(z){if(!d(u,z,x)){z=c(z,w);var y=t(z);y.appendChild(z);m(y.parentNode,false);m(y,false);x.push(z)}}this.process({LI:v,defaultAction:this.adjustPaddingFunction(true),elements:this.selectedBlocks()})},outdent:function(y,x){var w=this,u=w.ed,z=u.dom,s=[];function A(t){var C,B,D;if(!d(u,t,s)){if(z.getStyle(t,"margin-left")!==""||z.getStyle(t,"padding-left")!==""){return w.adjustPaddingFunction(false)(t)}D=z.getStyle(t,"text-align",true);if(D==="center"||D==="right"){z.setStyle(t,"text-align","left");return}t=c(t,z);C=t.parentNode;B=t.parentNode.parentNode;if(B.tagName==="P"){z.split(B,t.parentNode)}else{z.split(C,t);if(B.tagName==="LI"){z.split(B,t)}else{if(!z.is(B,"ol,ul")){z.rename(t,"p")}}}s.push(t)}}var v=x&&tinymce.is(x,"array")?x:this.selectedBlocks();this.process({LI:A,defaultAction:this.adjustPaddingFunction(false),elements:v});e(s,m)},process:function(y){var F=this,w=F.ed.selection,z=F.ed.dom,E,u;function B(t){var s=tinymce.grep(t.childNodes,function(H){return !(H.nodeName==="BR"||H.nodeName==="SPAN"&&z.getAttrib(H,"data-mce-type")=="bookmark"||H.nodeType==3&&(H.nodeValue==String.fromCharCode(160)||H.nodeValue==""))});return s.length===0}function x(s){z.removeClass(s,"_mce_act_on");if(!s||s.nodeType!==1||E.length>1&&B(s)){return}s=k(s,z);var t=y[s.tagName];if(!t){t=y.defaultAction}t(s)}function v(s){F.splitSafeEach(s.childNodes,x)}function C(s,t){return t>=0&&s.hasChildNodes()&&t<s.childNodes.length&&s.childNodes[t].tagName==="BR"}function D(){var t=w.getNode();var s=z.getParent(t,"td");return s!==null}E=y.elements;u=w.getRng(true);if(!u.collapsed){if(C(u.endContainer,u.endOffset-1)){u.setEnd(u.endContainer,u.endOffset-1);w.setRng(u)}if(C(u.startContainer,u.startOffset)){u.setStart(u.startContainer,u.startOffset+1);w.setRng(u)}}if(tinymce.isIE8){var G=F.ed.selection.getNode();if(G.tagName==="LI"&&!(G.parentNode.lastChild===G)){var A=F.ed.getDoc().createTextNode("\uFEFF");G.appendChild(A)}}g=w.getBookmark();y.OL=y.UL=v;F.splitSafeEach(E,x);w.moveToBookmark(g);g=null;if(!D()){F.ed.execCommand("mceRepaint")}},splitSafeEach:function(t,s){if(tinymce.isGecko&&(/Firefox\/[12]\.[0-9]/.test(navigator.userAgent)||/Firefox\/3\.[0-4]/.test(navigator.userAgent))){this.classBasedEach(t,s)}else{e(t,s)}},classBasedEach:function(v,u){var w=this.ed.dom,s,t;e(v,function(x){w.addClass(x,"_mce_act_on")});s=w.select("._mce_act_on");while(s.length>0){t=s.shift();w.removeClass(t,"_mce_act_on");u(t);s=w.select("._mce_act_on")}},adjustPaddingFunction:function(u){var s,v,t=this.ed;s=t.settings.indentation;v=/[a-z%]+/i.exec(s);s=parseInt(s,10);return function(w){var y,x;y=parseInt(t.dom.getStyle(w,"margin-left")||0,10)+parseInt(t.dom.getStyle(w,"padding-left")||0,10);if(u){x=y+s}else{x=y-s}t.dom.setStyle(w,"padding-left","");t.dom.setStyle(w,"margin-left",x>0?x+v:"")}},selectedBlocks:function(){var s=this.ed;var t=s.selection.getSelectedBlocks();return t.length==0?[s.dom.getRoot()]:t},getInfo:function(){return{longname:"Lists",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/lists",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("lists",tinymce.plugins.Lists)}());
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/lists/editor_plugin_src.js
ADDED
@@ -0,0 +1,951 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* editor_plugin_src.js
|
3 |
+
*
|
4 |
+
* Copyright 2011, 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 each = tinymce.each, Event = tinymce.dom.Event, bookmark;
|
13 |
+
|
14 |
+
// Skips text nodes that only contain whitespace since they aren't semantically important.
|
15 |
+
function skipWhitespaceNodes(e, next) {
|
16 |
+
while (e && (e.nodeType === 8 || (e.nodeType === 3 && /^[ \t\n\r]*$/.test(e.nodeValue)))) {
|
17 |
+
e = next(e);
|
18 |
+
}
|
19 |
+
return e;
|
20 |
+
}
|
21 |
+
|
22 |
+
function skipWhitespaceNodesBackwards(e) {
|
23 |
+
return skipWhitespaceNodes(e, function(e) {
|
24 |
+
return e.previousSibling;
|
25 |
+
});
|
26 |
+
}
|
27 |
+
|
28 |
+
function skipWhitespaceNodesForwards(e) {
|
29 |
+
return skipWhitespaceNodes(e, function(e) {
|
30 |
+
return e.nextSibling;
|
31 |
+
});
|
32 |
+
}
|
33 |
+
|
34 |
+
function hasParentInList(ed, e, list) {
|
35 |
+
return ed.dom.getParent(e, function(p) {
|
36 |
+
return tinymce.inArray(list, p) !== -1;
|
37 |
+
});
|
38 |
+
}
|
39 |
+
|
40 |
+
function isList(e) {
|
41 |
+
return e && (e.tagName === 'OL' || e.tagName === 'UL');
|
42 |
+
}
|
43 |
+
|
44 |
+
function splitNestedLists(element, dom) {
|
45 |
+
var tmp, nested, wrapItem;
|
46 |
+
tmp = skipWhitespaceNodesBackwards(element.lastChild);
|
47 |
+
while (isList(tmp)) {
|
48 |
+
nested = tmp;
|
49 |
+
tmp = skipWhitespaceNodesBackwards(nested.previousSibling);
|
50 |
+
}
|
51 |
+
if (nested) {
|
52 |
+
wrapItem = dom.create('li', { style: 'list-style-type: none;'});
|
53 |
+
dom.split(element, nested);
|
54 |
+
dom.insertAfter(wrapItem, nested);
|
55 |
+
wrapItem.appendChild(nested);
|
56 |
+
wrapItem.appendChild(nested);
|
57 |
+
element = wrapItem.previousSibling;
|
58 |
+
}
|
59 |
+
return element;
|
60 |
+
}
|
61 |
+
|
62 |
+
function attemptMergeWithAdjacent(e, allowDifferentListStyles, mergeParagraphs) {
|
63 |
+
e = attemptMergeWithPrevious(e, allowDifferentListStyles, mergeParagraphs);
|
64 |
+
return attemptMergeWithNext(e, allowDifferentListStyles, mergeParagraphs);
|
65 |
+
}
|
66 |
+
|
67 |
+
function attemptMergeWithPrevious(e, allowDifferentListStyles, mergeParagraphs) {
|
68 |
+
var prev = skipWhitespaceNodesBackwards(e.previousSibling);
|
69 |
+
if (prev) {
|
70 |
+
return attemptMerge(prev, e, allowDifferentListStyles ? prev : false, mergeParagraphs);
|
71 |
+
} else {
|
72 |
+
return e;
|
73 |
+
}
|
74 |
+
}
|
75 |
+
|
76 |
+
function attemptMergeWithNext(e, allowDifferentListStyles, mergeParagraphs) {
|
77 |
+
var next = skipWhitespaceNodesForwards(e.nextSibling);
|
78 |
+
if (next) {
|
79 |
+
return attemptMerge(e, next, allowDifferentListStyles ? next : false, mergeParagraphs);
|
80 |
+
} else {
|
81 |
+
return e;
|
82 |
+
}
|
83 |
+
}
|
84 |
+
|
85 |
+
function attemptMerge(e1, e2, differentStylesMasterElement, mergeParagraphs) {
|
86 |
+
if (canMerge(e1, e2, !!differentStylesMasterElement, mergeParagraphs)) {
|
87 |
+
return merge(e1, e2, differentStylesMasterElement);
|
88 |
+
} else if (e1 && e1.tagName === 'LI' && isList(e2)) {
|
89 |
+
// Fix invalidly nested lists.
|
90 |
+
e1.appendChild(e2);
|
91 |
+
}
|
92 |
+
return e2;
|
93 |
+
}
|
94 |
+
|
95 |
+
function canMerge(e1, e2, allowDifferentListStyles, mergeParagraphs) {
|
96 |
+
if (!e1 || !e2) {
|
97 |
+
return false;
|
98 |
+
} else if (e1.tagName === 'LI' && e2.tagName === 'LI') {
|
99 |
+
return e2.style.listStyleType === 'none' || containsOnlyAList(e2);
|
100 |
+
} else if (isList(e1)) {
|
101 |
+
return (e1.tagName === e2.tagName && (allowDifferentListStyles || e1.style.listStyleType === e2.style.listStyleType)) || isListForIndent(e2);
|
102 |
+
} else return mergeParagraphs && e1.tagName === 'P' && e2.tagName === 'P';
|
103 |
+
}
|
104 |
+
|
105 |
+
function isListForIndent(e) {
|
106 |
+
var firstLI = skipWhitespaceNodesForwards(e.firstChild), lastLI = skipWhitespaceNodesBackwards(e.lastChild);
|
107 |
+
return firstLI && lastLI && isList(e) && firstLI === lastLI && (isList(firstLI) || firstLI.style.listStyleType === 'none' || containsOnlyAList(firstLI));
|
108 |
+
}
|
109 |
+
|
110 |
+
function containsOnlyAList(e) {
|
111 |
+
var firstChild = skipWhitespaceNodesForwards(e.firstChild), lastChild = skipWhitespaceNodesBackwards(e.lastChild);
|
112 |
+
return firstChild && lastChild && firstChild === lastChild && isList(firstChild);
|
113 |
+
}
|
114 |
+
|
115 |
+
function merge(e1, e2, masterElement) {
|
116 |
+
var lastOriginal = skipWhitespaceNodesBackwards(e1.lastChild), firstNew = skipWhitespaceNodesForwards(e2.firstChild);
|
117 |
+
if (e1.tagName === 'P') {
|
118 |
+
e1.appendChild(e1.ownerDocument.createElement('br'));
|
119 |
+
}
|
120 |
+
while (e2.firstChild) {
|
121 |
+
e1.appendChild(e2.firstChild);
|
122 |
+
}
|
123 |
+
if (masterElement) {
|
124 |
+
e1.style.listStyleType = masterElement.style.listStyleType;
|
125 |
+
}
|
126 |
+
e2.parentNode.removeChild(e2);
|
127 |
+
attemptMerge(lastOriginal, firstNew, false);
|
128 |
+
return e1;
|
129 |
+
}
|
130 |
+
|
131 |
+
function findItemToOperateOn(e, dom) {
|
132 |
+
var item;
|
133 |
+
if (!dom.is(e, 'li,ol,ul')) {
|
134 |
+
item = dom.getParent(e, 'li');
|
135 |
+
if (item) {
|
136 |
+
e = item;
|
137 |
+
}
|
138 |
+
}
|
139 |
+
return e;
|
140 |
+
}
|
141 |
+
|
142 |
+
tinymce.create('tinymce.plugins.Lists', {
|
143 |
+
init: function(ed) {
|
144 |
+
var LIST_TABBING = 'TABBING';
|
145 |
+
var LIST_EMPTY_ITEM = 'EMPTY';
|
146 |
+
var LIST_ESCAPE = 'ESCAPE';
|
147 |
+
var LIST_PARAGRAPH = 'PARAGRAPH';
|
148 |
+
var LIST_UNKNOWN = 'UNKNOWN';
|
149 |
+
var state = LIST_UNKNOWN;
|
150 |
+
|
151 |
+
function isTabInList(e) {
|
152 |
+
// Don't indent on Ctrl+Tab or Alt+Tab
|
153 |
+
return e.keyCode === tinymce.VK.TAB && !(e.altKey || e.ctrlKey) &&
|
154 |
+
(ed.queryCommandState('InsertUnorderedList') || ed.queryCommandState('InsertOrderedList'));
|
155 |
+
}
|
156 |
+
|
157 |
+
function isOnLastListItem() {
|
158 |
+
var li = getLi();
|
159 |
+
var grandParent = li.parentNode.parentNode;
|
160 |
+
var isLastItem = li.parentNode.lastChild === li;
|
161 |
+
return isLastItem && !isNestedList(grandParent) && isEmptyListItem(li);
|
162 |
+
}
|
163 |
+
|
164 |
+
function isNestedList(grandParent) {
|
165 |
+
if (isList(grandParent)) {
|
166 |
+
return grandParent.parentNode && grandParent.parentNode.tagName === 'LI';
|
167 |
+
} else {
|
168 |
+
return grandParent.tagName === 'LI';
|
169 |
+
}
|
170 |
+
}
|
171 |
+
|
172 |
+
function isInEmptyListItem() {
|
173 |
+
return ed.selection.isCollapsed() && isEmptyListItem(getLi());
|
174 |
+
}
|
175 |
+
|
176 |
+
function getLi() {
|
177 |
+
var n = ed.selection.getStart();
|
178 |
+
// Get start will return BR if the LI only contains a BR or an empty element as we use these to fix caret position
|
179 |
+
return ((n.tagName == 'BR' || n.tagName == '') && n.parentNode.tagName == 'LI') ? n.parentNode : n;
|
180 |
+
}
|
181 |
+
|
182 |
+
function isEmptyListItem(li) {
|
183 |
+
var numChildren = li.childNodes.length;
|
184 |
+
if (li.tagName === 'LI') {
|
185 |
+
return numChildren == 0 ? true : numChildren == 1 && (li.firstChild.tagName == '' || li.firstChild.tagName == 'BR' || isEmptyIE9Li(li));
|
186 |
+
}
|
187 |
+
return false;
|
188 |
+
}
|
189 |
+
|
190 |
+
function isEmptyIE9Li(li) {
|
191 |
+
// only consider this to be last item if there is no list item content or that content is nbsp or space since IE9 creates these
|
192 |
+
var lis = tinymce.grep(li.parentNode.childNodes, function(n) {return n.tagName == 'LI'});
|
193 |
+
var isLastLi = li == lis[lis.length - 1];
|
194 |
+
var child = li.firstChild;
|
195 |
+
return tinymce.isIE9 && isLastLi && (child.nodeValue == String.fromCharCode(160) || child.nodeValue == String.fromCharCode(32));
|
196 |
+
}
|
197 |
+
|
198 |
+
function isEnter(e) {
|
199 |
+
return e.keyCode === tinymce.VK.ENTER;
|
200 |
+
}
|
201 |
+
|
202 |
+
function isEnterWithoutShift(e) {
|
203 |
+
return isEnter(e) && !e.shiftKey;
|
204 |
+
}
|
205 |
+
|
206 |
+
function getListKeyState(e) {
|
207 |
+
if (isTabInList(e)) {
|
208 |
+
return LIST_TABBING;
|
209 |
+
} else if (isEnterWithoutShift(e) && isOnLastListItem()) {
|
210 |
+
// Returns LIST_UNKNOWN since breaking out of lists is handled by the EnterKey.js logic now
|
211 |
+
//return LIST_ESCAPE;
|
212 |
+
return LIST_UNKNOWN;
|
213 |
+
} else if (isEnterWithoutShift(e) && isInEmptyListItem()) {
|
214 |
+
return LIST_EMPTY_ITEM;
|
215 |
+
} else {
|
216 |
+
return LIST_UNKNOWN;
|
217 |
+
}
|
218 |
+
}
|
219 |
+
|
220 |
+
function cancelDefaultEvents(ed, e) {
|
221 |
+
// list escape is done manually using outdent as it does not create paragraphs correctly in td's
|
222 |
+
if (state == LIST_TABBING || state == LIST_EMPTY_ITEM || tinymce.isGecko && state == LIST_ESCAPE) {
|
223 |
+
Event.cancel(e);
|
224 |
+
}
|
225 |
+
}
|
226 |
+
|
227 |
+
function isCursorAtEndOfContainer() {
|
228 |
+
var range = ed.selection.getRng(true);
|
229 |
+
var startContainer = range.startContainer;
|
230 |
+
if (startContainer.nodeType == 3) {
|
231 |
+
var value = startContainer.nodeValue;
|
232 |
+
if (tinymce.isIE9 && value.length > 1 && value.charCodeAt(value.length-1) == 32) {
|
233 |
+
// IE9 places a space on the end of the text in some cases so ignore last char
|
234 |
+
return (range.endOffset == value.length-1);
|
235 |
+
} else {
|
236 |
+
return (range.endOffset == value.length);
|
237 |
+
}
|
238 |
+
} else if (startContainer.nodeType == 1) {
|
239 |
+
return range.endOffset == startContainer.childNodes.length;
|
240 |
+
}
|
241 |
+
return false;
|
242 |
+
}
|
243 |
+
|
244 |
+
/*
|
245 |
+
If we are at the end of a list item surrounded with an element, pressing enter should create a
|
246 |
+
new list item instead without splitting the element e.g. don't want to create new P or H1 tag
|
247 |
+
*/
|
248 |
+
function isEndOfListItem() {
|
249 |
+
var node = ed.selection.getNode();
|
250 |
+
var validElements = 'h1,h2,h3,h4,h5,h6,p,div';
|
251 |
+
var isLastParagraphOfLi = ed.dom.is(node, validElements) && node.parentNode.tagName === 'LI' && node.parentNode.lastChild === node;
|
252 |
+
return ed.selection.isCollapsed() && isLastParagraphOfLi && isCursorAtEndOfContainer();
|
253 |
+
}
|
254 |
+
|
255 |
+
// Creates a new list item after the current selection's list item parent
|
256 |
+
function createNewLi(ed, e) {
|
257 |
+
if (isEnterWithoutShift(e) && isEndOfListItem()) {
|
258 |
+
var node = ed.selection.getNode();
|
259 |
+
var li = ed.dom.create("li");
|
260 |
+
var parentLi = ed.dom.getParent(node, 'li');
|
261 |
+
ed.dom.insertAfter(li, parentLi);
|
262 |
+
|
263 |
+
// Move caret to new list element.
|
264 |
+
if (tinymce.isIE6 || tinymce.isIE7 || tinyMCE.isIE8) {
|
265 |
+
// Removed this line since it would create an odd < > tag and placing the caret inside an empty LI is handled and should be handled by the selection logic
|
266 |
+
//li.appendChild(ed.dom.create(" ")); // IE needs an element within the bullet point
|
267 |
+
ed.selection.setCursorLocation(li, 1);
|
268 |
+
} else {
|
269 |
+
ed.selection.setCursorLocation(li, 0);
|
270 |
+
}
|
271 |
+
e.preventDefault();
|
272 |
+
}
|
273 |
+
}
|
274 |
+
|
275 |
+
function imageJoiningListItem(ed, e) {
|
276 |
+
var prevSibling;
|
277 |
+
|
278 |
+
if (!tinymce.isGecko)
|
279 |
+
return;
|
280 |
+
|
281 |
+
var n = ed.selection.getStart();
|
282 |
+
if (e.keyCode != tinymce.VK.BACKSPACE || n.tagName !== 'IMG')
|
283 |
+
return;
|
284 |
+
|
285 |
+
function lastLI(node) {
|
286 |
+
var child = node.firstChild;
|
287 |
+
var li = null;
|
288 |
+
do {
|
289 |
+
if (!child)
|
290 |
+
break;
|
291 |
+
|
292 |
+
if (child.tagName === 'LI')
|
293 |
+
li = child;
|
294 |
+
} while (child = child.nextSibling);
|
295 |
+
|
296 |
+
return li;
|
297 |
+
}
|
298 |
+
|
299 |
+
function addChildren(parentNode, destination) {
|
300 |
+
while (parentNode.childNodes.length > 0)
|
301 |
+
destination.appendChild(parentNode.childNodes[0]);
|
302 |
+
}
|
303 |
+
|
304 |
+
// Check if there is a previous sibling
|
305 |
+
prevSibling = n.parentNode.previousSibling;
|
306 |
+
if (!prevSibling)
|
307 |
+
return;
|
308 |
+
|
309 |
+
var ul;
|
310 |
+
if (prevSibling.tagName === 'UL' || prevSibling.tagName === 'OL')
|
311 |
+
ul = prevSibling;
|
312 |
+
else if (prevSibling.previousSibling && (prevSibling.previousSibling.tagName === 'UL' || prevSibling.previousSibling.tagName === 'OL'))
|
313 |
+
ul = prevSibling.previousSibling;
|
314 |
+
else
|
315 |
+
return;
|
316 |
+
|
317 |
+
var li = lastLI(ul);
|
318 |
+
|
319 |
+
// move the caret to the end of the list item
|
320 |
+
var rng = ed.dom.createRng();
|
321 |
+
rng.setStart(li, 1);
|
322 |
+
rng.setEnd(li, 1);
|
323 |
+
ed.selection.setRng(rng);
|
324 |
+
ed.selection.collapse(true);
|
325 |
+
|
326 |
+
// save a bookmark at the end of the list item
|
327 |
+
var bookmark = ed.selection.getBookmark();
|
328 |
+
|
329 |
+
// copy the image an its text to the list item
|
330 |
+
var clone = n.parentNode.cloneNode(true);
|
331 |
+
if (clone.tagName === 'P' || clone.tagName === 'DIV')
|
332 |
+
addChildren(clone, li);
|
333 |
+
else
|
334 |
+
li.appendChild(clone);
|
335 |
+
|
336 |
+
// remove the old copy of the image
|
337 |
+
n.parentNode.parentNode.removeChild(n.parentNode);
|
338 |
+
|
339 |
+
// move the caret where we saved the bookmark
|
340 |
+
ed.selection.moveToBookmark(bookmark);
|
341 |
+
}
|
342 |
+
|
343 |
+
// fix the cursor position to ensure it is correct in IE
|
344 |
+
function setCursorPositionToOriginalLi(li) {
|
345 |
+
var list = ed.dom.getParent(li, 'ol,ul');
|
346 |
+
if (list != null) {
|
347 |
+
var lastLi = list.lastChild;
|
348 |
+
// Removed this line since IE9 would report an DOM character error and placing the caret inside an empty LI is handled and should be handled by the selection logic
|
349 |
+
//lastLi.appendChild(ed.getDoc().createElement(''));
|
350 |
+
ed.selection.setCursorLocation(lastLi, 0);
|
351 |
+
}
|
352 |
+
}
|
353 |
+
|
354 |
+
this.ed = ed;
|
355 |
+
ed.addCommand('Indent', this.indent, this);
|
356 |
+
ed.addCommand('Outdent', this.outdent, this);
|
357 |
+
ed.addCommand('InsertUnorderedList', function() {
|
358 |
+
this.applyList('UL', 'OL');
|
359 |
+
}, this);
|
360 |
+
ed.addCommand('InsertOrderedList', function() {
|
361 |
+
this.applyList('OL', 'UL');
|
362 |
+
}, this);
|
363 |
+
|
364 |
+
ed.onInit.add(function() {
|
365 |
+
ed.editorCommands.addCommands({
|
366 |
+
'outdent': function() {
|
367 |
+
var sel = ed.selection, dom = ed.dom;
|
368 |
+
|
369 |
+
function hasStyleIndent(n) {
|
370 |
+
n = dom.getParent(n, dom.isBlock);
|
371 |
+
return n && (parseInt(ed.dom.getStyle(n, 'margin-left') || 0, 10) + parseInt(ed.dom.getStyle(n, 'padding-left') || 0, 10)) > 0;
|
372 |
+
}
|
373 |
+
|
374 |
+
return hasStyleIndent(sel.getStart()) || hasStyleIndent(sel.getEnd()) || ed.queryCommandState('InsertOrderedList') || ed.queryCommandState('InsertUnorderedList');
|
375 |
+
}
|
376 |
+
}, 'state');
|
377 |
+
});
|
378 |
+
|
379 |
+
ed.onKeyUp.add(function(ed, e) {
|
380 |
+
if (state == LIST_TABBING) {
|
381 |
+
ed.execCommand(e.shiftKey ? 'Outdent' : 'Indent', true, null);
|
382 |
+
state = LIST_UNKNOWN;
|
383 |
+
return Event.cancel(e);
|
384 |
+
} else if (state == LIST_EMPTY_ITEM) {
|
385 |
+
var li = getLi();
|
386 |
+
var shouldOutdent = ed.settings.list_outdent_on_enter === true || e.shiftKey;
|
387 |
+
ed.execCommand(shouldOutdent ? 'Outdent' : 'Indent', true, null);
|
388 |
+
if (tinymce.isIE) {
|
389 |
+
setCursorPositionToOriginalLi(li);
|
390 |
+
}
|
391 |
+
|
392 |
+
return Event.cancel(e);
|
393 |
+
} else if (state == LIST_ESCAPE) {
|
394 |
+
if (tinymce.isIE6 || tinymce.isIE7 || tinymce.isIE8) {
|
395 |
+
// append a zero sized nbsp so that caret is positioned correctly in IE after escaping and applying formatting.
|
396 |
+
// if there is no text then applying formatting for e.g a H1 to the P tag immediately following list after
|
397 |
+
// escaping from it will cause the caret to be positioned on the last li instead of staying the in P tag.
|
398 |
+
var n = ed.getDoc().createTextNode('\uFEFF');
|
399 |
+
ed.selection.getNode().appendChild(n);
|
400 |
+
} else if (tinymce.isIE9 || tinymce.isGecko) {
|
401 |
+
// IE9 does not escape the list so we use outdent to do this and cancel the default behaviour
|
402 |
+
// Gecko does not create a paragraph outdenting inside a TD so default behaviour is cancelled and we outdent ourselves
|
403 |
+
ed.execCommand('Outdent');
|
404 |
+
return Event.cancel(e);
|
405 |
+
}
|
406 |
+
}
|
407 |
+
});
|
408 |
+
|
409 |
+
function fixListItem(parent, reference) {
|
410 |
+
// a zero-sized non-breaking space is placed in the empty list item so that the nested list is
|
411 |
+
// displayed on the below line instead of next to it
|
412 |
+
var n = ed.getDoc().createTextNode('\uFEFF');
|
413 |
+
parent.insertBefore(n, reference);
|
414 |
+
ed.selection.setCursorLocation(n, 0);
|
415 |
+
// repaint to remove rendering artifact. only visible when creating new list
|
416 |
+
ed.execCommand('mceRepaint');
|
417 |
+
}
|
418 |
+
|
419 |
+
function fixIndentedListItemForGecko(ed, e) {
|
420 |
+
if (isEnter(e)) {
|
421 |
+
var li = getLi();
|
422 |
+
if (li) {
|
423 |
+
var parent = li.parentNode;
|
424 |
+
var grandParent = parent && parent.parentNode;
|
425 |
+
if (grandParent && grandParent.nodeName == 'LI' && grandParent.firstChild == parent && li == parent.firstChild) {
|
426 |
+
fixListItem(grandParent, parent);
|
427 |
+
}
|
428 |
+
}
|
429 |
+
}
|
430 |
+
}
|
431 |
+
|
432 |
+
function fixIndentedListItemForIE8(ed, e) {
|
433 |
+
if (isEnter(e)) {
|
434 |
+
var li = getLi();
|
435 |
+
if (ed.dom.select('ul li', li).length === 1) {
|
436 |
+
var list = li.firstChild;
|
437 |
+
fixListItem(li, list);
|
438 |
+
}
|
439 |
+
}
|
440 |
+
}
|
441 |
+
|
442 |
+
function fixDeletingFirstCharOfList(ed, e) {
|
443 |
+
function listElements(list, li) {
|
444 |
+
var elements = [];
|
445 |
+
var walker = new tinymce.dom.TreeWalker(li, list);
|
446 |
+
for (var node = walker.current(); node; node = walker.next()) {
|
447 |
+
if (ed.dom.is(node, 'ol,ul,li')) {
|
448 |
+
elements.push(node);
|
449 |
+
}
|
450 |
+
}
|
451 |
+
return elements;
|
452 |
+
}
|
453 |
+
|
454 |
+
if (e.keyCode == tinymce.VK.BACKSPACE) {
|
455 |
+
var li = getLi();
|
456 |
+
if (li) {
|
457 |
+
var list = ed.dom.getParent(li, 'ol,ul');
|
458 |
+
if (list && list.firstChild === li) {
|
459 |
+
var elements = listElements(list, li);
|
460 |
+
ed.execCommand("Outdent", false, elements);
|
461 |
+
ed.undoManager.add();
|
462 |
+
return Event.cancel(e);
|
463 |
+
}
|
464 |
+
}
|
465 |
+
}
|
466 |
+
}
|
467 |
+
|
468 |
+
function fixDeletingEmptyLiInWebkit(ed, e) {
|
469 |
+
var li = getLi();
|
470 |
+
if (e.keyCode === tinymce.VK.BACKSPACE && ed.dom.is(li, 'li') && li.parentNode.firstChild!==li) {
|
471 |
+
if (ed.dom.select('ul,ol', li).length === 1) {
|
472 |
+
var prevLi = li.previousSibling;
|
473 |
+
ed.dom.remove(ed.dom.select('br', li));
|
474 |
+
ed.dom.remove(li, true);
|
475 |
+
var textNodes = tinymce.grep(prevLi.childNodes, function(n){ return n.nodeType === 3 });
|
476 |
+
if (textNodes.length === 1) {
|
477 |
+
var textNode = textNodes[0]
|
478 |
+
ed.selection.setCursorLocation(textNode, textNode.length);
|
479 |
+
}
|
480 |
+
ed.undoManager.add();
|
481 |
+
return Event.cancel(e);
|
482 |
+
}
|
483 |
+
}
|
484 |
+
}
|
485 |
+
|
486 |
+
ed.onKeyDown.add(function(_, e) { state = getListKeyState(e); });
|
487 |
+
ed.onKeyDown.add(cancelDefaultEvents);
|
488 |
+
ed.onKeyDown.add(imageJoiningListItem);
|
489 |
+
ed.onKeyDown.add(createNewLi);
|
490 |
+
|
491 |
+
if (tinymce.isGecko) {
|
492 |
+
ed.onKeyUp.add(fixIndentedListItemForGecko);
|
493 |
+
}
|
494 |
+
if (tinymce.isIE8) {
|
495 |
+
ed.onKeyUp.add(fixIndentedListItemForIE8);
|
496 |
+
}
|
497 |
+
if (tinymce.isGecko || tinymce.isWebKit) {
|
498 |
+
ed.onKeyDown.add(fixDeletingFirstCharOfList);
|
499 |
+
}
|
500 |
+
if (tinymce.isWebKit) {
|
501 |
+
ed.onKeyDown.add(fixDeletingEmptyLiInWebkit);
|
502 |
+
}
|
503 |
+
},
|
504 |
+
|
505 |
+
applyList: function(targetListType, oppositeListType) {
|
506 |
+
var t = this, ed = t.ed, dom = ed.dom, applied = [], hasSameType = false, hasOppositeType = false, hasNonList = false, actions,
|
507 |
+
selectedBlocks = ed.selection.getSelectedBlocks();
|
508 |
+
|
509 |
+
function cleanupBr(e) {
|
510 |
+
if (e && e.tagName === 'BR') {
|
511 |
+
dom.remove(e);
|
512 |
+
}
|
513 |
+
}
|
514 |
+
|
515 |
+
function makeList(element) {
|
516 |
+
var list = dom.create(targetListType), li;
|
517 |
+
|
518 |
+
function adjustIndentForNewList(element) {
|
519 |
+
// If there's a margin-left, outdent one level to account for the extra list margin.
|
520 |
+
if (element.style.marginLeft || element.style.paddingLeft) {
|
521 |
+
t.adjustPaddingFunction(false)(element);
|
522 |
+
}
|
523 |
+
}
|
524 |
+
|
525 |
+
if (element.tagName === 'LI') {
|
526 |
+
// No change required.
|
527 |
+
} else if (element.tagName === 'P' || element.tagName === 'DIV' || element.tagName === 'BODY') {
|
528 |
+
processBrs(element, function(startSection, br) {
|
529 |
+
doWrapList(startSection, br, element.tagName === 'BODY' ? null : startSection.parentNode);
|
530 |
+
li = startSection.parentNode;
|
531 |
+
adjustIndentForNewList(li);
|
532 |
+
cleanupBr(br);
|
533 |
+
});
|
534 |
+
if (li) {
|
535 |
+
if (li.tagName === 'LI' && (element.tagName === 'P' || selectedBlocks.length > 1)) {
|
536 |
+
dom.split(li.parentNode.parentNode, li.parentNode);
|
537 |
+
}
|
538 |
+
attemptMergeWithAdjacent(li.parentNode, true);
|
539 |
+
}
|
540 |
+
return;
|
541 |
+
} else {
|
542 |
+
// Put the list around the element.
|
543 |
+
li = dom.create('li');
|
544 |
+
dom.insertAfter(li, element);
|
545 |
+
li.appendChild(element);
|
546 |
+
adjustIndentForNewList(element);
|
547 |
+
element = li;
|
548 |
+
}
|
549 |
+
dom.insertAfter(list, element);
|
550 |
+
list.appendChild(element);
|
551 |
+
attemptMergeWithAdjacent(list, true);
|
552 |
+
applied.push(element);
|
553 |
+
}
|
554 |
+
|
555 |
+
function doWrapList(start, end, template) {
|
556 |
+
var li, n = start, tmp;
|
557 |
+
while (!dom.isBlock(start.parentNode) && start.parentNode !== dom.getRoot()) {
|
558 |
+
start = dom.split(start.parentNode, start.previousSibling);
|
559 |
+
start = start.nextSibling;
|
560 |
+
n = start;
|
561 |
+
}
|
562 |
+
if (template) {
|
563 |
+
li = template.cloneNode(true);
|
564 |
+
start.parentNode.insertBefore(li, start);
|
565 |
+
while (li.firstChild) dom.remove(li.firstChild);
|
566 |
+
li = dom.rename(li, 'li');
|
567 |
+
} else {
|
568 |
+
li = dom.create('li');
|
569 |
+
start.parentNode.insertBefore(li, start);
|
570 |
+
}
|
571 |
+
while (n && n != end) {
|
572 |
+
tmp = n.nextSibling;
|
573 |
+
li.appendChild(n);
|
574 |
+
n = tmp;
|
575 |
+
}
|
576 |
+
if (li.childNodes.length === 0) {
|
577 |
+
li.innerHTML = '<br _mce_bogus="1" />';
|
578 |
+
}
|
579 |
+
makeList(li);
|
580 |
+
}
|
581 |
+
|
582 |
+
function processBrs(element, callback) {
|
583 |
+
var startSection, previousBR, END_TO_START = 3, START_TO_END = 1,
|
584 |
+
breakElements = 'br,ul,ol,p,div,h1,h2,h3,h4,h5,h6,table,blockquote,address,pre,form,center,dl';
|
585 |
+
|
586 |
+
function isAnyPartSelected(start, end) {
|
587 |
+
var r = dom.createRng(), sel;
|
588 |
+
bookmark.keep = true;
|
589 |
+
ed.selection.moveToBookmark(bookmark);
|
590 |
+
bookmark.keep = false;
|
591 |
+
sel = ed.selection.getRng(true);
|
592 |
+
if (!end) {
|
593 |
+
end = start.parentNode.lastChild;
|
594 |
+
}
|
595 |
+
r.setStartBefore(start);
|
596 |
+
r.setEndAfter(end);
|
597 |
+
return !(r.compareBoundaryPoints(END_TO_START, sel) > 0 || r.compareBoundaryPoints(START_TO_END, sel) <= 0);
|
598 |
+
}
|
599 |
+
|
600 |
+
function nextLeaf(br) {
|
601 |
+
if (br.nextSibling)
|
602 |
+
return br.nextSibling;
|
603 |
+
if (!dom.isBlock(br.parentNode) && br.parentNode !== dom.getRoot())
|
604 |
+
return nextLeaf(br.parentNode);
|
605 |
+
}
|
606 |
+
|
607 |
+
// Split on BRs within the range and process those.
|
608 |
+
startSection = element.firstChild;
|
609 |
+
// First mark the BRs that have any part of the previous section selected.
|
610 |
+
var trailingContentSelected = false;
|
611 |
+
each(dom.select(breakElements, element), function(br) {
|
612 |
+
if (br.hasAttribute && br.hasAttribute('_mce_bogus')) {
|
613 |
+
return true; // Skip the bogus Brs that are put in to appease Firefox and Safari.
|
614 |
+
}
|
615 |
+
if (isAnyPartSelected(startSection, br)) {
|
616 |
+
dom.addClass(br, '_mce_tagged_br');
|
617 |
+
startSection = nextLeaf(br);
|
618 |
+
}
|
619 |
+
});
|
620 |
+
trailingContentSelected = (startSection && isAnyPartSelected(startSection, undefined));
|
621 |
+
startSection = element.firstChild;
|
622 |
+
each(dom.select(breakElements, element), function(br) {
|
623 |
+
// Got a section from start to br.
|
624 |
+
var tmp = nextLeaf(br);
|
625 |
+
if (br.hasAttribute && br.hasAttribute('_mce_bogus')) {
|
626 |
+
return true; // Skip the bogus Brs that are put in to appease Firefox and Safari.
|
627 |
+
}
|
628 |
+
if (dom.hasClass(br, '_mce_tagged_br')) {
|
629 |
+
callback(startSection, br, previousBR);
|
630 |
+
previousBR = null;
|
631 |
+
} else {
|
632 |
+
previousBR = br;
|
633 |
+
}
|
634 |
+
startSection = tmp;
|
635 |
+
});
|
636 |
+
if (trailingContentSelected) {
|
637 |
+
callback(startSection, undefined, previousBR);
|
638 |
+
}
|
639 |
+
}
|
640 |
+
|
641 |
+
function wrapList(element) {
|
642 |
+
processBrs(element, function(startSection, br, previousBR) {
|
643 |
+
// Need to indent this part
|
644 |
+
doWrapList(startSection, br);
|
645 |
+
cleanupBr(br);
|
646 |
+
cleanupBr(previousBR);
|
647 |
+
});
|
648 |
+
}
|
649 |
+
|
650 |
+
function changeList(element) {
|
651 |
+
if (tinymce.inArray(applied, element) !== -1) {
|
652 |
+
return;
|
653 |
+
}
|
654 |
+
if (element.parentNode.tagName === oppositeListType) {
|
655 |
+
dom.split(element.parentNode, element);
|
656 |
+
makeList(element);
|
657 |
+
attemptMergeWithNext(element.parentNode, false);
|
658 |
+
}
|
659 |
+
applied.push(element);
|
660 |
+
}
|
661 |
+
|
662 |
+
function convertListItemToParagraph(element) {
|
663 |
+
var child, nextChild, mergedElement, splitLast;
|
664 |
+
if (tinymce.inArray(applied, element) !== -1) {
|
665 |
+
return;
|
666 |
+
}
|
667 |
+
element = splitNestedLists(element, dom);
|
668 |
+
while (dom.is(element.parentNode, 'ol,ul,li')) {
|
669 |
+
dom.split(element.parentNode, element);
|
670 |
+
}
|
671 |
+
// Push the original element we have from the selection, not the renamed one.
|
672 |
+
applied.push(element);
|
673 |
+
element = dom.rename(element, 'p');
|
674 |
+
mergedElement = attemptMergeWithAdjacent(element, false, ed.settings.force_br_newlines);
|
675 |
+
if (mergedElement === element) {
|
676 |
+
// Now split out any block elements that can't be contained within a P.
|
677 |
+
// Manually iterate to ensure we handle modifications correctly (doesn't work with tinymce.each)
|
678 |
+
child = element.firstChild;
|
679 |
+
while (child) {
|
680 |
+
if (dom.isBlock(child)) {
|
681 |
+
child = dom.split(child.parentNode, child);
|
682 |
+
splitLast = true;
|
683 |
+
nextChild = child.nextSibling && child.nextSibling.firstChild;
|
684 |
+
} else {
|
685 |
+
nextChild = child.nextSibling;
|
686 |
+
if (splitLast && child.tagName === 'BR') {
|
687 |
+
dom.remove(child);
|
688 |
+
}
|
689 |
+
splitLast = false;
|
690 |
+
}
|
691 |
+
child = nextChild;
|
692 |
+
}
|
693 |
+
}
|
694 |
+
}
|
695 |
+
|
696 |
+
each(selectedBlocks, function(e) {
|
697 |
+
e = findItemToOperateOn(e, dom);
|
698 |
+
if (e.tagName === oppositeListType || (e.tagName === 'LI' && e.parentNode.tagName === oppositeListType)) {
|
699 |
+
hasOppositeType = true;
|
700 |
+
} else if (e.tagName === targetListType || (e.tagName === 'LI' && e.parentNode.tagName === targetListType)) {
|
701 |
+
hasSameType = true;
|
702 |
+
} else {
|
703 |
+
hasNonList = true;
|
704 |
+
}
|
705 |
+
});
|
706 |
+
|
707 |
+
if (hasNonList &&!hasSameType || hasOppositeType || selectedBlocks.length === 0) {
|
708 |
+
actions = {
|
709 |
+
'LI': changeList,
|
710 |
+
'H1': makeList,
|
711 |
+
'H2': makeList,
|
712 |
+
'H3': makeList,
|
713 |
+
'H4': makeList,
|
714 |
+
'H5': makeList,
|
715 |
+
'H6': makeList,
|
716 |
+
'P': makeList,
|
717 |
+
'BODY': makeList,
|
718 |
+
'DIV': selectedBlocks.length > 1 ? makeList : wrapList,
|
719 |
+
defaultAction: wrapList,
|
720 |
+
elements: this.selectedBlocks()
|
721 |
+
};
|
722 |
+
} else {
|
723 |
+
actions = {
|
724 |
+
defaultAction: convertListItemToParagraph,
|
725 |
+
elements: this.selectedBlocks()
|
726 |
+
};
|
727 |
+
}
|
728 |
+
this.process(actions);
|
729 |
+
},
|
730 |
+
|
731 |
+
indent: function() {
|
732 |
+
var ed = this.ed, dom = ed.dom, indented = [];
|
733 |
+
|
734 |
+
function createWrapItem(element) {
|
735 |
+
var wrapItem = dom.create('li', { style: 'list-style-type: none;'});
|
736 |
+
dom.insertAfter(wrapItem, element);
|
737 |
+
return wrapItem;
|
738 |
+
}
|
739 |
+
|
740 |
+
function createWrapList(element) {
|
741 |
+
var wrapItem = createWrapItem(element),
|
742 |
+
list = dom.getParent(element, 'ol,ul'),
|
743 |
+
listType = list.tagName,
|
744 |
+
listStyle = dom.getStyle(list, 'list-style-type'),
|
745 |
+
attrs = {},
|
746 |
+
wrapList;
|
747 |
+
if (listStyle !== '') {
|
748 |
+
attrs.style = 'list-style-type: ' + listStyle + ';';
|
749 |
+
}
|
750 |
+
wrapList = dom.create(listType, attrs);
|
751 |
+
wrapItem.appendChild(wrapList);
|
752 |
+
return wrapList;
|
753 |
+
}
|
754 |
+
|
755 |
+
function indentLI(element) {
|
756 |
+
if (!hasParentInList(ed, element, indented)) {
|
757 |
+
element = splitNestedLists(element, dom);
|
758 |
+
var wrapList = createWrapList(element);
|
759 |
+
wrapList.appendChild(element);
|
760 |
+
attemptMergeWithAdjacent(wrapList.parentNode, false);
|
761 |
+
attemptMergeWithAdjacent(wrapList, false);
|
762 |
+
indented.push(element);
|
763 |
+
}
|
764 |
+
}
|
765 |
+
|
766 |
+
this.process({
|
767 |
+
'LI': indentLI,
|
768 |
+
defaultAction: this.adjustPaddingFunction(true),
|
769 |
+
elements: this.selectedBlocks()
|
770 |
+
});
|
771 |
+
|
772 |
+
},
|
773 |
+
|
774 |
+
outdent: function(ui, elements) {
|
775 |
+
var t = this, ed = t.ed, dom = ed.dom, outdented = [];
|
776 |
+
|
777 |
+
function outdentLI(element) {
|
778 |
+
var listElement, targetParent, align;
|
779 |
+
if (!hasParentInList(ed, element, outdented)) {
|
780 |
+
if (dom.getStyle(element, 'margin-left') !== '' || dom.getStyle(element, 'padding-left') !== '') {
|
781 |
+
return t.adjustPaddingFunction(false)(element);
|
782 |
+
}
|
783 |
+
align = dom.getStyle(element, 'text-align', true);
|
784 |
+
if (align === 'center' || align === 'right') {
|
785 |
+
dom.setStyle(element, 'text-align', 'left');
|
786 |
+
return;
|
787 |
+
}
|
788 |
+
element = splitNestedLists(element, dom);
|
789 |
+
listElement = element.parentNode;
|
790 |
+
targetParent = element.parentNode.parentNode;
|
791 |
+
if (targetParent.tagName === 'P') {
|
792 |
+
dom.split(targetParent, element.parentNode);
|
793 |
+
} else {
|
794 |
+
dom.split(listElement, element);
|
795 |
+
if (targetParent.tagName === 'LI') {
|
796 |
+
// Nested list, need to split the LI and go back out to the OL/UL element.
|
797 |
+
dom.split(targetParent, element);
|
798 |
+
} else if (!dom.is(targetParent, 'ol,ul')) {
|
799 |
+
dom.rename(element, 'p');
|
800 |
+
}
|
801 |
+
}
|
802 |
+
outdented.push(element);
|
803 |
+
}
|
804 |
+
}
|
805 |
+
|
806 |
+
var listElements = elements && tinymce.is(elements, 'array') ? elements : this.selectedBlocks();
|
807 |
+
this.process({
|
808 |
+
'LI': outdentLI,
|
809 |
+
defaultAction: this.adjustPaddingFunction(false),
|
810 |
+
elements: listElements
|
811 |
+
});
|
812 |
+
|
813 |
+
each(outdented, attemptMergeWithAdjacent);
|
814 |
+
},
|
815 |
+
|
816 |
+
process: function(actions) {
|
817 |
+
var t = this, sel = t.ed.selection, dom = t.ed.dom, selectedBlocks, r;
|
818 |
+
|
819 |
+
function isEmptyElement(element) {
|
820 |
+
var excludeBrsAndBookmarks = tinymce.grep(element.childNodes, function(n) {
|
821 |
+
return !(n.nodeName === 'BR' || n.nodeName === 'SPAN' && dom.getAttrib(n, 'data-mce-type') == 'bookmark'
|
822 |
+
|| n.nodeType == 3 && (n.nodeValue == String.fromCharCode(160) || n.nodeValue == ''));
|
823 |
+
});
|
824 |
+
return excludeBrsAndBookmarks.length === 0;
|
825 |
+
}
|
826 |
+
|
827 |
+
function processElement(element) {
|
828 |
+
dom.removeClass(element, '_mce_act_on');
|
829 |
+
if (!element || element.nodeType !== 1 || selectedBlocks.length > 1 && isEmptyElement(element)) {
|
830 |
+
return;
|
831 |
+
}
|
832 |
+
element = findItemToOperateOn(element, dom);
|
833 |
+
var action = actions[element.tagName];
|
834 |
+
if (!action) {
|
835 |
+
action = actions.defaultAction;
|
836 |
+
}
|
837 |
+
action(element);
|
838 |
+
}
|
839 |
+
|
840 |
+
function recurse(element) {
|
841 |
+
t.splitSafeEach(element.childNodes, processElement);
|
842 |
+
}
|
843 |
+
|
844 |
+
function brAtEdgeOfSelection(container, offset) {
|
845 |
+
return offset >= 0 && container.hasChildNodes() && offset < container.childNodes.length &&
|
846 |
+
container.childNodes[offset].tagName === 'BR';
|
847 |
+
}
|
848 |
+
|
849 |
+
function isInTable() {
|
850 |
+
var n = sel.getNode();
|
851 |
+
var p = dom.getParent(n, 'td');
|
852 |
+
return p !== null;
|
853 |
+
}
|
854 |
+
|
855 |
+
selectedBlocks = actions.elements;
|
856 |
+
|
857 |
+
r = sel.getRng(true);
|
858 |
+
if (!r.collapsed) {
|
859 |
+
if (brAtEdgeOfSelection(r.endContainer, r.endOffset - 1)) {
|
860 |
+
r.setEnd(r.endContainer, r.endOffset - 1);
|
861 |
+
sel.setRng(r);
|
862 |
+
}
|
863 |
+
if (brAtEdgeOfSelection(r.startContainer, r.startOffset)) {
|
864 |
+
r.setStart(r.startContainer, r.startOffset + 1);
|
865 |
+
sel.setRng(r);
|
866 |
+
}
|
867 |
+
}
|
868 |
+
|
869 |
+
|
870 |
+
if (tinymce.isIE8) {
|
871 |
+
// append a zero sized nbsp so that caret is restored correctly using bookmark
|
872 |
+
var s = t.ed.selection.getNode();
|
873 |
+
if (s.tagName === 'LI' && !(s.parentNode.lastChild === s)) {
|
874 |
+
var i = t.ed.getDoc().createTextNode('\uFEFF');
|
875 |
+
s.appendChild(i);
|
876 |
+
}
|
877 |
+
}
|
878 |
+
|
879 |
+
bookmark = sel.getBookmark();
|
880 |
+
actions.OL = actions.UL = recurse;
|
881 |
+
t.splitSafeEach(selectedBlocks, processElement);
|
882 |
+
sel.moveToBookmark(bookmark);
|
883 |
+
bookmark = null;
|
884 |
+
|
885 |
+
// we avoid doing repaint in a table as this will move the caret out of the table in Firefox 3.6
|
886 |
+
if (!isInTable()) {
|
887 |
+
// Avoids table or image handles being left behind in Firefox.
|
888 |
+
t.ed.execCommand('mceRepaint');
|
889 |
+
}
|
890 |
+
},
|
891 |
+
|
892 |
+
splitSafeEach: function(elements, f) {
|
893 |
+
if (tinymce.isGecko && (/Firefox\/[12]\.[0-9]/.test(navigator.userAgent) ||
|
894 |
+
/Firefox\/3\.[0-4]/.test(navigator.userAgent))) {
|
895 |
+
this.classBasedEach(elements, f);
|
896 |
+
} else {
|
897 |
+
each(elements, f);
|
898 |
+
}
|
899 |
+
},
|
900 |
+
|
901 |
+
classBasedEach: function(elements, f) {
|
902 |
+
var dom = this.ed.dom, nodes, element;
|
903 |
+
// Mark nodes
|
904 |
+
each(elements, function(element) {
|
905 |
+
dom.addClass(element, '_mce_act_on');
|
906 |
+
});
|
907 |
+
nodes = dom.select('._mce_act_on');
|
908 |
+
while (nodes.length > 0) {
|
909 |
+
element = nodes.shift();
|
910 |
+
dom.removeClass(element, '_mce_act_on');
|
911 |
+
f(element);
|
912 |
+
nodes = dom.select('._mce_act_on');
|
913 |
+
}
|
914 |
+
},
|
915 |
+
|
916 |
+
adjustPaddingFunction: function(isIndent) {
|
917 |
+
var indentAmount, indentUnits, ed = this.ed;
|
918 |
+
indentAmount = ed.settings.indentation;
|
919 |
+
indentUnits = /[a-z%]+/i.exec(indentAmount);
|
920 |
+
indentAmount = parseInt(indentAmount, 10);
|
921 |
+
return function(element) {
|
922 |
+
var currentIndent, newIndentAmount;
|
923 |
+
currentIndent = parseInt(ed.dom.getStyle(element, 'margin-left') || 0, 10) + parseInt(ed.dom.getStyle(element, 'padding-left') || 0, 10);
|
924 |
+
if (isIndent) {
|
925 |
+
newIndentAmount = currentIndent + indentAmount;
|
926 |
+
} else {
|
927 |
+
newIndentAmount = currentIndent - indentAmount;
|
928 |
+
}
|
929 |
+
ed.dom.setStyle(element, 'padding-left', '');
|
930 |
+
ed.dom.setStyle(element, 'margin-left', newIndentAmount > 0 ? newIndentAmount + indentUnits : '');
|
931 |
+
};
|
932 |
+
},
|
933 |
+
|
934 |
+
selectedBlocks: function() {
|
935 |
+
var ed = this.ed
|
936 |
+
var selectedBlocks = ed.selection.getSelectedBlocks();
|
937 |
+
return selectedBlocks.length == 0 ? [ ed.dom.getRoot() ] : selectedBlocks;
|
938 |
+
},
|
939 |
+
|
940 |
+
getInfo: function() {
|
941 |
+
return {
|
942 |
+
longname : 'Lists',
|
943 |
+
author : 'Moxiecode Systems AB',
|
944 |
+
authorurl : 'http://tinymce.moxiecode.com',
|
945 |
+
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/lists',
|
946 |
+
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
947 |
+
};
|
948 |
+
}
|
949 |
+
});
|
950 |
+
tinymce.PluginManager.add("lists", tinymce.plugins.Lists);
|
951 |
+
}());
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/media/css/media.css
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#id, #name, #hspace, #vspace, #class_name, #align { width: 100px }
|
2 |
+
#hspace, #vspace { width: 50px }
|
3 |
+
#flash_quality, #flash_align, #flash_scale, #flash_salign, #flash_wmode { width: 100px }
|
4 |
+
#flash_base, #flash_flashvars, #html5_altsource1, #html5_altsource2, #html5_poster { width: 240px }
|
5 |
+
#width, #height { width: 40px }
|
6 |
+
#src, #media_type { width: 250px }
|
7 |
+
#class { width: 120px }
|
8 |
+
#prev { margin: 0; border: 1px solid black; width: 380px; height: 260px; overflow: auto }
|
9 |
+
.panel_wrapper div.current { height: 420px; overflow: auto }
|
10 |
+
#flash_options, #shockwave_options, #qt_options, #wmp_options, #rmp_options { display: none }
|
11 |
+
.mceAddSelectValue { background-color: #DDDDDD }
|
12 |
+
#qt_starttime, #qt_endtime, #qt_fov, #qt_href, #qt_moveid, #qt_moviename, #qt_node, #qt_pan, #qt_qtsrc, #qt_qtsrcchokespeed, #qt_target, #qt_tilt, #qt_urlsubstituten, #qt_volume { width: 70px }
|
13 |
+
#wmp_balance, #wmp_baseurl, #wmp_captioningid, #wmp_currentmarker, #wmp_currentposition, #wmp_defaultframe, #wmp_playcount, #wmp_rate, #wmp_uimode, #wmp_volume { width: 70px }
|
14 |
+
#rmp_console, #rmp_numloop, #rmp_controls, #rmp_scriptcallbacks { width: 70px }
|
15 |
+
#shockwave_swvolume, #shockwave_swframe, #shockwave_swurl, #shockwave_swstretchvalign, #shockwave_swstretchhalign, #shockwave_swstretchstyle { width: 90px }
|
16 |
+
#qt_qtsrc { width: 200px }
|
17 |
+
iframe {border: 1px solid gray}
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/media/editor_plugin.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(function(){var d=tinymce.explode("id,name,width,height,style,align,class,hspace,vspace,bgcolor,type"),h=tinymce.makeMap(d.join(",")),b=tinymce.html.Node,f,a,g=tinymce.util.JSON,e;f=[["Flash","d27cdb6e-ae6d-11cf-96b8-444553540000","application/x-shockwave-flash","http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"],["ShockWave","166b1bca-3f9c-11cf-8075-444553540000","application/x-director","http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0"],["WindowsMedia","6bf52a52-394a-11d3-b153-00c04f79faa6,22d6f312-b0f6-11d0-94ab-0080c74c7e95,05589fa1-c356-11ce-bf01-00aa0055595a","application/x-mplayer2","http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"],["QuickTime","02bf25d5-8c17-4b23-bc80-d3488abddc6b","video/quicktime","http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0"],["RealMedia","cfcdaa03-8be4-11cf-b84b-0020afbbccfa","audio/x-pn-realaudio-plugin","http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"],["Java","8ad9c840-044e-11d1-b3e9-00805f499d93","application/x-java-applet","http://java.sun.com/products/plugin/autodl/jinstall-1_5_0-windows-i586.cab#Version=1,5,0,0"],["Silverlight","dfeaf541-f3e1-4c24-acac-99c30715084a","application/x-silverlight-2"],["Iframe"],["Video"],["EmbeddedAudio"],["Audio"]];function c(m){var l,j,k;if(m&&!m.splice){j=[];for(k=0;true;k++){if(m[k]){j[k]=m[k]}else{break}}return j}return m}tinymce.create("tinymce.plugins.MediaPlugin",{init:function(n,j){var r=this,l={},m,p,q,k;function o(i){return i&&i.nodeName==="IMG"&&n.dom.hasClass(i,"mceItemMedia")}r.editor=n;r.url=j;a="";for(m=0;m<f.length;m++){k=f[m][0];q={name:k,clsids:tinymce.explode(f[m][1]||""),mimes:tinymce.explode(f[m][2]||""),codebase:f[m][3]};for(p=0;p<q.clsids.length;p++){l["clsid:"+q.clsids[p]]=q}for(p=0;p<q.mimes.length;p++){l[q.mimes[p]]=q}l["mceItem"+k]=q;l[k.toLowerCase()]=q;a+=(a?"|":"")+k}tinymce.each(n.getParam("media_types","video=mp4,m4v,ogv,webm;silverlight=xap;flash=swf,flv;shockwave=dcr;quicktime=mov,qt,mpg,mpeg;shockwave=dcr;windowsmedia=avi,wmv,wm,asf,asx,wmx,wvx;realmedia=rm,ra,ram;java=jar;audio=mp3,ogg").split(";"),function(v){var s,u,t;v=v.split(/=/);u=tinymce.explode(v[1].toLowerCase());for(s=0;s<u.length;s++){t=l[v[0].toLowerCase()];if(t){l[u[s]]=t}}});a=new RegExp("write("+a+")\\(([^)]+)\\)");r.lookup=l;n.onPreInit.add(function(){n.schema.addValidElements("object[id|style|width|height|classid|codebase|*],param[name|value],embed[id|style|width|height|type|src|*],video[*],audio[*],source[*]");n.parser.addNodeFilter("object,embed,video,audio,script,iframe",function(s){var t=s.length;while(t--){r.objectToImg(s[t])}});n.serializer.addNodeFilter("img",function(s,u,t){var v=s.length,w;while(v--){w=s[v];if((w.attr("class")||"").indexOf("mceItemMedia")!==-1){r.imgToObject(w,t)}}})});n.onInit.add(function(){if(n.theme&&n.theme.onResolveName){n.theme.onResolveName.add(function(i,s){if(s.name==="img"&&n.dom.hasClass(s.node,"mceItemMedia")){s.name="media"}})}if(n&&n.plugins.contextmenu){n.plugins.contextmenu.onContextMenu.add(function(s,t,i){if(i.nodeName==="IMG"&&i.className.indexOf("mceItemMedia")!==-1){t.add({title:"media.edit",icon:"media",cmd:"mceMedia"})}})}});n.addCommand("mceMedia",function(){var s,i;i=n.selection.getNode();if(o(i)){s=n.dom.getAttrib(i,"data-mce-json");if(s){s=g.parse(s);tinymce.each(d,function(t){var u=n.dom.getAttrib(i,t);if(u){s[t]=u}});s.type=r.getType(i.className).name.toLowerCase()}}if(!s){s={type:"flash",video:{sources:[]},params:{}}}n.windowManager.open({file:j+"/media.htm",width:430+parseInt(n.getLang("media.delta_width",0)),height:500+parseInt(n.getLang("media.delta_height",0)),inline:1},{plugin_url:j,data:s})});n.addButton("media",{title:"media.desc",cmd:"mceMedia"});n.onNodeChange.add(function(s,i,t){i.setActive("media",o(t))})},convertUrl:function(k,n){var j=this,m=j.editor,l=m.settings,o=l.url_converter,i=l.url_converter_scope||j;if(!k){return k}if(n){return m.documentBaseURI.toAbsolute(k)}return o.call(i,k,"src","object")},getInfo:function(){return{longname:"Media",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/media",version:tinymce.majorVersion+"."+tinymce.minorVersion}},dataToImg:function(m,k){var r=this,o=r.editor,p=o.documentBaseURI,j,q,n,l;m.params.src=r.convertUrl(m.params.src,k);q=m.video.attrs;if(q){q.src=r.convertUrl(q.src,k)}if(q){q.poster=r.convertUrl(q.poster,k)}j=c(m.video.sources);if(j){for(l=0;l<j.length;l++){j[l].src=r.convertUrl(j[l].src,k)}}n=r.editor.dom.create("img",{id:m.id,style:m.style,align:m.align,hspace:m.hspace,vspace:m.vspace,src:r.editor.theme.url+"/img/trans.gif","class":"mceItemMedia mceItem"+r.getType(m.type).name,"data-mce-json":g.serialize(m,"'")});n.width=m.width||(m.type=="audio"?"300":"320");n.height=m.height||(m.type=="audio"?"32":"240");return n},dataToHtml:function(i,j){return this.editor.serializer.serialize(this.dataToImg(i,j),{forced_root_block:"",force_absolute:j})},htmlToData:function(k){var j,i,l;l={type:"flash",video:{sources:[]},params:{}};j=this.editor.parser.parse(k);i=j.getAll("img")[0];if(i){l=g.parse(i.attr("data-mce-json"));l.type=this.getType(i.attr("class")).name.toLowerCase();tinymce.each(d,function(m){var n=i.attr(m);if(n){l[m]=n}})}return l},getType:function(m){var k,j,l;j=tinymce.explode(m," ");for(k=0;k<j.length;k++){l=this.lookup[j[k]];if(l){return l}}},imgToObject:function(z,o){var u=this,p=u.editor,C,H,j,t,I,y,G,w,k,E,s,q,A,D,m,x,l,B,F;function r(i,n){var M,L,N,K,J;J=p.getParam("flash_video_player_url",u.convertUrl(u.url+"/moxieplayer.swf"));if(J){M=p.documentBaseURI;G.params.src=J;if(p.getParam("flash_video_player_absvideourl",true)){i=M.toAbsolute(i||"",true);n=M.toAbsolute(n||"",true)}N="";L=p.getParam("flash_video_player_flashvars",{url:"$url",poster:"$poster"});tinymce.each(L,function(P,O){P=P.replace(/\$url/,i||"");P=P.replace(/\$poster/,n||"");if(P.length>0){N+=(N?"&":"")+O+"="+escape(P)}});if(N.length){G.params.flashvars=N}K=p.getParam("flash_video_player_params",{allowfullscreen:true,allowscriptaccess:true});tinymce.each(K,function(P,O){G.params[O]=""+P})}}G=z.attr("data-mce-json");if(!G){return}G=g.parse(G);q=this.getType(z.attr("class"));B=z.attr("data-mce-style");if(!B){B=z.attr("style");if(B){B=p.dom.serializeStyle(p.dom.parseStyle(B,"img"))}}if(q.name==="Iframe"){x=new b("iframe",1);tinymce.each(d,function(i){var n=z.attr(i);if(i=="class"&&n){n=n.replace(/mceItem.+ ?/g,"")}if(n&&n.length>0){x.attr(i,n)}});for(I in G.params){x.attr(I,G.params[I])}x.attr({style:B,src:G.params.src});z.replace(x);return}if(this.editor.settings.media_use_script){x=new b("script",1).attr("type","text/javascript");y=new b("#text",3);y.value="write"+q.name+"("+g.serialize(tinymce.extend(G.params,{width:z.attr("width"),height:z.attr("height")}))+");";x.append(y);z.replace(x);return}if(q.name==="Video"&&G.video.sources[0]){C=new b("video",1).attr(tinymce.extend({id:z.attr("id"),width:z.attr("width"),height:z.attr("height"),style:B},G.video.attrs));if(G.video.attrs){l=G.video.attrs.poster}k=G.video.sources=c(G.video.sources);for(A=0;A<k.length;A++){if(/\.mp4$/.test(k[A].src)){m=k[A].src}}if(!k[0].type){C.attr("src",k[0].src);k.splice(0,1)}for(A=0;A<k.length;A++){w=new b("source",1).attr(k[A]);w.shortEnded=true;C.append(w)}if(m){r(m,l);q=u.getType("flash")}else{G.params.src=""}}if(q.name==="Audio"&&G.video.sources[0]){F=new b("audio",1).attr(tinymce.extend({id:z.attr("id"),width:z.attr("width"),height:z.attr("height"),style:B},G.video.attrs));if(G.video.attrs){l=G.video.attrs.poster}k=G.video.sources=c(G.video.sources);if(!k[0].type){F.attr("src",k[0].src);k.splice(0,1)}for(A=0;A<k.length;A++){w=new b("source",1).attr(k[A]);w.shortEnded=true;F.append(w)}G.params.src=""}if(q.name==="EmbeddedAudio"){j=new b("embed",1);j.shortEnded=true;j.attr({id:z.attr("id"),width:z.attr("width"),height:z.attr("height"),style:B,type:z.attr("type")});for(I in G.params){j.attr(I,G.params[I])}tinymce.each(d,function(i){if(G[i]&&i!="type"){j.attr(i,G[i])}});G.params.src=""}if(G.params.src){if(/\.flv$/i.test(G.params.src)){r(G.params.src,"")}if(o&&o.force_absolute){G.params.src=p.documentBaseURI.toAbsolute(G.params.src)}H=new b("object",1).attr({id:z.attr("id"),width:z.attr("width"),height:z.attr("height"),style:B});tinymce.each(d,function(i){var n=G[i];if(i=="class"&&n){n=n.replace(/mceItem.+ ?/g,"")}if(n&&i!="type"){H.attr(i,n)}});for(I in G.params){s=new b("param",1);s.shortEnded=true;y=G.params[I];if(I==="src"&&q.name==="WindowsMedia"){I="url"}s.attr({name:I,value:y});H.append(s)}if(this.editor.getParam("media_strict",true)){H.attr({data:G.params.src,type:q.mimes[0]})}else{H.attr({classid:"clsid:"+q.clsids[0],codebase:q.codebase});j=new b("embed",1);j.shortEnded=true;j.attr({id:z.attr("id"),width:z.attr("width"),height:z.attr("height"),style:B,type:q.mimes[0]});for(I in G.params){j.attr(I,G.params[I])}tinymce.each(d,function(i){if(G[i]&&i!="type"){j.attr(i,G[i])}});H.append(j)}if(G.object_html){y=new b("#text",3);y.raw=true;y.value=G.object_html;H.append(y)}if(C){C.append(H)}}if(C){if(G.video_html){y=new b("#text",3);y.raw=true;y.value=G.video_html;C.append(y)}}if(F){if(G.video_html){y=new b("#text",3);y.raw=true;y.value=G.video_html;F.append(y)}}var v=C||F||H||j;if(v){z.replace(v)}else{z.remove()}},objectToImg:function(C){var L,k,F,s,M,N,y,A,x,G,E,t,q,I,B,l,K,o,H=this.lookup,m,z,v=this.editor.settings.url_converter,n=this.editor.settings.url_converter_scope,w,r,D,j;function u(i){return new tinymce.html.Serializer({inner:true,validate:false}).serialize(i)}function J(O,i){return H[(O.attr(i)||"").toLowerCase()]}function p(O){var i=O.replace(/^.*\.([^.]+)$/,"$1");return H[i.toLowerCase()||""]}if(!C.parent){return}if(C.name==="script"){if(C.firstChild){m=a.exec(C.firstChild.value)}if(!m){return}o=m[1];K={video:{},params:g.parse(m[2])};A=K.params.width;x=K.params.height}K=K||{video:{},params:{}};M=new b("img",1);M.attr({src:this.editor.theme.url+"/img/trans.gif"});N=C.name;if(N==="video"||N=="audio"){F=C;L=C.getAll("object")[0];k=C.getAll("embed")[0];A=F.attr("width");x=F.attr("height");y=F.attr("id");K.video={attrs:{},sources:[]};z=K.video.attrs;for(N in F.attributes.map){z[N]=F.attributes.map[N]}B=C.attr("src");if(B){K.video.sources.push({src:v.call(n,B,"src",C.name)})}l=F.getAll("source");for(E=0;E<l.length;E++){B=l[E].remove();K.video.sources.push({src:v.call(n,B.attr("src"),"src","source"),type:B.attr("type"),media:B.attr("media")})}if(z.poster){z.poster=v.call(n,z.poster,"poster",C.name)}}if(C.name==="object"){L=C;k=C.getAll("embed")[0]}if(C.name==="embed"){k=C}if(C.name==="iframe"){s=C;o="Iframe"}if(L){A=A||L.attr("width");x=x||L.attr("height");G=G||L.attr("style");y=y||L.attr("id");w=w||L.attr("hspace");r=r||L.attr("vspace");D=D||L.attr("align");j=j||L.attr("bgcolor");K.name=L.attr("name");I=L.getAll("param");for(E=0;E<I.length;E++){q=I[E];N=q.remove().attr("name");if(!h[N]){K.params[N]=q.attr("value")}}K.params.src=K.params.src||L.attr("data")}if(k){A=A||k.attr("width");x=x||k.attr("height");G=G||k.attr("style");y=y||k.attr("id");w=w||k.attr("hspace");r=r||k.attr("vspace");D=D||k.attr("align");j=j||k.attr("bgcolor");for(N in k.attributes.map){if(!h[N]&&!K.params[N]){K.params[N]=k.attributes.map[N]}}}if(s){A=s.attr("width");x=s.attr("height");G=G||s.attr("style");y=s.attr("id");w=s.attr("hspace");r=s.attr("vspace");D=s.attr("align");j=s.attr("bgcolor");tinymce.each(d,function(i){M.attr(i,s.attr(i))});for(N in s.attributes.map){if(!h[N]&&!K.params[N]){K.params[N]=s.attributes.map[N]}}}if(K.params.movie){K.params.src=K.params.src||K.params.movie;delete K.params.movie}if(K.params.src){K.params.src=v.call(n,K.params.src,"src","object")}if(F){if(C.name==="video"){o=H.video.name}else{if(C.name==="audio"){o=H.audio.name}}}if(L&&!o){o=(J(L,"clsid")||J(L,"classid")||J(L,"type")||{}).name}if(k&&!o){o=(J(k,"type")||p(K.params.src)||{}).name}if(k&&o=="EmbeddedAudio"){K.params.type=k.attr("type")}C.replace(M);if(k){k.remove()}if(L){t=u(L.remove());if(t){K.object_html=t}}if(F){t=u(F.remove());if(t){K.video_html=t}}K.hspace=w;K.vspace=r;K.align=D;K.bgcolor=j;M.attr({id:y,"class":"mceItemMedia mceItem"+(o||"Flash"),style:G,width:A||(C.name=="audio"?"300":"320"),height:x||(C.name=="audio"?"32":"240"),hspace:w,vspace:r,align:D,bgcolor:j,"data-mce-json":g.serialize(K,"'")})}});tinymce.PluginManager.add("media",tinymce.plugins.MediaPlugin)})();
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/media/editor_plugin_src.js
ADDED
@@ -0,0 +1,890 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 rootAttributes = tinymce.explode('id,name,width,height,style,align,class,hspace,vspace,bgcolor,type'), excludedAttrs = tinymce.makeMap(rootAttributes.join(',')), Node = tinymce.html.Node,
|
13 |
+
mediaTypes, scriptRegExp, JSON = tinymce.util.JSON, mimeTypes;
|
14 |
+
|
15 |
+
// Media types supported by this plugin
|
16 |
+
mediaTypes = [
|
17 |
+
// Type, clsid:s, mime types, codebase
|
18 |
+
["Flash", "d27cdb6e-ae6d-11cf-96b8-444553540000", "application/x-shockwave-flash", "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"],
|
19 |
+
["ShockWave", "166b1bca-3f9c-11cf-8075-444553540000", "application/x-director", "http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0"],
|
20 |
+
["WindowsMedia", "6bf52a52-394a-11d3-b153-00c04f79faa6,22d6f312-b0f6-11d0-94ab-0080c74c7e95,05589fa1-c356-11ce-bf01-00aa0055595a", "application/x-mplayer2", "http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"],
|
21 |
+
["QuickTime", "02bf25d5-8c17-4b23-bc80-d3488abddc6b", "video/quicktime", "http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0"],
|
22 |
+
["RealMedia", "cfcdaa03-8be4-11cf-b84b-0020afbbccfa", "audio/x-pn-realaudio-plugin", "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"],
|
23 |
+
["Java", "8ad9c840-044e-11d1-b3e9-00805f499d93", "application/x-java-applet", "http://java.sun.com/products/plugin/autodl/jinstall-1_5_0-windows-i586.cab#Version=1,5,0,0"],
|
24 |
+
["Silverlight", "dfeaf541-f3e1-4c24-acac-99c30715084a", "application/x-silverlight-2"],
|
25 |
+
["Iframe"],
|
26 |
+
["Video"],
|
27 |
+
["EmbeddedAudio"],
|
28 |
+
["Audio"]
|
29 |
+
];
|
30 |
+
|
31 |
+
function toArray(obj) {
|
32 |
+
var undef, out, i;
|
33 |
+
|
34 |
+
if (obj && !obj.splice) {
|
35 |
+
out = [];
|
36 |
+
|
37 |
+
for (i = 0; true; i++) {
|
38 |
+
if (obj[i])
|
39 |
+
out[i] = obj[i];
|
40 |
+
else
|
41 |
+
break;
|
42 |
+
}
|
43 |
+
|
44 |
+
return out;
|
45 |
+
}
|
46 |
+
|
47 |
+
return obj;
|
48 |
+
};
|
49 |
+
|
50 |
+
tinymce.create('tinymce.plugins.MediaPlugin', {
|
51 |
+
init : function(ed, url) {
|
52 |
+
var self = this, lookup = {}, i, y, item, name;
|
53 |
+
|
54 |
+
function isMediaImg(node) {
|
55 |
+
return node && node.nodeName === 'IMG' && ed.dom.hasClass(node, 'mceItemMedia');
|
56 |
+
};
|
57 |
+
|
58 |
+
self.editor = ed;
|
59 |
+
self.url = url;
|
60 |
+
|
61 |
+
// Parse media types into a lookup table
|
62 |
+
scriptRegExp = '';
|
63 |
+
for (i = 0; i < mediaTypes.length; i++) {
|
64 |
+
name = mediaTypes[i][0];
|
65 |
+
|
66 |
+
item = {
|
67 |
+
name : name,
|
68 |
+
clsids : tinymce.explode(mediaTypes[i][1] || ''),
|
69 |
+
mimes : tinymce.explode(mediaTypes[i][2] || ''),
|
70 |
+
codebase : mediaTypes[i][3]
|
71 |
+
};
|
72 |
+
|
73 |
+
for (y = 0; y < item.clsids.length; y++)
|
74 |
+
lookup['clsid:' + item.clsids[y]] = item;
|
75 |
+
|
76 |
+
for (y = 0; y < item.mimes.length; y++)
|
77 |
+
lookup[item.mimes[y]] = item;
|
78 |
+
|
79 |
+
lookup['mceItem' + name] = item;
|
80 |
+
lookup[name.toLowerCase()] = item;
|
81 |
+
|
82 |
+
scriptRegExp += (scriptRegExp ? '|' : '') + name;
|
83 |
+
}
|
84 |
+
|
85 |
+
// Handle the media_types setting
|
86 |
+
tinymce.each(ed.getParam("media_types",
|
87 |
+
"video=mp4,m4v,ogv,webm;" +
|
88 |
+
"silverlight=xap;" +
|
89 |
+
"flash=swf,flv;" +
|
90 |
+
"shockwave=dcr;" +
|
91 |
+
"quicktime=mov,qt,mpg,mpeg;" +
|
92 |
+
"shockwave=dcr;" +
|
93 |
+
"windowsmedia=avi,wmv,wm,asf,asx,wmx,wvx;" +
|
94 |
+
"realmedia=rm,ra,ram;" +
|
95 |
+
"java=jar;" +
|
96 |
+
"audio=mp3,ogg"
|
97 |
+
).split(';'), function(item) {
|
98 |
+
var i, extensions, type;
|
99 |
+
|
100 |
+
item = item.split(/=/);
|
101 |
+
extensions = tinymce.explode(item[1].toLowerCase());
|
102 |
+
for (i = 0; i < extensions.length; i++) {
|
103 |
+
type = lookup[item[0].toLowerCase()];
|
104 |
+
|
105 |
+
if (type)
|
106 |
+
lookup[extensions[i]] = type;
|
107 |
+
}
|
108 |
+
});
|
109 |
+
|
110 |
+
scriptRegExp = new RegExp('write(' + scriptRegExp + ')\\(([^)]+)\\)');
|
111 |
+
self.lookup = lookup;
|
112 |
+
|
113 |
+
ed.onPreInit.add(function() {
|
114 |
+
// Allow video elements
|
115 |
+
ed.schema.addValidElements('object[id|style|width|height|classid|codebase|*],param[name|value],embed[id|style|width|height|type|src|*],video[*],audio[*],source[*]');
|
116 |
+
|
117 |
+
// Convert video elements to image placeholder
|
118 |
+
ed.parser.addNodeFilter('object,embed,video,audio,script,iframe', function(nodes) {
|
119 |
+
var i = nodes.length;
|
120 |
+
|
121 |
+
while (i--)
|
122 |
+
self.objectToImg(nodes[i]);
|
123 |
+
});
|
124 |
+
|
125 |
+
// Convert image placeholders to video elements
|
126 |
+
ed.serializer.addNodeFilter('img', function(nodes, name, args) {
|
127 |
+
var i = nodes.length, node;
|
128 |
+
|
129 |
+
while (i--) {
|
130 |
+
node = nodes[i];
|
131 |
+
if ((node.attr('class') || '').indexOf('mceItemMedia') !== -1)
|
132 |
+
self.imgToObject(node, args);
|
133 |
+
}
|
134 |
+
});
|
135 |
+
});
|
136 |
+
|
137 |
+
ed.onInit.add(function() {
|
138 |
+
// Display "media" instead of "img" in element path
|
139 |
+
if (ed.theme && ed.theme.onResolveName) {
|
140 |
+
ed.theme.onResolveName.add(function(theme, path_object) {
|
141 |
+
if (path_object.name === 'img' && ed.dom.hasClass(path_object.node, 'mceItemMedia'))
|
142 |
+
path_object.name = 'media';
|
143 |
+
});
|
144 |
+
}
|
145 |
+
|
146 |
+
// Add contect menu if it's loaded
|
147 |
+
if (ed && ed.plugins.contextmenu) {
|
148 |
+
ed.plugins.contextmenu.onContextMenu.add(function(plugin, menu, element) {
|
149 |
+
if (element.nodeName === 'IMG' && element.className.indexOf('mceItemMedia') !== -1)
|
150 |
+
menu.add({title : 'media.edit', icon : 'media', cmd : 'mceMedia'});
|
151 |
+
});
|
152 |
+
}
|
153 |
+
});
|
154 |
+
|
155 |
+
// Register commands
|
156 |
+
ed.addCommand('mceMedia', function() {
|
157 |
+
var data, img;
|
158 |
+
|
159 |
+
img = ed.selection.getNode();
|
160 |
+
if (isMediaImg(img)) {
|
161 |
+
data = ed.dom.getAttrib(img, 'data-mce-json');
|
162 |
+
if (data) {
|
163 |
+
data = JSON.parse(data);
|
164 |
+
|
165 |
+
// Add some extra properties to the data object
|
166 |
+
tinymce.each(rootAttributes, function(name) {
|
167 |
+
var value = ed.dom.getAttrib(img, name);
|
168 |
+
|
169 |
+
if (value)
|
170 |
+
data[name] = value;
|
171 |
+
});
|
172 |
+
|
173 |
+
data.type = self.getType(img.className).name.toLowerCase();
|
174 |
+
}
|
175 |
+
}
|
176 |
+
|
177 |
+
if (!data) {
|
178 |
+
data = {
|
179 |
+
type : 'flash',
|
180 |
+
video: {sources:[]},
|
181 |
+
params: {}
|
182 |
+
};
|
183 |
+
}
|
184 |
+
|
185 |
+
ed.windowManager.open({
|
186 |
+
file : url + '/media.htm',
|
187 |
+
width : 430 + parseInt(ed.getLang('media.delta_width', 0)),
|
188 |
+
height : 500 + parseInt(ed.getLang('media.delta_height', 0)),
|
189 |
+
inline : 1
|
190 |
+
}, {
|
191 |
+
plugin_url : url,
|
192 |
+
data : data
|
193 |
+
});
|
194 |
+
});
|
195 |
+
|
196 |
+
// Register buttons
|
197 |
+
ed.addButton('media', {title : 'media.desc', cmd : 'mceMedia'});
|
198 |
+
|
199 |
+
// Update media selection status
|
200 |
+
ed.onNodeChange.add(function(ed, cm, node) {
|
201 |
+
cm.setActive('media', isMediaImg(node));
|
202 |
+
});
|
203 |
+
},
|
204 |
+
|
205 |
+
convertUrl : function(url, force_absolute) {
|
206 |
+
var self = this, editor = self.editor, settings = editor.settings,
|
207 |
+
urlConverter = settings.url_converter,
|
208 |
+
urlConverterScope = settings.url_converter_scope || self;
|
209 |
+
|
210 |
+
if (!url)
|
211 |
+
return url;
|
212 |
+
|
213 |
+
if (force_absolute)
|
214 |
+
return editor.documentBaseURI.toAbsolute(url);
|
215 |
+
|
216 |
+
return urlConverter.call(urlConverterScope, url, 'src', 'object');
|
217 |
+
},
|
218 |
+
|
219 |
+
getInfo : function() {
|
220 |
+
return {
|
221 |
+
longname : 'Media',
|
222 |
+
author : 'Moxiecode Systems AB',
|
223 |
+
authorurl : 'http://tinymce.moxiecode.com',
|
224 |
+
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/media',
|
225 |
+
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
226 |
+
};
|
227 |
+
},
|
228 |
+
|
229 |
+
/**
|
230 |
+
* Converts the JSON data object to an img node.
|
231 |
+
*/
|
232 |
+
dataToImg : function(data, force_absolute) {
|
233 |
+
var self = this, editor = self.editor, baseUri = editor.documentBaseURI, sources, attrs, img, i;
|
234 |
+
|
235 |
+
data.params.src = self.convertUrl(data.params.src, force_absolute);
|
236 |
+
|
237 |
+
attrs = data.video.attrs;
|
238 |
+
if (attrs)
|
239 |
+
attrs.src = self.convertUrl(attrs.src, force_absolute);
|
240 |
+
|
241 |
+
if (attrs)
|
242 |
+
attrs.poster = self.convertUrl(attrs.poster, force_absolute);
|
243 |
+
|
244 |
+
sources = toArray(data.video.sources);
|
245 |
+
if (sources) {
|
246 |
+
for (i = 0; i < sources.length; i++)
|
247 |
+
sources[i].src = self.convertUrl(sources[i].src, force_absolute);
|
248 |
+
}
|
249 |
+
|
250 |
+
img = self.editor.dom.create('img', {
|
251 |
+
id : data.id,
|
252 |
+
style : data.style,
|
253 |
+
align : data.align,
|
254 |
+
hspace : data.hspace,
|
255 |
+
vspace : data.vspace,
|
256 |
+
src : self.editor.theme.url + '/img/trans.gif',
|
257 |
+
'class' : 'mceItemMedia mceItem' + self.getType(data.type).name,
|
258 |
+
'data-mce-json' : JSON.serialize(data, "'")
|
259 |
+
});
|
260 |
+
|
261 |
+
img.width = data.width || (data.type == 'audio' ? "300" : "320");
|
262 |
+
img.height = data.height || (data.type == 'audio' ? "32" : "240");
|
263 |
+
|
264 |
+
return img;
|
265 |
+
},
|
266 |
+
|
267 |
+
/**
|
268 |
+
* Converts the JSON data object to a HTML string.
|
269 |
+
*/
|
270 |
+
dataToHtml : function(data, force_absolute) {
|
271 |
+
return this.editor.serializer.serialize(this.dataToImg(data, force_absolute), {forced_root_block : '', force_absolute : force_absolute});
|
272 |
+
},
|
273 |
+
|
274 |
+
/**
|
275 |
+
* Converts the JSON data object to a HTML string.
|
276 |
+
*/
|
277 |
+
htmlToData : function(html) {
|
278 |
+
var fragment, img, data;
|
279 |
+
|
280 |
+
data = {
|
281 |
+
type : 'flash',
|
282 |
+
video: {sources:[]},
|
283 |
+
params: {}
|
284 |
+
};
|
285 |
+
|
286 |
+
fragment = this.editor.parser.parse(html);
|
287 |
+
img = fragment.getAll('img')[0];
|
288 |
+
|
289 |
+
if (img) {
|
290 |
+
data = JSON.parse(img.attr('data-mce-json'));
|
291 |
+
data.type = this.getType(img.attr('class')).name.toLowerCase();
|
292 |
+
|
293 |
+
// Add some extra properties to the data object
|
294 |
+
tinymce.each(rootAttributes, function(name) {
|
295 |
+
var value = img.attr(name);
|
296 |
+
|
297 |
+
if (value)
|
298 |
+
data[name] = value;
|
299 |
+
});
|
300 |
+
}
|
301 |
+
|
302 |
+
return data;
|
303 |
+
},
|
304 |
+
|
305 |
+
/**
|
306 |
+
* Get type item by extension, class, clsid or mime type.
|
307 |
+
*
|
308 |
+
* @method getType
|
309 |
+
* @param {String} value Value to get type item by.
|
310 |
+
* @return {Object} Type item object or undefined.
|
311 |
+
*/
|
312 |
+
getType : function(value) {
|
313 |
+
var i, values, typeItem;
|
314 |
+
|
315 |
+
// Find type by checking the classes
|
316 |
+
values = tinymce.explode(value, ' ');
|
317 |
+
for (i = 0; i < values.length; i++) {
|
318 |
+
typeItem = this.lookup[values[i]];
|
319 |
+
|
320 |
+
if (typeItem)
|
321 |
+
return typeItem;
|
322 |
+
}
|
323 |
+
},
|
324 |
+
|
325 |
+
/**
|
326 |
+
* Converts a tinymce.html.Node image element to video/object/embed.
|
327 |
+
*/
|
328 |
+
imgToObject : function(node, args) {
|
329 |
+
var self = this, editor = self.editor, video, object, embed, iframe, name, value, data,
|
330 |
+
source, sources, params, param, typeItem, i, item, mp4Source, replacement,
|
331 |
+
posterSrc, style, audio;
|
332 |
+
|
333 |
+
// Adds the flash player
|
334 |
+
function addPlayer(video_src, poster_src) {
|
335 |
+
var baseUri, flashVars, flashVarsOutput, params, flashPlayer;
|
336 |
+
|
337 |
+
flashPlayer = editor.getParam('flash_video_player_url', self.convertUrl(self.url + '/moxieplayer.swf'));
|
338 |
+
if (flashPlayer) {
|
339 |
+
baseUri = editor.documentBaseURI;
|
340 |
+
data.params.src = flashPlayer;
|
341 |
+
|
342 |
+
// Convert the movie url to absolute urls
|
343 |
+
if (editor.getParam('flash_video_player_absvideourl', true)) {
|
344 |
+
video_src = baseUri.toAbsolute(video_src || '', true);
|
345 |
+
poster_src = baseUri.toAbsolute(poster_src || '', true);
|
346 |
+
}
|
347 |
+
|
348 |
+
// Generate flash vars
|
349 |
+
flashVarsOutput = '';
|
350 |
+
flashVars = editor.getParam('flash_video_player_flashvars', {url : '$url', poster : '$poster'});
|
351 |
+
tinymce.each(flashVars, function(value, name) {
|
352 |
+
// Replace $url and $poster variables in flashvars value
|
353 |
+
value = value.replace(/\$url/, video_src || '');
|
354 |
+
value = value.replace(/\$poster/, poster_src || '');
|
355 |
+
|
356 |
+
if (value.length > 0)
|
357 |
+
flashVarsOutput += (flashVarsOutput ? '&' : '') + name + '=' + escape(value);
|
358 |
+
});
|
359 |
+
|
360 |
+
if (flashVarsOutput.length)
|
361 |
+
data.params.flashvars = flashVarsOutput;
|
362 |
+
|
363 |
+
params = editor.getParam('flash_video_player_params', {
|
364 |
+
allowfullscreen: true,
|
365 |
+
allowscriptaccess: true
|
366 |
+
});
|
367 |
+
|
368 |
+
tinymce.each(params, function(value, name) {
|
369 |
+
data.params[name] = "" + value;
|
370 |
+
});
|
371 |
+
}
|
372 |
+
};
|
373 |
+
|
374 |
+
data = node.attr('data-mce-json');
|
375 |
+
if (!data)
|
376 |
+
return;
|
377 |
+
|
378 |
+
data = JSON.parse(data);
|
379 |
+
typeItem = this.getType(node.attr('class'));
|
380 |
+
|
381 |
+
style = node.attr('data-mce-style')
|
382 |
+
if (!style) {
|
383 |
+
style = node.attr('style');
|
384 |
+
|
385 |
+
if (style)
|
386 |
+
style = editor.dom.serializeStyle(editor.dom.parseStyle(style, 'img'));
|
387 |
+
}
|
388 |
+
|
389 |
+
// Handle iframe
|
390 |
+
if (typeItem.name === 'Iframe') {
|
391 |
+
replacement = new Node('iframe', 1);
|
392 |
+
|
393 |
+
tinymce.each(rootAttributes, function(name) {
|
394 |
+
var value = node.attr(name);
|
395 |
+
|
396 |
+
if (name == 'class' && value)
|
397 |
+
value = value.replace(/mceItem.+ ?/g, '');
|
398 |
+
|
399 |
+
if (value && value.length > 0)
|
400 |
+
replacement.attr(name, value);
|
401 |
+
});
|
402 |
+
|
403 |
+
for (name in data.params)
|
404 |
+
replacement.attr(name, data.params[name]);
|
405 |
+
|
406 |
+
replacement.attr({
|
407 |
+
style: style,
|
408 |
+
src: data.params.src
|
409 |
+
});
|
410 |
+
|
411 |
+
node.replace(replacement);
|
412 |
+
|
413 |
+
return;
|
414 |
+
}
|
415 |
+
|
416 |
+
// Handle scripts
|
417 |
+
if (this.editor.settings.media_use_script) {
|
418 |
+
replacement = new Node('script', 1).attr('type', 'text/javascript');
|
419 |
+
|
420 |
+
value = new Node('#text', 3);
|
421 |
+
value.value = 'write' + typeItem.name + '(' + JSON.serialize(tinymce.extend(data.params, {
|
422 |
+
width: node.attr('width'),
|
423 |
+
height: node.attr('height')
|
424 |
+
})) + ');';
|
425 |
+
|
426 |
+
replacement.append(value);
|
427 |
+
node.replace(replacement);
|
428 |
+
|
429 |
+
return;
|
430 |
+
}
|
431 |
+
|
432 |
+
// Add HTML5 video element
|
433 |
+
if (typeItem.name === 'Video' && data.video.sources[0]) {
|
434 |
+
// Create new object element
|
435 |
+
video = new Node('video', 1).attr(tinymce.extend({
|
436 |
+
id : node.attr('id'),
|
437 |
+
width: node.attr('width'),
|
438 |
+
height: node.attr('height'),
|
439 |
+
style : style
|
440 |
+
}, data.video.attrs));
|
441 |
+
|
442 |
+
// Get poster source and use that for flash fallback
|
443 |
+
if (data.video.attrs)
|
444 |
+
posterSrc = data.video.attrs.poster;
|
445 |
+
|
446 |
+
sources = data.video.sources = toArray(data.video.sources);
|
447 |
+
for (i = 0; i < sources.length; i++) {
|
448 |
+
if (/\.mp4$/.test(sources[i].src))
|
449 |
+
mp4Source = sources[i].src;
|
450 |
+
}
|
451 |
+
|
452 |
+
if (!sources[0].type) {
|
453 |
+
video.attr('src', sources[0].src);
|
454 |
+
sources.splice(0, 1);
|
455 |
+
}
|
456 |
+
|
457 |
+
for (i = 0; i < sources.length; i++) {
|
458 |
+
source = new Node('source', 1).attr(sources[i]);
|
459 |
+
source.shortEnded = true;
|
460 |
+
video.append(source);
|
461 |
+
}
|
462 |
+
|
463 |
+
// Create flash fallback for video if we have a mp4 source
|
464 |
+
if (mp4Source) {
|
465 |
+
addPlayer(mp4Source, posterSrc);
|
466 |
+
typeItem = self.getType('flash');
|
467 |
+
} else
|
468 |
+
data.params.src = '';
|
469 |
+
}
|
470 |
+
|
471 |
+
// Add HTML5 audio element
|
472 |
+
if (typeItem.name === 'Audio' && data.video.sources[0]) {
|
473 |
+
// Create new object element
|
474 |
+
audio = new Node('audio', 1).attr(tinymce.extend({
|
475 |
+
id : node.attr('id'),
|
476 |
+
width: node.attr('width'),
|
477 |
+
height: node.attr('height'),
|
478 |
+
style : style
|
479 |
+
}, data.video.attrs));
|
480 |
+
|
481 |
+
// Get poster source and use that for flash fallback
|
482 |
+
if (data.video.attrs)
|
483 |
+
posterSrc = data.video.attrs.poster;
|
484 |
+
|
485 |
+
sources = data.video.sources = toArray(data.video.sources);
|
486 |
+
if (!sources[0].type) {
|
487 |
+
audio.attr('src', sources[0].src);
|
488 |
+
sources.splice(0, 1);
|
489 |
+
}
|
490 |
+
|
491 |
+
for (i = 0; i < sources.length; i++) {
|
492 |
+
source = new Node('source', 1).attr(sources[i]);
|
493 |
+
source.shortEnded = true;
|
494 |
+
audio.append(source);
|
495 |
+
}
|
496 |
+
|
497 |
+
data.params.src = '';
|
498 |
+
}
|
499 |
+
|
500 |
+
if (typeItem.name === 'EmbeddedAudio') {
|
501 |
+
embed = new Node('embed', 1);
|
502 |
+
embed.shortEnded = true;
|
503 |
+
embed.attr({
|
504 |
+
id: node.attr('id'),
|
505 |
+
width: node.attr('width'),
|
506 |
+
height: node.attr('height'),
|
507 |
+
style : style,
|
508 |
+
type: node.attr('type')
|
509 |
+
});
|
510 |
+
|
511 |
+
for (name in data.params)
|
512 |
+
embed.attr(name, data.params[name]);
|
513 |
+
|
514 |
+
tinymce.each(rootAttributes, function(name) {
|
515 |
+
if (data[name] && name != 'type')
|
516 |
+
embed.attr(name, data[name]);
|
517 |
+
});
|
518 |
+
|
519 |
+
data.params.src = '';
|
520 |
+
}
|
521 |
+
|
522 |
+
// Do we have a params src then we can generate object
|
523 |
+
if (data.params.src) {
|
524 |
+
// Is flv movie add player for it
|
525 |
+
if (/\.flv$/i.test(data.params.src))
|
526 |
+
addPlayer(data.params.src, '');
|
527 |
+
|
528 |
+
if (args && args.force_absolute)
|
529 |
+
data.params.src = editor.documentBaseURI.toAbsolute(data.params.src);
|
530 |
+
|
531 |
+
// Create new object element
|
532 |
+
object = new Node('object', 1).attr({
|
533 |
+
id : node.attr('id'),
|
534 |
+
width: node.attr('width'),
|
535 |
+
height: node.attr('height'),
|
536 |
+
style : style
|
537 |
+
});
|
538 |
+
|
539 |
+
tinymce.each(rootAttributes, function(name) {
|
540 |
+
var value = data[name];
|
541 |
+
|
542 |
+
if (name == 'class' && value)
|
543 |
+
value = value.replace(/mceItem.+ ?/g, '');
|
544 |
+
|
545 |
+
if (value && name != 'type')
|
546 |
+
object.attr(name, value);
|
547 |
+
});
|
548 |
+
|
549 |
+
// Add params
|
550 |
+
for (name in data.params) {
|
551 |
+
param = new Node('param', 1);
|
552 |
+
param.shortEnded = true;
|
553 |
+
value = data.params[name];
|
554 |
+
|
555 |
+
// Windows media needs to use url instead of src for the media URL
|
556 |
+
if (name === 'src' && typeItem.name === 'WindowsMedia')
|
557 |
+
name = 'url';
|
558 |
+
|
559 |
+
param.attr({name: name, value: value});
|
560 |
+
object.append(param);
|
561 |
+
}
|
562 |
+
|
563 |
+
// Setup add type and classid if strict is disabled
|
564 |
+
if (this.editor.getParam('media_strict', true)) {
|
565 |
+
object.attr({
|
566 |
+
data: data.params.src,
|
567 |
+
type: typeItem.mimes[0]
|
568 |
+
});
|
569 |
+
} else {
|
570 |
+
object.attr({
|
571 |
+
classid: "clsid:" + typeItem.clsids[0],
|
572 |
+
codebase: typeItem.codebase
|
573 |
+
});
|
574 |
+
|
575 |
+
embed = new Node('embed', 1);
|
576 |
+
embed.shortEnded = true;
|
577 |
+
embed.attr({
|
578 |
+
id: node.attr('id'),
|
579 |
+
width: node.attr('width'),
|
580 |
+
height: node.attr('height'),
|
581 |
+
style : style,
|
582 |
+
type: typeItem.mimes[0]
|
583 |
+
});
|
584 |
+
|
585 |
+
for (name in data.params)
|
586 |
+
embed.attr(name, data.params[name]);
|
587 |
+
|
588 |
+
tinymce.each(rootAttributes, function(name) {
|
589 |
+
if (data[name] && name != 'type')
|
590 |
+
embed.attr(name, data[name]);
|
591 |
+
});
|
592 |
+
|
593 |
+
object.append(embed);
|
594 |
+
}
|
595 |
+
|
596 |
+
// Insert raw HTML
|
597 |
+
if (data.object_html) {
|
598 |
+
value = new Node('#text', 3);
|
599 |
+
value.raw = true;
|
600 |
+
value.value = data.object_html;
|
601 |
+
object.append(value);
|
602 |
+
}
|
603 |
+
|
604 |
+
// Append object to video element if it exists
|
605 |
+
if (video)
|
606 |
+
video.append(object);
|
607 |
+
}
|
608 |
+
|
609 |
+
if (video) {
|
610 |
+
// Insert raw HTML
|
611 |
+
if (data.video_html) {
|
612 |
+
value = new Node('#text', 3);
|
613 |
+
value.raw = true;
|
614 |
+
value.value = data.video_html;
|
615 |
+
video.append(value);
|
616 |
+
}
|
617 |
+
}
|
618 |
+
|
619 |
+
if (audio) {
|
620 |
+
// Insert raw HTML
|
621 |
+
if (data.video_html) {
|
622 |
+
value = new Node('#text', 3);
|
623 |
+
value.raw = true;
|
624 |
+
value.value = data.video_html;
|
625 |
+
audio.append(value);
|
626 |
+
}
|
627 |
+
}
|
628 |
+
|
629 |
+
var n = video || audio || object || embed;
|
630 |
+
if (n)
|
631 |
+
node.replace(n);
|
632 |
+
else
|
633 |
+
node.remove();
|
634 |
+
},
|
635 |
+
|
636 |
+
/**
|
637 |
+
* Converts a tinymce.html.Node video/object/embed to an img element.
|
638 |
+
*
|
639 |
+
* The video/object/embed will be converted into an image placeholder with a JSON data attribute like this:
|
640 |
+
* <img class="mceItemMedia mceItemFlash" width="100" height="100" data-mce-json="{..}" />
|
641 |
+
*
|
642 |
+
* The JSON structure will be like this:
|
643 |
+
* {'params':{'flashvars':'something','quality':'high','src':'someurl'}, 'video':{'sources':[{src: 'someurl', type: 'video/mp4'}]}}
|
644 |
+
*/
|
645 |
+
objectToImg : function(node) {
|
646 |
+
var object, embed, video, iframe, img, name, id, width, height, style, i, html,
|
647 |
+
param, params, source, sources, data, type, lookup = this.lookup,
|
648 |
+
matches, attrs, urlConverter = this.editor.settings.url_converter,
|
649 |
+
urlConverterScope = this.editor.settings.url_converter_scope,
|
650 |
+
hspace, vspace, align, bgcolor;
|
651 |
+
|
652 |
+
function getInnerHTML(node) {
|
653 |
+
return new tinymce.html.Serializer({
|
654 |
+
inner: true,
|
655 |
+
validate: false
|
656 |
+
}).serialize(node);
|
657 |
+
};
|
658 |
+
|
659 |
+
function lookupAttribute(o, attr) {
|
660 |
+
return lookup[(o.attr(attr) || '').toLowerCase()];
|
661 |
+
}
|
662 |
+
|
663 |
+
function lookupExtension(src) {
|
664 |
+
var ext = src.replace(/^.*\.([^.]+)$/, '$1');
|
665 |
+
return lookup[ext.toLowerCase() || ''];
|
666 |
+
}
|
667 |
+
|
668 |
+
// If node isn't in document
|
669 |
+
if (!node.parent)
|
670 |
+
return;
|
671 |
+
|
672 |
+
// Handle media scripts
|
673 |
+
if (node.name === 'script') {
|
674 |
+
if (node.firstChild)
|
675 |
+
matches = scriptRegExp.exec(node.firstChild.value);
|
676 |
+
|
677 |
+
if (!matches)
|
678 |
+
return;
|
679 |
+
|
680 |
+
type = matches[1];
|
681 |
+
data = {video : {}, params : JSON.parse(matches[2])};
|
682 |
+
width = data.params.width;
|
683 |
+
height = data.params.height;
|
684 |
+
}
|
685 |
+
|
686 |
+
// Setup data objects
|
687 |
+
data = data || {
|
688 |
+
video : {},
|
689 |
+
params : {}
|
690 |
+
};
|
691 |
+
|
692 |
+
// Setup new image object
|
693 |
+
img = new Node('img', 1);
|
694 |
+
img.attr({
|
695 |
+
src : this.editor.theme.url + '/img/trans.gif'
|
696 |
+
});
|
697 |
+
|
698 |
+
// Video element
|
699 |
+
name = node.name;
|
700 |
+
if (name === 'video' || name == 'audio') {
|
701 |
+
video = node;
|
702 |
+
object = node.getAll('object')[0];
|
703 |
+
embed = node.getAll('embed')[0];
|
704 |
+
width = video.attr('width');
|
705 |
+
height = video.attr('height');
|
706 |
+
id = video.attr('id');
|
707 |
+
data.video = {attrs : {}, sources : []};
|
708 |
+
|
709 |
+
// Get all video attributes
|
710 |
+
attrs = data.video.attrs;
|
711 |
+
for (name in video.attributes.map)
|
712 |
+
attrs[name] = video.attributes.map[name];
|
713 |
+
|
714 |
+
source = node.attr('src');
|
715 |
+
if (source)
|
716 |
+
data.video.sources.push({src : urlConverter.call(urlConverterScope, source, 'src', node.name)});
|
717 |
+
|
718 |
+
// Get all sources
|
719 |
+
sources = video.getAll("source");
|
720 |
+
for (i = 0; i < sources.length; i++) {
|
721 |
+
source = sources[i].remove();
|
722 |
+
|
723 |
+
data.video.sources.push({
|
724 |
+
src: urlConverter.call(urlConverterScope, source.attr('src'), 'src', 'source'),
|
725 |
+
type: source.attr('type'),
|
726 |
+
media: source.attr('media')
|
727 |
+
});
|
728 |
+
}
|
729 |
+
|
730 |
+
// Convert the poster URL
|
731 |
+
if (attrs.poster)
|
732 |
+
attrs.poster = urlConverter.call(urlConverterScope, attrs.poster, 'poster', node.name);
|
733 |
+
}
|
734 |
+
|
735 |
+
// Object element
|
736 |
+
if (node.name === 'object') {
|
737 |
+
object = node;
|
738 |
+
embed = node.getAll('embed')[0];
|
739 |
+
}
|
740 |
+
|
741 |
+
// Embed element
|
742 |
+
if (node.name === 'embed')
|
743 |
+
embed = node;
|
744 |
+
|
745 |
+
// Iframe element
|
746 |
+
if (node.name === 'iframe') {
|
747 |
+
iframe = node;
|
748 |
+
type = 'Iframe';
|
749 |
+
}
|
750 |
+
|
751 |
+
if (object) {
|
752 |
+
// Get width/height
|
753 |
+
width = width || object.attr('width');
|
754 |
+
height = height || object.attr('height');
|
755 |
+
style = style || object.attr('style');
|
756 |
+
id = id || object.attr('id');
|
757 |
+
hspace = hspace || object.attr('hspace');
|
758 |
+
vspace = vspace || object.attr('vspace');
|
759 |
+
align = align || object.attr('align');
|
760 |
+
bgcolor = bgcolor || object.attr('bgcolor');
|
761 |
+
data.name = object.attr('name');
|
762 |
+
|
763 |
+
// Get all object params
|
764 |
+
params = object.getAll("param");
|
765 |
+
for (i = 0; i < params.length; i++) {
|
766 |
+
param = params[i];
|
767 |
+
name = param.remove().attr('name');
|
768 |
+
|
769 |
+
if (!excludedAttrs[name])
|
770 |
+
data.params[name] = param.attr('value');
|
771 |
+
}
|
772 |
+
|
773 |
+
data.params.src = data.params.src || object.attr('data');
|
774 |
+
}
|
775 |
+
|
776 |
+
if (embed) {
|
777 |
+
// Get width/height
|
778 |
+
width = width || embed.attr('width');
|
779 |
+
height = height || embed.attr('height');
|
780 |
+
style = style || embed.attr('style');
|
781 |
+
id = id || embed.attr('id');
|
782 |
+
hspace = hspace || embed.attr('hspace');
|
783 |
+
vspace = vspace || embed.attr('vspace');
|
784 |
+
align = align || embed.attr('align');
|
785 |
+
bgcolor = bgcolor || embed.attr('bgcolor');
|
786 |
+
|
787 |
+
// Get all embed attributes
|
788 |
+
for (name in embed.attributes.map) {
|
789 |
+
if (!excludedAttrs[name] && !data.params[name])
|
790 |
+
data.params[name] = embed.attributes.map[name];
|
791 |
+
}
|
792 |
+
}
|
793 |
+
|
794 |
+
if (iframe) {
|
795 |
+
// Get width/height
|
796 |
+
width = iframe.attr('width');
|
797 |
+
height = iframe.attr('height');
|
798 |
+
style = style || iframe.attr('style');
|
799 |
+
id = iframe.attr('id');
|
800 |
+
hspace = iframe.attr('hspace');
|
801 |
+
vspace = iframe.attr('vspace');
|
802 |
+
align = iframe.attr('align');
|
803 |
+
bgcolor = iframe.attr('bgcolor');
|
804 |
+
|
805 |
+
tinymce.each(rootAttributes, function(name) {
|
806 |
+
img.attr(name, iframe.attr(name));
|
807 |
+
});
|
808 |
+
|
809 |
+
// Get all iframe attributes
|
810 |
+
for (name in iframe.attributes.map) {
|
811 |
+
if (!excludedAttrs[name] && !data.params[name])
|
812 |
+
data.params[name] = iframe.attributes.map[name];
|
813 |
+
}
|
814 |
+
}
|
815 |
+
|
816 |
+
// Use src not movie
|
817 |
+
if (data.params.movie) {
|
818 |
+
data.params.src = data.params.src || data.params.movie;
|
819 |
+
delete data.params.movie;
|
820 |
+
}
|
821 |
+
|
822 |
+
// Convert the URL to relative/absolute depending on configuration
|
823 |
+
if (data.params.src)
|
824 |
+
data.params.src = urlConverter.call(urlConverterScope, data.params.src, 'src', 'object');
|
825 |
+
|
826 |
+
if (video) {
|
827 |
+
if (node.name === 'video')
|
828 |
+
type = lookup.video.name;
|
829 |
+
else if (node.name === 'audio')
|
830 |
+
type = lookup.audio.name;
|
831 |
+
}
|
832 |
+
|
833 |
+
if (object && !type)
|
834 |
+
type = (lookupAttribute(object, 'clsid') || lookupAttribute(object, 'classid') || lookupAttribute(object, 'type') || {}).name;
|
835 |
+
|
836 |
+
if (embed && !type)
|
837 |
+
type = (lookupAttribute(embed, 'type') || lookupExtension(data.params.src) || {}).name;
|
838 |
+
|
839 |
+
// for embedded audio we preserve the original specified type
|
840 |
+
if (embed && type == 'EmbeddedAudio') {
|
841 |
+
data.params.type = embed.attr('type');
|
842 |
+
}
|
843 |
+
|
844 |
+
// Replace the video/object/embed element with a placeholder image containing the data
|
845 |
+
node.replace(img);
|
846 |
+
|
847 |
+
// Remove embed
|
848 |
+
if (embed)
|
849 |
+
embed.remove();
|
850 |
+
|
851 |
+
// Serialize the inner HTML of the object element
|
852 |
+
if (object) {
|
853 |
+
html = getInnerHTML(object.remove());
|
854 |
+
|
855 |
+
if (html)
|
856 |
+
data.object_html = html;
|
857 |
+
}
|
858 |
+
|
859 |
+
// Serialize the inner HTML of the video element
|
860 |
+
if (video) {
|
861 |
+
html = getInnerHTML(video.remove());
|
862 |
+
|
863 |
+
if (html)
|
864 |
+
data.video_html = html;
|
865 |
+
}
|
866 |
+
|
867 |
+
data.hspace = hspace;
|
868 |
+
data.vspace = vspace;
|
869 |
+
data.align = align;
|
870 |
+
data.bgcolor = bgcolor;
|
871 |
+
|
872 |
+
// Set width/height of placeholder
|
873 |
+
img.attr({
|
874 |
+
id : id,
|
875 |
+
'class' : 'mceItemMedia mceItem' + (type || 'Flash'),
|
876 |
+
style : style,
|
877 |
+
width : width || (node.name == 'audio' ? "300" : "320"),
|
878 |
+
height : height || (node.name == 'audio' ? "32" : "240"),
|
879 |
+
hspace : hspace,
|
880 |
+
vspace : vspace,
|
881 |
+
align : align,
|
882 |
+
bgcolor : bgcolor,
|
883 |
+
"data-mce-json" : JSON.serialize(data, "'")
|
884 |
+
});
|
885 |
+
}
|
886 |
+
});
|
887 |
+
|
888 |
+
// Register plugin
|
889 |
+
tinymce.PluginManager.add('media', tinymce.plugins.MediaPlugin);
|
890 |
+
})();
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/media/js/embed.js
ADDED
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* This script contains embed functions for common plugins. This scripts are complety free to use for any purpose.
|
3 |
+
*/
|
4 |
+
|
5 |
+
function writeFlash(p) {
|
6 |
+
writeEmbed(
|
7 |
+
'D27CDB6E-AE6D-11cf-96B8-444553540000',
|
8 |
+
'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0',
|
9 |
+
'application/x-shockwave-flash',
|
10 |
+
p
|
11 |
+
);
|
12 |
+
}
|
13 |
+
|
14 |
+
function writeShockWave(p) {
|
15 |
+
writeEmbed(
|
16 |
+
'166B1BCA-3F9C-11CF-8075-444553540000',
|
17 |
+
'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0',
|
18 |
+
'application/x-director',
|
19 |
+
p
|
20 |
+
);
|
21 |
+
}
|
22 |
+
|
23 |
+
function writeQuickTime(p) {
|
24 |
+
writeEmbed(
|
25 |
+
'02BF25D5-8C17-4B23-BC80-D3488ABDDC6B',
|
26 |
+
'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0',
|
27 |
+
'video/quicktime',
|
28 |
+
p
|
29 |
+
);
|
30 |
+
}
|
31 |
+
|
32 |
+
function writeRealMedia(p) {
|
33 |
+
writeEmbed(
|
34 |
+
'CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA',
|
35 |
+
'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0',
|
36 |
+
'audio/x-pn-realaudio-plugin',
|
37 |
+
p
|
38 |
+
);
|
39 |
+
}
|
40 |
+
|
41 |
+
function writeWindowsMedia(p) {
|
42 |
+
p.url = p.src;
|
43 |
+
writeEmbed(
|
44 |
+
'6BF52A52-394A-11D3-B153-00C04F79FAA6',
|
45 |
+
'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701',
|
46 |
+
'application/x-mplayer2',
|
47 |
+
p
|
48 |
+
);
|
49 |
+
}
|
50 |
+
|
51 |
+
function writeEmbed(cls, cb, mt, p) {
|
52 |
+
var h = '', n;
|
53 |
+
|
54 |
+
h += '<object classid="clsid:' + cls + '" codebase="' + cb + '"';
|
55 |
+
h += typeof(p.id) != "undefined" ? 'id="' + p.id + '"' : '';
|
56 |
+
h += typeof(p.name) != "undefined" ? 'name="' + p.name + '"' : '';
|
57 |
+
h += typeof(p.width) != "undefined" ? 'width="' + p.width + '"' : '';
|
58 |
+
h += typeof(p.height) != "undefined" ? 'height="' + p.height + '"' : '';
|
59 |
+
h += typeof(p.align) != "undefined" ? 'align="' + p.align + '"' : '';
|
60 |
+
h += '>';
|
61 |
+
|
62 |
+
for (n in p)
|
63 |
+
h += '<param name="' + n + '" value="' + p[n] + '">';
|
64 |
+
|
65 |
+
h += '<embed type="' + mt + '"';
|
66 |
+
|
67 |
+
for (n in p)
|
68 |
+
h += n + '="' + p[n] + '" ';
|
69 |
+
|
70 |
+
h += '></embed></object>';
|
71 |
+
|
72 |
+
document.write(h);
|
73 |
+
}
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/media/js/media.js
ADDED
@@ -0,0 +1,470 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function() {
|
2 |
+
var url;
|
3 |
+
|
4 |
+
if (url = tinyMCEPopup.getParam("media_external_list_url"))
|
5 |
+
document.write('<script language="javascript" type="text/javascript" src="' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '"></script>');
|
6 |
+
|
7 |
+
function get(id) {
|
8 |
+
return document.getElementById(id);
|
9 |
+
}
|
10 |
+
|
11 |
+
function clone(obj) {
|
12 |
+
var i, len, copy, attr;
|
13 |
+
|
14 |
+
if (null == obj || "object" != typeof obj)
|
15 |
+
return obj;
|
16 |
+
|
17 |
+
// Handle Array
|
18 |
+
if ('length' in obj) {
|
19 |
+
copy = [];
|
20 |
+
|
21 |
+
for (i = 0, len = obj.length; i < len; ++i) {
|
22 |
+
copy[i] = clone(obj[i]);
|
23 |
+
}
|
24 |
+
|
25 |
+
return copy;
|
26 |
+
}
|
27 |
+
|
28 |
+
// Handle Object
|
29 |
+
copy = {};
|
30 |
+
for (attr in obj) {
|
31 |
+
if (obj.hasOwnProperty(attr))
|
32 |
+
copy[attr] = clone(obj[attr]);
|
33 |
+
}
|
34 |
+
|
35 |
+
return copy;
|
36 |
+
}
|
37 |
+
|
38 |
+
function getVal(id) {
|
39 |
+
var elm = get(id);
|
40 |
+
|
41 |
+
if (elm.nodeName == "SELECT")
|
42 |
+
return elm.options[elm.selectedIndex].value;
|
43 |
+
|
44 |
+
if (elm.type == "checkbox")
|
45 |
+
return elm.checked;
|
46 |
+
|
47 |
+
return elm.value;
|
48 |
+
}
|
49 |
+
|
50 |
+
function setVal(id, value, name) {
|
51 |
+
if (typeof(value) != 'undefined' && value != null) {
|
52 |
+
var elm = get(id);
|
53 |
+
|
54 |
+
if (elm.nodeName == "SELECT")
|
55 |
+
selectByValue(document.forms[0], id, value);
|
56 |
+
else if (elm.type == "checkbox") {
|
57 |
+
if (typeof(value) == 'string') {
|
58 |
+
value = value.toLowerCase();
|
59 |
+
value = (!name && value === 'true') || (name && value === name.toLowerCase());
|
60 |
+
}
|
61 |
+
elm.checked = !!value;
|
62 |
+
} else
|
63 |
+
elm.value = value;
|
64 |
+
}
|
65 |
+
}
|
66 |
+
|
67 |
+
window.Media = {
|
68 |
+
init : function() {
|
69 |
+
var html, editor, self = this;
|
70 |
+
|
71 |
+
self.editor = editor = tinyMCEPopup.editor;
|
72 |
+
|
73 |
+
// Setup file browsers and color pickers
|
74 |
+
get('filebrowsercontainer').innerHTML = getBrowserHTML('filebrowser','src','media','media');
|
75 |
+
get('qtsrcfilebrowsercontainer').innerHTML = getBrowserHTML('qtsrcfilebrowser','quicktime_qtsrc','media','media');
|
76 |
+
get('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor');
|
77 |
+
get('video_altsource1_filebrowser').innerHTML = getBrowserHTML('video_filebrowser_altsource1','video_altsource1','media','media');
|
78 |
+
get('video_altsource2_filebrowser').innerHTML = getBrowserHTML('video_filebrowser_altsource2','video_altsource2','media','media');
|
79 |
+
get('audio_altsource1_filebrowser').innerHTML = getBrowserHTML('audio_filebrowser_altsource1','audio_altsource1','media','media');
|
80 |
+
get('audio_altsource2_filebrowser').innerHTML = getBrowserHTML('audio_filebrowser_altsource2','audio_altsource2','media','media');
|
81 |
+
get('video_poster_filebrowser').innerHTML = getBrowserHTML('filebrowser_poster','video_poster','media','image');
|
82 |
+
|
83 |
+
html = self.getMediaListHTML('medialist', 'src', 'media', 'media');
|
84 |
+
if (html == "")
|
85 |
+
get("linklistrow").style.display = 'none';
|
86 |
+
else
|
87 |
+
get("linklistcontainer").innerHTML = html;
|
88 |
+
|
89 |
+
if (isVisible('filebrowser'))
|
90 |
+
get('src').style.width = '230px';
|
91 |
+
|
92 |
+
if (isVisible('video_filebrowser_altsource1'))
|
93 |
+
get('video_altsource1').style.width = '220px';
|
94 |
+
|
95 |
+
if (isVisible('video_filebrowser_altsource2'))
|
96 |
+
get('video_altsource2').style.width = '220px';
|
97 |
+
|
98 |
+
if (isVisible('audio_filebrowser_altsource1'))
|
99 |
+
get('audio_altsource1').style.width = '220px';
|
100 |
+
|
101 |
+
if (isVisible('audio_filebrowser_altsource2'))
|
102 |
+
get('audio_altsource2').style.width = '220px';
|
103 |
+
|
104 |
+
if (isVisible('filebrowser_poster'))
|
105 |
+
get('video_poster').style.width = '220px';
|
106 |
+
|
107 |
+
editor.dom.setOuterHTML(get('media_type'), self.getMediaTypeHTML(editor));
|
108 |
+
|
109 |
+
self.setDefaultDialogSettings(editor);
|
110 |
+
self.data = clone(tinyMCEPopup.getWindowArg('data'));
|
111 |
+
self.dataToForm();
|
112 |
+
self.preview();
|
113 |
+
|
114 |
+
updateColor('bgcolor_pick', 'bgcolor');
|
115 |
+
},
|
116 |
+
|
117 |
+
insert : function() {
|
118 |
+
var editor = tinyMCEPopup.editor;
|
119 |
+
|
120 |
+
this.formToData();
|
121 |
+
editor.execCommand('mceRepaint');
|
122 |
+
tinyMCEPopup.restoreSelection();
|
123 |
+
editor.selection.setNode(editor.plugins.media.dataToImg(this.data));
|
124 |
+
tinyMCEPopup.close();
|
125 |
+
},
|
126 |
+
|
127 |
+
preview : function() {
|
128 |
+
get('prev').innerHTML = this.editor.plugins.media.dataToHtml(this.data, true);
|
129 |
+
},
|
130 |
+
|
131 |
+
moveStates : function(to_form, field) {
|
132 |
+
var data = this.data, editor = this.editor,
|
133 |
+
mediaPlugin = editor.plugins.media, ext, src, typeInfo, defaultStates, src;
|
134 |
+
|
135 |
+
defaultStates = {
|
136 |
+
// QuickTime
|
137 |
+
quicktime_autoplay : true,
|
138 |
+
quicktime_controller : true,
|
139 |
+
|
140 |
+
// Flash
|
141 |
+
flash_play : true,
|
142 |
+
flash_loop : true,
|
143 |
+
flash_menu : true,
|
144 |
+
|
145 |
+
// WindowsMedia
|
146 |
+
windowsmedia_autostart : true,
|
147 |
+
windowsmedia_enablecontextmenu : true,
|
148 |
+
windowsmedia_invokeurls : true,
|
149 |
+
|
150 |
+
// RealMedia
|
151 |
+
realmedia_autogotourl : true,
|
152 |
+
realmedia_imagestatus : true
|
153 |
+
};
|
154 |
+
|
155 |
+
function parseQueryParams(str) {
|
156 |
+
var out = {};
|
157 |
+
|
158 |
+
if (str) {
|
159 |
+
tinymce.each(str.split('&'), function(item) {
|
160 |
+
var parts = item.split('=');
|
161 |
+
|
162 |
+
out[unescape(parts[0])] = unescape(parts[1]);
|
163 |
+
});
|
164 |
+
}
|
165 |
+
|
166 |
+
return out;
|
167 |
+
};
|
168 |
+
|
169 |
+
function setOptions(type, names) {
|
170 |
+
var i, name, formItemName, value, list;
|
171 |
+
|
172 |
+
if (type == data.type || type == 'global') {
|
173 |
+
names = tinymce.explode(names);
|
174 |
+
for (i = 0; i < names.length; i++) {
|
175 |
+
name = names[i];
|
176 |
+
formItemName = type == 'global' ? name : type + '_' + name;
|
177 |
+
|
178 |
+
if (type == 'global')
|
179 |
+
list = data;
|
180 |
+
else if (type == 'video' || type == 'audio') {
|
181 |
+
list = data.video.attrs;
|
182 |
+
|
183 |
+
if (!list && !to_form)
|
184 |
+
data.video.attrs = list = {};
|
185 |
+
} else
|
186 |
+
list = data.params;
|
187 |
+
|
188 |
+
if (list) {
|
189 |
+
if (to_form) {
|
190 |
+
setVal(formItemName, list[name], type == 'video' || type == 'audio' ? name : '');
|
191 |
+
} else {
|
192 |
+
delete list[name];
|
193 |
+
|
194 |
+
value = getVal(formItemName);
|
195 |
+
if ((type == 'video' || type == 'audio') && value === true)
|
196 |
+
value = name;
|
197 |
+
|
198 |
+
if (defaultStates[formItemName]) {
|
199 |
+
if (value !== defaultStates[formItemName]) {
|
200 |
+
value = "" + value;
|
201 |
+
list[name] = value;
|
202 |
+
}
|
203 |
+
} else if (value) {
|
204 |
+
value = "" + value;
|
205 |
+
list[name] = value;
|
206 |
+
}
|
207 |
+
}
|
208 |
+
}
|
209 |
+
}
|
210 |
+
}
|
211 |
+
}
|
212 |
+
|
213 |
+
if (!to_form) {
|
214 |
+
data.type = get('media_type').options[get('media_type').selectedIndex].value;
|
215 |
+
data.width = getVal('width');
|
216 |
+
data.height = getVal('height');
|
217 |
+
|
218 |
+
// Switch type based on extension
|
219 |
+
src = getVal('src');
|
220 |
+
if (field == 'src') {
|
221 |
+
ext = src.replace(/^.*\.([^.]+)$/, '$1');
|
222 |
+
if (typeInfo = mediaPlugin.getType(ext))
|
223 |
+
data.type = typeInfo.name.toLowerCase();
|
224 |
+
|
225 |
+
setVal('media_type', data.type);
|
226 |
+
}
|
227 |
+
|
228 |
+
if (data.type == "video" || data.type == "audio") {
|
229 |
+
if (!data.video.sources)
|
230 |
+
data.video.sources = [];
|
231 |
+
|
232 |
+
data.video.sources[0] = {src: getVal('src')};
|
233 |
+
}
|
234 |
+
}
|
235 |
+
|
236 |
+
// Hide all fieldsets and show the one active
|
237 |
+
get('video_options').style.display = 'none';
|
238 |
+
get('audio_options').style.display = 'none';
|
239 |
+
get('flash_options').style.display = 'none';
|
240 |
+
get('quicktime_options').style.display = 'none';
|
241 |
+
get('shockwave_options').style.display = 'none';
|
242 |
+
get('windowsmedia_options').style.display = 'none';
|
243 |
+
get('realmedia_options').style.display = 'none';
|
244 |
+
get('embeddedaudio_options').style.display = 'none';
|
245 |
+
|
246 |
+
if (get(data.type + '_options'))
|
247 |
+
get(data.type + '_options').style.display = 'block';
|
248 |
+
|
249 |
+
setVal('media_type', data.type);
|
250 |
+
|
251 |
+
setOptions('flash', 'play,loop,menu,swliveconnect,quality,scale,salign,wmode,base,flashvars');
|
252 |
+
setOptions('quicktime', 'loop,autoplay,cache,controller,correction,enablejavascript,kioskmode,autohref,playeveryframe,targetcache,scale,starttime,endtime,target,qtsrcchokespeed,volume,qtsrc');
|
253 |
+
setOptions('shockwave', 'sound,progress,autostart,swliveconnect,swvolume,swstretchstyle,swstretchhalign,swstretchvalign');
|
254 |
+
setOptions('windowsmedia', 'autostart,enabled,enablecontextmenu,fullscreen,invokeurls,mute,stretchtofit,windowlessvideo,balance,baseurl,captioningid,currentmarker,currentposition,defaultframe,playcount,rate,uimode,volume');
|
255 |
+
setOptions('realmedia', 'autostart,loop,autogotourl,center,imagestatus,maintainaspect,nojava,prefetch,shuffle,console,controls,numloop,scriptcallbacks');
|
256 |
+
setOptions('video', 'poster,autoplay,loop,muted,preload,controls');
|
257 |
+
setOptions('audio', 'autoplay,loop,preload,controls');
|
258 |
+
setOptions('embeddedaudio', 'autoplay,loop,controls');
|
259 |
+
setOptions('global', 'id,name,vspace,hspace,bgcolor,align,width,height');
|
260 |
+
|
261 |
+
if (to_form) {
|
262 |
+
if (data.type == 'video') {
|
263 |
+
if (data.video.sources[0])
|
264 |
+
setVal('src', data.video.sources[0].src);
|
265 |
+
|
266 |
+
src = data.video.sources[1];
|
267 |
+
if (src)
|
268 |
+
setVal('video_altsource1', src.src);
|
269 |
+
|
270 |
+
src = data.video.sources[2];
|
271 |
+
if (src)
|
272 |
+
setVal('video_altsource2', src.src);
|
273 |
+
} else if (data.type == 'audio') {
|
274 |
+
if (data.video.sources[0])
|
275 |
+
setVal('src', data.video.sources[0].src);
|
276 |
+
|
277 |
+
src = data.video.sources[1];
|
278 |
+
if (src)
|
279 |
+
setVal('audio_altsource1', src.src);
|
280 |
+
|
281 |
+
src = data.video.sources[2];
|
282 |
+
if (src)
|
283 |
+
setVal('audio_altsource2', src.src);
|
284 |
+
} else {
|
285 |
+
// Check flash vars
|
286 |
+
if (data.type == 'flash') {
|
287 |
+
tinymce.each(editor.getParam('flash_video_player_flashvars', {url : '$url', poster : '$poster'}), function(value, name) {
|
288 |
+
if (value == '$url')
|
289 |
+
data.params.src = parseQueryParams(data.params.flashvars)[name] || data.params.src || '';
|
290 |
+
});
|
291 |
+
}
|
292 |
+
|
293 |
+
setVal('src', data.params.src);
|
294 |
+
}
|
295 |
+
} else {
|
296 |
+
src = getVal("src");
|
297 |
+
|
298 |
+
// YouTube *NEW*
|
299 |
+
if (src.match(/youtu.be\/[a-z1-9.-_]+/)) {
|
300 |
+
data.width = 425;
|
301 |
+
data.height = 350;
|
302 |
+
data.params.frameborder = '0';
|
303 |
+
data.type = 'iframe';
|
304 |
+
src = 'http://www.youtube.com/embed/' + src.match(/youtu.be\/([a-z1-9.-_]+)/)[1];
|
305 |
+
setVal('src', src);
|
306 |
+
setVal('media_type', data.type);
|
307 |
+
}
|
308 |
+
|
309 |
+
// YouTube
|
310 |
+
if (src.match(/youtube.com(.+)v=([^&]+)/)) {
|
311 |
+
data.width = 425;
|
312 |
+
data.height = 350;
|
313 |
+
data.params.frameborder = '0';
|
314 |
+
data.type = 'iframe';
|
315 |
+
src = 'http://www.youtube.com/embed/' + src.match(/v=([^&]+)/)[1];
|
316 |
+
setVal('src', src);
|
317 |
+
setVal('media_type', data.type);
|
318 |
+
}
|
319 |
+
|
320 |
+
// Google video
|
321 |
+
if (src.match(/video.google.com(.+)docid=([^&]+)/)) {
|
322 |
+
data.width = 425;
|
323 |
+
data.height = 326;
|
324 |
+
data.type = 'flash';
|
325 |
+
src = 'http://video.google.com/googleplayer.swf?docId=' + src.match(/docid=([^&]+)/)[1] + '&hl=en';
|
326 |
+
setVal('src', src);
|
327 |
+
setVal('media_type', data.type);
|
328 |
+
}
|
329 |
+
|
330 |
+
if (data.type == 'video') {
|
331 |
+
if (!data.video.sources)
|
332 |
+
data.video.sources = [];
|
333 |
+
|
334 |
+
data.video.sources[0] = {src : src};
|
335 |
+
|
336 |
+
src = getVal("video_altsource1");
|
337 |
+
if (src)
|
338 |
+
data.video.sources[1] = {src : src};
|
339 |
+
|
340 |
+
src = getVal("video_altsource2");
|
341 |
+
if (src)
|
342 |
+
data.video.sources[2] = {src : src};
|
343 |
+
} else if (data.type == 'audio') {
|
344 |
+
if (!data.video.sources)
|
345 |
+
data.video.sources = [];
|
346 |
+
|
347 |
+
data.video.sources[0] = {src : src};
|
348 |
+
|
349 |
+
src = getVal("audio_altsource1");
|
350 |
+
if (src)
|
351 |
+
data.video.sources[1] = {src : src};
|
352 |
+
|
353 |
+
src = getVal("audio_altsource2");
|
354 |
+
if (src)
|
355 |
+
data.video.sources[2] = {src : src};
|
356 |
+
} else
|
357 |
+
data.params.src = src;
|
358 |
+
|
359 |
+
// Set default size
|
360 |
+
setVal('width', data.width || (data.type == 'audio' ? 300 : 320));
|
361 |
+
setVal('height', data.height || (data.type == 'audio' ? 32 : 240));
|
362 |
+
}
|
363 |
+
},
|
364 |
+
|
365 |
+
dataToForm : function() {
|
366 |
+
this.moveStates(true);
|
367 |
+
},
|
368 |
+
|
369 |
+
formToData : function(field) {
|
370 |
+
if (field == "width" || field == "height")
|
371 |
+
this.changeSize(field);
|
372 |
+
|
373 |
+
if (field == 'source') {
|
374 |
+
this.moveStates(false, field);
|
375 |
+
setVal('source', this.editor.plugins.media.dataToHtml(this.data));
|
376 |
+
this.panel = 'source';
|
377 |
+
} else {
|
378 |
+
if (this.panel == 'source') {
|
379 |
+
this.data = clone(this.editor.plugins.media.htmlToData(getVal('source')));
|
380 |
+
this.dataToForm();
|
381 |
+
this.panel = '';
|
382 |
+
}
|
383 |
+
|
384 |
+
this.moveStates(false, field);
|
385 |
+
this.preview();
|
386 |
+
}
|
387 |
+
},
|
388 |
+
|
389 |
+
beforeResize : function() {
|
390 |
+
this.width = parseInt(getVal('width') || (this.data.type == 'audio' ? "300" : "320"), 10);
|
391 |
+
this.height = parseInt(getVal('height') || (this.data.type == 'audio' ? "32" : "240"), 10);
|
392 |
+
},
|
393 |
+
|
394 |
+
changeSize : function(type) {
|
395 |
+
var width, height, scale, size;
|
396 |
+
|
397 |
+
if (get('constrain').checked) {
|
398 |
+
width = parseInt(getVal('width') || (this.data.type == 'audio' ? "300" : "320"), 10);
|
399 |
+
height = parseInt(getVal('height') || (this.data.type == 'audio' ? "32" : "240"), 10);
|
400 |
+
|
401 |
+
if (type == 'width') {
|
402 |
+
this.height = Math.round((width / this.width) * height);
|
403 |
+
setVal('height', this.height);
|
404 |
+
} else {
|
405 |
+
this.width = Math.round((height / this.height) * width);
|
406 |
+
setVal('width', this.width);
|
407 |
+
}
|
408 |
+
}
|
409 |
+
},
|
410 |
+
|
411 |
+
getMediaListHTML : function() {
|
412 |
+
if (typeof(tinyMCEMediaList) != "undefined" && tinyMCEMediaList.length > 0) {
|
413 |
+
var html = "";
|
414 |
+
|
415 |
+
html += '<select id="linklist" name="linklist" style="width: 250px" onchange="this.form.src.value=this.options[this.selectedIndex].value;Media.formToData(\'src\');">';
|
416 |
+
html += '<option value="">---</option>';
|
417 |
+
|
418 |
+
for (var i=0; i<tinyMCEMediaList.length; i++)
|
419 |
+
html += '<option value="' + tinyMCEMediaList[i][1] + '">' + tinyMCEMediaList[i][0] + '</option>';
|
420 |
+
|
421 |
+
html += '</select>';
|
422 |
+
|
423 |
+
return html;
|
424 |
+
}
|
425 |
+
|
426 |
+
return "";
|
427 |
+
},
|
428 |
+
|
429 |
+
getMediaTypeHTML : function(editor) {
|
430 |
+
function option(media_type, element) {
|
431 |
+
if (!editor.schema.getElementRule(element || media_type)) {
|
432 |
+
return '';
|
433 |
+
}
|
434 |
+
|
435 |
+
return '<option value="'+media_type+'">'+tinyMCEPopup.editor.translate("media_dlg."+media_type)+'</option>'
|
436 |
+
}
|
437 |
+
|
438 |
+
var html = "";
|
439 |
+
|
440 |
+
html += '<select id="media_type" name="media_type" onchange="Media.formToData(\'type\');">';
|
441 |
+
html += option("video");
|
442 |
+
html += option("audio");
|
443 |
+
html += option("flash", "object");
|
444 |
+
html += option("quicktime", "object");
|
445 |
+
html += option("shockwave", "object");
|
446 |
+
html += option("windowsmedia", "object");
|
447 |
+
html += option("realmedia", "object");
|
448 |
+
html += option("iframe");
|
449 |
+
|
450 |
+
if (editor.getParam('media_embedded_audio', false)) {
|
451 |
+
html += option('embeddedaudio', "object");
|
452 |
+
}
|
453 |
+
|
454 |
+
html += '</select>';
|
455 |
+
return html;
|
456 |
+
},
|
457 |
+
|
458 |
+
setDefaultDialogSettings : function(editor) {
|
459 |
+
var defaultDialogSettings = editor.getParam("media_dialog_defaults", {});
|
460 |
+
tinymce.each(defaultDialogSettings, function(v, k) {
|
461 |
+
setVal(k, v);
|
462 |
+
});
|
463 |
+
}
|
464 |
+
};
|
465 |
+
|
466 |
+
tinyMCEPopup.requireLangPack();
|
467 |
+
tinyMCEPopup.onInit.add(function() {
|
468 |
+
Media.init();
|
469 |
+
});
|
470 |
+
})();
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/media/langs/en_dlg.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
tinyMCE.addI18n('en.media_dlg',{list:"List",file:"File/URL",advanced:"Advanced",general:"General",title:"Insert/Edit Embedded Media","align_top_left":"Top Left","align_center":"Center","align_left":"Left","align_bottom":"Bottom","align_right":"Right","align_top":"Top","qt_stream_warn":"Streamed RTSP resources should be added to the QT Source field under the Advanced tab.\nYou should also add a non-streamed version to the Source field.",qtsrc:"QT Source",progress:"Progress",sound:"Sound",swstretchvalign:"Stretch V-Align",swstretchhalign:"Stretch H-Align",swstretchstyle:"Stretch Style",scriptcallbacks:"Script Callbacks","align_top_right":"Top Right",uimode:"UI Mode",rate:"Rate",playcount:"Play Count",defaultframe:"Default Frame",currentposition:"Current Position",currentmarker:"Current Marker",captioningid:"Captioning ID",baseurl:"Base URL",balance:"Balance",windowlessvideo:"Windowless Video",stretchtofit:"Stretch to Fit",mute:"Mute",invokeurls:"Invoke URLs",fullscreen:"Full Screen",enabled:"Enabled",autostart:"Auto Start",volume:"Volume",target:"Target",qtsrcchokespeed:"Choke Speed",href:"HREF",endtime:"End Time",starttime:"Start Time",enablejavascript:"Enable JavaScript",correction:"No Correction",targetcache:"Target Cache",playeveryframe:"Play Every Frame",kioskmode:"Kiosk Mode",controller:"Controller",menu:"Show Menu",loop:"Loop",play:"Auto Play",hspace:"H-Space",vspace:"V-Space","class_name":"Class",name:"Name",id:"ID",type:"Type",size:"Dimensions",preview:"Preview","constrain_proportions":"Constrain Proportions",controls:"Controls",numloop:"Num Loops",console:"Console",cache:"Cache",autohref:"Auto HREF",liveconnect:"SWLiveConnect",flashvars:"Flash Vars",base:"Base",bgcolor:"Background",wmode:"WMode",salign:"SAlign",align:"Align",scale:"Scale",quality:"Quality",shuffle:"Shuffle",prefetch:"Prefetch",nojava:"No Java",maintainaspect:"Maintain Aspect",imagestatus:"Image Status",center:"Center",autogotourl:"Auto Goto URL","shockwave_options":"Shockwave Options","rmp_options":"Real Media Player Options","wmp_options":"Windows Media Player Options","qt_options":"QuickTime Options","flash_options":"Flash Options",hidden:"Hidden","align_bottom_left":"Bottom Left","align_bottom_right":"Bottom Right","html5_video_options":"HTML5 Video Options",altsource1:"Alternative source 1",altsource2:"Alternative source 2",preload:"Preload",poster:"Poster",source:"Source","html5_audio_options":"Audio Options","preload_none":"Don\'t Preload","preload_metadata":"Preload video metadata","preload_auto":"Let user\'s browser decide", "embedded_audio_options":"Embedded Audio Options", video:"HTML5 Video", audio:"HTML5 Audio", flash:"Flash", quicktime:"QuickTime", shockwave:"Shockwave", windowsmedia:"Windows Media", realmedia:"Real Media", iframe:"Iframe", embeddedaudio:"Embedded Audio" });
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/media/media.htm
ADDED
@@ -0,0 +1,922 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2 |
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
+
<head>
|
4 |
+
<title>{#media_dlg.title}</title>
|
5 |
+
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
6 |
+
<script type="text/javascript" src="js/media.js"></script>
|
7 |
+
<script type="text/javascript" src="../../utils/mctabs.js"></script>
|
8 |
+
<script type="text/javascript" src="../../utils/validate.js"></script>
|
9 |
+
<script type="text/javascript" src="../../utils/form_utils.js"></script>
|
10 |
+
<script type="text/javascript" src="../../utils/editable_selects.js"></script>
|
11 |
+
<link href="css/media.css" rel="stylesheet" type="text/css" />
|
12 |
+
</head>
|
13 |
+
<body style="display: none" role="application">
|
14 |
+
<form onsubmit="Media.insert();return false;" action="#">
|
15 |
+
<div class="tabs" role="presentation">
|
16 |
+
<ul>
|
17 |
+
<li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');Media.formToData();" onmousedown="return false;">{#media_dlg.general}</a></span></li>
|
18 |
+
<li id="advanced_tab" aria-controls="advanced_panel"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');Media.formToData();" onmousedown="return false;">{#media_dlg.advanced}</a></span></li>
|
19 |
+
<li id="source_tab" aria-controls="source_panel"><span><a href="javascript:mcTabs.displayTab('source_tab','source_panel');Media.formToData('source');" onmousedown="return false;">{#media_dlg.source}</a></span></li>
|
20 |
+
</ul>
|
21 |
+
</div>
|
22 |
+
|
23 |
+
<div class="panel_wrapper">
|
24 |
+
<div id="general_panel" class="panel current">
|
25 |
+
<fieldset>
|
26 |
+
<legend>{#media_dlg.general}</legend>
|
27 |
+
|
28 |
+
<table role="presentation" border="0" cellpadding="4" cellspacing="0">
|
29 |
+
<tr>
|
30 |
+
<td><label for="media_type">{#media_dlg.type}</label></td>
|
31 |
+
<td>
|
32 |
+
<select id="media_type"></select>
|
33 |
+
</td>
|
34 |
+
</tr>
|
35 |
+
<tr>
|
36 |
+
<td><label for="src">{#media_dlg.file}</label></td>
|
37 |
+
<td>
|
38 |
+
<table role="presentation" border="0" cellspacing="0" cellpadding="0">
|
39 |
+
<tr>
|
40 |
+
<td><input id="src" name="src" type="text" value="" class="mceFocus" onchange="Media.formToData();" /></td>
|
41 |
+
<td id="filebrowsercontainer"> </td>
|
42 |
+
</tr>
|
43 |
+
</table>
|
44 |
+
</td>
|
45 |
+
</tr>
|
46 |
+
<tr id="linklistrow">
|
47 |
+
<td><label for="linklist">{#media_dlg.list}</label></td>
|
48 |
+
<td id="linklistcontainer"><select id="linklist"><option value=""></option></select></td>
|
49 |
+
</tr>
|
50 |
+
<tr>
|
51 |
+
<td><label for="width">{#media_dlg.size}</label></td>
|
52 |
+
<td>
|
53 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
54 |
+
<tr>
|
55 |
+
<td><input type="text" id="width" name="width" value="" class="size" onchange="Media.formToData('width');" onfocus="Media.beforeResize();" /> x <input type="text" id="height" name="height" value="" class="size" onfocus="Media.beforeResize();" onchange="Media.formToData('height');" /></td>
|
56 |
+
<td> <input id="constrain" type="checkbox" name="constrain" class="checkbox" checked="checked" /></td>
|
57 |
+
<td><label id="constrainlabel" for="constrain">{#media_dlg.constrain_proportions}</label></td>
|
58 |
+
</tr>
|
59 |
+
</table>
|
60 |
+
</td>
|
61 |
+
</tr>
|
62 |
+
</table>
|
63 |
+
</fieldset>
|
64 |
+
|
65 |
+
<fieldset>
|
66 |
+
<legend>{#media_dlg.preview}</legend>
|
67 |
+
<div id="prev"></div>
|
68 |
+
</fieldset>
|
69 |
+
</div>
|
70 |
+
|
71 |
+
<div id="advanced_panel" class="panel">
|
72 |
+
<fieldset>
|
73 |
+
<legend>{#media_dlg.advanced}</legend>
|
74 |
+
|
75 |
+
<table role="presentation" border="0" cellpadding="4" cellspacing="0" width="100%">
|
76 |
+
<tr>
|
77 |
+
<td><label for="id">{#media_dlg.id}</label></td>
|
78 |
+
<td><input type="text" id="id" name="id" onchange="Media.formToData();" /></td>
|
79 |
+
<td><label for="name">{#media_dlg.name}</label></td>
|
80 |
+
<td><input type="text" id="name" name="name" onchange="Media.formToData();" /></td>
|
81 |
+
</tr>
|
82 |
+
|
83 |
+
<tr>
|
84 |
+
<td><label for="align">{#media_dlg.align}</label></td>
|
85 |
+
<td>
|
86 |
+
<select id="align" name="align" onchange="Media.formToData();">
|
87 |
+
<option value="">{#not_set}</option>
|
88 |
+
<option value="top">{#media_dlg.align_top}</option>
|
89 |
+
<option value="right">{#media_dlg.align_right}</option>
|
90 |
+
<option value="bottom">{#media_dlg.align_bottom}</option>
|
91 |
+
<option value="left">{#media_dlg.align_left}</option>
|
92 |
+
</select>
|
93 |
+
</td>
|
94 |
+
|
95 |
+
<td><label for="bgcolor">{#media_dlg.bgcolor}</label></td>
|
96 |
+
<td>
|
97 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
98 |
+
<tr>
|
99 |
+
<td><input id="bgcolor" name="bgcolor" type="text" value="" size="9" onchange="updateColor('bgcolor_pick','bgcolor');Media.formToData();" /></td>
|
100 |
+
<td id="bgcolor_pickcontainer"> </td>
|
101 |
+
</tr>
|
102 |
+
</table>
|
103 |
+
</td>
|
104 |
+
</tr>
|
105 |
+
|
106 |
+
<tr>
|
107 |
+
<td><label for="vspace">{#media_dlg.vspace}</label></td>
|
108 |
+
<td><input type="text" id="vspace" name="vspace" class="number" onchange="Media.formToData();" /></td>
|
109 |
+
<td><label for="hspace">{#media_dlg.hspace}</label></td>
|
110 |
+
<td><input type="text" id="hspace" name="hspace" class="number" onchange="Media.formToData();" /></td>
|
111 |
+
</tr>
|
112 |
+
</table>
|
113 |
+
</fieldset>
|
114 |
+
|
115 |
+
<fieldset id="video_options">
|
116 |
+
<legend>{#media_dlg.html5_video_options}</legend>
|
117 |
+
|
118 |
+
<table role="presentation">
|
119 |
+
<tr>
|
120 |
+
<td><label for="video_altsource1">{#media_dlg.altsource1}</label></td>
|
121 |
+
<td>
|
122 |
+
<table role="presentation" border="0" cellspacing="0" cellpadding="0">
|
123 |
+
<tr>
|
124 |
+
<td><input type="text" id="video_altsource1" name="video_altsource1" onchange="Media.formToData();" style="width: 240px" /></td>
|
125 |
+
<td id="video_altsource1_filebrowser"> </td>
|
126 |
+
</tr>
|
127 |
+
</table>
|
128 |
+
</td>
|
129 |
+
</tr>
|
130 |
+
|
131 |
+
<tr>
|
132 |
+
<td><label for="video_altsource2">{#media_dlg.altsource2}</label></td>
|
133 |
+
<td>
|
134 |
+
<table role="presentation" border="0" cellspacing="0" cellpadding="0">
|
135 |
+
<tr>
|
136 |
+
<td><input type="text" id="video_altsource2" name="video_altsource2" onchange="Media.formToData();" style="width: 240px" /></td>
|
137 |
+
<td id="video_altsource2_filebrowser"> </td>
|
138 |
+
</tr>
|
139 |
+
</table>
|
140 |
+
</td>
|
141 |
+
</tr>
|
142 |
+
|
143 |
+
<tr>
|
144 |
+
<td><label for="video_poster">{#media_dlg.poster}</label></td>
|
145 |
+
<td>
|
146 |
+
<table role="presentation" border="0" cellspacing="0" cellpadding="0">
|
147 |
+
<tr>
|
148 |
+
<td><input type="text" id="video_poster" name="video_poster" onchange="Media.formToData();" style="width: 240px" /></td>
|
149 |
+
<td id="video_poster_filebrowser"> </td>
|
150 |
+
</tr>
|
151 |
+
</table>
|
152 |
+
</td>
|
153 |
+
</tr>
|
154 |
+
|
155 |
+
<tr>
|
156 |
+
<td><label for="video_preload">{#media_dlg.preload}</label></td>
|
157 |
+
<td>
|
158 |
+
<select id="video_preload" name="video_preload" onchange="Media.formToData();">
|
159 |
+
<option value="none">{#media_dlg.preload_none}</option>
|
160 |
+
<option value="metadata">{#media_dlg.preload_metadata}</option>
|
161 |
+
<option value="auto">{#media_dlg.preload_auto}</option>
|
162 |
+
</select>
|
163 |
+
</td>
|
164 |
+
</tr>
|
165 |
+
</table>
|
166 |
+
|
167 |
+
<table role="presentation" border="0" cellpadding="4" cellspacing="0">
|
168 |
+
<tr>
|
169 |
+
<td>
|
170 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
171 |
+
<tr>
|
172 |
+
<td><input type="checkbox" class="checkbox" id="video_autoplay" name="video_autoplay" onchange="Media.formToData();" /></td>
|
173 |
+
<td><label for="video_autoplay">{#media_dlg.play}</label></td>
|
174 |
+
</tr>
|
175 |
+
</table>
|
176 |
+
</td>
|
177 |
+
|
178 |
+
<td>
|
179 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
180 |
+
<tr>
|
181 |
+
<td><input type="checkbox" class="checkbox" id="video_muted" name="video_muted" onchange="Media.formToData();" /></td>
|
182 |
+
<td><label for="video_muted">{#media_dlg.mute}</label></td>
|
183 |
+
</tr>
|
184 |
+
</table>
|
185 |
+
</td>
|
186 |
+
|
187 |
+
<td>
|
188 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
189 |
+
<tr>
|
190 |
+
<td><input type="checkbox" class="checkbox" id="video_loop" name="video_loop" onchange="Media.formToData();" /></td>
|
191 |
+
<td><label for="video_loop">{#media_dlg.loop}</label></td>
|
192 |
+
</tr>
|
193 |
+
</table>
|
194 |
+
</td>
|
195 |
+
|
196 |
+
<td>
|
197 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
198 |
+
<tr>
|
199 |
+
<td><input type="checkbox" class="checkbox" id="video_controls" name="video_controls" onchange="Media.formToData();" /></td>
|
200 |
+
<td><label for="video_controls">{#media_dlg.controls}</label></td>
|
201 |
+
</tr>
|
202 |
+
</table>
|
203 |
+
</td>
|
204 |
+
</tr>
|
205 |
+
</table>
|
206 |
+
</fieldset>
|
207 |
+
|
208 |
+
<fieldset id="embeddedaudio_options">
|
209 |
+
<legend>{#media_dlg.embedded_audio_options}</legend>
|
210 |
+
|
211 |
+
<table role="presentation" border="0" cellpadding="4" cellspacing="0">
|
212 |
+
<tr>
|
213 |
+
<td>
|
214 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
215 |
+
<tr>
|
216 |
+
<td><input type="checkbox" class="checkbox" id="embeddedaudio_autoplay" name="audio_autoplay" onchange="Media.formToData();" /></td>
|
217 |
+
<td><label for="audio_autoplay">{#media_dlg.play}</label></td>
|
218 |
+
</tr>
|
219 |
+
</table>
|
220 |
+
</td>
|
221 |
+
|
222 |
+
<td>
|
223 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
224 |
+
<tr>
|
225 |
+
<td><input type="checkbox" class="checkbox" id="embeddedaudio_loop" name="audio_loop" onchange="Media.formToData();" /></td>
|
226 |
+
<td><label for="audio_loop">{#media_dlg.loop}</label></td>
|
227 |
+
</tr>
|
228 |
+
</table>
|
229 |
+
</td>
|
230 |
+
|
231 |
+
<td>
|
232 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
233 |
+
<tr>
|
234 |
+
<td><input type="checkbox" class="checkbox" id="embeddedaudio_controls" name="audio_controls" onchange="Media.formToData();" /></td>
|
235 |
+
<td><label for="audio_controls">{#media_dlg.controls}</label></td>
|
236 |
+
</tr>
|
237 |
+
</table>
|
238 |
+
</td>
|
239 |
+
</tr>
|
240 |
+
</table>
|
241 |
+
</fieldset>
|
242 |
+
|
243 |
+
<fieldset id="audio_options">
|
244 |
+
<legend>{#media_dlg.html5_audio_options}</legend>
|
245 |
+
|
246 |
+
<table role="presentation">
|
247 |
+
<tr>
|
248 |
+
<td><label for="audio_altsource1">{#media_dlg.altsource1}</label></td>
|
249 |
+
<td>
|
250 |
+
<table role="presentation" border="0" cellspacing="0" cellpadding="0">
|
251 |
+
<tr>
|
252 |
+
<td><input type="text" id="audio_altsource1" name="audio_altsource1" onchange="Media.formToData();" style="width: 240px" /></td>
|
253 |
+
<td id="audio_altsource1_filebrowser"> </td>
|
254 |
+
</tr>
|
255 |
+
</table>
|
256 |
+
</td>
|
257 |
+
</tr>
|
258 |
+
|
259 |
+
<tr>
|
260 |
+
<td><label for="audio_altsource2">{#media_dlg.altsource2}</label></td>
|
261 |
+
<td>
|
262 |
+
<table role="presentation" border="0" cellspacing="0" cellpadding="0">
|
263 |
+
<tr>
|
264 |
+
<td><input type="text" id="audio_altsource2" name="audio_altsource2" onchange="Media.formToData();" style="width: 240px" /></td>
|
265 |
+
<td id="audio_altsource2_filebrowser"> </td>
|
266 |
+
</tr>
|
267 |
+
</table>
|
268 |
+
</td>
|
269 |
+
</tr>
|
270 |
+
|
271 |
+
<tr>
|
272 |
+
<td><label for="audio_preload">{#media_dlg.preload}</label></td>
|
273 |
+
<td>
|
274 |
+
<select id="audio_preload" name="audio_preload" onchange="Media.formToData();">
|
275 |
+
<option value="none">{#media_dlg.preload_none}</option>
|
276 |
+
<option value="metadata">{#media_dlg.preload_metadata}</option>
|
277 |
+
<option value="auto">{#media_dlg.preload_auto}</option>
|
278 |
+
</select>
|
279 |
+
</td>
|
280 |
+
</tr>
|
281 |
+
</table>
|
282 |
+
|
283 |
+
<table role="presentation" border="0" cellpadding="4" cellspacing="0">
|
284 |
+
<tr>
|
285 |
+
<td>
|
286 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
287 |
+
<tr>
|
288 |
+
<td><input type="checkbox" class="checkbox" id="audio_autoplay" name="audio_autoplay" onchange="Media.formToData();" /></td>
|
289 |
+
<td><label for="audio_autoplay">{#media_dlg.play}</label></td>
|
290 |
+
</tr>
|
291 |
+
</table>
|
292 |
+
</td>
|
293 |
+
|
294 |
+
<td>
|
295 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
296 |
+
<tr>
|
297 |
+
<td><input type="checkbox" class="checkbox" id="audio_loop" name="audio_loop" onchange="Media.formToData();" /></td>
|
298 |
+
<td><label for="audio_loop">{#media_dlg.loop}</label></td>
|
299 |
+
</tr>
|
300 |
+
</table>
|
301 |
+
</td>
|
302 |
+
|
303 |
+
<td>
|
304 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
305 |
+
<tr>
|
306 |
+
<td><input type="checkbox" class="checkbox" id="audio_controls" name="audio_controls" onchange="Media.formToData();" /></td>
|
307 |
+
<td><label for="audio_controls">{#media_dlg.controls}</label></td>
|
308 |
+
</tr>
|
309 |
+
</table>
|
310 |
+
</td>
|
311 |
+
</tr>
|
312 |
+
</table>
|
313 |
+
</fieldset>
|
314 |
+
|
315 |
+
<fieldset id="flash_options">
|
316 |
+
<legend>{#media_dlg.flash_options}</legend>
|
317 |
+
|
318 |
+
<table role="presentation" border="0" cellpadding="4" cellspacing="0">
|
319 |
+
<tr>
|
320 |
+
<td><label for="flash_quality">{#media_dlg.quality}</label></td>
|
321 |
+
<td>
|
322 |
+
<select id="flash_quality" name="flash_quality" onchange="Media.formToData();">
|
323 |
+
<option value="">{#not_set}</option>
|
324 |
+
<option value="high">high</option>
|
325 |
+
<option value="low">low</option>
|
326 |
+
<option value="autolow">autolow</option>
|
327 |
+
<option value="autohigh">autohigh</option>
|
328 |
+
<option value="best">best</option>
|
329 |
+
</select>
|
330 |
+
</td>
|
331 |
+
|
332 |
+
<td><label for="flash_scale">{#media_dlg.scale}</label></td>
|
333 |
+
<td>
|
334 |
+
<select id="flash_scale" name="flash_scale" onchange="Media.formToData();">
|
335 |
+
<option value="">{#not_set}</option>
|
336 |
+
<option value="showall">showall</option>
|
337 |
+
<option value="noborder">noborder</option>
|
338 |
+
<option value="exactfit">exactfit</option>
|
339 |
+
<option value="noscale">noscale</option>
|
340 |
+
</select>
|
341 |
+
</td>
|
342 |
+
</tr>
|
343 |
+
|
344 |
+
<tr>
|
345 |
+
<td><label for="flash_wmode">{#media_dlg.wmode}</label></td>
|
346 |
+
<td>
|
347 |
+
<select id="flash_wmode" name="flash_wmode" onchange="Media.formToData();">
|
348 |
+
<option value="">{#not_set}</option>
|
349 |
+
<option value="window">window</option>
|
350 |
+
<option value="opaque">opaque</option>
|
351 |
+
<option value="transparent">transparent</option>
|
352 |
+
</select>
|
353 |
+
</td>
|
354 |
+
|
355 |
+
<td><label for="flash_salign">{#media_dlg.salign}</label></td>
|
356 |
+
<td>
|
357 |
+
<select id="flash_salign" name="flash_salign" onchange="Media.formToData();">
|
358 |
+
<option value="">{#not_set}</option>
|
359 |
+
<option value="l">{#media_dlg.align_left}</option>
|
360 |
+
<option value="t">{#media_dlg.align_top}</option>
|
361 |
+
<option value="r">{#media_dlg.align_right}</option>
|
362 |
+
<option value="b">{#media_dlg.align_bottom}</option>
|
363 |
+
<option value="tl">{#media_dlg.align_top_left}</option>
|
364 |
+
<option value="tr">{#media_dlg.align_top_right}</option>
|
365 |
+
<option value="bl">{#media_dlg.align_bottom_left}</option>
|
366 |
+
<option value="br">{#media_dlg.align_bottom_right}</option>
|
367 |
+
</select>
|
368 |
+
</td>
|
369 |
+
</tr>
|
370 |
+
|
371 |
+
<tr>
|
372 |
+
<td colspan="2">
|
373 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
374 |
+
<tr>
|
375 |
+
<td><input type="checkbox" class="checkbox" id="flash_play" name="flash_play" checked="checked" onchange="Media.formToData();" /></td>
|
376 |
+
<td><label for="flash_play">{#media_dlg.play}</label></td>
|
377 |
+
</tr>
|
378 |
+
</table>
|
379 |
+
</td>
|
380 |
+
|
381 |
+
<td colspan="2">
|
382 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
383 |
+
<tr>
|
384 |
+
<td><input type="checkbox" class="checkbox" id="flash_loop" name="flash_loop" checked="checked" onchange="Media.formToData();" /></td>
|
385 |
+
<td><label for="flash_loop">{#media_dlg.loop}</label></td>
|
386 |
+
</tr>
|
387 |
+
</table>
|
388 |
+
</td>
|
389 |
+
</tr>
|
390 |
+
|
391 |
+
<tr>
|
392 |
+
<td colspan="2">
|
393 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
394 |
+
<tr>
|
395 |
+
<td><input type="checkbox" class="checkbox" id="flash_menu" name="flash_menu" checked="checked" onchange="Media.formToData();" /></td>
|
396 |
+
<td><label for="flash_menu">{#media_dlg.menu}</label></td>
|
397 |
+
</tr>
|
398 |
+
</table>
|
399 |
+
</td>
|
400 |
+
|
401 |
+
<td colspan="2">
|
402 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
403 |
+
<tr>
|
404 |
+
<td><input type="checkbox" class="checkbox" id="flash_swliveconnect" name="flash_swliveconnect" onchange="Media.formToData();" /></td>
|
405 |
+
<td><label for="flash_swliveconnect">{#media_dlg.liveconnect}</label></td>
|
406 |
+
</tr>
|
407 |
+
</table>
|
408 |
+
</td>
|
409 |
+
</tr>
|
410 |
+
</table>
|
411 |
+
|
412 |
+
<table role="presentation">
|
413 |
+
<tr>
|
414 |
+
<td><label for="flash_base">{#media_dlg.base}</label></td>
|
415 |
+
<td><input type="text" id="flash_base" name="flash_base" onchange="Media.formToData();" /></td>
|
416 |
+
</tr>
|
417 |
+
|
418 |
+
<tr>
|
419 |
+
<td><label for="flash_flashvars">{#media_dlg.flashvars}</label></td>
|
420 |
+
<td><input type="text" id="flash_flashvars" name="flash_flashvars" onchange="Media.formToData();" /></td>
|
421 |
+
</tr>
|
422 |
+
</table>
|
423 |
+
</fieldset>
|
424 |
+
|
425 |
+
<fieldset id="quicktime_options">
|
426 |
+
<legend>{#media_dlg.qt_options}</legend>
|
427 |
+
|
428 |
+
<table role="presentation" border="0" cellpadding="4" cellspacing="0">
|
429 |
+
<tr>
|
430 |
+
<td colspan="2">
|
431 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
432 |
+
<tr>
|
433 |
+
<td><input type="checkbox" class="checkbox" id="quicktime_loop" name="quicktime_loop" onchange="Media.formToData();" /></td>
|
434 |
+
<td><label for="quicktime_loop">{#media_dlg.loop}</label></td>
|
435 |
+
</tr>
|
436 |
+
</table>
|
437 |
+
</td>
|
438 |
+
|
439 |
+
<td colspan="2">
|
440 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
441 |
+
<tr>
|
442 |
+
<td><input type="checkbox" class="checkbox" id="quicktime_autoplay" name="quicktime_autoplay" checked="checked" onchange="Media.formToData();" /></td>
|
443 |
+
<td><label for="quicktime_autoplay">{#media_dlg.play}</label></td>
|
444 |
+
</tr>
|
445 |
+
</table>
|
446 |
+
</td>
|
447 |
+
</tr>
|
448 |
+
|
449 |
+
<tr>
|
450 |
+
<td colspan="2">
|
451 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
452 |
+
<tr>
|
453 |
+
<td><input type="checkbox" class="checkbox" id="quicktime_cache" name="quicktime_cache" onchange="Media.formToData();" /></td>
|
454 |
+
<td><label for="quicktime_cache">{#media_dlg.cache}</label></td>
|
455 |
+
</tr>
|
456 |
+
</table>
|
457 |
+
</td>
|
458 |
+
|
459 |
+
<td colspan="2">
|
460 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
461 |
+
<tr>
|
462 |
+
<td><input type="checkbox" class="checkbox" id="quicktime_controller" name="quicktime_controller" checked="checked" onchange="Media.formToData();" /></td>
|
463 |
+
<td><label for="quicktime_controller">{#media_dlg.controller}</label></td>
|
464 |
+
</tr>
|
465 |
+
</table>
|
466 |
+
</td>
|
467 |
+
</tr>
|
468 |
+
|
469 |
+
<tr>
|
470 |
+
<td colspan="2">
|
471 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
472 |
+
<tr>
|
473 |
+
<td><input type="checkbox" class="checkbox" id="quicktime_correction" name="quicktime_correction" onchange="Media.formToData();" /></td>
|
474 |
+
<td><label for="quicktime_correction">{#media_dlg.correction}</label></td>
|
475 |
+
</tr>
|
476 |
+
</table>
|
477 |
+
</td>
|
478 |
+
|
479 |
+
<td colspan="2">
|
480 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
481 |
+
<tr>
|
482 |
+
<td><input type="checkbox" class="checkbox" id="quicktime_enablejavascript" name="quicktime_enablejavascript" onchange="Media.formToData();" /></td>
|
483 |
+
<td><label for="quicktime_enablejavascript">{#media_dlg.enablejavascript}</label></td>
|
484 |
+
</tr>
|
485 |
+
</table>
|
486 |
+
</td>
|
487 |
+
</tr>
|
488 |
+
|
489 |
+
<tr>
|
490 |
+
<td colspan="2">
|
491 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
492 |
+
<tr>
|
493 |
+
<td><input type="checkbox" class="checkbox" id="quicktime_kioskmode" name="quicktime_kioskmode" onchange="Media.formToData();" /></td>
|
494 |
+
<td><label for="quicktime_kioskmode">{#media_dlg.kioskmode}</label></td>
|
495 |
+
</tr>
|
496 |
+
</table>
|
497 |
+
</td>
|
498 |
+
|
499 |
+
<td colspan="2">
|
500 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
501 |
+
<tr>
|
502 |
+
<td><input type="checkbox" class="checkbox" id="quicktime_autohref" name="quicktime_autohref" onchange="Media.formToData();" /></td>
|
503 |
+
<td><label for="quicktime_autohref">{#media_dlg.autohref}</label></td>
|
504 |
+
</tr>
|
505 |
+
</table>
|
506 |
+
</td>
|
507 |
+
</tr>
|
508 |
+
|
509 |
+
<tr>
|
510 |
+
<td colspan="2">
|
511 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
512 |
+
<tr>
|
513 |
+
<td><input type="checkbox" class="checkbox" id="quicktime_playeveryframe" name="quicktime_playeveryframe" onchange="Media.formToData();" /></td>
|
514 |
+
<td><label for="quicktime_playeveryframe">{#media_dlg.playeveryframe}</label></td>
|
515 |
+
</tr>
|
516 |
+
</table>
|
517 |
+
</td>
|
518 |
+
|
519 |
+
<td colspan="2">
|
520 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
521 |
+
<tr>
|
522 |
+
<td><input type="checkbox" class="checkbox" id="quicktime_targetcache" name="quicktime_targetcache" onchange="Media.formToData();" /></td>
|
523 |
+
<td><label for="quicktime_targetcache">{#media_dlg.targetcache}</label></td>
|
524 |
+
</tr>
|
525 |
+
</table>
|
526 |
+
</td>
|
527 |
+
</tr>
|
528 |
+
|
529 |
+
<tr>
|
530 |
+
<td><label for="quicktime_scale">{#media_dlg.scale}</label></td>
|
531 |
+
<td><select id="quicktime_scale" name="quicktime_scale" class="mceEditableSelect" onchange="Media.formToData();">
|
532 |
+
<option value="">{#not_set}</option>
|
533 |
+
<option value="tofit">tofit</option>
|
534 |
+
<option value="aspect">aspect</option>
|
535 |
+
</select>
|
536 |
+
</td>
|
537 |
+
|
538 |
+
<td colspan="2"> </td>
|
539 |
+
</tr>
|
540 |
+
|
541 |
+
<tr>
|
542 |
+
<td><label for="quicktime_starttime">{#media_dlg.starttime}</label></td>
|
543 |
+
<td><input type="text" id="quicktime_starttime" name="quicktime_starttime" onchange="Media.formToData();" /></td>
|
544 |
+
|
545 |
+
<td><label for="quicktime_endtime">{#media_dlg.endtime}</label></td>
|
546 |
+
<td><input type="text" id="quicktime_endtime" name="quicktime_endtime" onchange="Media.formToData();" /></td>
|
547 |
+
</tr>
|
548 |
+
|
549 |
+
<tr>
|
550 |
+
<td><label for="quicktime_target">{#media_dlg.target}</label></td>
|
551 |
+
<td><input type="text" id="quicktime_target" name="quicktime_target" onchange="Media.formToData();" /></td>
|
552 |
+
|
553 |
+
<td><label for="quicktime_href">{#media_dlg.href}</label></td>
|
554 |
+
<td><input type="text" id="quicktime_href" name="quicktime_href" onchange="Media.formToData();" /></td>
|
555 |
+
</tr>
|
556 |
+
|
557 |
+
<tr>
|
558 |
+
<td><label for="quicktime_qtsrcchokespeed">{#media_dlg.qtsrcchokespeed}</label></td>
|
559 |
+
<td><input type="text" id="quicktime_qtsrcchokespeed" name="quicktime_qtsrcchokespeed" onchange="Media.formToData();" /></td>
|
560 |
+
|
561 |
+
<td><label for="quicktime_volume">{#media_dlg.volume}</label></td>
|
562 |
+
<td><input type="text" id="quicktime_volume" name="quicktime_volume" onchange="Media.formToData();" /></td>
|
563 |
+
</tr>
|
564 |
+
|
565 |
+
<tr>
|
566 |
+
<td><label for="quicktime_qtsrc">{#media_dlg.qtsrc}</label></td>
|
567 |
+
<td colspan="4">
|
568 |
+
<table role="presentation" border="0" cellspacing="0" cellpadding="0">
|
569 |
+
<tr>
|
570 |
+
<td><input type="text" id="quicktime_qtsrc" name="quicktime_qtsrc" onchange="Media.formToData();" /></td>
|
571 |
+
<td id="qtsrcfilebrowsercontainer"> </td>
|
572 |
+
</tr>
|
573 |
+
</table>
|
574 |
+
</td>
|
575 |
+
</tr>
|
576 |
+
</table>
|
577 |
+
</fieldset>
|
578 |
+
|
579 |
+
<fieldset id="windowsmedia_options">
|
580 |
+
<legend>{#media_dlg.wmp_options}</legend>
|
581 |
+
|
582 |
+
<table role="presentation" border="0" cellpadding="4" cellspacing="0">
|
583 |
+
<tr>
|
584 |
+
<td colspan="2">
|
585 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
586 |
+
<tr>
|
587 |
+
<td><input type="checkbox" class="checkbox" id="windowsmedia_autostart" name="windowsmedia_autostart" checked="checked" onchange="Media.formToData();" /></td>
|
588 |
+
<td><label for="windowsmedia_autostart">{#media_dlg.autostart}</label></td>
|
589 |
+
</tr>
|
590 |
+
</table>
|
591 |
+
</td>
|
592 |
+
|
593 |
+
<td colspan="2">
|
594 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
595 |
+
<tr>
|
596 |
+
<td><input type="checkbox" class="checkbox" id="windowsmedia_enabled" name="windowsmedia_enabled" onchange="Media.formToData();" /></td>
|
597 |
+
<td><label for="windowsmedia_enabled">{#media_dlg.enabled}</label></td>
|
598 |
+
</tr>
|
599 |
+
</table>
|
600 |
+
</td>
|
601 |
+
</tr>
|
602 |
+
|
603 |
+
<tr>
|
604 |
+
<td colspan="2">
|
605 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
606 |
+
<tr>
|
607 |
+
<td><input type="checkbox" class="checkbox" id="windowsmedia_enablecontextmenu" name="windowsmedia_enablecontextmenu" checked="checked" onchange="Media.formToData();" /></td>
|
608 |
+
<td><label for="windowsmedia_enablecontextmenu">{#media_dlg.menu}</label></td>
|
609 |
+
</tr>
|
610 |
+
</table>
|
611 |
+
</td>
|
612 |
+
|
613 |
+
<td colspan="2">
|
614 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
615 |
+
<tr>
|
616 |
+
<td><input type="checkbox" class="checkbox" id="windowsmedia_fullscreen" name="windowsmedia_fullscreen" onchange="Media.formToData();" /></td>
|
617 |
+
<td><label for="windowsmedia_fullscreen">{#media_dlg.fullscreen}</label></td>
|
618 |
+
</tr>
|
619 |
+
</table>
|
620 |
+
</td>
|
621 |
+
</tr>
|
622 |
+
|
623 |
+
<tr>
|
624 |
+
<td colspan="2">
|
625 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
626 |
+
<tr>
|
627 |
+
<td><input type="checkbox" class="checkbox" id="windowsmedia_invokeurls" name="windowsmedia_invokeurls" checked="checked" onchange="Media.formToData();" /></td>
|
628 |
+
<td><label for="windowsmedia_invokeurls">{#media_dlg.invokeurls}</label></td>
|
629 |
+
</tr>
|
630 |
+
</table>
|
631 |
+
</td>
|
632 |
+
|
633 |
+
<td colspan="2">
|
634 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
635 |
+
<tr>
|
636 |
+
<td><input type="checkbox" class="checkbox" id="windowsmedia_mute" name="windowsmedia_mute" onchange="Media.formToData();" /></td>
|
637 |
+
<td><label for="windowsmedia_mute">{#media_dlg.mute}</label></td>
|
638 |
+
</tr>
|
639 |
+
</table>
|
640 |
+
</td>
|
641 |
+
</tr>
|
642 |
+
|
643 |
+
<tr>
|
644 |
+
<td colspan="2">
|
645 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
646 |
+
<tr>
|
647 |
+
<td><input type="checkbox" class="checkbox" id="windowsmedia_stretchtofit" name="windowsmedia_stretchtofit" onchange="Media.formToData();" /></td>
|
648 |
+
<td><label for="windowsmedia_stretchtofit">{#media_dlg.stretchtofit}</label></td>
|
649 |
+
</tr>
|
650 |
+
</table>
|
651 |
+
</td>
|
652 |
+
|
653 |
+
<td colspan="2">
|
654 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
655 |
+
<tr>
|
656 |
+
<td><input type="checkbox" class="checkbox" id="windowsmedia_windowlessvideo" name="windowsmedia_windowlessvideo" onchange="Media.formToData();" /></td>
|
657 |
+
<td><label for="windowsmedia_windowlessvideo">{#media_dlg.windowlessvideo}</label></td>
|
658 |
+
</tr>
|
659 |
+
</table>
|
660 |
+
</td>
|
661 |
+
</tr>
|
662 |
+
|
663 |
+
<tr>
|
664 |
+
<td><label for="windowsmedia_balance">{#media_dlg.balance}</label></td>
|
665 |
+
<td><input type="text" id="windowsmedia_balance" name="windowsmedia_balance" onchange="Media.formToData();" /></td>
|
666 |
+
|
667 |
+
<td><label for="windowsmedia_baseurl">{#media_dlg.baseurl}</label></td>
|
668 |
+
<td><input type="text" id="windowsmedia_baseurl" name="windowsmedia_baseurl" onchange="Media.formToData();" /></td>
|
669 |
+
</tr>
|
670 |
+
|
671 |
+
<tr>
|
672 |
+
<td><label for="windowsmedia_captioningid">{#media_dlg.captioningid}</label></td>
|
673 |
+
<td><input type="text" id="windowsmedia_captioningid" name="windowsmedia_captioningid" onchange="Media.formToData();" /></td>
|
674 |
+
|
675 |
+
<td><label for="windowsmedia_currentmarker">{#media_dlg.currentmarker}</label></td>
|
676 |
+
<td><input type="text" id="windowsmedia_currentmarker" name="windowsmedia_currentmarker" onchange="Media.formToData();" /></td>
|
677 |
+
</tr>
|
678 |
+
|
679 |
+
<tr>
|
680 |
+
<td><label for="windowsmedia_currentposition">{#media_dlg.currentposition}</label></td>
|
681 |
+
<td><input type="text" id="windowsmedia_currentposition" name="windowsmedia_currentposition" onchange="Media.formToData();" /></td>
|
682 |
+
|
683 |
+
<td><label for="windowsmedia_defaultframe">{#media_dlg.defaultframe}</label></td>
|
684 |
+
<td><input type="text" id="windowsmedia_defaultframe" name="windowsmedia_defaultframe" onchange="Media.formToData();" /></td>
|
685 |
+
</tr>
|
686 |
+
|
687 |
+
<tr>
|
688 |
+
<td><label for="windowsmedia_playcount">{#media_dlg.playcount}</label></td>
|
689 |
+
<td><input type="text" id="windowsmedia_playcount" name="windowsmedia_playcount" onchange="Media.formToData();" /></td>
|
690 |
+
|
691 |
+
<td><label for="windowsmedia_rate">{#media_dlg.rate}</label></td>
|
692 |
+
<td><input type="text" id="windowsmedia_rate" name="windowsmedia_rate" onchange="Media.formToData();" /></td>
|
693 |
+
</tr>
|
694 |
+
|
695 |
+
<tr>
|
696 |
+
<td><label for="windowsmedia_uimode">{#media_dlg.uimode}</label></td>
|
697 |
+
<td><input type="text" id="windowsmedia_uimode" name="windowsmedia_uimode" onchange="Media.formToData();" /></td>
|
698 |
+
|
699 |
+
<td><label for="windowsmedia_volume">{#media_dlg.volume}</label></td>
|
700 |
+
<td><input type="text" id="windowsmedia_volume" name="windowsmedia_volume" onchange="Media.formToData();" /></td>
|
701 |
+
</tr>
|
702 |
+
|
703 |
+
</table>
|
704 |
+
</fieldset>
|
705 |
+
|
706 |
+
<fieldset id="realmedia_options">
|
707 |
+
<legend>{#media_dlg.rmp_options}</legend>
|
708 |
+
|
709 |
+
<table role="presentation" border="0" cellpadding="4" cellspacing="0">
|
710 |
+
<tr>
|
711 |
+
<td colspan="2">
|
712 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
713 |
+
<tr>
|
714 |
+
<td><input type="checkbox" class="checkbox" id="realmedia_autostart" name="realmedia_autostart" onchange="Media.formToData();" /></td>
|
715 |
+
<td><label for="realmedia_autostart">{#media_dlg.autostart}</label></td>
|
716 |
+
</tr>
|
717 |
+
</table>
|
718 |
+
</td>
|
719 |
+
|
720 |
+
<td colspan="2">
|
721 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
722 |
+
<tr>
|
723 |
+
<td><input type="checkbox" class="checkbox" id="realmedia_loop" name="realmedia_loop" onchange="Media.formToData();" /></td>
|
724 |
+
<td><label for="realmedia_loop">{#media_dlg.loop}</label></td>
|
725 |
+
</tr>
|
726 |
+
</table>
|
727 |
+
</td>
|
728 |
+
</tr>
|
729 |
+
|
730 |
+
<tr>
|
731 |
+
<td colspan="2">
|
732 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
733 |
+
<tr>
|
734 |
+
<td><input type="checkbox" class="checkbox" id="realmedia_autogotourl" name="realmedia_autogotourl" checked="checked" onchange="Media.formToData();" /></td>
|
735 |
+
<td><label for="realmedia_autogotourl">{#media_dlg.autogotourl}</label></td>
|
736 |
+
</tr>
|
737 |
+
</table>
|
738 |
+
</td>
|
739 |
+
|
740 |
+
<td colspan="2">
|
741 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
742 |
+
<tr>
|
743 |
+
<td><input type="checkbox" class="checkbox" id="realmedia_center" name="realmedia_center" onchange="Media.formToData();" /></td>
|
744 |
+
<td><label for="realmedia_center">{#media_dlg.center}</label></td>
|
745 |
+
</tr>
|
746 |
+
</table>
|
747 |
+
</td>
|
748 |
+
</tr>
|
749 |
+
|
750 |
+
<tr>
|
751 |
+
<td colspan="2">
|
752 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
753 |
+
<tr>
|
754 |
+
<td><input type="checkbox" class="checkbox" id="realmedia_imagestatus" name="realmedia_imagestatus" checked="checked" onchange="Media.formToData();" /></td>
|
755 |
+
<td><label for="realmedia_imagestatus">{#media_dlg.imagestatus}</label></td>
|
756 |
+
</tr>
|
757 |
+
</table>
|
758 |
+
</td>
|
759 |
+
|
760 |
+
<td colspan="2">
|
761 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
762 |
+
<tr>
|
763 |
+
<td><input type="checkbox" class="checkbox" id="realmedia_maintainaspect" name="realmedia_maintainaspect" onchange="Media.formToData();" /></td>
|
764 |
+
<td><label for="realmedia_maintainaspect">{#media_dlg.maintainaspect}</label></td>
|
765 |
+
</tr>
|
766 |
+
</table>
|
767 |
+
</td>
|
768 |
+
</tr>
|
769 |
+
|
770 |
+
<tr>
|
771 |
+
<td colspan="2">
|
772 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
773 |
+
<tr>
|
774 |
+
<td><input type="checkbox" class="checkbox" id="realmedia_nojava" name="realmedia_nojava" onchange="Media.formToData();" /></td>
|
775 |
+
<td><label for="realmedia_nojava">{#media_dlg.nojava}</label></td>
|
776 |
+
</tr>
|
777 |
+
</table>
|
778 |
+
</td>
|
779 |
+
|
780 |
+
<td colspan="2">
|
781 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
782 |
+
<tr>
|
783 |
+
<td><input type="checkbox" class="checkbox" id="realmedia_prefetch" name="realmedia_prefetch" onchange="Media.formToData();" /></td>
|
784 |
+
<td><label for="realmedia_prefetch">{#media_dlg.prefetch}</label></td>
|
785 |
+
</tr>
|
786 |
+
</table>
|
787 |
+
</td>
|
788 |
+
</tr>
|
789 |
+
|
790 |
+
<tr>
|
791 |
+
<td colspan="2">
|
792 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
793 |
+
<tr>
|
794 |
+
<td><input type="checkbox" class="checkbox" id="realmedia_shuffle" name="realmedia_shuffle" onchange="Media.formToData();" /></td>
|
795 |
+
<td><label for="realmedia_shuffle">{#media_dlg.shuffle}</label></td>
|
796 |
+
</tr>
|
797 |
+
</table>
|
798 |
+
</td>
|
799 |
+
|
800 |
+
<td colspan="2">
|
801 |
+
|
802 |
+
</td>
|
803 |
+
</tr>
|
804 |
+
|
805 |
+
<tr>
|
806 |
+
<td><label for="realmedia_console">{#media_dlg.console}</label></td>
|
807 |
+
<td><input type="text" id="realmedia_console" name="realmedia_console" onchange="Media.formToData();" /></td>
|
808 |
+
|
809 |
+
<td><label for="realmedia_controls">{#media_dlg.controls}</label></td>
|
810 |
+
<td><input type="text" id="realmedia_controls" name="realmedia_controls" onchange="Media.formToData();" /></td>
|
811 |
+
</tr>
|
812 |
+
|
813 |
+
<tr>
|
814 |
+
<td><label for="realmedia_numloop">{#media_dlg.numloop}</label></td>
|
815 |
+
<td><input type="text" id="realmedia_numloop" name="realmedia_numloop" onchange="Media.formToData();" /></td>
|
816 |
+
|
817 |
+
<td><label for="realmedia_scriptcallbacks">{#media_dlg.scriptcallbacks}</label></td>
|
818 |
+
<td><input type="text" id="realmedia_scriptcallbacks" name="realmedia_scriptcallbacks" onchange="Media.formToData();" /></td>
|
819 |
+
</tr>
|
820 |
+
</table>
|
821 |
+
</fieldset>
|
822 |
+
|
823 |
+
<fieldset id="shockwave_options">
|
824 |
+
<legend>{#media_dlg.shockwave_options}</legend>
|
825 |
+
|
826 |
+
<table role="presentation" border="0" cellpadding="4" cellspacing="0">
|
827 |
+
<tr>
|
828 |
+
<td><label for="shockwave_swstretchstyle">{#media_dlg.swstretchstyle}</label></td>
|
829 |
+
<td>
|
830 |
+
<select id="shockwave_swstretchstyle" name="shockwave_swstretchstyle" onchange="Media.formToData();">
|
831 |
+
<option value="none">{#not_set}</option>
|
832 |
+
<option value="meet">Meet</option>
|
833 |
+
<option value="fill">Fill</option>
|
834 |
+
<option value="stage">Stage</option>
|
835 |
+
</select>
|
836 |
+
</td>
|
837 |
+
|
838 |
+
<td><label for="shockwave_swvolume">{#media_dlg.volume}</label></td>
|
839 |
+
<td><input type="text" id="shockwave_swvolume" name="shockwave_swvolume" onchange="Media.formToData();" /></td>
|
840 |
+
</tr>
|
841 |
+
|
842 |
+
<tr>
|
843 |
+
<td><label for="shockwave_swstretchhalign">{#media_dlg.swstretchhalign}</label></td>
|
844 |
+
<td>
|
845 |
+
<select id="shockwave_swstretchhalign" name="shockwave_swstretchhalign" onchange="Media.formToData();">
|
846 |
+
<option value="none">{#not_set}</option>
|
847 |
+
<option value="left">{#media_dlg.align_left}</option>
|
848 |
+
<option value="center">{#media_dlg.align_center}</option>
|
849 |
+
<option value="right">{#media_dlg.align_right}</option>
|
850 |
+
</select>
|
851 |
+
</td>
|
852 |
+
|
853 |
+
<td><label for="shockwave_swstretchvalign">{#media_dlg.swstretchvalign}</label></td>
|
854 |
+
<td>
|
855 |
+
<select id="shockwave_swstretchvalign" name="shockwave_swstretchvalign" onchange="Media.formToData();">
|
856 |
+
<option value="none">{#not_set}</option>
|
857 |
+
<option value="meet">Meet</option>
|
858 |
+
<option value="fill">Fill</option>
|
859 |
+
<option value="stage">Stage</option>
|
860 |
+
</select>
|
861 |
+
</td>
|
862 |
+
</tr>
|
863 |
+
|
864 |
+
<tr>
|
865 |
+
<td colspan="2">
|
866 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
867 |
+
<tr>
|
868 |
+
<td><input type="checkbox" class="checkbox" id="shockwave_autostart" name="shockwave_autostart" onchange="Media.formToData();" checked="checked" /></td>
|
869 |
+
<td><label for="shockwave_autostart">{#media_dlg.autostart}</label></td>
|
870 |
+
</tr>
|
871 |
+
</table>
|
872 |
+
</td>
|
873 |
+
|
874 |
+
<td colspan="2">
|
875 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
876 |
+
<tr>
|
877 |
+
<td><input type="checkbox" class="checkbox" id="shockwave_sound" name="shockwave_sound" onchange="Media.formToData();" checked="checked" /></td>
|
878 |
+
<td><label for="shockwave_sound">{#media_dlg.sound}</label></td>
|
879 |
+
</tr>
|
880 |
+
</table>
|
881 |
+
</td>
|
882 |
+
</tr>
|
883 |
+
|
884 |
+
|
885 |
+
<tr>
|
886 |
+
<td colspan="2">
|
887 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
888 |
+
<tr>
|
889 |
+
<td><input type="checkbox" class="checkbox" id="shockwave_swliveconnect" name="shockwave_swliveconnect" onchange="Media.formToData();" /></td>
|
890 |
+
<td><label for="shockwave_swliveconnect">{#media_dlg.liveconnect}</label></td>
|
891 |
+
</tr>
|
892 |
+
</table>
|
893 |
+
</td>
|
894 |
+
|
895 |
+
<td colspan="2">
|
896 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
897 |
+
<tr>
|
898 |
+
<td><input type="checkbox" class="checkbox" id="shockwave_progress" name="shockwave_progress" onchange="Media.formToData();" checked="checked" /></td>
|
899 |
+
<td><label for="shockwave_progress">{#media_dlg.progress}</label></td>
|
900 |
+
</tr>
|
901 |
+
</table>
|
902 |
+
</td>
|
903 |
+
</tr>
|
904 |
+
</table>
|
905 |
+
</fieldset>
|
906 |
+
</div>
|
907 |
+
|
908 |
+
<div id="source_panel" class="panel">
|
909 |
+
<fieldset>
|
910 |
+
<legend>{#media_dlg.source}</legend>
|
911 |
+
<textarea id="source" style="width: 99%; height: 390px"></textarea>
|
912 |
+
</fieldset>
|
913 |
+
</div>
|
914 |
+
</div>
|
915 |
+
|
916 |
+
<div class="mceActionPanel">
|
917 |
+
<input type="submit" id="insert" name="insert" value="{#insert}" />
|
918 |
+
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
919 |
+
</div>
|
920 |
+
</form>
|
921 |
+
</body>
|
922 |
+
</html>
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/media/moxieplayer.swf
ADDED
Binary file
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/nonbreaking/editor_plugin.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(function(){tinymce.create("tinymce.plugins.Nonbreaking",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceNonBreaking",function(){a.execCommand("mceInsertContent",false,(a.plugins.visualchars&&a.plugins.visualchars.state)?'<span data-mce-bogus="1" class="mceItemHidden mceItemNbsp"> </span>':" ")});a.addButton("nonbreaking",{title:"nonbreaking.nonbreaking_desc",cmd:"mceNonBreaking"});if(a.getParam("nonbreaking_force_tab")){a.onKeyDown.add(function(d,f){if(f.keyCode==9){f.preventDefault();d.execCommand("mceNonBreaking");d.execCommand("mceNonBreaking");d.execCommand("mceNonBreaking")}})}},getInfo:function(){return{longname:"Nonbreaking space",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/nonbreaking",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("nonbreaking",tinymce.plugins.Nonbreaking)})();
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/nonbreaking/editor_plugin_src.js
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
tinymce.create('tinymce.plugins.Nonbreaking', {
|
13 |
+
init : function(ed, url) {
|
14 |
+
var t = this;
|
15 |
+
|
16 |
+
t.editor = ed;
|
17 |
+
|
18 |
+
// Register commands
|
19 |
+
ed.addCommand('mceNonBreaking', function() {
|
20 |
+
ed.execCommand('mceInsertContent', false, (ed.plugins.visualchars && ed.plugins.visualchars.state) ? '<span data-mce-bogus="1" class="mceItemHidden mceItemNbsp"> </span>' : ' ');
|
21 |
+
});
|
22 |
+
|
23 |
+
// Register buttons
|
24 |
+
ed.addButton('nonbreaking', {title : 'nonbreaking.nonbreaking_desc', cmd : 'mceNonBreaking'});
|
25 |
+
|
26 |
+
if (ed.getParam('nonbreaking_force_tab')) {
|
27 |
+
ed.onKeyDown.add(function(ed, e) {
|
28 |
+
if (e.keyCode == 9) {
|
29 |
+
e.preventDefault();
|
30 |
+
|
31 |
+
ed.execCommand('mceNonBreaking');
|
32 |
+
ed.execCommand('mceNonBreaking');
|
33 |
+
ed.execCommand('mceNonBreaking');
|
34 |
+
}
|
35 |
+
});
|
36 |
+
}
|
37 |
+
},
|
38 |
+
|
39 |
+
getInfo : function() {
|
40 |
+
return {
|
41 |
+
longname : 'Nonbreaking space',
|
42 |
+
author : 'Moxiecode Systems AB',
|
43 |
+
authorurl : 'http://tinymce.moxiecode.com',
|
44 |
+
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/nonbreaking',
|
45 |
+
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
46 |
+
};
|
47 |
+
}
|
48 |
+
|
49 |
+
// Private methods
|
50 |
+
});
|
51 |
+
|
52 |
+
// Register plugin
|
53 |
+
tinymce.PluginManager.add('nonbreaking', tinymce.plugins.Nonbreaking);
|
54 |
+
})();
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/noneditable/editor_plugin.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(function(){var c=tinymce.dom.TreeWalker;var a="contenteditable",d="data-mce-"+a;var e=tinymce.VK;function b(n){var j=n.dom,p=n.selection,r,o="mce_noneditablecaret";r=tinymce.isGecko?"\u200B":"\uFEFF";function m(t){var s;if(t.nodeType===1){s=t.getAttribute(d);if(s&&s!=="inherit"){return s}s=t.contentEditable;if(s!=="inherit"){return s}}return null}function g(s){var t;while(s){t=m(s);if(t){return t==="false"?s:null}s=s.parentNode}}function l(s){while(s){if(s.id===o){return s}s=s.parentNode}}function k(s){var t;if(s){t=new c(s,s);for(s=t.current();s;s=t.next()){if(s.nodeType===3){return s}}}}function f(v,u){var s,t;if(m(v)==="false"){if(j.isBlock(v)){p.select(v);return}}t=j.createRng();if(m(v)==="true"){if(!v.firstChild){v.appendChild(n.getDoc().createTextNode("\u00a0"))}v=v.firstChild;u=true}s=j.create("span",{id:o,"data-mce-bogus":true},r);if(u){v.parentNode.insertBefore(s,v)}else{j.insertAfter(s,v)}t.setStart(s.firstChild,1);t.collapse(true);p.setRng(t);return s}function i(s){var v,t,u;if(s){rng=p.getRng(true);rng.setStartBefore(s);rng.setEndBefore(s);v=k(s);if(v&&v.nodeValue.charAt(0)==r){v=v.deleteData(0,1)}j.remove(s,true);p.setRng(rng)}else{t=l(p.getStart());while((s=j.get(o))&&s!==u){if(t!==s){v=k(s);if(v&&v.nodeValue.charAt(0)==r){v=v.deleteData(0,1)}j.remove(s,true)}u=s}}}function q(){var s,w,u,t,v;function x(B,D){var A,F,E,C,z;A=t.startContainer;F=t.startOffset;if(A.nodeType==3){z=A.nodeValue.length;if((F>0&&F<z)||(D?F==z:F==0)){return}}else{if(F<A.childNodes.length){var G=!D&&F>0?F-1:F;A=A.childNodes[G];if(A.hasChildNodes()){A=A.firstChild}}else{return !D?B:null}}E=new c(A,B);while(C=E[D?"prev":"next"]()){if(C.nodeType===3&&C.nodeValue.length>0){return}else{if(m(C)==="true"){return C}}}return B}i();u=p.isCollapsed();s=g(p.getStart());w=g(p.getEnd());if(s||w){t=p.getRng(true);if(u){s=s||w;var y=p.getStart();if(v=x(s,true)){f(v,true)}else{if(v=x(s,false)){f(v,false)}else{p.select(s)}}}else{t=p.getRng(true);if(s){t.setStartBefore(s)}if(w){t.setEndAfter(w)}p.setRng(t)}}}function h(y,A){var E=A.keyCode,w,B,C,u;function t(G,F){while(G=G[F?"previousSibling":"nextSibling"]){if(G.nodeType!==3||G.nodeValue.length>0){return G}}}function x(F,G){p.select(F);p.collapse(G)}C=p.getStart();u=p.getEnd();w=g(C)||g(u);if(w&&(E<112||E>124)&&E!=e.DELETE&&E!=e.BACKSPACE){if((tinymce.isMac?A.metaKey:A.ctrlKey)&&(E==67||E==88||E==86)){return}A.preventDefault();if(E==e.LEFT||E==e.RIGHT){var v=E==e.LEFT;if(y.dom.isBlock(w)){var z=v?w.previousSibling:w.nextSibling;var s=new c(z,z);var D=v?s.prev():s.next();x(D,!v)}else{x(w,v)}}}else{if(E==e.LEFT||E==e.RIGHT||E==e.BACKSPACE||E==e.DELETE){B=l(C);if(B){if(E==e.LEFT||E==e.BACKSPACE){w=t(B,true);if(w&&m(w)==="false"){A.preventDefault();if(E==e.LEFT){x(w,true)}else{j.remove(w)}}else{i(B)}}if(E==e.RIGHT||E==e.DELETE){w=t(B);if(w&&m(w)==="false"){A.preventDefault();if(E==e.RIGHT){x(w,false)}else{j.remove(w)}}else{i(B)}}}}}}n.onMouseDown.addToTop(function(s,u){var t=s.selection.getNode();if(m(t)==="false"&&t==u.target){q()}});n.onMouseUp.addToTop(q);n.onKeyDown.addToTop(h);n.onKeyUp.addToTop(q)}tinymce.create("tinymce.plugins.NonEditablePlugin",{init:function(i,k){var h,g,j;function f(m,n){var o=j.length,p=n.content,l=tinymce.trim(g);if(n.format=="raw"){return}while(o--){p=p.replace(j[o],function(s){var r=arguments,q=r[r.length-2];if(q>0&&p.charAt(q-1)=='"'){return s}return'<span class="'+l+'" data-mce-content="'+m.dom.encode(r[0])+'">'+m.dom.encode(typeof(r[1])==="string"?r[1]:r[0])+"</span>"})}n.content=p}h=" "+tinymce.trim(i.getParam("noneditable_editable_class","mceEditable"))+" ";g=" "+tinymce.trim(i.getParam("noneditable_noneditable_class","mceNonEditable"))+" ";j=i.getParam("noneditable_regexp");if(j&&!j.length){j=[j]}i.onPreInit.add(function(){b(i);if(j){i.selection.onBeforeSetContent.add(f);i.onBeforeSetContent.add(f)}i.parser.addAttributeFilter("class",function(l){var m=l.length,n,o;while(m--){o=l[m];n=" "+o.attr("class")+" ";if(n.indexOf(h)!==-1){o.attr(d,"true")}else{if(n.indexOf(g)!==-1){o.attr(d,"false")}}}});i.serializer.addAttributeFilter(d,function(l,m){var n=l.length,o;while(n--){o=l[n];if(j&&o.attr("data-mce-content")){o.name="#text";o.type=3;o.raw=true;o.value=o.attr("data-mce-content")}else{o.attr(a,null);o.attr(d,null)}}});i.parser.addAttributeFilter(a,function(l,m){var n=l.length,o;while(n--){o=l[n];o.attr(d,o.attr(a));o.attr(a,null)}})})},getInfo:function(){return{longname:"Non editable elements",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/noneditable",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("noneditable",tinymce.plugins.NonEditablePlugin)})();
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/noneditable/editor_plugin_src.js
ADDED
@@ -0,0 +1,454 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 TreeWalker = tinymce.dom.TreeWalker;
|
13 |
+
var externalName = 'contenteditable', internalName = 'data-mce-' + externalName;
|
14 |
+
var VK = tinymce.VK;
|
15 |
+
|
16 |
+
function handleContentEditableSelection(ed) {
|
17 |
+
var dom = ed.dom, selection = ed.selection, invisibleChar, caretContainerId = 'mce_noneditablecaret';
|
18 |
+
|
19 |
+
// Setup invisible character use zero width space on Gecko since it doesn't change the height of the container
|
20 |
+
invisibleChar = tinymce.isGecko ? '\u200B' : '\uFEFF';
|
21 |
+
|
22 |
+
// Returns the content editable state of a node "true/false" or null
|
23 |
+
function getContentEditable(node) {
|
24 |
+
var contentEditable;
|
25 |
+
|
26 |
+
// Ignore non elements
|
27 |
+
if (node.nodeType === 1) {
|
28 |
+
// Check for fake content editable
|
29 |
+
contentEditable = node.getAttribute(internalName);
|
30 |
+
if (contentEditable && contentEditable !== "inherit") {
|
31 |
+
return contentEditable;
|
32 |
+
}
|
33 |
+
|
34 |
+
// Check for real content editable
|
35 |
+
contentEditable = node.contentEditable;
|
36 |
+
if (contentEditable !== "inherit") {
|
37 |
+
return contentEditable;
|
38 |
+
}
|
39 |
+
}
|
40 |
+
|
41 |
+
return null;
|
42 |
+
};
|
43 |
+
|
44 |
+
// Returns the noneditable parent or null if there is a editable before it or if it wasn't found
|
45 |
+
function getNonEditableParent(node) {
|
46 |
+
var state;
|
47 |
+
|
48 |
+
while (node) {
|
49 |
+
state = getContentEditable(node);
|
50 |
+
if (state) {
|
51 |
+
return state === "false" ? node : null;
|
52 |
+
}
|
53 |
+
|
54 |
+
node = node.parentNode;
|
55 |
+
}
|
56 |
+
};
|
57 |
+
|
58 |
+
// Get caret container parent for the specified node
|
59 |
+
function getParentCaretContainer(node) {
|
60 |
+
while (node) {
|
61 |
+
if (node.id === caretContainerId) {
|
62 |
+
return node;
|
63 |
+
}
|
64 |
+
|
65 |
+
node = node.parentNode;
|
66 |
+
}
|
67 |
+
};
|
68 |
+
|
69 |
+
// Finds the first text node in the specified node
|
70 |
+
function findFirstTextNode(node) {
|
71 |
+
var walker;
|
72 |
+
|
73 |
+
if (node) {
|
74 |
+
walker = new TreeWalker(node, node);
|
75 |
+
|
76 |
+
for (node = walker.current(); node; node = walker.next()) {
|
77 |
+
if (node.nodeType === 3) {
|
78 |
+
return node;
|
79 |
+
}
|
80 |
+
}
|
81 |
+
}
|
82 |
+
};
|
83 |
+
|
84 |
+
// Insert caret container before/after target or expand selection to include block
|
85 |
+
function insertCaretContainerOrExpandToBlock(target, before) {
|
86 |
+
var caretContainer, rng;
|
87 |
+
|
88 |
+
// Select block
|
89 |
+
if (getContentEditable(target) === "false") {
|
90 |
+
if (dom.isBlock(target)) {
|
91 |
+
selection.select(target);
|
92 |
+
return;
|
93 |
+
}
|
94 |
+
}
|
95 |
+
|
96 |
+
rng = dom.createRng();
|
97 |
+
|
98 |
+
if (getContentEditable(target) === "true") {
|
99 |
+
if (!target.firstChild) {
|
100 |
+
target.appendChild(ed.getDoc().createTextNode('\u00a0'));
|
101 |
+
}
|
102 |
+
|
103 |
+
target = target.firstChild;
|
104 |
+
before = true;
|
105 |
+
}
|
106 |
+
|
107 |
+
//caretContainer = dom.create('span', {id: caretContainerId, 'data-mce-bogus': true, style:'border: 1px solid red'}, invisibleChar);
|
108 |
+
caretContainer = dom.create('span', {id: caretContainerId, 'data-mce-bogus': true}, invisibleChar);
|
109 |
+
|
110 |
+
if (before) {
|
111 |
+
target.parentNode.insertBefore(caretContainer, target);
|
112 |
+
} else {
|
113 |
+
dom.insertAfter(caretContainer, target);
|
114 |
+
}
|
115 |
+
|
116 |
+
rng.setStart(caretContainer.firstChild, 1);
|
117 |
+
rng.collapse(true);
|
118 |
+
selection.setRng(rng);
|
119 |
+
|
120 |
+
return caretContainer;
|
121 |
+
};
|
122 |
+
|
123 |
+
// Removes any caret container except the one we might be in
|
124 |
+
function removeCaretContainer(caretContainer) {
|
125 |
+
var child, currentCaretContainer, lastContainer;
|
126 |
+
|
127 |
+
if (caretContainer) {
|
128 |
+
rng = selection.getRng(true);
|
129 |
+
rng.setStartBefore(caretContainer);
|
130 |
+
rng.setEndBefore(caretContainer);
|
131 |
+
|
132 |
+
child = findFirstTextNode(caretContainer);
|
133 |
+
if (child && child.nodeValue.charAt(0) == invisibleChar) {
|
134 |
+
child = child.deleteData(0, 1);
|
135 |
+
}
|
136 |
+
|
137 |
+
dom.remove(caretContainer, true);
|
138 |
+
|
139 |
+
selection.setRng(rng);
|
140 |
+
} else {
|
141 |
+
currentCaretContainer = getParentCaretContainer(selection.getStart());
|
142 |
+
while ((caretContainer = dom.get(caretContainerId)) && caretContainer !== lastContainer) {
|
143 |
+
if (currentCaretContainer !== caretContainer) {
|
144 |
+
child = findFirstTextNode(caretContainer);
|
145 |
+
if (child && child.nodeValue.charAt(0) == invisibleChar) {
|
146 |
+
child = child.deleteData(0, 1);
|
147 |
+
}
|
148 |
+
|
149 |
+
dom.remove(caretContainer, true);
|
150 |
+
}
|
151 |
+
|
152 |
+
lastContainer = caretContainer;
|
153 |
+
}
|
154 |
+
}
|
155 |
+
};
|
156 |
+
|
157 |
+
// Modifies the selection to include contentEditable false elements or insert caret containers
|
158 |
+
function moveSelection() {
|
159 |
+
var nonEditableStart, nonEditableEnd, isCollapsed, rng, element;
|
160 |
+
|
161 |
+
// Checks if there is any contents to the left/right side of caret returns the noneditable element or any editable element if it finds one inside
|
162 |
+
function hasSideContent(element, left) {
|
163 |
+
var container, offset, walker, node, len;
|
164 |
+
|
165 |
+
container = rng.startContainer;
|
166 |
+
offset = rng.startOffset;
|
167 |
+
|
168 |
+
// If endpoint is in middle of text node then expand to beginning/end of element
|
169 |
+
if (container.nodeType == 3) {
|
170 |
+
len = container.nodeValue.length;
|
171 |
+
if ((offset > 0 && offset < len) || (left ? offset == len : offset == 0)) {
|
172 |
+
return;
|
173 |
+
}
|
174 |
+
} else {
|
175 |
+
// Can we resolve the node by index
|
176 |
+
if (offset < container.childNodes.length) {
|
177 |
+
// Browser represents caret position as the offset at the start of an element. When moving right
|
178 |
+
// this is the element we are moving into so we consider our container to be child node at offset-1
|
179 |
+
var pos = !left && offset > 0 ? offset-1 : offset;
|
180 |
+
container = container.childNodes[pos];
|
181 |
+
if (container.hasChildNodes()) {
|
182 |
+
container = container.firstChild;
|
183 |
+
}
|
184 |
+
} else {
|
185 |
+
// If not then the caret is at the last position in it's container and the caret container should be inserted after the noneditable element
|
186 |
+
return !left ? element : null;
|
187 |
+
}
|
188 |
+
}
|
189 |
+
|
190 |
+
// Walk left/right to look for contents
|
191 |
+
walker = new TreeWalker(container, element);
|
192 |
+
while (node = walker[left ? 'prev' : 'next']()) {
|
193 |
+
if (node.nodeType === 3 && node.nodeValue.length > 0) {
|
194 |
+
return;
|
195 |
+
} else if (getContentEditable(node) === "true") {
|
196 |
+
// Found contentEditable=true element return this one to we can move the caret inside it
|
197 |
+
return node;
|
198 |
+
}
|
199 |
+
}
|
200 |
+
|
201 |
+
return element;
|
202 |
+
};
|
203 |
+
|
204 |
+
// Remove any existing caret containers
|
205 |
+
removeCaretContainer();
|
206 |
+
|
207 |
+
// Get noneditable start/end elements
|
208 |
+
isCollapsed = selection.isCollapsed();
|
209 |
+
nonEditableStart = getNonEditableParent(selection.getStart());
|
210 |
+
nonEditableEnd = getNonEditableParent(selection.getEnd());
|
211 |
+
|
212 |
+
// Is any fo the range endpoints noneditable
|
213 |
+
if (nonEditableStart || nonEditableEnd) {
|
214 |
+
rng = selection.getRng(true);
|
215 |
+
|
216 |
+
// If it's a caret selection then look left/right to see if we need to move the caret out side or expand
|
217 |
+
if (isCollapsed) {
|
218 |
+
nonEditableStart = nonEditableStart || nonEditableEnd;
|
219 |
+
var start = selection.getStart();
|
220 |
+
if (element = hasSideContent(nonEditableStart, true)) {
|
221 |
+
// We have no contents to the left of the caret then insert a caret container before the noneditable element
|
222 |
+
insertCaretContainerOrExpandToBlock(element, true);
|
223 |
+
} else if (element = hasSideContent(nonEditableStart, false)) {
|
224 |
+
// We have no contents to the right of the caret then insert a caret container after the noneditable element
|
225 |
+
insertCaretContainerOrExpandToBlock(element, false);
|
226 |
+
} else {
|
227 |
+
// We are in the middle of a noneditable so expand to select it
|
228 |
+
selection.select(nonEditableStart);
|
229 |
+
}
|
230 |
+
} else {
|
231 |
+
rng = selection.getRng(true);
|
232 |
+
|
233 |
+
// Expand selection to include start non editable element
|
234 |
+
if (nonEditableStart) {
|
235 |
+
rng.setStartBefore(nonEditableStart);
|
236 |
+
}
|
237 |
+
|
238 |
+
// Expand selection to include end non editable element
|
239 |
+
if (nonEditableEnd) {
|
240 |
+
rng.setEndAfter(nonEditableEnd);
|
241 |
+
}
|
242 |
+
|
243 |
+
selection.setRng(rng);
|
244 |
+
}
|
245 |
+
}
|
246 |
+
};
|
247 |
+
|
248 |
+
function handleKey(ed, e) {
|
249 |
+
var keyCode = e.keyCode, nonEditableParent, caretContainer, startElement, endElement;
|
250 |
+
|
251 |
+
function getNonEmptyTextNodeSibling(node, prev) {
|
252 |
+
while (node = node[prev ? 'previousSibling' : 'nextSibling']) {
|
253 |
+
if (node.nodeType !== 3 || node.nodeValue.length > 0) {
|
254 |
+
return node;
|
255 |
+
}
|
256 |
+
}
|
257 |
+
};
|
258 |
+
|
259 |
+
function positionCaretOnElement(element, start) {
|
260 |
+
selection.select(element);
|
261 |
+
selection.collapse(start);
|
262 |
+
}
|
263 |
+
|
264 |
+
startElement = selection.getStart()
|
265 |
+
endElement = selection.getEnd();
|
266 |
+
|
267 |
+
// Disable all key presses in contentEditable=false except delete or backspace
|
268 |
+
nonEditableParent = getNonEditableParent(startElement) || getNonEditableParent(endElement);
|
269 |
+
if (nonEditableParent && (keyCode < 112 || keyCode > 124) && keyCode != VK.DELETE && keyCode != VK.BACKSPACE) {
|
270 |
+
// Is Ctrl+c, Ctrl+v or Ctrl+x then use default browser behavior
|
271 |
+
if ((tinymce.isMac ? e.metaKey : e.ctrlKey) && (keyCode == 67 || keyCode == 88 || keyCode == 86)) {
|
272 |
+
return;
|
273 |
+
}
|
274 |
+
|
275 |
+
e.preventDefault();
|
276 |
+
|
277 |
+
// Arrow left/right select the element and collapse left/right
|
278 |
+
if (keyCode == VK.LEFT || keyCode == VK.RIGHT) {
|
279 |
+
var left = keyCode == VK.LEFT;
|
280 |
+
// If a block element find previous or next element to position the caret
|
281 |
+
if (ed.dom.isBlock(nonEditableParent)) {
|
282 |
+
var targetElement = left ? nonEditableParent.previousSibling : nonEditableParent.nextSibling;
|
283 |
+
var walker = new TreeWalker(targetElement, targetElement);
|
284 |
+
var caretElement = left ? walker.prev() : walker.next();
|
285 |
+
positionCaretOnElement(caretElement, !left);
|
286 |
+
} else {
|
287 |
+
positionCaretOnElement(nonEditableParent, left);
|
288 |
+
}
|
289 |
+
}
|
290 |
+
} else {
|
291 |
+
// Is arrow left/right, backspace or delete
|
292 |
+
if (keyCode == VK.LEFT || keyCode == VK.RIGHT || keyCode == VK.BACKSPACE || keyCode == VK.DELETE) {
|
293 |
+
caretContainer = getParentCaretContainer(startElement);
|
294 |
+
if (caretContainer) {
|
295 |
+
// Arrow left or backspace
|
296 |
+
if (keyCode == VK.LEFT || keyCode == VK.BACKSPACE) {
|
297 |
+
nonEditableParent = getNonEmptyTextNodeSibling(caretContainer, true);
|
298 |
+
|
299 |
+
if (nonEditableParent && getContentEditable(nonEditableParent) === "false") {
|
300 |
+
e.preventDefault();
|
301 |
+
|
302 |
+
if (keyCode == VK.LEFT) {
|
303 |
+
positionCaretOnElement(nonEditableParent, true);
|
304 |
+
} else {
|
305 |
+
dom.remove(nonEditableParent);
|
306 |
+
}
|
307 |
+
} else {
|
308 |
+
removeCaretContainer(caretContainer);
|
309 |
+
}
|
310 |
+
}
|
311 |
+
|
312 |
+
// Arrow right or delete
|
313 |
+
if (keyCode == VK.RIGHT || keyCode == VK.DELETE) {
|
314 |
+
nonEditableParent = getNonEmptyTextNodeSibling(caretContainer);
|
315 |
+
|
316 |
+
if (nonEditableParent && getContentEditable(nonEditableParent) === "false") {
|
317 |
+
e.preventDefault();
|
318 |
+
|
319 |
+
if (keyCode == VK.RIGHT) {
|
320 |
+
positionCaretOnElement(nonEditableParent, false);
|
321 |
+
} else {
|
322 |
+
dom.remove(nonEditableParent);
|
323 |
+
}
|
324 |
+
} else {
|
325 |
+
removeCaretContainer(caretContainer);
|
326 |
+
}
|
327 |
+
}
|
328 |
+
}
|
329 |
+
}
|
330 |
+
}
|
331 |
+
};
|
332 |
+
|
333 |
+
ed.onMouseDown.addToTop(function(ed, e) {
|
334 |
+
var node = ed.selection.getNode();
|
335 |
+
|
336 |
+
if (getContentEditable(node) === "false" && node == e.target) {
|
337 |
+
// Expand selection on mouse down we can't block the default event since it's used for drag/drop
|
338 |
+
moveSelection();
|
339 |
+
}
|
340 |
+
});
|
341 |
+
|
342 |
+
ed.onMouseUp.addToTop(moveSelection);
|
343 |
+
ed.onKeyDown.addToTop(handleKey);
|
344 |
+
ed.onKeyUp.addToTop(moveSelection);
|
345 |
+
};
|
346 |
+
|
347 |
+
tinymce.create('tinymce.plugins.NonEditablePlugin', {
|
348 |
+
init : function(ed, url) {
|
349 |
+
var editClass, nonEditClass, nonEditableRegExps;
|
350 |
+
|
351 |
+
// Converts configured regexps to noneditable span items
|
352 |
+
function convertRegExpsToNonEditable(ed, args) {
|
353 |
+
var i = nonEditableRegExps.length, content = args.content, cls = tinymce.trim(nonEditClass);
|
354 |
+
|
355 |
+
// Don't replace the variables when raw is used for example on undo/redo
|
356 |
+
if (args.format == "raw") {
|
357 |
+
return;
|
358 |
+
}
|
359 |
+
|
360 |
+
while (i--) {
|
361 |
+
content = content.replace(nonEditableRegExps[i], function(match) {
|
362 |
+
var args = arguments, index = args[args.length - 2];
|
363 |
+
|
364 |
+
// Is value inside an attribute then don't replace
|
365 |
+
if (index > 0 && content.charAt(index - 1) == '"') {
|
366 |
+
return match;
|
367 |
+
}
|
368 |
+
|
369 |
+
return '<span class="' + cls + '" data-mce-content="' + ed.dom.encode(args[0]) + '">' + ed.dom.encode(typeof(args[1]) === "string" ? args[1] : args[0]) + '</span>';
|
370 |
+
});
|
371 |
+
}
|
372 |
+
|
373 |
+
args.content = content;
|
374 |
+
};
|
375 |
+
|
376 |
+
editClass = " " + tinymce.trim(ed.getParam("noneditable_editable_class", "mceEditable")) + " ";
|
377 |
+
nonEditClass = " " + tinymce.trim(ed.getParam("noneditable_noneditable_class", "mceNonEditable")) + " ";
|
378 |
+
|
379 |
+
// Setup noneditable regexps array
|
380 |
+
nonEditableRegExps = ed.getParam("noneditable_regexp");
|
381 |
+
if (nonEditableRegExps && !nonEditableRegExps.length) {
|
382 |
+
nonEditableRegExps = [nonEditableRegExps];
|
383 |
+
}
|
384 |
+
|
385 |
+
ed.onPreInit.add(function() {
|
386 |
+
handleContentEditableSelection(ed);
|
387 |
+
|
388 |
+
if (nonEditableRegExps) {
|
389 |
+
ed.selection.onBeforeSetContent.add(convertRegExpsToNonEditable);
|
390 |
+
ed.onBeforeSetContent.add(convertRegExpsToNonEditable);
|
391 |
+
}
|
392 |
+
|
393 |
+
// Apply contentEditable true/false on elements with the noneditable/editable classes
|
394 |
+
ed.parser.addAttributeFilter('class', function(nodes) {
|
395 |
+
var i = nodes.length, className, node;
|
396 |
+
|
397 |
+
while (i--) {
|
398 |
+
node = nodes[i];
|
399 |
+
className = " " + node.attr("class") + " ";
|
400 |
+
|
401 |
+
if (className.indexOf(editClass) !== -1) {
|
402 |
+
node.attr(internalName, "true");
|
403 |
+
} else if (className.indexOf(nonEditClass) !== -1) {
|
404 |
+
node.attr(internalName, "false");
|
405 |
+
}
|
406 |
+
}
|
407 |
+
});
|
408 |
+
|
409 |
+
// Remove internal name
|
410 |
+
ed.serializer.addAttributeFilter(internalName, function(nodes, name) {
|
411 |
+
var i = nodes.length, node;
|
412 |
+
|
413 |
+
while (i--) {
|
414 |
+
node = nodes[i];
|
415 |
+
|
416 |
+
if (nonEditableRegExps && node.attr('data-mce-content')) {
|
417 |
+
node.name = "#text";
|
418 |
+
node.type = 3;
|
419 |
+
node.raw = true;
|
420 |
+
node.value = node.attr('data-mce-content');
|
421 |
+
} else {
|
422 |
+
node.attr(externalName, null);
|
423 |
+
node.attr(internalName, null);
|
424 |
+
}
|
425 |
+
}
|
426 |
+
});
|
427 |
+
|
428 |
+
// Convert external name into internal name
|
429 |
+
ed.parser.addAttributeFilter(externalName, function(nodes, name) {
|
430 |
+
var i = nodes.length, node;
|
431 |
+
|
432 |
+
while (i--) {
|
433 |
+
node = nodes[i];
|
434 |
+
node.attr(internalName, node.attr(externalName));
|
435 |
+
node.attr(externalName, null);
|
436 |
+
}
|
437 |
+
});
|
438 |
+
});
|
439 |
+
},
|
440 |
+
|
441 |
+
getInfo : function() {
|
442 |
+
return {
|
443 |
+
longname : 'Non editable elements',
|
444 |
+
author : 'Moxiecode Systems AB',
|
445 |
+
authorurl : 'http://tinymce.moxiecode.com',
|
446 |
+
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/noneditable',
|
447 |
+
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
448 |
+
};
|
449 |
+
}
|
450 |
+
});
|
451 |
+
|
452 |
+
// Register plugin
|
453 |
+
tinymce.PluginManager.add('noneditable', tinymce.plugins.NonEditablePlugin);
|
454 |
+
})();
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/pagebreak/editor_plugin.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(function(){tinymce.create("tinymce.plugins.PageBreakPlugin",{init:function(b,d){var f='<img src="'+b.theme.url+'/img/trans.gif" class="mcePageBreak mceItemNoResize" />',a="mcePageBreak",c=b.getParam("pagebreak_separator","<!-- pagebreak -->"),e;e=new RegExp(c.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,function(g){return"\\"+g}),"g");b.addCommand("mcePageBreak",function(){b.execCommand("mceInsertContent",0,f)});b.addButton("pagebreak",{title:"pagebreak.desc",cmd:a});b.onInit.add(function(){if(b.theme.onResolveName){b.theme.onResolveName.add(function(g,h){if(h.node.nodeName=="IMG"&&b.dom.hasClass(h.node,a)){h.name="pagebreak"}})}});b.onClick.add(function(g,h){h=h.target;if(h.nodeName==="IMG"&&g.dom.hasClass(h,a)){g.selection.select(h)}});b.onNodeChange.add(function(h,g,i){g.setActive("pagebreak",i.nodeName==="IMG"&&h.dom.hasClass(i,a))});b.onBeforeSetContent.add(function(g,h){h.content=h.content.replace(e,f)});b.onPostProcess.add(function(g,h){if(h.get){h.content=h.content.replace(/<img[^>]+>/g,function(i){if(i.indexOf('class="mcePageBreak')!==-1){i=c}return i})}})},getInfo:function(){return{longname:"PageBreak",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/pagebreak",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("pagebreak",tinymce.plugins.PageBreakPlugin)})();
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/pagebreak/editor_plugin_src.js
ADDED
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
tinymce.create('tinymce.plugins.PageBreakPlugin', {
|
13 |
+
init : function(ed, url) {
|
14 |
+
var pb = '<img src="' + ed.theme.url + '/img/trans.gif" class="mcePageBreak mceItemNoResize" />', cls = 'mcePageBreak', sep = ed.getParam('pagebreak_separator', '<!-- pagebreak -->'), pbRE;
|
15 |
+
|
16 |
+
pbRE = new RegExp(sep.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g, function(a) {return '\\' + a;}), 'g');
|
17 |
+
|
18 |
+
// Register commands
|
19 |
+
ed.addCommand('mcePageBreak', function() {
|
20 |
+
ed.execCommand('mceInsertContent', 0, pb);
|
21 |
+
});
|
22 |
+
|
23 |
+
// Register buttons
|
24 |
+
ed.addButton('pagebreak', {title : 'pagebreak.desc', cmd : cls});
|
25 |
+
|
26 |
+
ed.onInit.add(function() {
|
27 |
+
if (ed.theme.onResolveName) {
|
28 |
+
ed.theme.onResolveName.add(function(th, o) {
|
29 |
+
if (o.node.nodeName == 'IMG' && ed.dom.hasClass(o.node, cls))
|
30 |
+
o.name = 'pagebreak';
|
31 |
+
});
|
32 |
+
}
|
33 |
+
});
|
34 |
+
|
35 |
+
ed.onClick.add(function(ed, e) {
|
36 |
+
e = e.target;
|
37 |
+
|
38 |
+
if (e.nodeName === 'IMG' && ed.dom.hasClass(e, cls))
|
39 |
+
ed.selection.select(e);
|
40 |
+
});
|
41 |
+
|
42 |
+
ed.onNodeChange.add(function(ed, cm, n) {
|
43 |
+
cm.setActive('pagebreak', n.nodeName === 'IMG' && ed.dom.hasClass(n, cls));
|
44 |
+
});
|
45 |
+
|
46 |
+
ed.onBeforeSetContent.add(function(ed, o) {
|
47 |
+
o.content = o.content.replace(pbRE, pb);
|
48 |
+
});
|
49 |
+
|
50 |
+
ed.onPostProcess.add(function(ed, o) {
|
51 |
+
if (o.get)
|
52 |
+
o.content = o.content.replace(/<img[^>]+>/g, function(im) {
|
53 |
+
if (im.indexOf('class="mcePageBreak') !== -1)
|
54 |
+
im = sep;
|
55 |
+
|
56 |
+
return im;
|
57 |
+
});
|
58 |
+
});
|
59 |
+
},
|
60 |
+
|
61 |
+
getInfo : function() {
|
62 |
+
return {
|
63 |
+
longname : 'PageBreak',
|
64 |
+
author : 'Moxiecode Systems AB',
|
65 |
+
authorurl : 'http://tinymce.moxiecode.com',
|
66 |
+
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/pagebreak',
|
67 |
+
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
68 |
+
};
|
69 |
+
}
|
70 |
+
});
|
71 |
+
|
72 |
+
// Register plugin
|
73 |
+
tinymce.PluginManager.add('pagebreak', tinymce.plugins.PageBreakPlugin);
|
74 |
+
})();
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/paste/editor_plugin.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(function(){var c=tinymce.each,a={paste_auto_cleanup_on_paste:true,paste_enable_default_filters:true,paste_block_drop:false,paste_retain_style_properties:"none",paste_strip_class_attributes:"mso",paste_remove_spans:false,paste_remove_styles:false,paste_remove_styles_if_webkit:true,paste_convert_middot_lists:true,paste_convert_headers_to_strong:false,paste_dialog_width:"450",paste_dialog_height:"400",paste_text_use_dialog:false,paste_text_sticky:false,paste_text_sticky_default:false,paste_text_notifyalways:false,paste_text_linebreaktype:"combined",paste_text_replacements:[[/\u2026/g,"..."],[/[\x93\x94\u201c\u201d]/g,'"'],[/[\x60\x91\x92\u2018\u2019]/g,"'"]]};function b(d,e){return d.getParam(e,a[e])}tinymce.create("tinymce.plugins.PastePlugin",{init:function(d,e){var f=this;f.editor=d;f.url=e;f.onPreProcess=new tinymce.util.Dispatcher(f);f.onPostProcess=new tinymce.util.Dispatcher(f);f.onPreProcess.add(f._preProcess);f.onPostProcess.add(f._postProcess);f.onPreProcess.add(function(i,j){d.execCallback("paste_preprocess",i,j)});f.onPostProcess.add(function(i,j){d.execCallback("paste_postprocess",i,j)});d.onKeyDown.addToTop(function(i,j){if(((tinymce.isMac?j.metaKey:j.ctrlKey)&&j.keyCode==86)||(j.shiftKey&&j.keyCode==45)){return false}});d.pasteAsPlainText=b(d,"paste_text_sticky_default");function h(l,j){var k=d.dom,i;f.onPreProcess.dispatch(f,l);l.node=k.create("div",0,l.content);if(tinymce.isGecko){i=d.selection.getRng(true);if(i.startContainer==i.endContainer&&i.startContainer.nodeType==3){if(l.node.childNodes.length===1&&/^(p|h[1-6]|pre)$/i.test(l.node.firstChild.nodeName)&&l.content.indexOf("__MCE_ITEM__")===-1){k.remove(l.node.firstChild,true)}}}f.onPostProcess.dispatch(f,l);l.content=d.serializer.serialize(l.node,{getInner:1,forced_root_block:""});if((!j)&&(d.pasteAsPlainText)){f._insertPlainText(l.content);if(!b(d,"paste_text_sticky")){d.pasteAsPlainText=false;d.controlManager.setActive("pastetext",false)}}else{f._insert(l.content)}}d.addCommand("mceInsertClipboardContent",function(i,j){h(j,true)});if(!b(d,"paste_text_use_dialog")){d.addCommand("mcePasteText",function(j,i){var k=tinymce.util.Cookie;d.pasteAsPlainText=!d.pasteAsPlainText;d.controlManager.setActive("pastetext",d.pasteAsPlainText);if((d.pasteAsPlainText)&&(!k.get("tinymcePasteText"))){if(b(d,"paste_text_sticky")){d.windowManager.alert(d.translate("paste.plaintext_mode_sticky"))}else{d.windowManager.alert(d.translate("paste.plaintext_mode"))}if(!b(d,"paste_text_notifyalways")){k.set("tinymcePasteText","1",new Date(new Date().getFullYear()+1,12,31))}}})}d.addButton("pastetext",{title:"paste.paste_text_desc",cmd:"mcePasteText"});d.addButton("selectall",{title:"paste.selectall_desc",cmd:"selectall"});function g(s){var l,p,j,t,k=d.selection,o=d.dom,q=d.getBody(),i,r;if(s.clipboardData||o.doc.dataTransfer){r=(s.clipboardData||o.doc.dataTransfer).getData("Text");if(d.pasteAsPlainText){s.preventDefault();h({content:o.encode(r).replace(/\r?\n/g,"<br />")});return}}if(o.get("_mcePaste")){return}l=o.add(q,"div",{id:"_mcePaste","class":"mcePaste","data-mce-bogus":"1"},"\uFEFF\uFEFF");if(q!=d.getDoc().body){i=o.getPos(d.selection.getStart(),q).y}else{i=q.scrollTop+o.getViewPort(d.getWin()).y}o.setStyles(l,{position:"absolute",left:tinymce.isGecko?-40:0,top:i-25,width:1,height:1,overflow:"hidden"});if(tinymce.isIE){t=k.getRng();j=o.doc.body.createTextRange();j.moveToElementText(l);j.execCommand("Paste");o.remove(l);if(l.innerHTML==="\uFEFF\uFEFF"){d.execCommand("mcePasteWord");s.preventDefault();return}k.setRng(t);k.setContent("");setTimeout(function(){h({content:l.innerHTML})},0);return tinymce.dom.Event.cancel(s)}else{function m(n){n.preventDefault()}o.bind(d.getDoc(),"mousedown",m);o.bind(d.getDoc(),"keydown",m);p=d.selection.getRng();l=l.firstChild;j=d.getDoc().createRange();j.setStart(l,0);j.setEnd(l,2);k.setRng(j);window.setTimeout(function(){var u="",n;if(!o.select("div.mcePaste > div.mcePaste").length){n=o.select("div.mcePaste");c(n,function(w){var v=w.firstChild;if(v&&v.nodeName=="DIV"&&v.style.marginTop&&v.style.backgroundColor){o.remove(v,1)}c(o.select("span.Apple-style-span",w),function(x){o.remove(x,1)});c(o.select("br[data-mce-bogus]",w),function(x){o.remove(x)});if(w.parentNode.className!="mcePaste"){u+=w.innerHTML}})}else{u="<p>"+o.encode(r).replace(/\r?\n\r?\n/g,"</p><p>").replace(/\r?\n/g,"<br />")+"</p>"}c(o.select("div.mcePaste"),function(v){o.remove(v)});if(p){k.setRng(p)}h({content:u});o.unbind(d.getDoc(),"mousedown",m);o.unbind(d.getDoc(),"keydown",m)},0)}}if(b(d,"paste_auto_cleanup_on_paste")){if(tinymce.isOpera||/Firefox\/2/.test(navigator.userAgent)){d.onKeyDown.addToTop(function(i,j){if(((tinymce.isMac?j.metaKey:j.ctrlKey)&&j.keyCode==86)||(j.shiftKey&&j.keyCode==45)){g(j)}})}else{d.onPaste.addToTop(function(i,j){return g(j)})}}d.onInit.add(function(){d.controlManager.setActive("pastetext",d.pasteAsPlainText);if(b(d,"paste_block_drop")){d.dom.bind(d.getBody(),["dragend","dragover","draggesture","dragdrop","drop","drag"],function(i){i.preventDefault();i.stopPropagation();return false})}});f._legacySupport()},getInfo:function(){return{longname:"Paste text/word",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/paste",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_preProcess:function(g,e){var k=this.editor,j=e.content,p=tinymce.grep,n=tinymce.explode,f=tinymce.trim,l,i;function d(h){c(h,function(o){if(o.constructor==RegExp){j=j.replace(o,"")}else{j=j.replace(o[0],o[1])}})}if(k.settings.paste_enable_default_filters==false){return}if(tinymce.isIE&&document.documentMode>=9&&/<(h[1-6r]|p|div|address|pre|form|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|blockquote|center|dl|dt|dd|dir|fieldset)/.test(e.content)){d([[/(?:<br> [\s\r\n]+|<br>)*(<\/?(h[1-6r]|p|div|address|pre|form|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|blockquote|center|dl|dt|dd|dir|fieldset)[^>]*>)(?:<br> [\s\r\n]+|<br>)*/g,"$1"]]);d([[/<br><br>/g,"<BR><BR>"],[/<br>/g," "],[/<BR><BR>/g,"<br>"]])}if(/class="?Mso|style="[^"]*\bmso-|w:WordDocument/i.test(j)||e.wordContent){e.wordContent=true;d([/^\s*( )+/gi,/( |<br[^>]*>)+\s*$/gi]);if(b(k,"paste_convert_headers_to_strong")){j=j.replace(/<p [^>]*class="?MsoHeading"?[^>]*>(.*?)<\/p>/gi,"<p><strong>$1</strong></p>")}if(b(k,"paste_convert_middot_lists")){d([[/<!--\[if !supportLists\]-->/gi,"$&__MCE_ITEM__"],[/(<span[^>]+(?:mso-list:|:\s*symbol)[^>]+>)/gi,"$1__MCE_ITEM__"],[/(<p[^>]+(?:MsoListParagraph)[^>]+>)/gi,"$1__MCE_ITEM__"]])}d([/<!--[\s\S]+?-->/gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/ /gi,"\u00a0"]]);do{l=j.length;j=j.replace(/(<[a-z][^>]*\s)(?:id|name|language|type|on\w+|\w+:\w+)=(?:"[^"]*"|\w+)\s?/gi,"$1")}while(l!=j.length);if(b(k,"paste_retain_style_properties").replace(/^none$/i,"").length==0){j=j.replace(/<\/?span[^>]*>/gi,"")}else{d([[/<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi,function(o,h){return(h.length>0)?h.replace(/./," ").slice(Math.floor(h.length/2)).split("").join("\u00a0"):""}],[/(<[a-z][^>]*)\sstyle="([^"]*)"/gi,function(t,h,r){var u=[],o=0,q=n(f(r).replace(/"/gi,"'"),";");c(q,function(s){var w,y,z=n(s,":");function x(A){return A+((A!=="0")&&(/\d$/.test(A)))?"px":""}if(z.length==2){w=z[0].toLowerCase();y=z[1].toLowerCase();switch(w){case"mso-padding-alt":case"mso-padding-top-alt":case"mso-padding-right-alt":case"mso-padding-bottom-alt":case"mso-padding-left-alt":case"mso-margin-alt":case"mso-margin-top-alt":case"mso-margin-right-alt":case"mso-margin-bottom-alt":case"mso-margin-left-alt":case"mso-table-layout-alt":case"mso-height":case"mso-width":case"mso-vertical-align-alt":u[o++]=w.replace(/^mso-|-alt$/g,"")+":"+x(y);return;case"horiz-align":u[o++]="text-align:"+y;return;case"vert-align":u[o++]="vertical-align:"+y;return;case"font-color":case"mso-foreground":u[o++]="color:"+y;return;case"mso-background":case"mso-highlight":u[o++]="background:"+y;return;case"mso-default-height":u[o++]="min-height:"+x(y);return;case"mso-default-width":u[o++]="min-width:"+x(y);return;case"mso-padding-between-alt":u[o++]="border-collapse:separate;border-spacing:"+x(y);return;case"text-line-through":if((y=="single")||(y=="double")){u[o++]="text-decoration:line-through"}return;case"mso-zero-height":if(y=="yes"){u[o++]="display:none"}return}if(/^(mso|column|font-emph|lang|layout|line-break|list-image|nav|panose|punct|row|ruby|sep|size|src|tab-|table-border|text-(?!align|decor|indent|trans)|top-bar|version|vnd|word-break)/.test(w)){return}u[o++]=w+":"+z[1]}});if(o>0){return h+' style="'+u.join(";")+'"'}else{return h}}]])}}if(b(k,"paste_convert_headers_to_strong")){d([[/<h[1-6][^>]*>/gi,"<p><strong>"],[/<\/h[1-6][^>]*>/gi,"</strong></p>"]])}d([[/Version:[\d.]+\nStartHTML:\d+\nEndHTML:\d+\nStartFragment:\d+\nEndFragment:\d+/gi,""]]);i=b(k,"paste_strip_class_attributes");if(i!=="none"){function m(q,o){if(i==="all"){return""}var h=p(n(o.replace(/^(["'])(.*)\1$/,"$2")," "),function(r){return(/^(?!mso)/i.test(r))});return h.length?' class="'+h.join(" ")+'"':""}j=j.replace(/ class="([^"]+)"/gi,m);j=j.replace(/ class=([\-\w]+)/gi,m)}if(b(k,"paste_remove_spans")){j=j.replace(/<\/?span[^>]*>/gi,"")}e.content=j},_postProcess:function(g,i){var f=this,e=f.editor,h=e.dom,d;if(e.settings.paste_enable_default_filters==false){return}if(i.wordContent){c(h.select("a",i.node),function(j){if(!j.href||j.href.indexOf("#_Toc")!=-1){h.remove(j,1)}});if(b(e,"paste_convert_middot_lists")){f._convertLists(g,i)}d=b(e,"paste_retain_style_properties");if((tinymce.is(d,"string"))&&(d!=="all")&&(d!=="*")){d=tinymce.explode(d.replace(/^none$/i,""));c(h.select("*",i.node),function(m){var n={},k=0,l,o,j;if(d){for(l=0;l<d.length;l++){o=d[l];j=h.getStyle(m,o);if(j){n[o]=j;k++}}}h.setAttrib(m,"style","");if(d&&k>0){h.setStyles(m,n)}else{if(m.nodeName=="SPAN"&&!m.className){h.remove(m,true)}}})}}if(b(e,"paste_remove_styles")||(b(e,"paste_remove_styles_if_webkit")&&tinymce.isWebKit)){c(h.select("*[style]",i.node),function(j){j.removeAttribute("style");j.removeAttribute("data-mce-style")})}else{if(tinymce.isWebKit){c(h.select("*",i.node),function(j){j.removeAttribute("data-mce-style")})}}},_convertLists:function(g,e){var i=g.editor.dom,h,l,d=-1,f,m=[],k,j;c(i.select("p",e.node),function(t){var q,u="",s,r,n,o;for(q=t.firstChild;q&&q.nodeType==3;q=q.nextSibling){u+=q.nodeValue}u=t.innerHTML.replace(/<\/?\w+[^>]*>/gi,"").replace(/ /g,"\u00a0");if(/^(__MCE_ITEM__)+[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*\u00a0*/.test(u)){s="ul"}if(/^__MCE_ITEM__\s*\w+\.\s*\u00a0+/.test(u)){s="ol"}if(s){f=parseFloat(t.style.marginLeft||0);if(f>d){m.push(f)}if(!h||s!=k){h=i.create(s);i.insertAfter(h,t)}else{if(f>d){h=l.appendChild(i.create(s))}else{if(f<d){n=tinymce.inArray(m,f);o=i.getParents(h.parentNode,s);h=o[o.length-1-n]||h}}}c(i.select("span",t),function(v){var p=v.innerHTML.replace(/<\/?\w+[^>]*>/gi,"");if(s=="ul"&&/^__MCE_ITEM__[\u2022\u00b7\u00a7\u00d8o\u25CF]/.test(p)){i.remove(v)}else{if(/^__MCE_ITEM__[\s\S]*\w+\.( |\u00a0)*\s*/.test(p)){i.remove(v)}}});r=t.innerHTML;if(s=="ul"){r=t.innerHTML.replace(/__MCE_ITEM__/g,"").replace(/^[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*( |\u00a0)+\s*/,"")}else{r=t.innerHTML.replace(/__MCE_ITEM__/g,"").replace(/^\s*\w+\.( |\u00a0)+\s*/,"")}l=h.appendChild(i.create("li",0,r));i.remove(t);d=f;k=s}else{h=d=0}});j=e.node.innerHTML;if(j.indexOf("__MCE_ITEM__")!=-1){e.node.innerHTML=j.replace(/__MCE_ITEM__/g,"")}},_insert:function(f,d){var e=this.editor,g=e.selection.getRng();if(!e.selection.isCollapsed()&&g.startContainer!=g.endContainer){e.getDoc().execCommand("Delete",false,null)}e.execCommand("mceInsertContent",false,f,{skip_undo:d})},_insertPlainText:function(g){var d=this.editor,e=b(d,"paste_text_linebreaktype"),i=b(d,"paste_text_replacements"),f=tinymce.is;function h(j){c(j,function(k){if(k.constructor==RegExp){g=g.replace(k,"")}else{g=g.replace(k[0],k[1])}})}if((typeof(g)==="string")&&(g.length>0)){if(/<(?:p|br|h[1-6]|ul|ol|dl|table|t[rdh]|div|blockquote|fieldset|pre|address|center)[^>]*>/i.test(g)){h([/[\n\r]+/g])}else{h([/\r+/g])}h([[/<\/(?:p|h[1-6]|ul|ol|dl|table|div|blockquote|fieldset|pre|address|center)>/gi,"\n\n"],[/<br[^>]*>|<\/tr>/gi,"\n"],[/<\/t[dh]>\s*<t[dh][^>]*>/gi,"\t"],/<[a-z!\/?][^>]*>/gi,[/ /gi," "],[/(?:(?!\n)\s)*(\n+)(?:(?!\n)\s)*/gi,"$1"],[/\n{3,}/g,"\n\n"]]);g=d.dom.decode(tinymce.html.Entities.encodeRaw(g));if(f(i,"array")){h(i)}else{if(f(i,"string")){h(new RegExp(i,"gi"))}}if(e=="none"){h([[/\n+/g," "]])}else{if(e=="br"){h([[/\n/g,"<br />"]])}else{if(e=="p"){h([[/\n+/g,"</p><p>"],[/^(.*<\/p>)(<p>)$/,"<p>$1"]])}else{h([[/\n\n/g,"</p><p>"],[/^(.*<\/p>)(<p>)$/,"<p>$1"],[/\n/g,"<br />"]])}}}d.execCommand("mceInsertContent",false,g)}},_legacySupport:function(){var e=this,d=e.editor;d.addCommand("mcePasteWord",function(){d.windowManager.open({file:e.url+"/pasteword.htm",width:parseInt(b(d,"paste_dialog_width")),height:parseInt(b(d,"paste_dialog_height")),inline:1})});if(b(d,"paste_text_use_dialog")){d.addCommand("mcePasteText",function(){d.windowManager.open({file:e.url+"/pastetext.htm",width:parseInt(b(d,"paste_dialog_width")),height:parseInt(b(d,"paste_dialog_height")),inline:1})})}d.addButton("pasteword",{title:"paste.paste_word_desc",cmd:"mcePasteWord"})}});tinymce.PluginManager.add("paste",tinymce.plugins.PastePlugin)})();
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/paste/editor_plugin_src.js
ADDED
@@ -0,0 +1,871 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 each = tinymce.each,
|
13 |
+
defs = {
|
14 |
+
paste_auto_cleanup_on_paste : true,
|
15 |
+
paste_enable_default_filters : true,
|
16 |
+
paste_block_drop : false,
|
17 |
+
paste_retain_style_properties : "none",
|
18 |
+
paste_strip_class_attributes : "mso",
|
19 |
+
paste_remove_spans : false,
|
20 |
+
paste_remove_styles : false,
|
21 |
+
paste_remove_styles_if_webkit : true,
|
22 |
+
paste_convert_middot_lists : true,
|
23 |
+
paste_convert_headers_to_strong : false,
|
24 |
+
paste_dialog_width : "450",
|
25 |
+
paste_dialog_height : "400",
|
26 |
+
paste_text_use_dialog : false,
|
27 |
+
paste_text_sticky : false,
|
28 |
+
paste_text_sticky_default : false,
|
29 |
+
paste_text_notifyalways : false,
|
30 |
+
paste_text_linebreaktype : "combined",
|
31 |
+
paste_text_replacements : [
|
32 |
+
[/\u2026/g, "..."],
|
33 |
+
[/[\x93\x94\u201c\u201d]/g, '"'],
|
34 |
+
[/[\x60\x91\x92\u2018\u2019]/g, "'"]
|
35 |
+
]
|
36 |
+
};
|
37 |
+
|
38 |
+
function getParam(ed, name) {
|
39 |
+
return ed.getParam(name, defs[name]);
|
40 |
+
}
|
41 |
+
|
42 |
+
tinymce.create('tinymce.plugins.PastePlugin', {
|
43 |
+
init : function(ed, url) {
|
44 |
+
var t = this;
|
45 |
+
|
46 |
+
t.editor = ed;
|
47 |
+
t.url = url;
|
48 |
+
|
49 |
+
// Setup plugin events
|
50 |
+
t.onPreProcess = new tinymce.util.Dispatcher(t);
|
51 |
+
t.onPostProcess = new tinymce.util.Dispatcher(t);
|
52 |
+
|
53 |
+
// Register default handlers
|
54 |
+
t.onPreProcess.add(t._preProcess);
|
55 |
+
t.onPostProcess.add(t._postProcess);
|
56 |
+
|
57 |
+
// Register optional preprocess handler
|
58 |
+
t.onPreProcess.add(function(pl, o) {
|
59 |
+
ed.execCallback('paste_preprocess', pl, o);
|
60 |
+
});
|
61 |
+
|
62 |
+
// Register optional postprocess
|
63 |
+
t.onPostProcess.add(function(pl, o) {
|
64 |
+
ed.execCallback('paste_postprocess', pl, o);
|
65 |
+
});
|
66 |
+
|
67 |
+
ed.onKeyDown.addToTop(function(ed, e) {
|
68 |
+
// Block ctrl+v from adding an undo level since the default logic in tinymce.Editor will add that
|
69 |
+
if (((tinymce.isMac ? e.metaKey : e.ctrlKey) && e.keyCode == 86) || (e.shiftKey && e.keyCode == 45))
|
70 |
+
return false; // Stop other listeners
|
71 |
+
});
|
72 |
+
|
73 |
+
// Initialize plain text flag
|
74 |
+
ed.pasteAsPlainText = getParam(ed, 'paste_text_sticky_default');
|
75 |
+
|
76 |
+
// This function executes the process handlers and inserts the contents
|
77 |
+
// force_rich overrides plain text mode set by user, important for pasting with execCommand
|
78 |
+
function process(o, force_rich) {
|
79 |
+
var dom = ed.dom, rng;
|
80 |
+
|
81 |
+
// Execute pre process handlers
|
82 |
+
t.onPreProcess.dispatch(t, o);
|
83 |
+
|
84 |
+
// Create DOM structure
|
85 |
+
o.node = dom.create('div', 0, o.content);
|
86 |
+
|
87 |
+
// If pasting inside the same element and the contents is only one block
|
88 |
+
// remove the block and keep the text since Firefox will copy parts of pre and h1-h6 as a pre element
|
89 |
+
if (tinymce.isGecko) {
|
90 |
+
rng = ed.selection.getRng(true);
|
91 |
+
if (rng.startContainer == rng.endContainer && rng.startContainer.nodeType == 3) {
|
92 |
+
// Is only one block node and it doesn't contain word stuff
|
93 |
+
if (o.node.childNodes.length === 1 && /^(p|h[1-6]|pre)$/i.test(o.node.firstChild.nodeName) && o.content.indexOf('__MCE_ITEM__') === -1)
|
94 |
+
dom.remove(o.node.firstChild, true);
|
95 |
+
}
|
96 |
+
}
|
97 |
+
|
98 |
+
// Execute post process handlers
|
99 |
+
t.onPostProcess.dispatch(t, o);
|
100 |
+
|
101 |
+
// Serialize content
|
102 |
+
o.content = ed.serializer.serialize(o.node, {getInner : 1, forced_root_block : ''});
|
103 |
+
|
104 |
+
// Plain text option active?
|
105 |
+
if ((!force_rich) && (ed.pasteAsPlainText)) {
|
106 |
+
t._insertPlainText(o.content);
|
107 |
+
|
108 |
+
if (!getParam(ed, "paste_text_sticky")) {
|
109 |
+
ed.pasteAsPlainText = false;
|
110 |
+
ed.controlManager.setActive("pastetext", false);
|
111 |
+
}
|
112 |
+
} else {
|
113 |
+
t._insert(o.content);
|
114 |
+
}
|
115 |
+
}
|
116 |
+
|
117 |
+
// Add command for external usage
|
118 |
+
ed.addCommand('mceInsertClipboardContent', function(u, o) {
|
119 |
+
process(o, true);
|
120 |
+
});
|
121 |
+
|
122 |
+
if (!getParam(ed, "paste_text_use_dialog")) {
|
123 |
+
ed.addCommand('mcePasteText', function(u, v) {
|
124 |
+
var cookie = tinymce.util.Cookie;
|
125 |
+
|
126 |
+
ed.pasteAsPlainText = !ed.pasteAsPlainText;
|
127 |
+
ed.controlManager.setActive('pastetext', ed.pasteAsPlainText);
|
128 |
+
|
129 |
+
if ((ed.pasteAsPlainText) && (!cookie.get("tinymcePasteText"))) {
|
130 |
+
if (getParam(ed, "paste_text_sticky")) {
|
131 |
+
ed.windowManager.alert(ed.translate('paste.plaintext_mode_sticky'));
|
132 |
+
} else {
|
133 |
+
ed.windowManager.alert(ed.translate('paste.plaintext_mode'));
|
134 |
+
}
|
135 |
+
|
136 |
+
if (!getParam(ed, "paste_text_notifyalways")) {
|
137 |
+
cookie.set("tinymcePasteText", "1", new Date(new Date().getFullYear() + 1, 12, 31))
|
138 |
+
}
|
139 |
+
}
|
140 |
+
});
|
141 |
+
}
|
142 |
+
|
143 |
+
ed.addButton('pastetext', {title: 'paste.paste_text_desc', cmd: 'mcePasteText'});
|
144 |
+
ed.addButton('selectall', {title: 'paste.selectall_desc', cmd: 'selectall'});
|
145 |
+
|
146 |
+
// This function grabs the contents from the clipboard by adding a
|
147 |
+
// hidden div and placing the caret inside it and after the browser paste
|
148 |
+
// is done it grabs that contents and processes that
|
149 |
+
function grabContent(e) {
|
150 |
+
var n, or, rng, oldRng, sel = ed.selection, dom = ed.dom, body = ed.getBody(), posY, textContent;
|
151 |
+
|
152 |
+
// Check if browser supports direct plaintext access
|
153 |
+
if (e.clipboardData || dom.doc.dataTransfer) {
|
154 |
+
textContent = (e.clipboardData || dom.doc.dataTransfer).getData('Text');
|
155 |
+
|
156 |
+
if (ed.pasteAsPlainText) {
|
157 |
+
e.preventDefault();
|
158 |
+
process({content : dom.encode(textContent).replace(/\r?\n/g, '<br />')});
|
159 |
+
return;
|
160 |
+
}
|
161 |
+
}
|
162 |
+
|
163 |
+
if (dom.get('_mcePaste'))
|
164 |
+
return;
|
165 |
+
|
166 |
+
// Create container to paste into
|
167 |
+
n = dom.add(body, 'div', {id : '_mcePaste', 'class' : 'mcePaste', 'data-mce-bogus' : '1'}, '\uFEFF\uFEFF');
|
168 |
+
|
169 |
+
// If contentEditable mode we need to find out the position of the closest element
|
170 |
+
if (body != ed.getDoc().body)
|
171 |
+
posY = dom.getPos(ed.selection.getStart(), body).y;
|
172 |
+
else
|
173 |
+
posY = body.scrollTop + dom.getViewPort(ed.getWin()).y;
|
174 |
+
|
175 |
+
// Styles needs to be applied after the element is added to the document since WebKit will otherwise remove all styles
|
176 |
+
// If also needs to be in view on IE or the paste would fail
|
177 |
+
dom.setStyles(n, {
|
178 |
+
position : 'absolute',
|
179 |
+
left : tinymce.isGecko ? -40 : 0, // Need to move it out of site on Gecko since it will othewise display a ghost resize rect for the div
|
180 |
+
top : posY - 25,
|
181 |
+
width : 1,
|
182 |
+
height : 1,
|
183 |
+
overflow : 'hidden'
|
184 |
+
});
|
185 |
+
|
186 |
+
if (tinymce.isIE) {
|
187 |
+
// Store away the old range
|
188 |
+
oldRng = sel.getRng();
|
189 |
+
|
190 |
+
// Select the container
|
191 |
+
rng = dom.doc.body.createTextRange();
|
192 |
+
rng.moveToElementText(n);
|
193 |
+
rng.execCommand('Paste');
|
194 |
+
|
195 |
+
// Remove container
|
196 |
+
dom.remove(n);
|
197 |
+
|
198 |
+
// Check if the contents was changed, if it wasn't then clipboard extraction failed probably due
|
199 |
+
// to IE security settings so we pass the junk though better than nothing right
|
200 |
+
if (n.innerHTML === '\uFEFF\uFEFF') {
|
201 |
+
ed.execCommand('mcePasteWord');
|
202 |
+
e.preventDefault();
|
203 |
+
return;
|
204 |
+
}
|
205 |
+
|
206 |
+
// Restore the old range and clear the contents before pasting
|
207 |
+
sel.setRng(oldRng);
|
208 |
+
sel.setContent('');
|
209 |
+
|
210 |
+
// For some odd reason we need to detach the the mceInsertContent call from the paste event
|
211 |
+
// It's like IE has a reference to the parent element that you paste in and the selection gets messed up
|
212 |
+
// when it tries to restore the selection
|
213 |
+
setTimeout(function() {
|
214 |
+
// Process contents
|
215 |
+
process({content : n.innerHTML});
|
216 |
+
}, 0);
|
217 |
+
|
218 |
+
// Block the real paste event
|
219 |
+
return tinymce.dom.Event.cancel(e);
|
220 |
+
} else {
|
221 |
+
function block(e) {
|
222 |
+
e.preventDefault();
|
223 |
+
};
|
224 |
+
|
225 |
+
// Block mousedown and click to prevent selection change
|
226 |
+
dom.bind(ed.getDoc(), 'mousedown', block);
|
227 |
+
dom.bind(ed.getDoc(), 'keydown', block);
|
228 |
+
|
229 |
+
or = ed.selection.getRng();
|
230 |
+
|
231 |
+
// Move select contents inside DIV
|
232 |
+
n = n.firstChild;
|
233 |
+
rng = ed.getDoc().createRange();
|
234 |
+
rng.setStart(n, 0);
|
235 |
+
rng.setEnd(n, 2);
|
236 |
+
sel.setRng(rng);
|
237 |
+
|
238 |
+
// Wait a while and grab the pasted contents
|
239 |
+
window.setTimeout(function() {
|
240 |
+
var h = '', nl;
|
241 |
+
|
242 |
+
// Paste divs duplicated in paste divs seems to happen when you paste plain text so lets first look for that broken behavior in WebKit
|
243 |
+
if (!dom.select('div.mcePaste > div.mcePaste').length) {
|
244 |
+
nl = dom.select('div.mcePaste');
|
245 |
+
|
246 |
+
// WebKit will split the div into multiple ones so this will loop through then all and join them to get the whole HTML string
|
247 |
+
each(nl, function(n) {
|
248 |
+
var child = n.firstChild;
|
249 |
+
|
250 |
+
// WebKit inserts a DIV container with lots of odd styles
|
251 |
+
if (child && child.nodeName == 'DIV' && child.style.marginTop && child.style.backgroundColor) {
|
252 |
+
dom.remove(child, 1);
|
253 |
+
}
|
254 |
+
|
255 |
+
// Remove apply style spans
|
256 |
+
each(dom.select('span.Apple-style-span', n), function(n) {
|
257 |
+
dom.remove(n, 1);
|
258 |
+
});
|
259 |
+
|
260 |
+
// Remove bogus br elements
|
261 |
+
each(dom.select('br[data-mce-bogus]', n), function(n) {
|
262 |
+
dom.remove(n);
|
263 |
+
});
|
264 |
+
|
265 |
+
// WebKit will make a copy of the DIV for each line of plain text pasted and insert them into the DIV
|
266 |
+
if (n.parentNode.className != 'mcePaste')
|
267 |
+
h += n.innerHTML;
|
268 |
+
});
|
269 |
+
} else {
|
270 |
+
// Found WebKit weirdness so force the content into paragraphs this seems to happen when you paste plain text from Nodepad etc
|
271 |
+
// So this logic will replace double enter with paragraphs and single enter with br so it kind of looks the same
|
272 |
+
h = '<p>' + dom.encode(textContent).replace(/\r?\n\r?\n/g, '</p><p>').replace(/\r?\n/g, '<br />') + '</p>';
|
273 |
+
}
|
274 |
+
|
275 |
+
// Remove the nodes
|
276 |
+
each(dom.select('div.mcePaste'), function(n) {
|
277 |
+
dom.remove(n);
|
278 |
+
});
|
279 |
+
|
280 |
+
// Restore the old selection
|
281 |
+
if (or)
|
282 |
+
sel.setRng(or);
|
283 |
+
|
284 |
+
process({content : h});
|
285 |
+
|
286 |
+
// Unblock events ones we got the contents
|
287 |
+
dom.unbind(ed.getDoc(), 'mousedown', block);
|
288 |
+
dom.unbind(ed.getDoc(), 'keydown', block);
|
289 |
+
}, 0);
|
290 |
+
}
|
291 |
+
}
|
292 |
+
|
293 |
+
// Check if we should use the new auto process method
|
294 |
+
if (getParam(ed, "paste_auto_cleanup_on_paste")) {
|
295 |
+
// Is it's Opera or older FF use key handler
|
296 |
+
if (tinymce.isOpera || /Firefox\/2/.test(navigator.userAgent)) {
|
297 |
+
ed.onKeyDown.addToTop(function(ed, e) {
|
298 |
+
if (((tinymce.isMac ? e.metaKey : e.ctrlKey) && e.keyCode == 86) || (e.shiftKey && e.keyCode == 45))
|
299 |
+
grabContent(e);
|
300 |
+
});
|
301 |
+
} else {
|
302 |
+
// Grab contents on paste event on Gecko and WebKit
|
303 |
+
ed.onPaste.addToTop(function(ed, e) {
|
304 |
+
return grabContent(e);
|
305 |
+
});
|
306 |
+
}
|
307 |
+
}
|
308 |
+
|
309 |
+
ed.onInit.add(function() {
|
310 |
+
ed.controlManager.setActive("pastetext", ed.pasteAsPlainText);
|
311 |
+
|
312 |
+
// Block all drag/drop events
|
313 |
+
if (getParam(ed, "paste_block_drop")) {
|
314 |
+
ed.dom.bind(ed.getBody(), ['dragend', 'dragover', 'draggesture', 'dragdrop', 'drop', 'drag'], function(e) {
|
315 |
+
e.preventDefault();
|
316 |
+
e.stopPropagation();
|
317 |
+
|
318 |
+
return false;
|
319 |
+
});
|
320 |
+
}
|
321 |
+
});
|
322 |
+
|
323 |
+
// Add legacy support
|
324 |
+
t._legacySupport();
|
325 |
+
},
|
326 |
+
|
327 |
+
getInfo : function() {
|
328 |
+
return {
|
329 |
+
longname : 'Paste text/word',
|
330 |
+
author : 'Moxiecode Systems AB',
|
331 |
+
authorurl : 'http://tinymce.moxiecode.com',
|
332 |
+
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/paste',
|
333 |
+
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
334 |
+
};
|
335 |
+
},
|
336 |
+
|
337 |
+
_preProcess : function(pl, o) {
|
338 |
+
var ed = this.editor,
|
339 |
+
h = o.content,
|
340 |
+
grep = tinymce.grep,
|
341 |
+
explode = tinymce.explode,
|
342 |
+
trim = tinymce.trim,
|
343 |
+
len, stripClass;
|
344 |
+
|
345 |
+
//console.log('Before preprocess:' + o.content);
|
346 |
+
|
347 |
+
function process(items) {
|
348 |
+
each(items, function(v) {
|
349 |
+
// Remove or replace
|
350 |
+
if (v.constructor == RegExp)
|
351 |
+
h = h.replace(v, '');
|
352 |
+
else
|
353 |
+
h = h.replace(v[0], v[1]);
|
354 |
+
});
|
355 |
+
}
|
356 |
+
|
357 |
+
if (ed.settings.paste_enable_default_filters == false) {
|
358 |
+
return;
|
359 |
+
}
|
360 |
+
|
361 |
+
// IE9 adds BRs before/after block elements when contents is pasted from word or for example another browser
|
362 |
+
if (tinymce.isIE && document.documentMode >= 9 && /<(h[1-6r]|p|div|address|pre|form|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|blockquote|center|dl|dt|dd|dir|fieldset)/.test(o.content)) {
|
363 |
+
// IE9 adds BRs before/after block elements when contents is pasted from word or for example another browser
|
364 |
+
process([[/(?:<br> [\s\r\n]+|<br>)*(<\/?(h[1-6r]|p|div|address|pre|form|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|blockquote|center|dl|dt|dd|dir|fieldset)[^>]*>)(?:<br> [\s\r\n]+|<br>)*/g, '$1']]);
|
365 |
+
|
366 |
+
// IE9 also adds an extra BR element for each soft-linefeed and it also adds a BR for each word wrap break
|
367 |
+
process([
|
368 |
+
[/<br><br>/g, '<BR><BR>'], // Replace multiple BR elements with uppercase BR to keep them intact
|
369 |
+
[/<br>/g, ' '], // Replace single br elements with space since they are word wrap BR:s
|
370 |
+
[/<BR><BR>/g, '<br>'] // Replace back the double brs but into a single BR
|
371 |
+
]);
|
372 |
+
}
|
373 |
+
|
374 |
+
// Detect Word content and process it more aggressive
|
375 |
+
if (/class="?Mso|style="[^"]*\bmso-|w:WordDocument/i.test(h) || o.wordContent) {
|
376 |
+
o.wordContent = true; // Mark the pasted contents as word specific content
|
377 |
+
//console.log('Word contents detected.');
|
378 |
+
|
379 |
+
// Process away some basic content
|
380 |
+
process([
|
381 |
+
/^\s*( )+/gi, // entities at the start of contents
|
382 |
+
/( |<br[^>]*>)+\s*$/gi // entities at the end of contents
|
383 |
+
]);
|
384 |
+
|
385 |
+
if (getParam(ed, "paste_convert_headers_to_strong")) {
|
386 |
+
h = h.replace(/<p [^>]*class="?MsoHeading"?[^>]*>(.*?)<\/p>/gi, "<p><strong>$1</strong></p>");
|
387 |
+
}
|
388 |
+
|
389 |
+
if (getParam(ed, "paste_convert_middot_lists")) {
|
390 |
+
process([
|
391 |
+
[/<!--\[if !supportLists\]-->/gi, '$&__MCE_ITEM__'], // Convert supportLists to a list item marker
|
392 |
+
[/(<span[^>]+(?:mso-list:|:\s*symbol)[^>]+>)/gi, '$1__MCE_ITEM__'], // Convert mso-list and symbol spans to item markers
|
393 |
+
[/(<p[^>]+(?:MsoListParagraph)[^>]+>)/gi, '$1__MCE_ITEM__'] // Convert mso-list and symbol paragraphs to item markers (FF)
|
394 |
+
]);
|
395 |
+
}
|
396 |
+
|
397 |
+
process([
|
398 |
+
// Word comments like conditional comments etc
|
399 |
+
/<!--[\s\S]+?-->/gi,
|
400 |
+
|
401 |
+
// Remove comments, scripts (e.g., msoShowComment), XML tag, VML content, MS Office namespaced tags, and a few other tags
|
402 |
+
/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,
|
403 |
+
|
404 |
+
// Convert <s> into <strike> for line-though
|
405 |
+
[/<(\/?)s>/gi, "<$1strike>"],
|
406 |
+
|
407 |
+
// Replace nsbp entites to char since it's easier to handle
|
408 |
+
[/ /gi, "\u00a0"]
|
409 |
+
]);
|
410 |
+
|
411 |
+
// Remove bad attributes, with or without quotes, ensuring that attribute text is really inside a tag.
|
412 |
+
// If JavaScript had a RegExp look-behind, we could have integrated this with the last process() array and got rid of the loop. But alas, it does not, so we cannot.
|
413 |
+
do {
|
414 |
+
len = h.length;
|
415 |
+
h = h.replace(/(<[a-z][^>]*\s)(?:id|name|language|type|on\w+|\w+:\w+)=(?:"[^"]*"|\w+)\s?/gi, "$1");
|
416 |
+
} while (len != h.length);
|
417 |
+
|
418 |
+
// Remove all spans if no styles is to be retained
|
419 |
+
if (getParam(ed, "paste_retain_style_properties").replace(/^none$/i, "").length == 0) {
|
420 |
+
h = h.replace(/<\/?span[^>]*>/gi, "");
|
421 |
+
} else {
|
422 |
+
// We're keeping styles, so at least clean them up.
|
423 |
+
// CSS Reference: http://msdn.microsoft.com/en-us/library/aa155477.aspx
|
424 |
+
|
425 |
+
process([
|
426 |
+
// Convert <span style="mso-spacerun:yes">___</span> to string of alternating breaking/non-breaking spaces of same length
|
427 |
+
[/<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi,
|
428 |
+
function(str, spaces) {
|
429 |
+
return (spaces.length > 0)? spaces.replace(/./, " ").slice(Math.floor(spaces.length/2)).split("").join("\u00a0") : "";
|
430 |
+
}
|
431 |
+
],
|
432 |
+
|
433 |
+
// Examine all styles: delete junk, transform some, and keep the rest
|
434 |
+
[/(<[a-z][^>]*)\sstyle="([^"]*)"/gi,
|
435 |
+
function(str, tag, style) {
|
436 |
+
var n = [],
|
437 |
+
i = 0,
|
438 |
+
s = explode(trim(style).replace(/"/gi, "'"), ";");
|
439 |
+
|
440 |
+
// Examine each style definition within the tag's style attribute
|
441 |
+
each(s, function(v) {
|
442 |
+
var name, value,
|
443 |
+
parts = explode(v, ":");
|
444 |
+
|
445 |
+
function ensureUnits(v) {
|
446 |
+
return v + ((v !== "0") && (/\d$/.test(v)))? "px" : "";
|
447 |
+
}
|
448 |
+
|
449 |
+
if (parts.length == 2) {
|
450 |
+
name = parts[0].toLowerCase();
|
451 |
+
value = parts[1].toLowerCase();
|
452 |
+
|
453 |
+
// Translate certain MS Office styles into their CSS equivalents
|
454 |
+
switch (name) {
|
455 |
+
case "mso-padding-alt":
|
456 |
+
case "mso-padding-top-alt":
|
457 |
+
case "mso-padding-right-alt":
|
458 |
+
case "mso-padding-bottom-alt":
|
459 |
+
case "mso-padding-left-alt":
|
460 |
+
case "mso-margin-alt":
|
461 |
+
case "mso-margin-top-alt":
|
462 |
+
case "mso-margin-right-alt":
|
463 |
+
case "mso-margin-bottom-alt":
|
464 |
+
case "mso-margin-left-alt":
|
465 |
+
case "mso-table-layout-alt":
|
466 |
+
case "mso-height":
|
467 |
+
case "mso-width":
|
468 |
+
case "mso-vertical-align-alt":
|
469 |
+
n[i++] = name.replace(/^mso-|-alt$/g, "") + ":" + ensureUnits(value);
|
470 |
+
return;
|
471 |
+
|
472 |
+
case "horiz-align":
|
473 |
+
n[i++] = "text-align:" + value;
|
474 |
+
return;
|
475 |
+
|
476 |
+
case "vert-align":
|
477 |
+
n[i++] = "vertical-align:" + value;
|
478 |
+
return;
|
479 |
+
|
480 |
+
case "font-color":
|
481 |
+
case "mso-foreground":
|
482 |
+
n[i++] = "color:" + value;
|
483 |
+
return;
|
484 |
+
|
485 |
+
case "mso-background":
|
486 |
+
case "mso-highlight":
|
487 |
+
n[i++] = "background:" + value;
|
488 |
+
return;
|
489 |
+
|
490 |
+
case "mso-default-height":
|
491 |
+
n[i++] = "min-height:" + ensureUnits(value);
|
492 |
+
return;
|
493 |
+
|
494 |
+
case "mso-default-width":
|
495 |
+
n[i++] = "min-width:" + ensureUnits(value);
|
496 |
+
return;
|
497 |
+
|
498 |
+
case "mso-padding-between-alt":
|
499 |
+
n[i++] = "border-collapse:separate;border-spacing:" + ensureUnits(value);
|
500 |
+
return;
|
501 |
+
|
502 |
+
case "text-line-through":
|
503 |
+
if ((value == "single") || (value == "double")) {
|
504 |
+
n[i++] = "text-decoration:line-through";
|
505 |
+
}
|
506 |
+
return;
|
507 |
+
|
508 |
+
case "mso-zero-height":
|
509 |
+
if (value == "yes") {
|
510 |
+
n[i++] = "display:none";
|
511 |
+
}
|
512 |
+
return;
|
513 |
+
}
|
514 |
+
|
515 |
+
// Eliminate all MS Office style definitions that have no CSS equivalent by examining the first characters in the name
|
516 |
+
if (/^(mso|column|font-emph|lang|layout|line-break|list-image|nav|panose|punct|row|ruby|sep|size|src|tab-|table-border|text-(?!align|decor|indent|trans)|top-bar|version|vnd|word-break)/.test(name)) {
|
517 |
+
return;
|
518 |
+
}
|
519 |
+
|
520 |
+
// If it reached this point, it must be a valid CSS style
|
521 |
+
n[i++] = name + ":" + parts[1]; // Lower-case name, but keep value case
|
522 |
+
}
|
523 |
+
});
|
524 |
+
|
525 |
+
// If style attribute contained any valid styles the re-write it; otherwise delete style attribute.
|
526 |
+
if (i > 0) {
|
527 |
+
return tag + ' style="' + n.join(';') + '"';
|
528 |
+
} else {
|
529 |
+
return tag;
|
530 |
+
}
|
531 |
+
}
|
532 |
+
]
|
533 |
+
]);
|
534 |
+
}
|
535 |
+
}
|
536 |
+
|
537 |
+
// Replace headers with <strong>
|
538 |
+
if (getParam(ed, "paste_convert_headers_to_strong")) {
|
539 |
+
process([
|
540 |
+
[/<h[1-6][^>]*>/gi, "<p><strong>"],
|
541 |
+
[/<\/h[1-6][^>]*>/gi, "</strong></p>"]
|
542 |
+
]);
|
543 |
+
}
|
544 |
+
|
545 |
+
process([
|
546 |
+
// Copy paste from Java like Open Office will produce this junk on FF
|
547 |
+
[/Version:[\d.]+\nStartHTML:\d+\nEndHTML:\d+\nStartFragment:\d+\nEndFragment:\d+/gi, '']
|
548 |
+
]);
|
549 |
+
|
550 |
+
// Class attribute options are: leave all as-is ("none"), remove all ("all"), or remove only those starting with mso ("mso").
|
551 |
+
// Note:- paste_strip_class_attributes: "none", verify_css_classes: true is also a good variation.
|
552 |
+
stripClass = getParam(ed, "paste_strip_class_attributes");
|
553 |
+
|
554 |
+
if (stripClass !== "none") {
|
555 |
+
function removeClasses(match, g1) {
|
556 |
+
if (stripClass === "all")
|
557 |
+
return '';
|
558 |
+
|
559 |
+
var cls = grep(explode(g1.replace(/^(["'])(.*)\1$/, "$2"), " "),
|
560 |
+
function(v) {
|
561 |
+
return (/^(?!mso)/i.test(v));
|
562 |
+
}
|
563 |
+
);
|
564 |
+
|
565 |
+
return cls.length ? ' class="' + cls.join(" ") + '"' : '';
|
566 |
+
};
|
567 |
+
|
568 |
+
h = h.replace(/ class="([^"]+)"/gi, removeClasses);
|
569 |
+
h = h.replace(/ class=([\-\w]+)/gi, removeClasses);
|
570 |
+
}
|
571 |
+
|
572 |
+
// Remove spans option
|
573 |
+
if (getParam(ed, "paste_remove_spans")) {
|
574 |
+
h = h.replace(/<\/?span[^>]*>/gi, "");
|
575 |
+
}
|
576 |
+
|
577 |
+
//console.log('After preprocess:' + h);
|
578 |
+
|
579 |
+
o.content = h;
|
580 |
+
},
|
581 |
+
|
582 |
+
/**
|
583 |
+
* Various post process items.
|
584 |
+
*/
|
585 |
+
_postProcess : function(pl, o) {
|
586 |
+
var t = this, ed = t.editor, dom = ed.dom, styleProps;
|
587 |
+
|
588 |
+
if (ed.settings.paste_enable_default_filters == false) {
|
589 |
+
return;
|
590 |
+
}
|
591 |
+
|
592 |
+
if (o.wordContent) {
|
593 |
+
// Remove named anchors or TOC links
|
594 |
+
each(dom.select('a', o.node), function(a) {
|
595 |
+
if (!a.href || a.href.indexOf('#_Toc') != -1)
|
596 |
+
dom.remove(a, 1);
|
597 |
+
});
|
598 |
+
|
599 |
+
if (getParam(ed, "paste_convert_middot_lists")) {
|
600 |
+
t._convertLists(pl, o);
|
601 |
+
}
|
602 |
+
|
603 |
+
// Process styles
|
604 |
+
styleProps = getParam(ed, "paste_retain_style_properties"); // retained properties
|
605 |
+
|
606 |
+
// Process only if a string was specified and not equal to "all" or "*"
|
607 |
+
if ((tinymce.is(styleProps, "string")) && (styleProps !== "all") && (styleProps !== "*")) {
|
608 |
+
styleProps = tinymce.explode(styleProps.replace(/^none$/i, ""));
|
609 |
+
|
610 |
+
// Retains some style properties
|
611 |
+
each(dom.select('*', o.node), function(el) {
|
612 |
+
var newStyle = {}, npc = 0, i, sp, sv;
|
613 |
+
|
614 |
+
// Store a subset of the existing styles
|
615 |
+
if (styleProps) {
|
616 |
+
for (i = 0; i < styleProps.length; i++) {
|
617 |
+
sp = styleProps[i];
|
618 |
+
sv = dom.getStyle(el, sp);
|
619 |
+
|
620 |
+
if (sv) {
|
621 |
+
newStyle[sp] = sv;
|
622 |
+
npc++;
|
623 |
+
}
|
624 |
+
}
|
625 |
+
}
|
626 |
+
|
627 |
+
// Remove all of the existing styles
|
628 |
+
dom.setAttrib(el, 'style', '');
|
629 |
+
|
630 |
+
if (styleProps && npc > 0)
|
631 |
+
dom.setStyles(el, newStyle); // Add back the stored subset of styles
|
632 |
+
else // Remove empty span tags that do not have class attributes
|
633 |
+
if (el.nodeName == 'SPAN' && !el.className)
|
634 |
+
dom.remove(el, true);
|
635 |
+
});
|
636 |
+
}
|
637 |
+
}
|
638 |
+
|
639 |
+
// Remove all style information or only specifically on WebKit to avoid the style bug on that browser
|
640 |
+
if (getParam(ed, "paste_remove_styles") || (getParam(ed, "paste_remove_styles_if_webkit") && tinymce.isWebKit)) {
|
641 |
+
each(dom.select('*[style]', o.node), function(el) {
|
642 |
+
el.removeAttribute('style');
|
643 |
+
el.removeAttribute('data-mce-style');
|
644 |
+
});
|
645 |
+
} else {
|
646 |
+
if (tinymce.isWebKit) {
|
647 |
+
// We need to compress the styles on WebKit since if you paste <img border="0" /> it will become <img border="0" style="... lots of junk ..." />
|
648 |
+
// Removing the mce_style that contains the real value will force the Serializer engine to compress the styles
|
649 |
+
each(dom.select('*', o.node), function(el) {
|
650 |
+
el.removeAttribute('data-mce-style');
|
651 |
+
});
|
652 |
+
}
|
653 |
+
}
|
654 |
+
},
|
655 |
+
|
656 |
+
/**
|
657 |
+
* Converts the most common bullet and number formats in Office into a real semantic UL/LI list.
|
658 |
+
*/
|
659 |
+
_convertLists : function(pl, o) {
|
660 |
+
var dom = pl.editor.dom, listElm, li, lastMargin = -1, margin, levels = [], lastType, html;
|
661 |
+
|
662 |
+
// Convert middot lists into real semantic lists
|
663 |
+
each(dom.select('p', o.node), function(p) {
|
664 |
+
var sib, val = '', type, html, idx, parents;
|
665 |
+
|
666 |
+
// Get text node value at beginning of paragraph
|
667 |
+
for (sib = p.firstChild; sib && sib.nodeType == 3; sib = sib.nextSibling)
|
668 |
+
val += sib.nodeValue;
|
669 |
+
|
670 |
+
val = p.innerHTML.replace(/<\/?\w+[^>]*>/gi, '').replace(/ /g, '\u00a0');
|
671 |
+
|
672 |
+
// Detect unordered lists look for bullets
|
673 |
+
if (/^(__MCE_ITEM__)+[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*\u00a0*/.test(val))
|
674 |
+
type = 'ul';
|
675 |
+
|
676 |
+
// Detect ordered lists 1., a. or ixv.
|
677 |
+
if (/^__MCE_ITEM__\s*\w+\.\s*\u00a0+/.test(val))
|
678 |
+
type = 'ol';
|
679 |
+
|
680 |
+
// Check if node value matches the list pattern: o
|
681 |
+
if (type) {
|
682 |
+
margin = parseFloat(p.style.marginLeft || 0);
|
683 |
+
|
684 |
+
if (margin > lastMargin)
|
685 |
+
levels.push(margin);
|
686 |
+
|
687 |
+
if (!listElm || type != lastType) {
|
688 |
+
listElm = dom.create(type);
|
689 |
+
dom.insertAfter(listElm, p);
|
690 |
+
} else {
|
691 |
+
// Nested list element
|
692 |
+
if (margin > lastMargin) {
|
693 |
+
listElm = li.appendChild(dom.create(type));
|
694 |
+
} else if (margin < lastMargin) {
|
695 |
+
// Find parent level based on margin value
|
696 |
+
idx = tinymce.inArray(levels, margin);
|
697 |
+
parents = dom.getParents(listElm.parentNode, type);
|
698 |
+
listElm = parents[parents.length - 1 - idx] || listElm;
|
699 |
+
}
|
700 |
+
}
|
701 |
+
|
702 |
+
// Remove middot or number spans if they exists
|
703 |
+
each(dom.select('span', p), function(span) {
|
704 |
+
var html = span.innerHTML.replace(/<\/?\w+[^>]*>/gi, '');
|
705 |
+
|
706 |
+
// Remove span with the middot or the number
|
707 |
+
if (type == 'ul' && /^__MCE_ITEM__[\u2022\u00b7\u00a7\u00d8o\u25CF]/.test(html))
|
708 |
+
dom.remove(span);
|
709 |
+
else if (/^__MCE_ITEM__[\s\S]*\w+\.( |\u00a0)*\s*/.test(html))
|
710 |
+
dom.remove(span);
|
711 |
+
});
|
712 |
+
|
713 |
+
html = p.innerHTML;
|
714 |
+
|
715 |
+
// Remove middot/list items
|
716 |
+
if (type == 'ul')
|
717 |
+
html = p.innerHTML.replace(/__MCE_ITEM__/g, '').replace(/^[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*( |\u00a0)+\s*/, '');
|
718 |
+
else
|
719 |
+
html = p.innerHTML.replace(/__MCE_ITEM__/g, '').replace(/^\s*\w+\.( |\u00a0)+\s*/, '');
|
720 |
+
|
721 |
+
// Create li and add paragraph data into the new li
|
722 |
+
li = listElm.appendChild(dom.create('li', 0, html));
|
723 |
+
dom.remove(p);
|
724 |
+
|
725 |
+
lastMargin = margin;
|
726 |
+
lastType = type;
|
727 |
+
} else
|
728 |
+
listElm = lastMargin = 0; // End list element
|
729 |
+
});
|
730 |
+
|
731 |
+
// Remove any left over makers
|
732 |
+
html = o.node.innerHTML;
|
733 |
+
if (html.indexOf('__MCE_ITEM__') != -1)
|
734 |
+
o.node.innerHTML = html.replace(/__MCE_ITEM__/g, '');
|
735 |
+
},
|
736 |
+
|
737 |
+
/**
|
738 |
+
* Inserts the specified contents at the caret position.
|
739 |
+
*/
|
740 |
+
_insert : function(h, skip_undo) {
|
741 |
+
var ed = this.editor, r = ed.selection.getRng();
|
742 |
+
|
743 |
+
// First delete the contents seems to work better on WebKit when the selection spans multiple list items or multiple table cells.
|
744 |
+
if (!ed.selection.isCollapsed() && r.startContainer != r.endContainer)
|
745 |
+
ed.getDoc().execCommand('Delete', false, null);
|
746 |
+
|
747 |
+
ed.execCommand('mceInsertContent', false, h, {skip_undo : skip_undo});
|
748 |
+
},
|
749 |
+
|
750 |
+
/**
|
751 |
+
* Instead of the old plain text method which tried to re-create a paste operation, the
|
752 |
+
* new approach adds a plain text mode toggle switch that changes the behavior of paste.
|
753 |
+
* This function is passed the same input that the regular paste plugin produces.
|
754 |
+
* It performs additional scrubbing and produces (and inserts) the plain text.
|
755 |
+
* This approach leverages all of the great existing functionality in the paste
|
756 |
+
* plugin, and requires minimal changes to add the new functionality.
|
757 |
+
* Speednet - June 2009
|
758 |
+
*/
|
759 |
+
_insertPlainText : function(content) {
|
760 |
+
var ed = this.editor,
|
761 |
+
linebr = getParam(ed, "paste_text_linebreaktype"),
|
762 |
+
rl = getParam(ed, "paste_text_replacements"),
|
763 |
+
is = tinymce.is;
|
764 |
+
|
765 |
+
function process(items) {
|
766 |
+
each(items, function(v) {
|
767 |
+
if (v.constructor == RegExp)
|
768 |
+
content = content.replace(v, "");
|
769 |
+
else
|
770 |
+
content = content.replace(v[0], v[1]);
|
771 |
+
});
|
772 |
+
};
|
773 |
+
|
774 |
+
if ((typeof(content) === "string") && (content.length > 0)) {
|
775 |
+
// If HTML content with line-breaking tags, then remove all cr/lf chars because only tags will break a line
|
776 |
+
if (/<(?:p|br|h[1-6]|ul|ol|dl|table|t[rdh]|div|blockquote|fieldset|pre|address|center)[^>]*>/i.test(content)) {
|
777 |
+
process([
|
778 |
+
/[\n\r]+/g
|
779 |
+
]);
|
780 |
+
} else {
|
781 |
+
// Otherwise just get rid of carriage returns (only need linefeeds)
|
782 |
+
process([
|
783 |
+
/\r+/g
|
784 |
+
]);
|
785 |
+
}
|
786 |
+
|
787 |
+
process([
|
788 |
+
[/<\/(?:p|h[1-6]|ul|ol|dl|table|div|blockquote|fieldset|pre|address|center)>/gi, "\n\n"], // Block tags get a blank line after them
|
789 |
+
[/<br[^>]*>|<\/tr>/gi, "\n"], // Single linebreak for <br /> tags and table rows
|
790 |
+
[/<\/t[dh]>\s*<t[dh][^>]*>/gi, "\t"], // Table cells get tabs betweem them
|
791 |
+
/<[a-z!\/?][^>]*>/gi, // Delete all remaining tags
|
792 |
+
[/ /gi, " "], // Convert non-break spaces to regular spaces (remember, *plain text*)
|
793 |
+
[/(?:(?!\n)\s)*(\n+)(?:(?!\n)\s)*/gi, "$1"],// Cool little RegExp deletes whitespace around linebreak chars.
|
794 |
+
[/\n{3,}/g, "\n\n"] // Max. 2 consecutive linebreaks
|
795 |
+
]);
|
796 |
+
|
797 |
+
content = ed.dom.decode(tinymce.html.Entities.encodeRaw(content));
|
798 |
+
|
799 |
+
// Perform default or custom replacements
|
800 |
+
if (is(rl, "array")) {
|
801 |
+
process(rl);
|
802 |
+
} else if (is(rl, "string")) {
|
803 |
+
process(new RegExp(rl, "gi"));
|
804 |
+
}
|
805 |
+
|
806 |
+
// Treat paragraphs as specified in the config
|
807 |
+
if (linebr == "none") {
|
808 |
+
// Convert all line breaks to space
|
809 |
+
process([
|
810 |
+
[/\n+/g, " "]
|
811 |
+
]);
|
812 |
+
} else if (linebr == "br") {
|
813 |
+
// Convert all line breaks to <br />
|
814 |
+
process([
|
815 |
+
[/\n/g, "<br />"]
|
816 |
+
]);
|
817 |
+
} else if (linebr == "p") {
|
818 |
+
// Convert all line breaks to <p>...</p>
|
819 |
+
process([
|
820 |
+
[/\n+/g, "</p><p>"],
|
821 |
+
[/^(.*<\/p>)(<p>)$/, '<p>$1']
|
822 |
+
]);
|
823 |
+
} else {
|
824 |
+
// defaults to "combined"
|
825 |
+
// Convert single line breaks to <br /> and double line breaks to <p>...</p>
|
826 |
+
process([
|
827 |
+
[/\n\n/g, "</p><p>"],
|
828 |
+
[/^(.*<\/p>)(<p>)$/, '<p>$1'],
|
829 |
+
[/\n/g, "<br />"]
|
830 |
+
]);
|
831 |
+
}
|
832 |
+
|
833 |
+
ed.execCommand('mceInsertContent', false, content);
|
834 |
+
}
|
835 |
+
},
|
836 |
+
|
837 |
+
/**
|
838 |
+
* This method will open the old style paste dialogs. Some users might want the old behavior but still use the new cleanup engine.
|
839 |
+
*/
|
840 |
+
_legacySupport : function() {
|
841 |
+
var t = this, ed = t.editor;
|
842 |
+
|
843 |
+
// Register command(s) for backwards compatibility
|
844 |
+
ed.addCommand("mcePasteWord", function() {
|
845 |
+
ed.windowManager.open({
|
846 |
+
file: t.url + "/pasteword.htm",
|
847 |
+
width: parseInt(getParam(ed, "paste_dialog_width")),
|
848 |
+
height: parseInt(getParam(ed, "paste_dialog_height")),
|
849 |
+
inline: 1
|
850 |
+
});
|
851 |
+
});
|
852 |
+
|
853 |
+
if (getParam(ed, "paste_text_use_dialog")) {
|
854 |
+
ed.addCommand("mcePasteText", function() {
|
855 |
+
ed.windowManager.open({
|
856 |
+
file : t.url + "/pastetext.htm",
|
857 |
+
width: parseInt(getParam(ed, "paste_dialog_width")),
|
858 |
+
height: parseInt(getParam(ed, "paste_dialog_height")),
|
859 |
+
inline : 1
|
860 |
+
});
|
861 |
+
});
|
862 |
+
}
|
863 |
+
|
864 |
+
// Register button for backwards compatibility
|
865 |
+
ed.addButton("pasteword", {title : "paste.paste_word_desc", cmd : "mcePasteWord"});
|
866 |
+
}
|
867 |
+
});
|
868 |
+
|
869 |
+
// Register plugin
|
870 |
+
tinymce.PluginManager.add("paste", tinymce.plugins.PastePlugin);
|
871 |
+
})();
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/paste/js/pastetext.js
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
tinyMCEPopup.requireLangPack();
|
2 |
+
|
3 |
+
var PasteTextDialog = {
|
4 |
+
init : function() {
|
5 |
+
this.resize();
|
6 |
+
},
|
7 |
+
|
8 |
+
insert : function() {
|
9 |
+
var h = tinyMCEPopup.dom.encode(document.getElementById('content').value), lines;
|
10 |
+
|
11 |
+
// Convert linebreaks into paragraphs
|
12 |
+
if (document.getElementById('linebreaks').checked) {
|
13 |
+
lines = h.split(/\r?\n/);
|
14 |
+
if (lines.length > 1) {
|
15 |
+
h = '';
|
16 |
+
tinymce.each(lines, function(row) {
|
17 |
+
h += '<p>' + row + '</p>';
|
18 |
+
});
|
19 |
+
}
|
20 |
+
}
|
21 |
+
|
22 |
+
tinyMCEPopup.editor.execCommand('mceInsertClipboardContent', false, {content : h});
|
23 |
+
tinyMCEPopup.close();
|
24 |
+
},
|
25 |
+
|
26 |
+
resize : function() {
|
27 |
+
var vp = tinyMCEPopup.dom.getViewPort(window), el;
|
28 |
+
|
29 |
+
el = document.getElementById('content');
|
30 |
+
|
31 |
+
el.style.width = (vp.w - 20) + 'px';
|
32 |
+
el.style.height = (vp.h - 90) + 'px';
|
33 |
+
}
|
34 |
+
};
|
35 |
+
|
36 |
+
tinyMCEPopup.onInit.add(PasteTextDialog.init, PasteTextDialog);
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/paste/js/pasteword.js
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
tinyMCEPopup.requireLangPack();
|
2 |
+
|
3 |
+
var PasteWordDialog = {
|
4 |
+
init : function() {
|
5 |
+
var ed = tinyMCEPopup.editor, el = document.getElementById('iframecontainer'), ifr, doc, css, cssHTML = '';
|
6 |
+
|
7 |
+
// Create iframe
|
8 |
+
el.innerHTML = '<iframe id="iframe" src="javascript:\'\';" frameBorder="0" style="border: 1px solid gray"></iframe>';
|
9 |
+
ifr = document.getElementById('iframe');
|
10 |
+
doc = ifr.contentWindow.document;
|
11 |
+
|
12 |
+
// Force absolute CSS urls
|
13 |
+
css = [ed.baseURI.toAbsolute("themes/" + ed.settings.theme + "/skins/" + ed.settings.skin + "/content.css")];
|
14 |
+
css = css.concat(tinymce.explode(ed.settings.content_css) || []);
|
15 |
+
tinymce.each(css, function(u) {
|
16 |
+
cssHTML += '<link href="' + ed.documentBaseURI.toAbsolute('' + u) + '" rel="stylesheet" type="text/css" />';
|
17 |
+
});
|
18 |
+
|
19 |
+
// Write content into iframe
|
20 |
+
doc.open();
|
21 |
+
doc.write('<html><head>' + cssHTML + '</head><body class="mceContentBody" spellcheck="false"></body></html>');
|
22 |
+
doc.close();
|
23 |
+
|
24 |
+
doc.designMode = 'on';
|
25 |
+
this.resize();
|
26 |
+
|
27 |
+
window.setTimeout(function() {
|
28 |
+
ifr.contentWindow.focus();
|
29 |
+
}, 10);
|
30 |
+
},
|
31 |
+
|
32 |
+
insert : function() {
|
33 |
+
var h = document.getElementById('iframe').contentWindow.document.body.innerHTML;
|
34 |
+
|
35 |
+
tinyMCEPopup.editor.execCommand('mceInsertClipboardContent', false, {content : h, wordContent : true});
|
36 |
+
tinyMCEPopup.close();
|
37 |
+
},
|
38 |
+
|
39 |
+
resize : function() {
|
40 |
+
var vp = tinyMCEPopup.dom.getViewPort(window), el;
|
41 |
+
|
42 |
+
el = document.getElementById('iframe');
|
43 |
+
|
44 |
+
if (el) {
|
45 |
+
el.style.width = (vp.w - 20) + 'px';
|
46 |
+
el.style.height = (vp.h - 90) + 'px';
|
47 |
+
}
|
48 |
+
}
|
49 |
+
};
|
50 |
+
|
51 |
+
tinyMCEPopup.onInit.add(PasteWordDialog.init, PasteWordDialog);
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/paste/langs/en_dlg.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
tinyMCE.addI18n('en.paste_dlg',{"word_title":"Use Ctrl+V on your keyboard to paste the text into the window.","text_linebreaks":"Keep Linebreaks","text_title":"Use Ctrl+V on your keyboard to paste the text into the window."});
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/paste/pastetext.htm
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
2 |
+
<head>
|
3 |
+
<title>{#paste.paste_text_desc}</title>
|
4 |
+
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
5 |
+
<script type="text/javascript" src="js/pastetext.js"></script>
|
6 |
+
</head>
|
7 |
+
<body onresize="PasteTextDialog.resize();" style="display:none; overflow:hidden;">
|
8 |
+
<form name="source" onsubmit="return PasteTextDialog.insert();" action="#">
|
9 |
+
<div style="float: left" class="title">{#paste.paste_text_desc}</div>
|
10 |
+
|
11 |
+
<div style="float: right">
|
12 |
+
<input type="checkbox" name="linebreaks" id="linebreaks" class="wordWrapCode" checked="checked" /><label for="linebreaks">{#paste_dlg.text_linebreaks}</label>
|
13 |
+
</div>
|
14 |
+
|
15 |
+
<br style="clear: both" />
|
16 |
+
|
17 |
+
<div>{#paste_dlg.text_title}</div>
|
18 |
+
|
19 |
+
<textarea id="content" name="content" rows="15" cols="100" style="width: 100%; height: 100%; font-family: 'Courier New',Courier,mono; font-size: 12px;" dir="ltr" wrap="soft" class="mceFocus"></textarea>
|
20 |
+
|
21 |
+
<div class="mceActionPanel">
|
22 |
+
<input type="submit" name="insert" value="{#insert}" id="insert" />
|
23 |
+
<input type="button" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" id="cancel" />
|
24 |
+
</div>
|
25 |
+
</form>
|
26 |
+
</body>
|
27 |
+
</html>
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/paste/pasteword.htm
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
2 |
+
<head>
|
3 |
+
<title>{#paste.paste_word_desc}</title>
|
4 |
+
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
5 |
+
<script type="text/javascript" src="js/pasteword.js"></script>
|
6 |
+
</head>
|
7 |
+
<body onresize="PasteWordDialog.resize();" style="display:none; overflow:hidden;">
|
8 |
+
<form name="source" onsubmit="return PasteWordDialog.insert();" action="#">
|
9 |
+
<div class="title">{#paste.paste_word_desc}</div>
|
10 |
+
|
11 |
+
<div>{#paste_dlg.word_title}</div>
|
12 |
+
|
13 |
+
<div id="iframecontainer"></div>
|
14 |
+
|
15 |
+
<div class="mceActionPanel">
|
16 |
+
<input type="submit" id="insert" name="insert" value="{#insert}" />
|
17 |
+
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
18 |
+
</div>
|
19 |
+
</form>
|
20 |
+
</body>
|
21 |
+
</html>
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/preview/editor_plugin.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(function(){tinymce.create("tinymce.plugins.Preview",{init:function(a,b){var d=this,c=tinymce.explode(a.settings.content_css);d.editor=a;tinymce.each(c,function(f,e){c[e]=a.documentBaseURI.toAbsolute(f)});a.addCommand("mcePreview",function(){a.windowManager.open({file:a.getParam("plugin_preview_pageurl",b+"/preview.html"),width:parseInt(a.getParam("plugin_preview_width","550")),height:parseInt(a.getParam("plugin_preview_height","600")),resizable:"yes",scrollbars:"yes",popup_css:c?c.join(","):a.baseURI.toAbsolute("themes/"+a.settings.theme+"/skins/"+a.settings.skin+"/content.css"),inline:a.getParam("plugin_preview_inline",1)},{base:a.documentBaseURI.getURI()})});a.addButton("preview",{title:"preview.preview_desc",cmd:"mcePreview"})},getInfo:function(){return{longname:"Preview",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/preview",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("preview",tinymce.plugins.Preview)})();
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/preview/editor_plugin_src.js
ADDED
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
tinymce.create('tinymce.plugins.Preview', {
|
13 |
+
init : function(ed, url) {
|
14 |
+
var t = this, css = tinymce.explode(ed.settings.content_css);
|
15 |
+
|
16 |
+
t.editor = ed;
|
17 |
+
|
18 |
+
// Force absolute CSS urls
|
19 |
+
tinymce.each(css, function(u, k) {
|
20 |
+
css[k] = ed.documentBaseURI.toAbsolute(u);
|
21 |
+
});
|
22 |
+
|
23 |
+
ed.addCommand('mcePreview', function() {
|
24 |
+
ed.windowManager.open({
|
25 |
+
file : ed.getParam("plugin_preview_pageurl", url + "/preview.html"),
|
26 |
+
width : parseInt(ed.getParam("plugin_preview_width", "550")),
|
27 |
+
height : parseInt(ed.getParam("plugin_preview_height", "600")),
|
28 |
+
resizable : "yes",
|
29 |
+
scrollbars : "yes",
|
30 |
+
popup_css : css ? css.join(',') : ed.baseURI.toAbsolute("themes/" + ed.settings.theme + "/skins/" + ed.settings.skin + "/content.css"),
|
31 |
+
inline : ed.getParam("plugin_preview_inline", 1)
|
32 |
+
}, {
|
33 |
+
base : ed.documentBaseURI.getURI()
|
34 |
+
});
|
35 |
+
});
|
36 |
+
|
37 |
+
ed.addButton('preview', {title : 'preview.preview_desc', cmd : 'mcePreview'});
|
38 |
+
},
|
39 |
+
|
40 |
+
getInfo : function() {
|
41 |
+
return {
|
42 |
+
longname : 'Preview',
|
43 |
+
author : 'Moxiecode Systems AB',
|
44 |
+
authorurl : 'http://tinymce.moxiecode.com',
|
45 |
+
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/preview',
|
46 |
+
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
47 |
+
};
|
48 |
+
}
|
49 |
+
});
|
50 |
+
|
51 |
+
// Register plugin
|
52 |
+
tinymce.PluginManager.add('preview', tinymce.plugins.Preview);
|
53 |
+
})();
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/preview/example.html
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
2 |
+
<head>
|
3 |
+
<script language="javascript" src="../../tiny_mce_popup.js"></script>
|
4 |
+
<script type="text/javascript" src="jscripts/embed.js"></script>
|
5 |
+
<script type="text/javascript">
|
6 |
+
tinyMCEPopup.onInit.add(function(ed) {
|
7 |
+
var dom = tinyMCEPopup.dom;
|
8 |
+
|
9 |
+
// Load editor content_css
|
10 |
+
tinymce.each(ed.settings.content_css.split(','), function(u) {
|
11 |
+
dom.loadCSS(ed.documentBaseURI.toAbsolute(u));
|
12 |
+
});
|
13 |
+
|
14 |
+
// Place contents inside div container
|
15 |
+
dom.setHTML('content', ed.getContent());
|
16 |
+
});
|
17 |
+
</script>
|
18 |
+
<title>Example of a custom preview page</title>
|
19 |
+
</head>
|
20 |
+
<body>
|
21 |
+
|
22 |
+
Editor contents: <br />
|
23 |
+
<div id="content">
|
24 |
+
<!-- Gets filled with editor contents -->
|
25 |
+
</div>
|
26 |
+
|
27 |
+
</body>
|
28 |
+
</html>
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/preview/jscripts/embed.js
ADDED
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* This script contains embed functions for common plugins. This scripts are complety free to use for any purpose.
|
3 |
+
*/
|
4 |
+
|
5 |
+
function writeFlash(p) {
|
6 |
+
writeEmbed(
|
7 |
+
'D27CDB6E-AE6D-11cf-96B8-444553540000',
|
8 |
+
'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0',
|
9 |
+
'application/x-shockwave-flash',
|
10 |
+
p
|
11 |
+
);
|
12 |
+
}
|
13 |
+
|
14 |
+
function writeShockWave(p) {
|
15 |
+
writeEmbed(
|
16 |
+
'166B1BCA-3F9C-11CF-8075-444553540000',
|
17 |
+
'http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0',
|
18 |
+
'application/x-director',
|
19 |
+
p
|
20 |
+
);
|
21 |
+
}
|
22 |
+
|
23 |
+
function writeQuickTime(p) {
|
24 |
+
writeEmbed(
|
25 |
+
'02BF25D5-8C17-4B23-BC80-D3488ABDDC6B',
|
26 |
+
'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0',
|
27 |
+
'video/quicktime',
|
28 |
+
p
|
29 |
+
);
|
30 |
+
}
|
31 |
+
|
32 |
+
function writeRealMedia(p) {
|
33 |
+
writeEmbed(
|
34 |
+
'CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA',
|
35 |
+
'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0',
|
36 |
+
'audio/x-pn-realaudio-plugin',
|
37 |
+
p
|
38 |
+
);
|
39 |
+
}
|
40 |
+
|
41 |
+
function writeWindowsMedia(p) {
|
42 |
+
p.url = p.src;
|
43 |
+
writeEmbed(
|
44 |
+
'6BF52A52-394A-11D3-B153-00C04F79FAA6',
|
45 |
+
'http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701',
|
46 |
+
'application/x-mplayer2',
|
47 |
+
p
|
48 |
+
);
|
49 |
+
}
|
50 |
+
|
51 |
+
function writeEmbed(cls, cb, mt, p) {
|
52 |
+
var h = '', n;
|
53 |
+
|
54 |
+
h += '<object classid="clsid:' + cls + '" codebase="' + cb + '"';
|
55 |
+
h += typeof(p.id) != "undefined" ? 'id="' + p.id + '"' : '';
|
56 |
+
h += typeof(p.name) != "undefined" ? 'name="' + p.name + '"' : '';
|
57 |
+
h += typeof(p.width) != "undefined" ? 'width="' + p.width + '"' : '';
|
58 |
+
h += typeof(p.height) != "undefined" ? 'height="' + p.height + '"' : '';
|
59 |
+
h += typeof(p.align) != "undefined" ? 'align="' + p.align + '"' : '';
|
60 |
+
h += '>';
|
61 |
+
|
62 |
+
for (n in p)
|
63 |
+
h += '<param name="' + n + '" value="' + p[n] + '">';
|
64 |
+
|
65 |
+
h += '<embed type="' + mt + '"';
|
66 |
+
|
67 |
+
for (n in p)
|
68 |
+
h += n + '="' + p[n] + '" ';
|
69 |
+
|
70 |
+
h += '></embed></object>';
|
71 |
+
|
72 |
+
document.write(h);
|
73 |
+
}
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/preview/preview.html
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2 |
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
+
<head>
|
4 |
+
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
5 |
+
<script type="text/javascript" src="jscripts/embed.js"></script>
|
6 |
+
<script type="text/javascript"><!--
|
7 |
+
document.write('<base href="' + tinyMCEPopup.getWindowArg("base") + '">');
|
8 |
+
// -->
|
9 |
+
</script>
|
10 |
+
<title>{#preview.preview_desc}</title>
|
11 |
+
</head>
|
12 |
+
<body id="content">
|
13 |
+
<script type="text/javascript">
|
14 |
+
document.write(tinyMCEPopup.editor.getContent());
|
15 |
+
</script>
|
16 |
+
</body>
|
17 |
+
</html>
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/print/editor_plugin.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(function(){tinymce.create("tinymce.plugins.Print",{init:function(a,b){a.addCommand("mcePrint",function(){a.getWin().print()});a.addButton("print",{title:"print.print_desc",cmd:"mcePrint"})},getInfo:function(){return{longname:"Print",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/print",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("print",tinymce.plugins.Print)})();
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/print/editor_plugin_src.js
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
tinymce.create('tinymce.plugins.Print', {
|
13 |
+
init : function(ed, url) {
|
14 |
+
ed.addCommand('mcePrint', function() {
|
15 |
+
ed.getWin().print();
|
16 |
+
});
|
17 |
+
|
18 |
+
ed.addButton('print', {title : 'print.print_desc', cmd : 'mcePrint'});
|
19 |
+
},
|
20 |
+
|
21 |
+
getInfo : function() {
|
22 |
+
return {
|
23 |
+
longname : 'Print',
|
24 |
+
author : 'Moxiecode Systems AB',
|
25 |
+
authorurl : 'http://tinymce.moxiecode.com',
|
26 |
+
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/print',
|
27 |
+
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
28 |
+
};
|
29 |
+
}
|
30 |
+
});
|
31 |
+
|
32 |
+
// Register plugin
|
33 |
+
tinymce.PluginManager.add('print', tinymce.plugins.Print);
|
34 |
+
})();
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/save/editor_plugin.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(function(){tinymce.create("tinymce.plugins.Save",{init:function(a,b){var c=this;c.editor=a;a.addCommand("mceSave",c._save,c);a.addCommand("mceCancel",c._cancel,c);a.addButton("save",{title:"save.save_desc",cmd:"mceSave"});a.addButton("cancel",{title:"save.cancel_desc",cmd:"mceCancel"});a.onNodeChange.add(c._nodeChange,c);a.addShortcut("ctrl+s",a.getLang("save.save_desc"),"mceSave")},getInfo:function(){return{longname:"Save",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/save",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_nodeChange:function(b,a,c){var b=this.editor;if(b.getParam("save_enablewhendirty")){a.setDisabled("save",!b.isDirty());a.setDisabled("cancel",!b.isDirty())}},_save:function(){var c=this.editor,a,e,d,b;a=tinymce.DOM.get(c.id).form||tinymce.DOM.getParent(c.id,"form");if(c.getParam("save_enablewhendirty")&&!c.isDirty()){return}tinyMCE.triggerSave();if(e=c.getParam("save_onsavecallback")){if(c.execCallback("save_onsavecallback",c)){c.startContent=tinymce.trim(c.getContent({format:"raw"}));c.nodeChanged()}return}if(a){c.isNotDirty=true;if(a.onsubmit==null||a.onsubmit()!=false){a.submit()}c.nodeChanged()}else{c.windowManager.alert("Error: No form element found.")}},_cancel:function(){var a=this.editor,c,b=tinymce.trim(a.startContent);if(c=a.getParam("save_oncancelcallback")){a.execCallback("save_oncancelcallback",a);return}a.setContent(b);a.undoManager.clear();a.nodeChanged()}});tinymce.PluginManager.add("save",tinymce.plugins.Save)})();
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/save/editor_plugin_src.js
ADDED
@@ -0,0 +1,101 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
tinymce.create('tinymce.plugins.Save', {
|
13 |
+
init : function(ed, url) {
|
14 |
+
var t = this;
|
15 |
+
|
16 |
+
t.editor = ed;
|
17 |
+
|
18 |
+
// Register commands
|
19 |
+
ed.addCommand('mceSave', t._save, t);
|
20 |
+
ed.addCommand('mceCancel', t._cancel, t);
|
21 |
+
|
22 |
+
// Register buttons
|
23 |
+
ed.addButton('save', {title : 'save.save_desc', cmd : 'mceSave'});
|
24 |
+
ed.addButton('cancel', {title : 'save.cancel_desc', cmd : 'mceCancel'});
|
25 |
+
|
26 |
+
ed.onNodeChange.add(t._nodeChange, t);
|
27 |
+
ed.addShortcut('ctrl+s', ed.getLang('save.save_desc'), 'mceSave');
|
28 |
+
},
|
29 |
+
|
30 |
+
getInfo : function() {
|
31 |
+
return {
|
32 |
+
longname : 'Save',
|
33 |
+
author : 'Moxiecode Systems AB',
|
34 |
+
authorurl : 'http://tinymce.moxiecode.com',
|
35 |
+
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/save',
|
36 |
+
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
37 |
+
};
|
38 |
+
},
|
39 |
+
|
40 |
+
// Private methods
|
41 |
+
|
42 |
+
_nodeChange : function(ed, cm, n) {
|
43 |
+
var ed = this.editor;
|
44 |
+
|
45 |
+
if (ed.getParam('save_enablewhendirty')) {
|
46 |
+
cm.setDisabled('save', !ed.isDirty());
|
47 |
+
cm.setDisabled('cancel', !ed.isDirty());
|
48 |
+
}
|
49 |
+
},
|
50 |
+
|
51 |
+
// Private methods
|
52 |
+
|
53 |
+
_save : function() {
|
54 |
+
var ed = this.editor, formObj, os, i, elementId;
|
55 |
+
|
56 |
+
formObj = tinymce.DOM.get(ed.id).form || tinymce.DOM.getParent(ed.id, 'form');
|
57 |
+
|
58 |
+
if (ed.getParam("save_enablewhendirty") && !ed.isDirty())
|
59 |
+
return;
|
60 |
+
|
61 |
+
tinyMCE.triggerSave();
|
62 |
+
|
63 |
+
// Use callback instead
|
64 |
+
if (os = ed.getParam("save_onsavecallback")) {
|
65 |
+
if (ed.execCallback('save_onsavecallback', ed)) {
|
66 |
+
ed.startContent = tinymce.trim(ed.getContent({format : 'raw'}));
|
67 |
+
ed.nodeChanged();
|
68 |
+
}
|
69 |
+
|
70 |
+
return;
|
71 |
+
}
|
72 |
+
|
73 |
+
if (formObj) {
|
74 |
+
ed.isNotDirty = true;
|
75 |
+
|
76 |
+
if (formObj.onsubmit == null || formObj.onsubmit() != false)
|
77 |
+
formObj.submit();
|
78 |
+
|
79 |
+
ed.nodeChanged();
|
80 |
+
} else
|
81 |
+
ed.windowManager.alert("Error: No form element found.");
|
82 |
+
},
|
83 |
+
|
84 |
+
_cancel : function() {
|
85 |
+
var ed = this.editor, os, h = tinymce.trim(ed.startContent);
|
86 |
+
|
87 |
+
// Use callback instead
|
88 |
+
if (os = ed.getParam("save_oncancelcallback")) {
|
89 |
+
ed.execCallback('save_oncancelcallback', ed);
|
90 |
+
return;
|
91 |
+
}
|
92 |
+
|
93 |
+
ed.setContent(h);
|
94 |
+
ed.undoManager.clear();
|
95 |
+
ed.nodeChanged();
|
96 |
+
}
|
97 |
+
});
|
98 |
+
|
99 |
+
// Register plugin
|
100 |
+
tinymce.PluginManager.add('save', tinymce.plugins.Save);
|
101 |
+
})();
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/searchreplace/css/searchreplace.css
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.panel_wrapper {height:85px;}
|
2 |
+
.panel_wrapper div.current {height:85px;}
|
3 |
+
|
4 |
+
/* IE */
|
5 |
+
* html .panel_wrapper {height:100px;}
|
6 |
+
* html .panel_wrapper div.current {height:100px;}
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/searchreplace/editor_plugin.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(function(){tinymce.create("tinymce.plugins.SearchReplacePlugin",{init:function(a,c){function b(d){window.focus();a.windowManager.open({file:c+"/searchreplace.htm",width:420+parseInt(a.getLang("searchreplace.delta_width",0)),height:170+parseInt(a.getLang("searchreplace.delta_height",0)),inline:1,auto_focus:0},{mode:d,search_string:a.selection.getContent({format:"text"}),plugin_url:c})}a.addCommand("mceSearch",function(){b("search")});a.addCommand("mceReplace",function(){b("replace")});a.addButton("search",{title:"searchreplace.search_desc",cmd:"mceSearch"});a.addButton("replace",{title:"searchreplace.replace_desc",cmd:"mceReplace"});a.addShortcut("ctrl+f","searchreplace.search_desc","mceSearch")},getInfo:function(){return{longname:"Search/Replace",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/searchreplace",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("searchreplace",tinymce.plugins.SearchReplacePlugin)})();
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/searchreplace/editor_plugin_src.js
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
tinymce.create('tinymce.plugins.SearchReplacePlugin', {
|
13 |
+
init : function(ed, url) {
|
14 |
+
function open(m) {
|
15 |
+
// Keep IE from writing out the f/r character to the editor
|
16 |
+
// instance while initializing a new dialog. See: #3131190
|
17 |
+
window.focus();
|
18 |
+
|
19 |
+
ed.windowManager.open({
|
20 |
+
file : url + '/searchreplace.htm',
|
21 |
+
width : 420 + parseInt(ed.getLang('searchreplace.delta_width', 0)),
|
22 |
+
height : 170 + parseInt(ed.getLang('searchreplace.delta_height', 0)),
|
23 |
+
inline : 1,
|
24 |
+
auto_focus : 0
|
25 |
+
}, {
|
26 |
+
mode : m,
|
27 |
+
search_string : ed.selection.getContent({format : 'text'}),
|
28 |
+
plugin_url : url
|
29 |
+
});
|
30 |
+
};
|
31 |
+
|
32 |
+
// Register commands
|
33 |
+
ed.addCommand('mceSearch', function() {
|
34 |
+
open('search');
|
35 |
+
});
|
36 |
+
|
37 |
+
ed.addCommand('mceReplace', function() {
|
38 |
+
open('replace');
|
39 |
+
});
|
40 |
+
|
41 |
+
// Register buttons
|
42 |
+
ed.addButton('search', {title : 'searchreplace.search_desc', cmd : 'mceSearch'});
|
43 |
+
ed.addButton('replace', {title : 'searchreplace.replace_desc', cmd : 'mceReplace'});
|
44 |
+
|
45 |
+
ed.addShortcut('ctrl+f', 'searchreplace.search_desc', 'mceSearch');
|
46 |
+
},
|
47 |
+
|
48 |
+
getInfo : function() {
|
49 |
+
return {
|
50 |
+
longname : 'Search/Replace',
|
51 |
+
author : 'Moxiecode Systems AB',
|
52 |
+
authorurl : 'http://tinymce.moxiecode.com',
|
53 |
+
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/searchreplace',
|
54 |
+
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
55 |
+
};
|
56 |
+
}
|
57 |
+
});
|
58 |
+
|
59 |
+
// Register plugin
|
60 |
+
tinymce.PluginManager.add('searchreplace', tinymce.plugins.SearchReplacePlugin);
|
61 |
+
})();
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/searchreplace/js/searchreplace.js
ADDED
@@ -0,0 +1,142 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
tinyMCEPopup.requireLangPack();
|
2 |
+
|
3 |
+
var SearchReplaceDialog = {
|
4 |
+
init : function(ed) {
|
5 |
+
var t = this, f = document.forms[0], m = tinyMCEPopup.getWindowArg("mode");
|
6 |
+
|
7 |
+
t.switchMode(m);
|
8 |
+
|
9 |
+
f[m + '_panel_searchstring'].value = tinyMCEPopup.getWindowArg("search_string");
|
10 |
+
|
11 |
+
// Focus input field
|
12 |
+
f[m + '_panel_searchstring'].focus();
|
13 |
+
|
14 |
+
mcTabs.onChange.add(function(tab_id, panel_id) {
|
15 |
+
t.switchMode(tab_id.substring(0, tab_id.indexOf('_')));
|
16 |
+
});
|
17 |
+
},
|
18 |
+
|
19 |
+
switchMode : function(m) {
|
20 |
+
var f, lm = this.lastMode;
|
21 |
+
|
22 |
+
if (lm != m) {
|
23 |
+
f = document.forms[0];
|
24 |
+
|
25 |
+
if (lm) {
|
26 |
+
f[m + '_panel_searchstring'].value = f[lm + '_panel_searchstring'].value;
|
27 |
+
f[m + '_panel_backwardsu'].checked = f[lm + '_panel_backwardsu'].checked;
|
28 |
+
f[m + '_panel_backwardsd'].checked = f[lm + '_panel_backwardsd'].checked;
|
29 |
+
f[m + '_panel_casesensitivebox'].checked = f[lm + '_panel_casesensitivebox'].checked;
|
30 |
+
}
|
31 |
+
|
32 |
+
mcTabs.displayTab(m + '_tab', m + '_panel');
|
33 |
+
document.getElementById("replaceBtn").style.display = (m == "replace") ? "inline" : "none";
|
34 |
+
document.getElementById("replaceAllBtn").style.display = (m == "replace") ? "inline" : "none";
|
35 |
+
this.lastMode = m;
|
36 |
+
}
|
37 |
+
},
|
38 |
+
|
39 |
+
searchNext : function(a) {
|
40 |
+
var ed = tinyMCEPopup.editor, se = ed.selection, r = se.getRng(), f, m = this.lastMode, s, b, fl = 0, w = ed.getWin(), wm = ed.windowManager, fo = 0;
|
41 |
+
|
42 |
+
// Get input
|
43 |
+
f = document.forms[0];
|
44 |
+
s = f[m + '_panel_searchstring'].value;
|
45 |
+
b = f[m + '_panel_backwardsu'].checked;
|
46 |
+
ca = f[m + '_panel_casesensitivebox'].checked;
|
47 |
+
rs = f['replace_panel_replacestring'].value;
|
48 |
+
|
49 |
+
if (tinymce.isIE) {
|
50 |
+
r = ed.getDoc().selection.createRange();
|
51 |
+
}
|
52 |
+
|
53 |
+
if (s == '')
|
54 |
+
return;
|
55 |
+
|
56 |
+
function fix() {
|
57 |
+
// Correct Firefox graphics glitches
|
58 |
+
// TODO: Verify if this is actually needed any more, maybe it was for very old FF versions?
|
59 |
+
r = se.getRng().cloneRange();
|
60 |
+
ed.getDoc().execCommand('SelectAll', false, null);
|
61 |
+
se.setRng(r);
|
62 |
+
};
|
63 |
+
|
64 |
+
function replace() {
|
65 |
+
ed.selection.setContent(rs); // Needs to be duplicated due to selection bug in IE
|
66 |
+
};
|
67 |
+
|
68 |
+
// IE flags
|
69 |
+
if (ca)
|
70 |
+
fl = fl | 4;
|
71 |
+
|
72 |
+
switch (a) {
|
73 |
+
case 'all':
|
74 |
+
// Move caret to beginning of text
|
75 |
+
ed.execCommand('SelectAll');
|
76 |
+
ed.selection.collapse(true);
|
77 |
+
|
78 |
+
if (tinymce.isIE) {
|
79 |
+
ed.focus();
|
80 |
+
r = ed.getDoc().selection.createRange();
|
81 |
+
|
82 |
+
while (r.findText(s, b ? -1 : 1, fl)) {
|
83 |
+
r.scrollIntoView();
|
84 |
+
r.select();
|
85 |
+
replace();
|
86 |
+
fo = 1;
|
87 |
+
|
88 |
+
if (b) {
|
89 |
+
r.moveEnd("character", -(rs.length)); // Otherwise will loop forever
|
90 |
+
}
|
91 |
+
}
|
92 |
+
|
93 |
+
tinyMCEPopup.storeSelection();
|
94 |
+
} else {
|
95 |
+
while (w.find(s, ca, b, false, false, false, false)) {
|
96 |
+
replace();
|
97 |
+
fo = 1;
|
98 |
+
}
|
99 |
+
}
|
100 |
+
|
101 |
+
if (fo)
|
102 |
+
tinyMCEPopup.alert(ed.getLang('searchreplace_dlg.allreplaced'));
|
103 |
+
else
|
104 |
+
tinyMCEPopup.alert(ed.getLang('searchreplace_dlg.notfound'));
|
105 |
+
|
106 |
+
return;
|
107 |
+
|
108 |
+
case 'current':
|
109 |
+
if (!ed.selection.isCollapsed())
|
110 |
+
replace();
|
111 |
+
|
112 |
+
break;
|
113 |
+
}
|
114 |
+
|
115 |
+
se.collapse(b);
|
116 |
+
r = se.getRng();
|
117 |
+
|
118 |
+
// Whats the point
|
119 |
+
if (!s)
|
120 |
+
return;
|
121 |
+
|
122 |
+
if (tinymce.isIE) {
|
123 |
+
ed.focus();
|
124 |
+
r = ed.getDoc().selection.createRange();
|
125 |
+
|
126 |
+
if (r.findText(s, b ? -1 : 1, fl)) {
|
127 |
+
r.scrollIntoView();
|
128 |
+
r.select();
|
129 |
+
} else
|
130 |
+
tinyMCEPopup.alert(ed.getLang('searchreplace_dlg.notfound'));
|
131 |
+
|
132 |
+
tinyMCEPopup.storeSelection();
|
133 |
+
} else {
|
134 |
+
if (!w.find(s, ca, b, false, false, false, false))
|
135 |
+
tinyMCEPopup.alert(ed.getLang('searchreplace_dlg.notfound'));
|
136 |
+
else
|
137 |
+
fix();
|
138 |
+
}
|
139 |
+
}
|
140 |
+
};
|
141 |
+
|
142 |
+
tinyMCEPopup.onInit.add(SearchReplaceDialog.init, SearchReplaceDialog);
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/searchreplace/langs/en_dlg.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
tinyMCE.addI18n('en.searchreplace_dlg',{findwhat:"Find What",replacewith:"Replace with",direction:"Direction",up:"Up",down:"Down",mcase:"Match Case",findnext:"Find Next",allreplaced:"All occurrences of the search string were replaced.","searchnext_desc":"Find Again",notfound:"The search has been completed. The search string could not be found.","search_title":"Find","replace_title":"Find/Replace",replaceall:"Replace All",replace:"Replace"});
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/searchreplace/searchreplace.htm
ADDED
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2 |
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
+
<head>
|
4 |
+
<title>{#searchreplace_dlg.replace_title}</title>
|
5 |
+
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
6 |
+
<script type="text/javascript" src="../../utils/mctabs.js"></script>
|
7 |
+
<script type="text/javascript" src="../../utils/form_utils.js"></script>
|
8 |
+
<script type="text/javascript" src="js/searchreplace.js"></script>
|
9 |
+
<link rel="stylesheet" type="text/css" href="css/searchreplace.css" />
|
10 |
+
</head>
|
11 |
+
<body style="display:none;" role="application" aria-labelledby="app_title">
|
12 |
+
<span id="app_title" style="display:none">{#searchreplace_dlg.replace_title}</span>
|
13 |
+
<form onsubmit="SearchReplaceDialog.searchNext('none');return false;" action="#">
|
14 |
+
<div class="tabs">
|
15 |
+
<ul>
|
16 |
+
<li id="search_tab" aria-controls="search_panel"><span><a href="javascript:SearchReplaceDialog.switchMode('search');" onmousedown="return false;">{#searchreplace.search_desc}</a></span></li>
|
17 |
+
<li id="replace_tab" aria-controls="replace_panel"><span><a href="javascript:SearchReplaceDialog.switchMode('replace');" onmousedown="return false;">{#searchreplace_dlg.replace}</a></span></li>
|
18 |
+
</ul>
|
19 |
+
</div>
|
20 |
+
|
21 |
+
<div class="panel_wrapper">
|
22 |
+
<div id="search_panel" class="panel">
|
23 |
+
<table role="presentation" border="0" cellspacing="0" cellpadding="2">
|
24 |
+
<tr>
|
25 |
+
<td><label for="search_panel_searchstring">{#searchreplace_dlg.findwhat}</label></td>
|
26 |
+
<td><input type="text" id="search_panel_searchstring" name="search_panel_searchstring" style="width: 200px" aria-required="true" /></td>
|
27 |
+
</tr>
|
28 |
+
<tr>
|
29 |
+
<td colspan="2">
|
30 |
+
<table role="presentation" border="0" cellspacing="0" cellpadding="0" class="direction">
|
31 |
+
<tr role="group" aria-labelledby="search_panel_backwards_label">
|
32 |
+
<td><label id="search_panel_backwards_label">{#searchreplace_dlg.direction}</label></td>
|
33 |
+
<td><input id="search_panel_backwardsu" name="search_panel_backwards" class="radio" type="radio" /></td>
|
34 |
+
<td><label for="search_panel_backwardsu">{#searchreplace_dlg.up}</label></td>
|
35 |
+
<td><input id="search_panel_backwardsd" name="search_panel_backwards" class="radio" type="radio" checked="checked" /></td>
|
36 |
+
<td><label for="search_panel_backwardsd">{#searchreplace_dlg.down}</label></td>
|
37 |
+
</tr>
|
38 |
+
</table>
|
39 |
+
</td>
|
40 |
+
</tr>
|
41 |
+
<tr>
|
42 |
+
<td colspan="2">
|
43 |
+
<table role="presentation" border="0" cellspacing="0" cellpadding="0">
|
44 |
+
<tr>
|
45 |
+
<td><input id="search_panel_casesensitivebox" name="search_panel_casesensitivebox" class="checkbox" type="checkbox" /></td>
|
46 |
+
<td><label for="search_panel_casesensitivebox">{#searchreplace_dlg.mcase}</label></td>
|
47 |
+
</tr>
|
48 |
+
</table>
|
49 |
+
</td>
|
50 |
+
</tr>
|
51 |
+
</table>
|
52 |
+
</div>
|
53 |
+
|
54 |
+
<div id="replace_panel" class="panel">
|
55 |
+
<table role="presentation" border="0" cellspacing="0" cellpadding="2">
|
56 |
+
<tr>
|
57 |
+
<td><label for="replace_panel_searchstring">{#searchreplace_dlg.findwhat}</label></td>
|
58 |
+
<td><input type="text" id="replace_panel_searchstring" name="replace_panel_searchstring" style="width: 200px" aria-required="true" /></td>
|
59 |
+
</tr>
|
60 |
+
<tr>
|
61 |
+
<td><label for="replace_panel_replacestring">{#searchreplace_dlg.replacewith}</label></td>
|
62 |
+
<td><input type="text" id="replace_panel_replacestring" name="replace_panel_replacestring" style="width: 200px" aria-required="true" /></td>
|
63 |
+
</tr>
|
64 |
+
<tr>
|
65 |
+
<td colspan="2">
|
66 |
+
<table role="presentation" border="0" cellspacing="0" cellpadding="0" class="direction">
|
67 |
+
<tr role="group" aria-labelledby="replace_panel_dir_label">
|
68 |
+
<td><label id="replace_panel_dir_label">{#searchreplace_dlg.direction}</label></td>
|
69 |
+
<td><input id="replace_panel_backwardsu" name="replace_panel_backwards" class="radio" type="radio" /></td>
|
70 |
+
<td><label for="replace_panel_backwardsu">{#searchreplace_dlg.up}</label></td>
|
71 |
+
<td><input id="replace_panel_backwardsd" name="replace_panel_backwards" class="radio" type="radio" checked="checked" /></td>
|
72 |
+
<td><label for="replace_panel_backwardsd">{#searchreplace_dlg.down}</label></td>
|
73 |
+
</tr>
|
74 |
+
</table>
|
75 |
+
</td>
|
76 |
+
</tr>
|
77 |
+
<tr>
|
78 |
+
<td colspan="2">
|
79 |
+
<table role="presentation" border="0" cellspacing="0" cellpadding="0">
|
80 |
+
<tr>
|
81 |
+
<td><input id="replace_panel_casesensitivebox" name="replace_panel_casesensitivebox" class="checkbox" type="checkbox" /></td>
|
82 |
+
<td><label for="replace_panel_casesensitivebox">{#searchreplace_dlg.mcase}</label></td>
|
83 |
+
</tr>
|
84 |
+
</table>
|
85 |
+
</td>
|
86 |
+
</tr>
|
87 |
+
</table>
|
88 |
+
</div>
|
89 |
+
|
90 |
+
</div>
|
91 |
+
|
92 |
+
<div class="mceActionPanel">
|
93 |
+
<input type="submit" id="insert" name="insert" value="{#searchreplace_dlg.findnext}" />
|
94 |
+
<input type="button" class="button" id="replaceBtn" name="replaceBtn" value="{#searchreplace_dlg.replace}" onclick="SearchReplaceDialog.searchNext('current');" />
|
95 |
+
<input type="button" class="button" id="replaceAllBtn" name="replaceAllBtn" value="{#searchreplace_dlg.replaceall}" onclick="SearchReplaceDialog.searchNext('all');" />
|
96 |
+
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
97 |
+
</div>
|
98 |
+
</form>
|
99 |
+
</body>
|
100 |
+
</html>
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/spellchecker/css/content.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.mceItemHiddenSpellWord {background:url(../img/wline.gif) repeat-x bottom left; cursor:default;}
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/spellchecker/editor_plugin.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(function(){var a=tinymce.util.JSONRequest,c=tinymce.each,b=tinymce.DOM;tinymce.create("tinymce.plugins.SpellcheckerPlugin",{getInfo:function(){return{longname:"Spellchecker",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker",version:tinymce.majorVersion+"."+tinymce.minorVersion}},init:function(e,f){var g=this,d;g.url=f;g.editor=e;g.rpcUrl=e.getParam("spellchecker_rpc_url","{backend}");if(g.rpcUrl=="{backend}"){if(tinymce.isIE){return}g.hasSupport=true;e.onContextMenu.addToTop(function(h,i){if(g.active){return false}})}e.addCommand("mceSpellCheck",function(){if(g.rpcUrl=="{backend}"){g.editor.getBody().spellcheck=g.active=!g.active;return}if(!g.active){e.setProgressState(1);g._sendRPC("checkWords",[g.selectedLang,g._getWords()],function(h){if(h.length>0){g.active=1;g._markWords(h);e.setProgressState(0);e.nodeChanged()}else{e.setProgressState(0);if(e.getParam("spellchecker_report_no_misspellings",true)){e.windowManager.alert("spellchecker.no_mpell")}}})}else{g._done()}});if(e.settings.content_css!==false){e.contentCSS.push(f+"/css/content.css")}e.onClick.add(g._showMenu,g);e.onContextMenu.add(g._showMenu,g);e.onBeforeGetContent.add(function(){if(g.active){g._removeWords()}});e.onNodeChange.add(function(i,h){h.setActive("spellchecker",g.active)});e.onSetContent.add(function(){g._done()});e.onBeforeGetContent.add(function(){g._done()});e.onBeforeExecCommand.add(function(h,i){if(i=="mceFullScreen"){g._done()}});g.languages={};c(e.getParam("spellchecker_languages","+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv","hash"),function(i,h){if(h.indexOf("+")===0){h=h.substring(1);g.selectedLang=i}g.languages[h]=i})},createControl:function(h,d){var f=this,g,e=f.editor;if(h=="spellchecker"){if(f.rpcUrl=="{backend}"){if(f.hasSupport){g=d.createButton(h,{title:"spellchecker.desc",cmd:"mceSpellCheck",scope:f})}return g}g=d.createSplitButton(h,{title:"spellchecker.desc",cmd:"mceSpellCheck",scope:f});g.onRenderMenu.add(function(j,i){i.add({title:"spellchecker.langs","class":"mceMenuItemTitle"}).setDisabled(1);c(f.languages,function(n,m){var p={icon:1},l;p.onclick=function(){if(n==f.selectedLang){return}l.setSelected(1);f.selectedItem.setSelected(0);f.selectedItem=l;f.selectedLang=n};p.title=m;l=i.add(p);l.setSelected(n==f.selectedLang);if(n==f.selectedLang){f.selectedItem=l}})});return g}},_walk:function(i,g){var h=this.editor.getDoc(),e;if(h.createTreeWalker){e=h.createTreeWalker(i,NodeFilter.SHOW_TEXT,null,false);while((i=e.nextNode())!=null){g.call(this,i)}}else{tinymce.walk(i,g,"childNodes")}},_getSeparators:function(){var e="",d,f=this.editor.getParam("spellchecker_word_separator_chars",'\\s!"#$%&()*+,-./:;<=>?@[]^_{|}����������������\u201d\u201c');for(d=0;d<f.length;d++){e+="\\"+f.charAt(d)}return e},_getWords:function(){var e=this.editor,g=[],d="",f={},h=[];this._walk(e.getBody(),function(i){if(i.nodeType==3){d+=i.nodeValue+" "}});if(e.getParam("spellchecker_word_pattern")){h=d.match("("+e.getParam("spellchecker_word_pattern")+")","gi")}else{d=d.replace(new RegExp("([0-9]|["+this._getSeparators()+"])","g")," ");d=tinymce.trim(d.replace(/(\s+)/g," "));h=d.split(" ")}c(h,function(i){if(!f[i]){g.push(i);f[i]=1}});return g},_removeWords:function(d){var e=this.editor,h=e.dom,g=e.selection,f=g.getRng(true);c(h.select("span").reverse(),function(i){if(i&&(h.hasClass(i,"mceItemHiddenSpellWord")||h.hasClass(i,"mceItemHidden"))){if(!d||h.decode(i.innerHTML)==d){h.remove(i,1)}}});g.setRng(f)},_markWords:function(l){var h=this.editor,g=h.dom,j=h.getDoc(),i=h.selection,d=i.getRng(true),e=[],k=l.join("|"),m=this._getSeparators(),f=new RegExp("(^|["+m+"])("+k+")(?=["+m+"]|$)","g");this._walk(h.getBody(),function(o){if(o.nodeType==3){e.push(o)}});c(e,function(t){var r,q,o,s,p=t.nodeValue;if(f.test(p)){p=g.encode(p);q=g.create("span",{"class":"mceItemHidden"});if(tinymce.isIE){p=p.replace(f,"$1<mcespell>$2</mcespell>");while((s=p.indexOf("<mcespell>"))!=-1){o=p.substring(0,s);if(o.length){r=j.createTextNode(g.decode(o));q.appendChild(r)}p=p.substring(s+10);s=p.indexOf("</mcespell>");o=p.substring(0,s);p=p.substring(s+11);q.appendChild(g.create("span",{"class":"mceItemHiddenSpellWord"},o))}if(p.length){r=j.createTextNode(g.decode(p));q.appendChild(r)}}else{q.innerHTML=p.replace(f,'$1<span class="mceItemHiddenSpellWord">$2</span>')}g.replace(q,t)}});i.setRng(d)},_showMenu:function(h,j){var i=this,h=i.editor,d=i._menu,l,k=h.dom,g=k.getViewPort(h.getWin()),f=j.target;j=0;if(!d){d=h.controlManager.createDropMenu("spellcheckermenu",{"class":"mceNoIcons"});i._menu=d}if(k.hasClass(f,"mceItemHiddenSpellWord")){d.removeAll();d.add({title:"spellchecker.wait","class":"mceMenuItemTitle"}).setDisabled(1);i._sendRPC("getSuggestions",[i.selectedLang,k.decode(f.innerHTML)],function(m){var e;d.removeAll();if(m.length>0){d.add({title:"spellchecker.sug","class":"mceMenuItemTitle"}).setDisabled(1);c(m,function(n){d.add({title:n,onclick:function(){k.replace(h.getDoc().createTextNode(n),f);i._checkDone()}})});d.addSeparator()}else{d.add({title:"spellchecker.no_sug","class":"mceMenuItemTitle"}).setDisabled(1)}if(h.getParam("show_ignore_words",true)){e=i.editor.getParam("spellchecker_enable_ignore_rpc","");d.add({title:"spellchecker.ignore_word",onclick:function(){var n=f.innerHTML;k.remove(f,1);i._checkDone();if(e){h.setProgressState(1);i._sendRPC("ignoreWord",[i.selectedLang,n],function(o){h.setProgressState(0)})}}});d.add({title:"spellchecker.ignore_words",onclick:function(){var n=f.innerHTML;i._removeWords(k.decode(n));i._checkDone();if(e){h.setProgressState(1);i._sendRPC("ignoreWords",[i.selectedLang,n],function(o){h.setProgressState(0)})}}})}if(i.editor.getParam("spellchecker_enable_learn_rpc")){d.add({title:"spellchecker.learn_word",onclick:function(){var n=f.innerHTML;k.remove(f,1);i._checkDone();h.setProgressState(1);i._sendRPC("learnWord",[i.selectedLang,n],function(o){h.setProgressState(0)})}})}d.update()});l=b.getPos(h.getContentAreaContainer());d.settings.offset_x=l.x;d.settings.offset_y=l.y;h.selection.select(f);l=k.getPos(f);d.showMenu(l.x,l.y+f.offsetHeight-g.y);return tinymce.dom.Event.cancel(j)}else{d.hideMenu()}},_checkDone:function(){var e=this,d=e.editor,g=d.dom,f;c(g.select("span"),function(h){if(h&&g.hasClass(h,"mceItemHiddenSpellWord")){f=true;return false}});if(!f){e._done()}},_done:function(){var d=this,e=d.active;if(d.active){d.active=0;d._removeWords();if(d._menu){d._menu.hideMenu()}if(e){d.editor.nodeChanged()}}},_sendRPC:function(e,g,d){var f=this;a.sendRPC({url:f.rpcUrl,method:e,params:g,success:d,error:function(i,h){f.editor.setProgressState(0);f.editor.windowManager.alert(i.errstr||("Error response: "+h.responseText))}})}});tinymce.PluginManager.add("spellchecker",tinymce.plugins.SpellcheckerPlugin)})();
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/spellchecker/editor_plugin_src.js
ADDED
@@ -0,0 +1,436 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 JSONRequest = tinymce.util.JSONRequest, each = tinymce.each, DOM = tinymce.DOM;
|
13 |
+
|
14 |
+
tinymce.create('tinymce.plugins.SpellcheckerPlugin', {
|
15 |
+
getInfo : function() {
|
16 |
+
return {
|
17 |
+
longname : 'Spellchecker',
|
18 |
+
author : 'Moxiecode Systems AB',
|
19 |
+
authorurl : 'http://tinymce.moxiecode.com',
|
20 |
+
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/spellchecker',
|
21 |
+
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
22 |
+
};
|
23 |
+
},
|
24 |
+
|
25 |
+
init : function(ed, url) {
|
26 |
+
var t = this, cm;
|
27 |
+
|
28 |
+
t.url = url;
|
29 |
+
t.editor = ed;
|
30 |
+
t.rpcUrl = ed.getParam("spellchecker_rpc_url", "{backend}");
|
31 |
+
|
32 |
+
if (t.rpcUrl == '{backend}') {
|
33 |
+
// Sniff if the browser supports native spellchecking (Don't know of a better way)
|
34 |
+
if (tinymce.isIE)
|
35 |
+
return;
|
36 |
+
|
37 |
+
t.hasSupport = true;
|
38 |
+
|
39 |
+
// Disable the context menu when spellchecking is active
|
40 |
+
ed.onContextMenu.addToTop(function(ed, e) {
|
41 |
+
if (t.active)
|
42 |
+
return false;
|
43 |
+
});
|
44 |
+
}
|
45 |
+
|
46 |
+
// Register commands
|
47 |
+
ed.addCommand('mceSpellCheck', function() {
|
48 |
+
if (t.rpcUrl == '{backend}') {
|
49 |
+
// Enable/disable native spellchecker
|
50 |
+
t.editor.getBody().spellcheck = t.active = !t.active;
|
51 |
+
return;
|
52 |
+
}
|
53 |
+
|
54 |
+
if (!t.active) {
|
55 |
+
ed.setProgressState(1);
|
56 |
+
t._sendRPC('checkWords', [t.selectedLang, t._getWords()], function(r) {
|
57 |
+
if (r.length > 0) {
|
58 |
+
t.active = 1;
|
59 |
+
t._markWords(r);
|
60 |
+
ed.setProgressState(0);
|
61 |
+
ed.nodeChanged();
|
62 |
+
} else {
|
63 |
+
ed.setProgressState(0);
|
64 |
+
|
65 |
+
if (ed.getParam('spellchecker_report_no_misspellings', true))
|
66 |
+
ed.windowManager.alert('spellchecker.no_mpell');
|
67 |
+
}
|
68 |
+
});
|
69 |
+
} else
|
70 |
+
t._done();
|
71 |
+
});
|
72 |
+
|
73 |
+
if (ed.settings.content_css !== false)
|
74 |
+
ed.contentCSS.push(url + '/css/content.css');
|
75 |
+
|
76 |
+
ed.onClick.add(t._showMenu, t);
|
77 |
+
ed.onContextMenu.add(t._showMenu, t);
|
78 |
+
ed.onBeforeGetContent.add(function() {
|
79 |
+
if (t.active)
|
80 |
+
t._removeWords();
|
81 |
+
});
|
82 |
+
|
83 |
+
ed.onNodeChange.add(function(ed, cm) {
|
84 |
+
cm.setActive('spellchecker', t.active);
|
85 |
+
});
|
86 |
+
|
87 |
+
ed.onSetContent.add(function() {
|
88 |
+
t._done();
|
89 |
+
});
|
90 |
+
|
91 |
+
ed.onBeforeGetContent.add(function() {
|
92 |
+
t._done();
|
93 |
+
});
|
94 |
+
|
95 |
+
ed.onBeforeExecCommand.add(function(ed, cmd) {
|
96 |
+
if (cmd == 'mceFullScreen')
|
97 |
+
t._done();
|
98 |
+
});
|
99 |
+
|
100 |
+
// Find selected language
|
101 |
+
t.languages = {};
|
102 |
+
each(ed.getParam('spellchecker_languages', '+English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr,German=de,Italian=it,Polish=pl,Portuguese=pt,Spanish=es,Swedish=sv', 'hash'), function(v, k) {
|
103 |
+
if (k.indexOf('+') === 0) {
|
104 |
+
k = k.substring(1);
|
105 |
+
t.selectedLang = v;
|
106 |
+
}
|
107 |
+
|
108 |
+
t.languages[k] = v;
|
109 |
+
});
|
110 |
+
},
|
111 |
+
|
112 |
+
createControl : function(n, cm) {
|
113 |
+
var t = this, c, ed = t.editor;
|
114 |
+
|
115 |
+
if (n == 'spellchecker') {
|
116 |
+
// Use basic button if we use the native spellchecker
|
117 |
+
if (t.rpcUrl == '{backend}') {
|
118 |
+
// Create simple toggle button if we have native support
|
119 |
+
if (t.hasSupport)
|
120 |
+
c = cm.createButton(n, {title : 'spellchecker.desc', cmd : 'mceSpellCheck', scope : t});
|
121 |
+
|
122 |
+
return c;
|
123 |
+
}
|
124 |
+
|
125 |
+
c = cm.createSplitButton(n, {title : 'spellchecker.desc', cmd : 'mceSpellCheck', scope : t});
|
126 |
+
|
127 |
+
c.onRenderMenu.add(function(c, m) {
|
128 |
+
m.add({title : 'spellchecker.langs', 'class' : 'mceMenuItemTitle'}).setDisabled(1);
|
129 |
+
each(t.languages, function(v, k) {
|
130 |
+
var o = {icon : 1}, mi;
|
131 |
+
|
132 |
+
o.onclick = function() {
|
133 |
+
if (v == t.selectedLang) {
|
134 |
+
return;
|
135 |
+
}
|
136 |
+
mi.setSelected(1);
|
137 |
+
t.selectedItem.setSelected(0);
|
138 |
+
t.selectedItem = mi;
|
139 |
+
t.selectedLang = v;
|
140 |
+
};
|
141 |
+
|
142 |
+
o.title = k;
|
143 |
+
mi = m.add(o);
|
144 |
+
mi.setSelected(v == t.selectedLang);
|
145 |
+
|
146 |
+
if (v == t.selectedLang)
|
147 |
+
t.selectedItem = mi;
|
148 |
+
})
|
149 |
+
});
|
150 |
+
|
151 |
+
return c;
|
152 |
+
}
|
153 |
+
},
|
154 |
+
|
155 |
+
// Internal functions
|
156 |
+
|
157 |
+
_walk : function(n, f) {
|
158 |
+
var d = this.editor.getDoc(), w;
|
159 |
+
|
160 |
+
if (d.createTreeWalker) {
|
161 |
+
w = d.createTreeWalker(n, NodeFilter.SHOW_TEXT, null, false);
|
162 |
+
|
163 |
+
while ((n = w.nextNode()) != null)
|
164 |
+
f.call(this, n);
|
165 |
+
} else
|
166 |
+
tinymce.walk(n, f, 'childNodes');
|
167 |
+
},
|
168 |
+
|
169 |
+
_getSeparators : function() {
|
170 |
+
var re = '', i, str = this.editor.getParam('spellchecker_word_separator_chars', '\\s!"#$%&()*+,-./:;<=>?@[\]^_{|}����������������\u201d\u201c');
|
171 |
+
|
172 |
+
// Build word separator regexp
|
173 |
+
for (i=0; i<str.length; i++)
|
174 |
+
re += '\\' + str.charAt(i);
|
175 |
+
|
176 |
+
return re;
|
177 |
+
},
|
178 |
+
|
179 |
+
_getWords : function() {
|
180 |
+
var ed = this.editor, wl = [], tx = '', lo = {}, rawWords = [];
|
181 |
+
|
182 |
+
// Get area text
|
183 |
+
this._walk(ed.getBody(), function(n) {
|
184 |
+
if (n.nodeType == 3)
|
185 |
+
tx += n.nodeValue + ' ';
|
186 |
+
});
|
187 |
+
|
188 |
+
// split the text up into individual words
|
189 |
+
if (ed.getParam('spellchecker_word_pattern')) {
|
190 |
+
// look for words that match the pattern
|
191 |
+
rawWords = tx.match('(' + ed.getParam('spellchecker_word_pattern') + ')', 'gi');
|
192 |
+
} else {
|
193 |
+
// Split words by separator
|
194 |
+
tx = tx.replace(new RegExp('([0-9]|[' + this._getSeparators() + '])', 'g'), ' ');
|
195 |
+
tx = tinymce.trim(tx.replace(/(\s+)/g, ' '));
|
196 |
+
rawWords = tx.split(' ');
|
197 |
+
}
|
198 |
+
|
199 |
+
// Build word array and remove duplicates
|
200 |
+
each(rawWords, function(v) {
|
201 |
+
if (!lo[v]) {
|
202 |
+
wl.push(v);
|
203 |
+
lo[v] = 1;
|
204 |
+
}
|
205 |
+
});
|
206 |
+
|
207 |
+
return wl;
|
208 |
+
},
|
209 |
+
|
210 |
+
_removeWords : function(w) {
|
211 |
+
var ed = this.editor, dom = ed.dom, se = ed.selection, r = se.getRng(true);
|
212 |
+
|
213 |
+
each(dom.select('span').reverse(), function(n) {
|
214 |
+
if (n && (dom.hasClass(n, 'mceItemHiddenSpellWord') || dom.hasClass(n, 'mceItemHidden'))) {
|
215 |
+
if (!w || dom.decode(n.innerHTML) == w)
|
216 |
+
dom.remove(n, 1);
|
217 |
+
}
|
218 |
+
});
|
219 |
+
|
220 |
+
se.setRng(r);
|
221 |
+
},
|
222 |
+
|
223 |
+
_markWords : function(wl) {
|
224 |
+
var ed = this.editor, dom = ed.dom, doc = ed.getDoc(), se = ed.selection, r = se.getRng(true), nl = [],
|
225 |
+
w = wl.join('|'), re = this._getSeparators(), rx = new RegExp('(^|[' + re + '])(' + w + ')(?=[' + re + ']|$)', 'g');
|
226 |
+
|
227 |
+
// Collect all text nodes
|
228 |
+
this._walk(ed.getBody(), function(n) {
|
229 |
+
if (n.nodeType == 3) {
|
230 |
+
nl.push(n);
|
231 |
+
}
|
232 |
+
});
|
233 |
+
|
234 |
+
// Wrap incorrect words in spans
|
235 |
+
each(nl, function(n) {
|
236 |
+
var node, elem, txt, pos, v = n.nodeValue;
|
237 |
+
|
238 |
+
if (rx.test(v)) {
|
239 |
+
// Encode the content
|
240 |
+
v = dom.encode(v);
|
241 |
+
// Create container element
|
242 |
+
elem = dom.create('span', {'class' : 'mceItemHidden'});
|
243 |
+
|
244 |
+
// Following code fixes IE issues by creating text nodes
|
245 |
+
// using DOM methods instead of innerHTML.
|
246 |
+
// Bug #3124: <PRE> elements content is broken after spellchecking.
|
247 |
+
// Bug #1408: Preceding whitespace characters are removed
|
248 |
+
// @TODO: I'm not sure that both are still issues on IE9.
|
249 |
+
if (tinymce.isIE) {
|
250 |
+
// Enclose mispelled words with temporal tag
|
251 |
+
v = v.replace(rx, '$1<mcespell>$2</mcespell>');
|
252 |
+
// Loop over the content finding mispelled words
|
253 |
+
while ((pos = v.indexOf('<mcespell>')) != -1) {
|
254 |
+
// Add text node for the content before the word
|
255 |
+
txt = v.substring(0, pos);
|
256 |
+
if (txt.length) {
|
257 |
+
node = doc.createTextNode(dom.decode(txt));
|
258 |
+
elem.appendChild(node);
|
259 |
+
}
|
260 |
+
v = v.substring(pos+10);
|
261 |
+
pos = v.indexOf('</mcespell>');
|
262 |
+
txt = v.substring(0, pos);
|
263 |
+
v = v.substring(pos+11);
|
264 |
+
// Add span element for the word
|
265 |
+
elem.appendChild(dom.create('span', {'class' : 'mceItemHiddenSpellWord'}, txt));
|
266 |
+
}
|
267 |
+
// Add text node for the rest of the content
|
268 |
+
if (v.length) {
|
269 |
+
node = doc.createTextNode(dom.decode(v));
|
270 |
+
elem.appendChild(node);
|
271 |
+
}
|
272 |
+
} else {
|
273 |
+
// Other browsers preserve whitespace characters on innerHTML usage
|
274 |
+
elem.innerHTML = v.replace(rx, '$1<span class="mceItemHiddenSpellWord">$2</span>');
|
275 |
+
}
|
276 |
+
|
277 |
+
// Finally, replace the node with the container
|
278 |
+
dom.replace(elem, n);
|
279 |
+
}
|
280 |
+
});
|
281 |
+
|
282 |
+
se.setRng(r);
|
283 |
+
},
|
284 |
+
|
285 |
+
_showMenu : function(ed, e) {
|
286 |
+
var t = this, ed = t.editor, m = t._menu, p1, dom = ed.dom, vp = dom.getViewPort(ed.getWin()), wordSpan = e.target;
|
287 |
+
|
288 |
+
e = 0; // Fixes IE memory leak
|
289 |
+
|
290 |
+
if (!m) {
|
291 |
+
m = ed.controlManager.createDropMenu('spellcheckermenu', {'class' : 'mceNoIcons'});
|
292 |
+
t._menu = m;
|
293 |
+
}
|
294 |
+
|
295 |
+
if (dom.hasClass(wordSpan, 'mceItemHiddenSpellWord')) {
|
296 |
+
m.removeAll();
|
297 |
+
m.add({title : 'spellchecker.wait', 'class' : 'mceMenuItemTitle'}).setDisabled(1);
|
298 |
+
|
299 |
+
t._sendRPC('getSuggestions', [t.selectedLang, dom.decode(wordSpan.innerHTML)], function(r) {
|
300 |
+
var ignoreRpc;
|
301 |
+
|
302 |
+
m.removeAll();
|
303 |
+
|
304 |
+
if (r.length > 0) {
|
305 |
+
m.add({title : 'spellchecker.sug', 'class' : 'mceMenuItemTitle'}).setDisabled(1);
|
306 |
+
each(r, function(v) {
|
307 |
+
m.add({title : v, onclick : function() {
|
308 |
+
dom.replace(ed.getDoc().createTextNode(v), wordSpan);
|
309 |
+
t._checkDone();
|
310 |
+
}});
|
311 |
+
});
|
312 |
+
|
313 |
+
m.addSeparator();
|
314 |
+
} else
|
315 |
+
m.add({title : 'spellchecker.no_sug', 'class' : 'mceMenuItemTitle'}).setDisabled(1);
|
316 |
+
|
317 |
+
if (ed.getParam('show_ignore_words', true)) {
|
318 |
+
ignoreRpc = t.editor.getParam("spellchecker_enable_ignore_rpc", '');
|
319 |
+
m.add({
|
320 |
+
title : 'spellchecker.ignore_word',
|
321 |
+
onclick : function() {
|
322 |
+
var word = wordSpan.innerHTML;
|
323 |
+
|
324 |
+
dom.remove(wordSpan, 1);
|
325 |
+
t._checkDone();
|
326 |
+
|
327 |
+
// tell the server if we need to
|
328 |
+
if (ignoreRpc) {
|
329 |
+
ed.setProgressState(1);
|
330 |
+
t._sendRPC('ignoreWord', [t.selectedLang, word], function(r) {
|
331 |
+
ed.setProgressState(0);
|
332 |
+
});
|
333 |
+
}
|
334 |
+
}
|
335 |
+
});
|
336 |
+
|
337 |
+
m.add({
|
338 |
+
title : 'spellchecker.ignore_words',
|
339 |
+
onclick : function() {
|
340 |
+
var word = wordSpan.innerHTML;
|
341 |
+
|
342 |
+
t._removeWords(dom.decode(word));
|
343 |
+
t._checkDone();
|
344 |
+
|
345 |
+
// tell the server if we need to
|
346 |
+
if (ignoreRpc) {
|
347 |
+
ed.setProgressState(1);
|
348 |
+
t._sendRPC('ignoreWords', [t.selectedLang, word], function(r) {
|
349 |
+
ed.setProgressState(0);
|
350 |
+
});
|
351 |
+
}
|
352 |
+
}
|
353 |
+
});
|
354 |
+
}
|
355 |
+
|
356 |
+
if (t.editor.getParam("spellchecker_enable_learn_rpc")) {
|
357 |
+
m.add({
|
358 |
+
title : 'spellchecker.learn_word',
|
359 |
+
onclick : function() {
|
360 |
+
var word = wordSpan.innerHTML;
|
361 |
+
|
362 |
+
dom.remove(wordSpan, 1);
|
363 |
+
t._checkDone();
|
364 |
+
|
365 |
+
ed.setProgressState(1);
|
366 |
+
t._sendRPC('learnWord', [t.selectedLang, word], function(r) {
|
367 |
+
ed.setProgressState(0);
|
368 |
+
});
|
369 |
+
}
|
370 |
+
});
|
371 |
+
}
|
372 |
+
|
373 |
+
m.update();
|
374 |
+
});
|
375 |
+
|
376 |
+
p1 = DOM.getPos(ed.getContentAreaContainer());
|
377 |
+
m.settings.offset_x = p1.x;
|
378 |
+
m.settings.offset_y = p1.y;
|
379 |
+
|
380 |
+
ed.selection.select(wordSpan);
|
381 |
+
p1 = dom.getPos(wordSpan);
|
382 |
+
m.showMenu(p1.x, p1.y + wordSpan.offsetHeight - vp.y);
|
383 |
+
|
384 |
+
return tinymce.dom.Event.cancel(e);
|
385 |
+
} else
|
386 |
+
m.hideMenu();
|
387 |
+
},
|
388 |
+
|
389 |
+
_checkDone : function() {
|
390 |
+
var t = this, ed = t.editor, dom = ed.dom, o;
|
391 |
+
|
392 |
+
each(dom.select('span'), function(n) {
|
393 |
+
if (n && dom.hasClass(n, 'mceItemHiddenSpellWord')) {
|
394 |
+
o = true;
|
395 |
+
return false;
|
396 |
+
}
|
397 |
+
});
|
398 |
+
|
399 |
+
if (!o)
|
400 |
+
t._done();
|
401 |
+
},
|
402 |
+
|
403 |
+
_done : function() {
|
404 |
+
var t = this, la = t.active;
|
405 |
+
|
406 |
+
if (t.active) {
|
407 |
+
t.active = 0;
|
408 |
+
t._removeWords();
|
409 |
+
|
410 |
+
if (t._menu)
|
411 |
+
t._menu.hideMenu();
|
412 |
+
|
413 |
+
if (la)
|
414 |
+
t.editor.nodeChanged();
|
415 |
+
}
|
416 |
+
},
|
417 |
+
|
418 |
+
_sendRPC : function(m, p, cb) {
|
419 |
+
var t = this;
|
420 |
+
|
421 |
+
JSONRequest.sendRPC({
|
422 |
+
url : t.rpcUrl,
|
423 |
+
method : m,
|
424 |
+
params : p,
|
425 |
+
success : cb,
|
426 |
+
error : function(e, x) {
|
427 |
+
t.editor.setProgressState(0);
|
428 |
+
t.editor.windowManager.alert(e.errstr || ('Error response: ' + x.responseText));
|
429 |
+
}
|
430 |
+
});
|
431 |
+
}
|
432 |
+
});
|
433 |
+
|
434 |
+
// Register plugin
|
435 |
+
tinymce.PluginManager.add('spellchecker', tinymce.plugins.SpellcheckerPlugin);
|
436 |
+
})();
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/spellchecker/img/wline.gif
ADDED
Binary file
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/style/css/props.css
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#text_font {width:250px;}
|
2 |
+
#text_size {width:70px;}
|
3 |
+
.mceAddSelectValue {background:#DDD;}
|
4 |
+
select, #block_text_indent, #box_width, #box_height, #box_padding_top, #box_padding_right, #box_padding_bottom, #box_padding_left {width:70px;}
|
5 |
+
#box_margin_top, #box_margin_right, #box_margin_bottom, #box_margin_left, #positioning_width, #positioning_height, #positioning_zindex {width:70px;}
|
6 |
+
#positioning_placement_top, #positioning_placement_right, #positioning_placement_bottom, #positioning_placement_left {width:70px;}
|
7 |
+
#positioning_clip_top, #positioning_clip_right, #positioning_clip_bottom, #positioning_clip_left {width:70px;}
|
8 |
+
.panel_toggle_insert_span {padding-top:10px;}
|
9 |
+
.panel_wrapper div.current {padding-top:10px;height:230px;}
|
10 |
+
.delim {border-left:1px solid gray;}
|
11 |
+
.tdelim {border-bottom:1px solid gray;}
|
12 |
+
#block_display {width:145px;}
|
13 |
+
#list_type {width:115px;}
|
14 |
+
.disabled {background:#EEE;}
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/style/editor_plugin.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(function(){tinymce.create("tinymce.plugins.StylePlugin",{init:function(a,b){a.addCommand("mceStyleProps",function(){var c=false;var f=a.selection.getSelectedBlocks();var d=[];if(f.length===1){d.push(a.selection.getNode().style.cssText)}else{tinymce.each(f,function(g){d.push(a.dom.getAttrib(g,"style"))});c=true}a.windowManager.open({file:b+"/props.htm",width:480+parseInt(a.getLang("style.delta_width",0)),height:340+parseInt(a.getLang("style.delta_height",0)),inline:1},{applyStyleToBlocks:c,plugin_url:b,styles:d})});a.addCommand("mceSetElementStyle",function(d,c){if(e=a.selection.getNode()){a.dom.setAttrib(e,"style",c);a.execCommand("mceRepaint")}});a.onNodeChange.add(function(d,c,f){c.setDisabled("styleprops",f.nodeName==="BODY")});a.addButton("styleprops",{title:"style.desc",cmd:"mceStyleProps"})},getInfo:function(){return{longname:"Style",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/style",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("style",tinymce.plugins.StylePlugin)})();
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/style/editor_plugin_src.js
ADDED
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
tinymce.create('tinymce.plugins.StylePlugin', {
|
13 |
+
init : function(ed, url) {
|
14 |
+
// Register commands
|
15 |
+
ed.addCommand('mceStyleProps', function() {
|
16 |
+
|
17 |
+
var applyStyleToBlocks = false;
|
18 |
+
var blocks = ed.selection.getSelectedBlocks();
|
19 |
+
var styles = [];
|
20 |
+
|
21 |
+
if (blocks.length === 1) {
|
22 |
+
styles.push(ed.selection.getNode().style.cssText);
|
23 |
+
}
|
24 |
+
else {
|
25 |
+
tinymce.each(blocks, function(block) {
|
26 |
+
styles.push(ed.dom.getAttrib(block, 'style'));
|
27 |
+
});
|
28 |
+
applyStyleToBlocks = true;
|
29 |
+
}
|
30 |
+
|
31 |
+
ed.windowManager.open({
|
32 |
+
file : url + '/props.htm',
|
33 |
+
width : 480 + parseInt(ed.getLang('style.delta_width', 0)),
|
34 |
+
height : 340 + parseInt(ed.getLang('style.delta_height', 0)),
|
35 |
+
inline : 1
|
36 |
+
}, {
|
37 |
+
applyStyleToBlocks : applyStyleToBlocks,
|
38 |
+
plugin_url : url,
|
39 |
+
styles : styles
|
40 |
+
});
|
41 |
+
});
|
42 |
+
|
43 |
+
ed.addCommand('mceSetElementStyle', function(ui, v) {
|
44 |
+
if (e = ed.selection.getNode()) {
|
45 |
+
ed.dom.setAttrib(e, 'style', v);
|
46 |
+
ed.execCommand('mceRepaint');
|
47 |
+
}
|
48 |
+
});
|
49 |
+
|
50 |
+
ed.onNodeChange.add(function(ed, cm, n) {
|
51 |
+
cm.setDisabled('styleprops', n.nodeName === 'BODY');
|
52 |
+
});
|
53 |
+
|
54 |
+
// Register buttons
|
55 |
+
ed.addButton('styleprops', {title : 'style.desc', cmd : 'mceStyleProps'});
|
56 |
+
},
|
57 |
+
|
58 |
+
getInfo : function() {
|
59 |
+
return {
|
60 |
+
longname : 'Style',
|
61 |
+
author : 'Moxiecode Systems AB',
|
62 |
+
authorurl : 'http://tinymce.moxiecode.com',
|
63 |
+
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/style',
|
64 |
+
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
65 |
+
};
|
66 |
+
}
|
67 |
+
});
|
68 |
+
|
69 |
+
// Register plugin
|
70 |
+
tinymce.PluginManager.add('style', tinymce.plugins.StylePlugin);
|
71 |
+
})();
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/style/js/props.js
ADDED
@@ -0,0 +1,709 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
tinyMCEPopup.requireLangPack();
|
2 |
+
|
3 |
+
var defaultFonts = "" +
|
4 |
+
"Arial, Helvetica, sans-serif=Arial, Helvetica, sans-serif;" +
|
5 |
+
"Times New Roman, Times, serif=Times New Roman, Times, serif;" +
|
6 |
+
"Courier New, Courier, mono=Courier New, Courier, mono;" +
|
7 |
+
"Times New Roman, Times, serif=Times New Roman, Times, serif;" +
|
8 |
+
"Georgia, Times New Roman, Times, serif=Georgia, Times New Roman, Times, serif;" +
|
9 |
+
"Verdana, Arial, Helvetica, sans-serif=Verdana, Arial, Helvetica, sans-serif;" +
|
10 |
+
"Geneva, Arial, Helvetica, sans-serif=Geneva, Arial, Helvetica, sans-serif";
|
11 |
+
|
12 |
+
var defaultSizes = "9;10;12;14;16;18;24;xx-small;x-small;small;medium;large;x-large;xx-large;smaller;larger";
|
13 |
+
var defaultMeasurement = "+pixels=px;points=pt;inches=in;centimetres=cm;millimetres=mm;picas=pc;ems=em;exs=ex;%";
|
14 |
+
var defaultSpacingMeasurement = "pixels=px;points=pt;inches=in;centimetres=cm;millimetres=mm;picas=pc;+ems=em;exs=ex;%";
|
15 |
+
var defaultIndentMeasurement = "pixels=px;+points=pt;inches=in;centimetres=cm;millimetres=mm;picas=pc;ems=em;exs=ex;%";
|
16 |
+
var defaultWeight = "normal;bold;bolder;lighter;100;200;300;400;500;600;700;800;900";
|
17 |
+
var defaultTextStyle = "normal;italic;oblique";
|
18 |
+
var defaultVariant = "normal;small-caps";
|
19 |
+
var defaultLineHeight = "normal";
|
20 |
+
var defaultAttachment = "fixed;scroll";
|
21 |
+
var defaultRepeat = "no-repeat;repeat;repeat-x;repeat-y";
|
22 |
+
var defaultPosH = "left;center;right";
|
23 |
+
var defaultPosV = "top;center;bottom";
|
24 |
+
var defaultVAlign = "baseline;sub;super;top;text-top;middle;bottom;text-bottom";
|
25 |
+
var defaultDisplay = "inline;block;list-item;run-in;compact;marker;table;inline-table;table-row-group;table-header-group;table-footer-group;table-row;table-column-group;table-column;table-cell;table-caption;none";
|
26 |
+
var defaultBorderStyle = "none;solid;dashed;dotted;double;groove;ridge;inset;outset";
|
27 |
+
var defaultBorderWidth = "thin;medium;thick";
|
28 |
+
var defaultListType = "disc;circle;square;decimal;lower-roman;upper-roman;lower-alpha;upper-alpha;none";
|
29 |
+
|
30 |
+
function aggregateStyles(allStyles) {
|
31 |
+
var mergedStyles = {};
|
32 |
+
|
33 |
+
tinymce.each(allStyles, function(style) {
|
34 |
+
if (style !== '') {
|
35 |
+
var parsedStyles = tinyMCEPopup.editor.dom.parseStyle(style);
|
36 |
+
for (var name in parsedStyles) {
|
37 |
+
if (parsedStyles.hasOwnProperty(name)) {
|
38 |
+
if (mergedStyles[name] === undefined) {
|
39 |
+
mergedStyles[name] = parsedStyles[name];
|
40 |
+
}
|
41 |
+
else if (name === 'text-decoration') {
|
42 |
+
if (mergedStyles[name].indexOf(parsedStyles[name]) === -1) {
|
43 |
+
mergedStyles[name] = mergedStyles[name] +' '+ parsedStyles[name];
|
44 |
+
}
|
45 |
+
}
|
46 |
+
}
|
47 |
+
}
|
48 |
+
}
|
49 |
+
});
|
50 |
+
|
51 |
+
return mergedStyles;
|
52 |
+
}
|
53 |
+
|
54 |
+
var applyActionIsInsert;
|
55 |
+
var existingStyles;
|
56 |
+
|
57 |
+
function init(ed) {
|
58 |
+
var ce = document.getElementById('container'), h;
|
59 |
+
|
60 |
+
existingStyles = aggregateStyles(tinyMCEPopup.getWindowArg('styles'));
|
61 |
+
ce.style.cssText = tinyMCEPopup.editor.dom.serializeStyle(existingStyles);
|
62 |
+
|
63 |
+
applyActionIsInsert = ed.getParam("edit_css_style_insert_span", false);
|
64 |
+
document.getElementById('toggle_insert_span').checked = applyActionIsInsert;
|
65 |
+
|
66 |
+
h = getBrowserHTML('background_image_browser','background_image','image','advimage');
|
67 |
+
document.getElementById("background_image_browser").innerHTML = h;
|
68 |
+
|
69 |
+
document.getElementById('text_color_pickcontainer').innerHTML = getColorPickerHTML('text_color_pick','text_color');
|
70 |
+
document.getElementById('background_color_pickcontainer').innerHTML = getColorPickerHTML('background_color_pick','background_color');
|
71 |
+
document.getElementById('border_color_top_pickcontainer').innerHTML = getColorPickerHTML('border_color_top_pick','border_color_top');
|
72 |
+
document.getElementById('border_color_right_pickcontainer').innerHTML = getColorPickerHTML('border_color_right_pick','border_color_right');
|
73 |
+
document.getElementById('border_color_bottom_pickcontainer').innerHTML = getColorPickerHTML('border_color_bottom_pick','border_color_bottom');
|
74 |
+
document.getElementById('border_color_left_pickcontainer').innerHTML = getColorPickerHTML('border_color_left_pick','border_color_left');
|
75 |
+
|
76 |
+
fillSelect(0, 'text_font', 'style_font', defaultFonts, ';', true);
|
77 |
+
fillSelect(0, 'text_size', 'style_font_size', defaultSizes, ';', true);
|
78 |
+
fillSelect(0, 'text_size_measurement', 'style_font_size_measurement', defaultMeasurement, ';', true);
|
79 |
+
fillSelect(0, 'text_case', 'style_text_case', "capitalize;uppercase;lowercase", ';', true);
|
80 |
+
fillSelect(0, 'text_weight', 'style_font_weight', defaultWeight, ';', true);
|
81 |
+
fillSelect(0, 'text_style', 'style_font_style', defaultTextStyle, ';', true);
|
82 |
+
fillSelect(0, 'text_variant', 'style_font_variant', defaultVariant, ';', true);
|
83 |
+
fillSelect(0, 'text_lineheight', 'style_font_line_height', defaultLineHeight, ';', true);
|
84 |
+
fillSelect(0, 'text_lineheight_measurement', 'style_font_line_height_measurement', defaultMeasurement, ';', true);
|
85 |
+
|
86 |
+
fillSelect(0, 'background_attachment', 'style_background_attachment', defaultAttachment, ';', true);
|
87 |
+
fillSelect(0, 'background_repeat', 'style_background_repeat', defaultRepeat, ';', true);
|
88 |
+
|
89 |
+
fillSelect(0, 'background_hpos_measurement', 'style_background_hpos_measurement', defaultMeasurement, ';', true);
|
90 |
+
fillSelect(0, 'background_vpos_measurement', 'style_background_vpos_measurement', defaultMeasurement, ';', true);
|
91 |
+
|
92 |
+
fillSelect(0, 'background_hpos', 'style_background_hpos', defaultPosH, ';', true);
|
93 |
+
fillSelect(0, 'background_vpos', 'style_background_vpos', defaultPosV, ';', true);
|
94 |
+
|
95 |
+
fillSelect(0, 'block_wordspacing', 'style_wordspacing', 'normal', ';', true);
|
96 |
+
fillSelect(0, 'block_wordspacing_measurement', 'style_wordspacing_measurement', defaultSpacingMeasurement, ';', true);
|
97 |
+
fillSelect(0, 'block_letterspacing', 'style_letterspacing', 'normal', ';', true);
|
98 |
+
fillSelect(0, 'block_letterspacing_measurement', 'style_letterspacing_measurement', defaultSpacingMeasurement, ';', true);
|
99 |
+
fillSelect(0, 'block_vertical_alignment', 'style_vertical_alignment', defaultVAlign, ';', true);
|
100 |
+
fillSelect(0, 'block_text_align', 'style_text_align', "left;right;center;justify", ';', true);
|
101 |
+
fillSelect(0, 'block_whitespace', 'style_whitespace', "normal;pre;nowrap", ';', true);
|
102 |
+
fillSelect(0, 'block_display', 'style_display', defaultDisplay, ';', true);
|
103 |
+
fillSelect(0, 'block_text_indent_measurement', 'style_text_indent_measurement', defaultIndentMeasurement, ';', true);
|
104 |
+
|
105 |
+
fillSelect(0, 'box_width_measurement', 'style_box_width_measurement', defaultMeasurement, ';', true);
|
106 |
+
fillSelect(0, 'box_height_measurement', 'style_box_height_measurement', defaultMeasurement, ';', true);
|
107 |
+
fillSelect(0, 'box_float', 'style_float', 'left;right;none', ';', true);
|
108 |
+
fillSelect(0, 'box_clear', 'style_clear', 'left;right;both;none', ';', true);
|
109 |
+
fillSelect(0, 'box_padding_left_measurement', 'style_padding_left_measurement', defaultMeasurement, ';', true);
|
110 |
+
fillSelect(0, 'box_padding_top_measurement', 'style_padding_top_measurement', defaultMeasurement, ';', true);
|
111 |
+
fillSelect(0, 'box_padding_bottom_measurement', 'style_padding_bottom_measurement', defaultMeasurement, ';', true);
|
112 |
+
fillSelect(0, 'box_padding_right_measurement', 'style_padding_right_measurement', defaultMeasurement, ';', true);
|
113 |
+
fillSelect(0, 'box_margin_left_measurement', 'style_margin_left_measurement', defaultMeasurement, ';', true);
|
114 |
+
fillSelect(0, 'box_margin_top_measurement', 'style_margin_top_measurement', defaultMeasurement, ';', true);
|
115 |
+
fillSelect(0, 'box_margin_bottom_measurement', 'style_margin_bottom_measurement', defaultMeasurement, ';', true);
|
116 |
+
fillSelect(0, 'box_margin_right_measurement', 'style_margin_right_measurement', defaultMeasurement, ';', true);
|
117 |
+
|
118 |
+
fillSelect(0, 'border_style_top', 'style_border_style_top', defaultBorderStyle, ';', true);
|
119 |
+
fillSelect(0, 'border_style_right', 'style_border_style_right', defaultBorderStyle, ';', true);
|
120 |
+
fillSelect(0, 'border_style_bottom', 'style_border_style_bottom', defaultBorderStyle, ';', true);
|
121 |
+
fillSelect(0, 'border_style_left', 'style_border_style_left', defaultBorderStyle, ';', true);
|
122 |
+
|
123 |
+
fillSelect(0, 'border_width_top', 'style_border_width_top', defaultBorderWidth, ';', true);
|
124 |
+
fillSelect(0, 'border_width_right', 'style_border_width_right', defaultBorderWidth, ';', true);
|
125 |
+
fillSelect(0, 'border_width_bottom', 'style_border_width_bottom', defaultBorderWidth, ';', true);
|
126 |
+
fillSelect(0, 'border_width_left', 'style_border_width_left', defaultBorderWidth, ';', true);
|
127 |
+
|
128 |
+
fillSelect(0, 'border_width_top_measurement', 'style_border_width_top_measurement', defaultMeasurement, ';', true);
|
129 |
+
fillSelect(0, 'border_width_right_measurement', 'style_border_width_right_measurement', defaultMeasurement, ';', true);
|
130 |
+
fillSelect(0, 'border_width_bottom_measurement', 'style_border_width_bottom_measurement', defaultMeasurement, ';', true);
|
131 |
+
fillSelect(0, 'border_width_left_measurement', 'style_border_width_left_measurement', defaultMeasurement, ';', true);
|
132 |
+
|
133 |
+
fillSelect(0, 'list_type', 'style_list_type', defaultListType, ';', true);
|
134 |
+
fillSelect(0, 'list_position', 'style_list_position', "inside;outside", ';', true);
|
135 |
+
|
136 |
+
fillSelect(0, 'positioning_type', 'style_positioning_type', "absolute;relative;static", ';', true);
|
137 |
+
fillSelect(0, 'positioning_visibility', 'style_positioning_visibility', "inherit;visible;hidden", ';', true);
|
138 |
+
|
139 |
+
fillSelect(0, 'positioning_width_measurement', 'style_positioning_width_measurement', defaultMeasurement, ';', true);
|
140 |
+
fillSelect(0, 'positioning_height_measurement', 'style_positioning_height_measurement', defaultMeasurement, ';', true);
|
141 |
+
fillSelect(0, 'positioning_overflow', 'style_positioning_overflow', "visible;hidden;scroll;auto", ';', true);
|
142 |
+
|
143 |
+
fillSelect(0, 'positioning_placement_top_measurement', 'style_positioning_placement_top_measurement', defaultMeasurement, ';', true);
|
144 |
+
fillSelect(0, 'positioning_placement_right_measurement', 'style_positioning_placement_right_measurement', defaultMeasurement, ';', true);
|
145 |
+
fillSelect(0, 'positioning_placement_bottom_measurement', 'style_positioning_placement_bottom_measurement', defaultMeasurement, ';', true);
|
146 |
+
fillSelect(0, 'positioning_placement_left_measurement', 'style_positioning_placement_left_measurement', defaultMeasurement, ';', true);
|
147 |
+
|
148 |
+
fillSelect(0, 'positioning_clip_top_measurement', 'style_positioning_clip_top_measurement', defaultMeasurement, ';', true);
|
149 |
+
fillSelect(0, 'positioning_clip_right_measurement', 'style_positioning_clip_right_measurement', defaultMeasurement, ';', true);
|
150 |
+
fillSelect(0, 'positioning_clip_bottom_measurement', 'style_positioning_clip_bottom_measurement', defaultMeasurement, ';', true);
|
151 |
+
fillSelect(0, 'positioning_clip_left_measurement', 'style_positioning_clip_left_measurement', defaultMeasurement, ';', true);
|
152 |
+
|
153 |
+
TinyMCE_EditableSelects.init();
|
154 |
+
setupFormData();
|
155 |
+
showDisabledControls();
|
156 |
+
}
|
157 |
+
|
158 |
+
function setupFormData() {
|
159 |
+
var ce = document.getElementById('container'), f = document.forms[0], s, b, i;
|
160 |
+
|
161 |
+
// Setup text fields
|
162 |
+
|
163 |
+
selectByValue(f, 'text_font', ce.style.fontFamily, true, true);
|
164 |
+
selectByValue(f, 'text_size', getNum(ce.style.fontSize), true, true);
|
165 |
+
selectByValue(f, 'text_size_measurement', getMeasurement(ce.style.fontSize));
|
166 |
+
selectByValue(f, 'text_weight', ce.style.fontWeight, true, true);
|
167 |
+
selectByValue(f, 'text_style', ce.style.fontStyle, true, true);
|
168 |
+
selectByValue(f, 'text_lineheight', getNum(ce.style.lineHeight), true, true);
|
169 |
+
selectByValue(f, 'text_lineheight_measurement', getMeasurement(ce.style.lineHeight));
|
170 |
+
selectByValue(f, 'text_case', ce.style.textTransform, true, true);
|
171 |
+
selectByValue(f, 'text_variant', ce.style.fontVariant, true, true);
|
172 |
+
f.text_color.value = tinyMCEPopup.editor.dom.toHex(ce.style.color);
|
173 |
+
updateColor('text_color_pick', 'text_color');
|
174 |
+
f.text_underline.checked = inStr(ce.style.textDecoration, 'underline');
|
175 |
+
f.text_overline.checked = inStr(ce.style.textDecoration, 'overline');
|
176 |
+
f.text_linethrough.checked = inStr(ce.style.textDecoration, 'line-through');
|
177 |
+
f.text_blink.checked = inStr(ce.style.textDecoration, 'blink');
|
178 |
+
f.text_none.checked = inStr(ce.style.textDecoration, 'none');
|
179 |
+
updateTextDecorations();
|
180 |
+
|
181 |
+
// Setup background fields
|
182 |
+
|
183 |
+
f.background_color.value = tinyMCEPopup.editor.dom.toHex(ce.style.backgroundColor);
|
184 |
+
updateColor('background_color_pick', 'background_color');
|
185 |
+
f.background_image.value = ce.style.backgroundImage.replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");
|
186 |
+
selectByValue(f, 'background_repeat', ce.style.backgroundRepeat, true, true);
|
187 |
+
selectByValue(f, 'background_attachment', ce.style.backgroundAttachment, true, true);
|
188 |
+
selectByValue(f, 'background_hpos', getNum(getVal(ce.style.backgroundPosition, 0)), true, true);
|
189 |
+
selectByValue(f, 'background_hpos_measurement', getMeasurement(getVal(ce.style.backgroundPosition, 0)));
|
190 |
+
selectByValue(f, 'background_vpos', getNum(getVal(ce.style.backgroundPosition, 1)), true, true);
|
191 |
+
selectByValue(f, 'background_vpos_measurement', getMeasurement(getVal(ce.style.backgroundPosition, 1)));
|
192 |
+
|
193 |
+
// Setup block fields
|
194 |
+
|
195 |
+
selectByValue(f, 'block_wordspacing', getNum(ce.style.wordSpacing), true, true);
|
196 |
+
selectByValue(f, 'block_wordspacing_measurement', getMeasurement(ce.style.wordSpacing));
|
197 |
+
selectByValue(f, 'block_letterspacing', getNum(ce.style.letterSpacing), true, true);
|
198 |
+
selectByValue(f, 'block_letterspacing_measurement', getMeasurement(ce.style.letterSpacing));
|
199 |
+
selectByValue(f, 'block_vertical_alignment', ce.style.verticalAlign, true, true);
|
200 |
+
selectByValue(f, 'block_text_align', ce.style.textAlign, true, true);
|
201 |
+
f.block_text_indent.value = getNum(ce.style.textIndent);
|
202 |
+
selectByValue(f, 'block_text_indent_measurement', getMeasurement(ce.style.textIndent));
|
203 |
+
selectByValue(f, 'block_whitespace', ce.style.whiteSpace, true, true);
|
204 |
+
selectByValue(f, 'block_display', ce.style.display, true, true);
|
205 |
+
|
206 |
+
// Setup box fields
|
207 |
+
|
208 |
+
f.box_width.value = getNum(ce.style.width);
|
209 |
+
selectByValue(f, 'box_width_measurement', getMeasurement(ce.style.width));
|
210 |
+
|
211 |
+
f.box_height.value = getNum(ce.style.height);
|
212 |
+
selectByValue(f, 'box_height_measurement', getMeasurement(ce.style.height));
|
213 |
+
selectByValue(f, 'box_float', ce.style.cssFloat || ce.style.styleFloat, true, true);
|
214 |
+
|
215 |
+
selectByValue(f, 'box_clear', ce.style.clear, true, true);
|
216 |
+
|
217 |
+
setupBox(f, ce, 'box_padding', 'padding', '');
|
218 |
+
setupBox(f, ce, 'box_margin', 'margin', '');
|
219 |
+
|
220 |
+
// Setup border fields
|
221 |
+
|
222 |
+
setupBox(f, ce, 'border_style', 'border', 'Style');
|
223 |
+
setupBox(f, ce, 'border_width', 'border', 'Width');
|
224 |
+
setupBox(f, ce, 'border_color', 'border', 'Color');
|
225 |
+
|
226 |
+
updateColor('border_color_top_pick', 'border_color_top');
|
227 |
+
updateColor('border_color_right_pick', 'border_color_right');
|
228 |
+
updateColor('border_color_bottom_pick', 'border_color_bottom');
|
229 |
+
updateColor('border_color_left_pick', 'border_color_left');
|
230 |
+
|
231 |
+
f.elements.border_color_top.value = tinyMCEPopup.editor.dom.toHex(f.elements.border_color_top.value);
|
232 |
+
f.elements.border_color_right.value = tinyMCEPopup.editor.dom.toHex(f.elements.border_color_right.value);
|
233 |
+
f.elements.border_color_bottom.value = tinyMCEPopup.editor.dom.toHex(f.elements.border_color_bottom.value);
|
234 |
+
f.elements.border_color_left.value = tinyMCEPopup.editor.dom.toHex(f.elements.border_color_left.value);
|
235 |
+
|
236 |
+
// Setup list fields
|
237 |
+
|
238 |
+
selectByValue(f, 'list_type', ce.style.listStyleType, true, true);
|
239 |
+
selectByValue(f, 'list_position', ce.style.listStylePosition, true, true);
|
240 |
+
f.list_bullet_image.value = ce.style.listStyleImage.replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");
|
241 |
+
|
242 |
+
// Setup box fields
|
243 |
+
|
244 |
+
selectByValue(f, 'positioning_type', ce.style.position, true, true);
|
245 |
+
selectByValue(f, 'positioning_visibility', ce.style.visibility, true, true);
|
246 |
+
selectByValue(f, 'positioning_overflow', ce.style.overflow, true, true);
|
247 |
+
f.positioning_zindex.value = ce.style.zIndex ? ce.style.zIndex : "";
|
248 |
+
|
249 |
+
f.positioning_width.value = getNum(ce.style.width);
|
250 |
+
selectByValue(f, 'positioning_width_measurement', getMeasurement(ce.style.width));
|
251 |
+
|
252 |
+
f.positioning_height.value = getNum(ce.style.height);
|
253 |
+
selectByValue(f, 'positioning_height_measurement', getMeasurement(ce.style.height));
|
254 |
+
|
255 |
+
setupBox(f, ce, 'positioning_placement', '', '', ['top', 'right', 'bottom', 'left']);
|
256 |
+
|
257 |
+
s = ce.style.clip.replace(new RegExp("rect\\('?([^']*)'?\\)", 'gi'), "$1");
|
258 |
+
s = s.replace(/,/g, ' ');
|
259 |
+
|
260 |
+
if (!hasEqualValues([getVal(s, 0), getVal(s, 1), getVal(s, 2), getVal(s, 3)])) {
|
261 |
+
f.positioning_clip_top.value = getNum(getVal(s, 0));
|
262 |
+
selectByValue(f, 'positioning_clip_top_measurement', getMeasurement(getVal(s, 0)));
|
263 |
+
f.positioning_clip_right.value = getNum(getVal(s, 1));
|
264 |
+
selectByValue(f, 'positioning_clip_right_measurement', getMeasurement(getVal(s, 1)));
|
265 |
+
f.positioning_clip_bottom.value = getNum(getVal(s, 2));
|
266 |
+
selectByValue(f, 'positioning_clip_bottom_measurement', getMeasurement(getVal(s, 2)));
|
267 |
+
f.positioning_clip_left.value = getNum(getVal(s, 3));
|
268 |
+
selectByValue(f, 'positioning_clip_left_measurement', getMeasurement(getVal(s, 3)));
|
269 |
+
} else {
|
270 |
+
f.positioning_clip_top.value = getNum(getVal(s, 0));
|
271 |
+
selectByValue(f, 'positioning_clip_top_measurement', getMeasurement(getVal(s, 0)));
|
272 |
+
f.positioning_clip_right.value = f.positioning_clip_bottom.value = f.positioning_clip_left.value;
|
273 |
+
}
|
274 |
+
|
275 |
+
// setupBox(f, ce, '', 'border', 'Color');
|
276 |
+
}
|
277 |
+
|
278 |
+
function getMeasurement(s) {
|
279 |
+
return s.replace(/^([0-9.]+)(.*)$/, "$2");
|
280 |
+
}
|
281 |
+
|
282 |
+
function getNum(s) {
|
283 |
+
if (new RegExp('^(?:[0-9.]+)(?:[a-z%]+)$', 'gi').test(s))
|
284 |
+
return s.replace(/[^0-9.]/g, '');
|
285 |
+
|
286 |
+
return s;
|
287 |
+
}
|
288 |
+
|
289 |
+
function inStr(s, n) {
|
290 |
+
return new RegExp(n, 'gi').test(s);
|
291 |
+
}
|
292 |
+
|
293 |
+
function getVal(s, i) {
|
294 |
+
var a = s.split(' ');
|
295 |
+
|
296 |
+
if (a.length > 1)
|
297 |
+
return a[i];
|
298 |
+
|
299 |
+
return "";
|
300 |
+
}
|
301 |
+
|
302 |
+
function setValue(f, n, v) {
|
303 |
+
if (f.elements[n].type == "text")
|
304 |
+
f.elements[n].value = v;
|
305 |
+
else
|
306 |
+
selectByValue(f, n, v, true, true);
|
307 |
+
}
|
308 |
+
|
309 |
+
function setupBox(f, ce, fp, pr, sf, b) {
|
310 |
+
if (typeof(b) == "undefined")
|
311 |
+
b = ['Top', 'Right', 'Bottom', 'Left'];
|
312 |
+
|
313 |
+
if (isSame(ce, pr, sf, b)) {
|
314 |
+
f.elements[fp + "_same"].checked = true;
|
315 |
+
|
316 |
+
setValue(f, fp + "_top", getNum(ce.style[pr + b[0] + sf]));
|
317 |
+
f.elements[fp + "_top"].disabled = false;
|
318 |
+
|
319 |
+
f.elements[fp + "_right"].value = "";
|
320 |
+
f.elements[fp + "_right"].disabled = true;
|
321 |
+
f.elements[fp + "_bottom"].value = "";
|
322 |
+
f.elements[fp + "_bottom"].disabled = true;
|
323 |
+
f.elements[fp + "_left"].value = "";
|
324 |
+
f.elements[fp + "_left"].disabled = true;
|
325 |
+
|
326 |
+
if (f.elements[fp + "_top_measurement"]) {
|
327 |
+
selectByValue(f, fp + '_top_measurement', getMeasurement(ce.style[pr + b[0] + sf]));
|
328 |
+
f.elements[fp + "_left_measurement"].disabled = true;
|
329 |
+
f.elements[fp + "_bottom_measurement"].disabled = true;
|
330 |
+
f.elements[fp + "_right_measurement"].disabled = true;
|
331 |
+
}
|
332 |
+
} else {
|
333 |
+
f.elements[fp + "_same"].checked = false;
|
334 |
+
|
335 |
+
setValue(f, fp + "_top", getNum(ce.style[pr + b[0] + sf]));
|
336 |
+
f.elements[fp + "_top"].disabled = false;
|
337 |
+
|
338 |
+
setValue(f, fp + "_right", getNum(ce.style[pr + b[1] + sf]));
|
339 |
+
f.elements[fp + "_right"].disabled = false;
|
340 |
+
|
341 |
+
setValue(f, fp + "_bottom", getNum(ce.style[pr + b[2] + sf]));
|
342 |
+
f.elements[fp + "_bottom"].disabled = false;
|
343 |
+
|
344 |
+
setValue(f, fp + "_left", getNum(ce.style[pr + b[3] + sf]));
|
345 |
+
f.elements[fp + "_left"].disabled = false;
|
346 |
+
|
347 |
+
if (f.elements[fp + "_top_measurement"]) {
|
348 |
+
selectByValue(f, fp + '_top_measurement', getMeasurement(ce.style[pr + b[0] + sf]));
|
349 |
+
selectByValue(f, fp + '_right_measurement', getMeasurement(ce.style[pr + b[1] + sf]));
|
350 |
+
selectByValue(f, fp + '_bottom_measurement', getMeasurement(ce.style[pr + b[2] + sf]));
|
351 |
+
selectByValue(f, fp + '_left_measurement', getMeasurement(ce.style[pr + b[3] + sf]));
|
352 |
+
f.elements[fp + "_left_measurement"].disabled = false;
|
353 |
+
f.elements[fp + "_bottom_measurement"].disabled = false;
|
354 |
+
f.elements[fp + "_right_measurement"].disabled = false;
|
355 |
+
}
|
356 |
+
}
|
357 |
+
}
|
358 |
+
|
359 |
+
function isSame(e, pr, sf, b) {
|
360 |
+
var a = [], i, x;
|
361 |
+
|
362 |
+
if (typeof(b) == "undefined")
|
363 |
+
b = ['Top', 'Right', 'Bottom', 'Left'];
|
364 |
+
|
365 |
+
if (typeof(sf) == "undefined" || sf == null)
|
366 |
+
sf = "";
|
367 |
+
|
368 |
+
a[0] = e.style[pr + b[0] + sf];
|
369 |
+
a[1] = e.style[pr + b[1] + sf];
|
370 |
+
a[2] = e.style[pr + b[2] + sf];
|
371 |
+
a[3] = e.style[pr + b[3] + sf];
|
372 |
+
|
373 |
+
for (i=0; i<a.length; i++) {
|
374 |
+
if (a[i] == null)
|
375 |
+
return false;
|
376 |
+
|
377 |
+
for (x=0; x<a.length; x++) {
|
378 |
+
if (a[x] != a[i])
|
379 |
+
return false;
|
380 |
+
}
|
381 |
+
}
|
382 |
+
|
383 |
+
return true;
|
384 |
+
};
|
385 |
+
|
386 |
+
function hasEqualValues(a) {
|
387 |
+
var i, x;
|
388 |
+
|
389 |
+
for (i=0; i<a.length; i++) {
|
390 |
+
if (a[i] == null)
|
391 |
+
return false;
|
392 |
+
|
393 |
+
for (x=0; x<a.length; x++) {
|
394 |
+
if (a[x] != a[i])
|
395 |
+
return false;
|
396 |
+
}
|
397 |
+
}
|
398 |
+
|
399 |
+
return true;
|
400 |
+
}
|
401 |
+
|
402 |
+
function toggleApplyAction() {
|
403 |
+
applyActionIsInsert = ! applyActionIsInsert;
|
404 |
+
}
|
405 |
+
|
406 |
+
function applyAction() {
|
407 |
+
var ce = document.getElementById('container'), ed = tinyMCEPopup.editor;
|
408 |
+
|
409 |
+
generateCSS();
|
410 |
+
|
411 |
+
tinyMCEPopup.restoreSelection();
|
412 |
+
|
413 |
+
var newStyles = tinyMCEPopup.editor.dom.parseStyle(ce.style.cssText);
|
414 |
+
|
415 |
+
if (applyActionIsInsert) {
|
416 |
+
ed.formatter.register('plugin_style', {
|
417 |
+
inline: 'span', styles: existingStyles
|
418 |
+
});
|
419 |
+
ed.formatter.remove('plugin_style');
|
420 |
+
|
421 |
+
ed.formatter.register('plugin_style', {
|
422 |
+
inline: 'span', styles: newStyles
|
423 |
+
});
|
424 |
+
ed.formatter.apply('plugin_style');
|
425 |
+
} else {
|
426 |
+
var nodes;
|
427 |
+
|
428 |
+
if (tinyMCEPopup.getWindowArg('applyStyleToBlocks')) {
|
429 |
+
nodes = ed.selection.getSelectedBlocks();
|
430 |
+
}
|
431 |
+
else {
|
432 |
+
nodes = ed.selection.getNode();
|
433 |
+
}
|
434 |
+
|
435 |
+
ed.dom.setAttrib(nodes, 'style', tinyMCEPopup.editor.dom.serializeStyle(newStyles));
|
436 |
+
}
|
437 |
+
}
|
438 |
+
|
439 |
+
function updateAction() {
|
440 |
+
applyAction();
|
441 |
+
tinyMCEPopup.close();
|
442 |
+
}
|
443 |
+
|
444 |
+
function generateCSS() {
|
445 |
+
var ce = document.getElementById('container'), f = document.forms[0], num = new RegExp('[0-9]+', 'g'), s, t;
|
446 |
+
|
447 |
+
ce.style.cssText = "";
|
448 |
+
|
449 |
+
// Build text styles
|
450 |
+
ce.style.fontFamily = f.text_font.value;
|
451 |
+
ce.style.fontSize = f.text_size.value + (isNum(f.text_size.value) ? (f.text_size_measurement.value || 'px') : "");
|
452 |
+
ce.style.fontStyle = f.text_style.value;
|
453 |
+
ce.style.lineHeight = f.text_lineheight.value + (isNum(f.text_lineheight.value) ? f.text_lineheight_measurement.value : "");
|
454 |
+
ce.style.textTransform = f.text_case.value;
|
455 |
+
ce.style.fontWeight = f.text_weight.value;
|
456 |
+
ce.style.fontVariant = f.text_variant.value;
|
457 |
+
ce.style.color = f.text_color.value;
|
458 |
+
|
459 |
+
s = "";
|
460 |
+
s += f.text_underline.checked ? " underline" : "";
|
461 |
+
s += f.text_overline.checked ? " overline" : "";
|
462 |
+
s += f.text_linethrough.checked ? " line-through" : "";
|
463 |
+
s += f.text_blink.checked ? " blink" : "";
|
464 |
+
s = s.length > 0 ? s.substring(1) : s;
|
465 |
+
|
466 |
+
if (f.text_none.checked)
|
467 |
+
s = "none";
|
468 |
+
|
469 |
+
ce.style.textDecoration = s;
|
470 |
+
|
471 |
+
// Build background styles
|
472 |
+
|
473 |
+
ce.style.backgroundColor = f.background_color.value;
|
474 |
+
ce.style.backgroundImage = f.background_image.value != "" ? "url(" + f.background_image.value + ")" : "";
|
475 |
+
ce.style.backgroundRepeat = f.background_repeat.value;
|
476 |
+
ce.style.backgroundAttachment = f.background_attachment.value;
|
477 |
+
|
478 |
+
if (f.background_hpos.value != "") {
|
479 |
+
s = "";
|
480 |
+
s += f.background_hpos.value + (isNum(f.background_hpos.value) ? f.background_hpos_measurement.value : "") + " ";
|
481 |
+
s += f.background_vpos.value + (isNum(f.background_vpos.value) ? f.background_vpos_measurement.value : "");
|
482 |
+
ce.style.backgroundPosition = s;
|
483 |
+
}
|
484 |
+
|
485 |
+
// Build block styles
|
486 |
+
|
487 |
+
ce.style.wordSpacing = f.block_wordspacing.value + (isNum(f.block_wordspacing.value) ? f.block_wordspacing_measurement.value : "");
|
488 |
+
ce.style.letterSpacing = f.block_letterspacing.value + (isNum(f.block_letterspacing.value) ? f.block_letterspacing_measurement.value : "");
|
489 |
+
ce.style.verticalAlign = f.block_vertical_alignment.value;
|
490 |
+
ce.style.textAlign = f.block_text_align.value;
|
491 |
+
ce.style.textIndent = f.block_text_indent.value + (isNum(f.block_text_indent.value) ? f.block_text_indent_measurement.value : "");
|
492 |
+
ce.style.whiteSpace = f.block_whitespace.value;
|
493 |
+
ce.style.display = f.block_display.value;
|
494 |
+
|
495 |
+
// Build box styles
|
496 |
+
|
497 |
+
ce.style.width = f.box_width.value + (isNum(f.box_width.value) ? f.box_width_measurement.value : "");
|
498 |
+
ce.style.height = f.box_height.value + (isNum(f.box_height.value) ? f.box_height_measurement.value : "");
|
499 |
+
ce.style.styleFloat = f.box_float.value;
|
500 |
+
ce.style.cssFloat = f.box_float.value;
|
501 |
+
|
502 |
+
ce.style.clear = f.box_clear.value;
|
503 |
+
|
504 |
+
if (!f.box_padding_same.checked) {
|
505 |
+
ce.style.paddingTop = f.box_padding_top.value + (isNum(f.box_padding_top.value) ? f.box_padding_top_measurement.value : "");
|
506 |
+
ce.style.paddingRight = f.box_padding_right.value + (isNum(f.box_padding_right.value) ? f.box_padding_right_measurement.value : "");
|
507 |
+
ce.style.paddingBottom = f.box_padding_bottom.value + (isNum(f.box_padding_bottom.value) ? f.box_padding_bottom_measurement.value : "");
|
508 |
+
ce.style.paddingLeft = f.box_padding_left.value + (isNum(f.box_padding_left.value) ? f.box_padding_left_measurement.value : "");
|
509 |
+
} else
|
510 |
+
ce.style.padding = f.box_padding_top.value + (isNum(f.box_padding_top.value) ? f.box_padding_top_measurement.value : "");
|
511 |
+
|
512 |
+
if (!f.box_margin_same.checked) {
|
513 |
+
ce.style.marginTop = f.box_margin_top.value + (isNum(f.box_margin_top.value) ? f.box_margin_top_measurement.value : "");
|
514 |
+
ce.style.marginRight = f.box_margin_right.value + (isNum(f.box_margin_right.value) ? f.box_margin_right_measurement.value : "");
|
515 |
+
ce.style.marginBottom = f.box_margin_bottom.value + (isNum(f.box_margin_bottom.value) ? f.box_margin_bottom_measurement.value : "");
|
516 |
+
ce.style.marginLeft = f.box_margin_left.value + (isNum(f.box_margin_left.value) ? f.box_margin_left_measurement.value : "");
|
517 |
+
} else
|
518 |
+
ce.style.margin = f.box_margin_top.value + (isNum(f.box_margin_top.value) ? f.box_margin_top_measurement.value : "");
|
519 |
+
|
520 |
+
// Build border styles
|
521 |
+
|
522 |
+
if (!f.border_style_same.checked) {
|
523 |
+
ce.style.borderTopStyle = f.border_style_top.value;
|
524 |
+
ce.style.borderRightStyle = f.border_style_right.value;
|
525 |
+
ce.style.borderBottomStyle = f.border_style_bottom.value;
|
526 |
+
ce.style.borderLeftStyle = f.border_style_left.value;
|
527 |
+
} else
|
528 |
+
ce.style.borderStyle = f.border_style_top.value;
|
529 |
+
|
530 |
+
if (!f.border_width_same.checked) {
|
531 |
+
ce.style.borderTopWidth = f.border_width_top.value + (isNum(f.border_width_top.value) ? f.border_width_top_measurement.value : "");
|
532 |
+
ce.style.borderRightWidth = f.border_width_right.value + (isNum(f.border_width_right.value) ? f.border_width_right_measurement.value : "");
|
533 |
+
ce.style.borderBottomWidth = f.border_width_bottom.value + (isNum(f.border_width_bottom.value) ? f.border_width_bottom_measurement.value : "");
|
534 |
+
ce.style.borderLeftWidth = f.border_width_left.value + (isNum(f.border_width_left.value) ? f.border_width_left_measurement.value : "");
|
535 |
+
} else
|
536 |
+
ce.style.borderWidth = f.border_width_top.value + (isNum(f.border_width_top.value) ? f.border_width_top_measurement.value : "");
|
537 |
+
|
538 |
+
if (!f.border_color_same.checked) {
|
539 |
+
ce.style.borderTopColor = f.border_color_top.value;
|
540 |
+
ce.style.borderRightColor = f.border_color_right.value;
|
541 |
+
ce.style.borderBottomColor = f.border_color_bottom.value;
|
542 |
+
ce.style.borderLeftColor = f.border_color_left.value;
|
543 |
+
} else
|
544 |
+
ce.style.borderColor = f.border_color_top.value;
|
545 |
+
|
546 |
+
// Build list styles
|
547 |
+
|
548 |
+
ce.style.listStyleType = f.list_type.value;
|
549 |
+
ce.style.listStylePosition = f.list_position.value;
|
550 |
+
ce.style.listStyleImage = f.list_bullet_image.value != "" ? "url(" + f.list_bullet_image.value + ")" : "";
|
551 |
+
|
552 |
+
// Build positioning styles
|
553 |
+
|
554 |
+
ce.style.position = f.positioning_type.value;
|
555 |
+
ce.style.visibility = f.positioning_visibility.value;
|
556 |
+
|
557 |
+
if (ce.style.width == "")
|
558 |
+
ce.style.width = f.positioning_width.value + (isNum(f.positioning_width.value) ? f.positioning_width_measurement.value : "");
|
559 |
+
|
560 |
+
if (ce.style.height == "")
|
561 |
+
ce.style.height = f.positioning_height.value + (isNum(f.positioning_height.value) ? f.positioning_height_measurement.value : "");
|
562 |
+
|
563 |
+
ce.style.zIndex = f.positioning_zindex.value;
|
564 |
+
ce.style.overflow = f.positioning_overflow.value;
|
565 |
+
|
566 |
+
if (!f.positioning_placement_same.checked) {
|
567 |
+
ce.style.top = f.positioning_placement_top.value + (isNum(f.positioning_placement_top.value) ? f.positioning_placement_top_measurement.value : "");
|
568 |
+
ce.style.right = f.positioning_placement_right.value + (isNum(f.positioning_placement_right.value) ? f.positioning_placement_right_measurement.value : "");
|
569 |
+
ce.style.bottom = f.positioning_placement_bottom.value + (isNum(f.positioning_placement_bottom.value) ? f.positioning_placement_bottom_measurement.value : "");
|
570 |
+
ce.style.left = f.positioning_placement_left.value + (isNum(f.positioning_placement_left.value) ? f.positioning_placement_left_measurement.value : "");
|
571 |
+
} else {
|
572 |
+
s = f.positioning_placement_top.value + (isNum(f.positioning_placement_top.value) ? f.positioning_placement_top_measurement.value : "");
|
573 |
+
ce.style.top = s;
|
574 |
+
ce.style.right = s;
|
575 |
+
ce.style.bottom = s;
|
576 |
+
ce.style.left = s;
|
577 |
+
}
|
578 |
+
|
579 |
+
if (!f.positioning_clip_same.checked) {
|
580 |
+
s = "rect(";
|
581 |
+
s += (isNum(f.positioning_clip_top.value) ? f.positioning_clip_top.value + f.positioning_clip_top_measurement.value : "auto") + " ";
|
582 |
+
s += (isNum(f.positioning_clip_right.value) ? f.positioning_clip_right.value + f.positioning_clip_right_measurement.value : "auto") + " ";
|
583 |
+
s += (isNum(f.positioning_clip_bottom.value) ? f.positioning_clip_bottom.value + f.positioning_clip_bottom_measurement.value : "auto") + " ";
|
584 |
+
s += (isNum(f.positioning_clip_left.value) ? f.positioning_clip_left.value + f.positioning_clip_left_measurement.value : "auto");
|
585 |
+
s += ")";
|
586 |
+
|
587 |
+
if (s != "rect(auto auto auto auto)")
|
588 |
+
ce.style.clip = s;
|
589 |
+
} else {
|
590 |
+
s = "rect(";
|
591 |
+
t = isNum(f.positioning_clip_top.value) ? f.positioning_clip_top.value + f.positioning_clip_top_measurement.value : "auto";
|
592 |
+
s += t + " ";
|
593 |
+
s += t + " ";
|
594 |
+
s += t + " ";
|
595 |
+
s += t + ")";
|
596 |
+
|
597 |
+
if (s != "rect(auto auto auto auto)")
|
598 |
+
ce.style.clip = s;
|
599 |
+
}
|
600 |
+
|
601 |
+
ce.style.cssText = ce.style.cssText;
|
602 |
+
}
|
603 |
+
|
604 |
+
function isNum(s) {
|
605 |
+
return new RegExp('[0-9]+', 'g').test(s);
|
606 |
+
}
|
607 |
+
|
608 |
+
function showDisabledControls() {
|
609 |
+
var f = document.forms, i, a;
|
610 |
+
|
611 |
+
for (i=0; i<f.length; i++) {
|
612 |
+
for (a=0; a<f[i].elements.length; a++) {
|
613 |
+
if (f[i].elements[a].disabled)
|
614 |
+
tinyMCEPopup.editor.dom.addClass(f[i].elements[a], "disabled");
|
615 |
+
else
|
616 |
+
tinyMCEPopup.editor.dom.removeClass(f[i].elements[a], "disabled");
|
617 |
+
}
|
618 |
+
}
|
619 |
+
}
|
620 |
+
|
621 |
+
function fillSelect(f, s, param, dval, sep, em) {
|
622 |
+
var i, ar, p, se;
|
623 |
+
|
624 |
+
f = document.forms[f];
|
625 |
+
sep = typeof(sep) == "undefined" ? ";" : sep;
|
626 |
+
|
627 |
+
if (em)
|
628 |
+
addSelectValue(f, s, "", "");
|
629 |
+
|
630 |
+
ar = tinyMCEPopup.getParam(param, dval).split(sep);
|
631 |
+
for (i=0; i<ar.length; i++) {
|
632 |
+
se = false;
|
633 |
+
|
634 |
+
if (ar[i].charAt(0) == '+') {
|
635 |
+
ar[i] = ar[i].substring(1);
|
636 |
+
se = true;
|
637 |
+
}
|
638 |
+
|
639 |
+
p = ar[i].split('=');
|
640 |
+
|
641 |
+
if (p.length > 1) {
|
642 |
+
addSelectValue(f, s, p[0], p[1]);
|
643 |
+
|
644 |
+
if (se)
|
645 |
+
selectByValue(f, s, p[1]);
|
646 |
+
} else {
|
647 |
+
addSelectValue(f, s, p[0], p[0]);
|
648 |
+
|
649 |
+
if (se)
|
650 |
+
selectByValue(f, s, p[0]);
|
651 |
+
}
|
652 |
+
}
|
653 |
+
}
|
654 |
+
|
655 |
+
function toggleSame(ce, pre) {
|
656 |
+
var el = document.forms[0].elements, i;
|
657 |
+
|
658 |
+
if (ce.checked) {
|
659 |
+
el[pre + "_top"].disabled = false;
|
660 |
+
el[pre + "_right"].disabled = true;
|
661 |
+
el[pre + "_bottom"].disabled = true;
|
662 |
+
el[pre + "_left"].disabled = true;
|
663 |
+
|
664 |
+
if (el[pre + "_top_measurement"]) {
|
665 |
+
el[pre + "_top_measurement"].disabled = false;
|
666 |
+
el[pre + "_right_measurement"].disabled = true;
|
667 |
+
el[pre + "_bottom_measurement"].disabled = true;
|
668 |
+
el[pre + "_left_measurement"].disabled = true;
|
669 |
+
}
|
670 |
+
} else {
|
671 |
+
el[pre + "_top"].disabled = false;
|
672 |
+
el[pre + "_right"].disabled = false;
|
673 |
+
el[pre + "_bottom"].disabled = false;
|
674 |
+
el[pre + "_left"].disabled = false;
|
675 |
+
|
676 |
+
if (el[pre + "_top_measurement"]) {
|
677 |
+
el[pre + "_top_measurement"].disabled = false;
|
678 |
+
el[pre + "_right_measurement"].disabled = false;
|
679 |
+
el[pre + "_bottom_measurement"].disabled = false;
|
680 |
+
el[pre + "_left_measurement"].disabled = false;
|
681 |
+
}
|
682 |
+
}
|
683 |
+
|
684 |
+
showDisabledControls();
|
685 |
+
}
|
686 |
+
|
687 |
+
function synch(fr, to) {
|
688 |
+
var f = document.forms[0];
|
689 |
+
|
690 |
+
f.elements[to].value = f.elements[fr].value;
|
691 |
+
|
692 |
+
if (f.elements[fr + "_measurement"])
|
693 |
+
selectByValue(f, to + "_measurement", f.elements[fr + "_measurement"].value);
|
694 |
+
}
|
695 |
+
|
696 |
+
function updateTextDecorations(){
|
697 |
+
var el = document.forms[0].elements;
|
698 |
+
|
699 |
+
var textDecorations = ["text_underline", "text_overline", "text_linethrough", "text_blink"];
|
700 |
+
var noneChecked = el["text_none"].checked;
|
701 |
+
tinymce.each(textDecorations, function(id) {
|
702 |
+
el[id].disabled = noneChecked;
|
703 |
+
if (noneChecked) {
|
704 |
+
el[id].checked = false;
|
705 |
+
}
|
706 |
+
});
|
707 |
+
}
|
708 |
+
|
709 |
+
tinyMCEPopup.onInit.add(init);
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/style/langs/en_dlg.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
tinyMCE.addI18n('en.style_dlg',{"text_lineheight":"Line Height","text_variant":"Variant","text_style":"Style","text_weight":"Weight","text_size":"Size","text_font":"Font","text_props":"Text","positioning_tab":"Positioning","list_tab":"List","border_tab":"Border","box_tab":"Box","block_tab":"Block","background_tab":"Background","text_tab":"Text",apply:"Apply",toggle_insert_span:"Insert span at selection",title:"Edit CSS Style",clip:"Clip",placement:"Placement",overflow:"Overflow",zindex:"Z-index",visibility:"Visibility","positioning_type":"Type",position:"Position","bullet_image":"Bullet Image","list_type":"Type",color:"Color",height:"Height",width:"Width",style:"Style",margin:"Margin",left:"Left",bottom:"Bottom",right:"Right",top:"Top",same:"Same for All",padding:"Padding","box_clear":"Clear","box_float":"Float","box_height":"Height","box_width":"Width","block_display":"Display","block_whitespace":"Whitespace","block_text_indent":"Text Indent","block_text_align":"Text Align","block_vertical_alignment":"Vertical Alignment","block_letterspacing":"Letter Spacing","block_wordspacing":"Word Spacing","background_vpos":"Vertical Position","background_hpos":"Horizontal Position","background_attachment":"Attachment","background_repeat":"Repeat","background_image":"Background Image","background_color":"Background Color","text_none":"None","text_blink":"Blink","text_case":"Case","text_striketrough":"Strikethrough","text_underline":"Underline","text_overline":"Overline","text_decoration":"Decoration","text_color":"Color",text:"Text",background:"Background",block:"Block",box:"Box",border:"Border",list:"List"});
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/style/props.htm
ADDED
@@ -0,0 +1,845 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2 |
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
+
<head>
|
4 |
+
<title>{#style_dlg.title}</title>
|
5 |
+
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
6 |
+
<script type="text/javascript" src="../../utils/mctabs.js"></script>
|
7 |
+
<script type="text/javascript" src="../../utils/editable_selects.js"></script>
|
8 |
+
<script type="text/javascript" src="../../utils/form_utils.js"></script>
|
9 |
+
<script type="text/javascript" src="js/props.js"></script>
|
10 |
+
<link href="css/props.css" rel="stylesheet" type="text/css" />
|
11 |
+
</head>
|
12 |
+
|
13 |
+
<body id="styleprops" style="display: none" role="application" aria-labelledby="app_title">
|
14 |
+
<span id="app_title" style="display:none">{#style_dlg.title}</span>
|
15 |
+
<form onsubmit="updateAction();return false;" action="#">
|
16 |
+
<div class="tabs">
|
17 |
+
<ul>
|
18 |
+
<li id="text_tab" class="current" aria-controls="text_panel"><span><a href="javascript:mcTabs.displayTab('text_tab','text_panel');" onMouseDown="return false;">{#style_dlg.text_tab}</a></span></li>
|
19 |
+
<li id="background_tab" aria-controls="background_panel"><span><a href="javascript:mcTabs.displayTab('background_tab','background_panel');" onMouseDown="return false;">{#style_dlg.background_tab}</a></span></li>
|
20 |
+
<li id="block_tab" aria-controls="block_panel"><span><a href="javascript:mcTabs.displayTab('block_tab','block_panel');" onMouseDown="return false;">{#style_dlg.block_tab}</a></span></li>
|
21 |
+
<li id="box_tab" aria-controls="box_panel"><span><a href="javascript:mcTabs.displayTab('box_tab','box_panel');" onMouseDown="return false;">{#style_dlg.box_tab}</a></span></li>
|
22 |
+
<li id="border_tab" aria-controls="border_panel"><span><a href="javascript:mcTabs.displayTab('border_tab','border_panel');" onMouseDown="return false;">{#style_dlg.border_tab}</a></span></li>
|
23 |
+
<li id="list_tab" aria-controls="list_panel"><span><a href="javascript:mcTabs.displayTab('list_tab','list_panel');" onMouseDown="return false;">{#style_dlg.list_tab}</a></span></li>
|
24 |
+
<li id="positioning_tab" aria-controls="positioning_panel"><span><a href="javascript:mcTabs.displayTab('positioning_tab','positioning_panel');" onMouseDown="return false;">{#style_dlg.positioning_tab}</a></span></li>
|
25 |
+
</ul>
|
26 |
+
</div>
|
27 |
+
|
28 |
+
<div class="panel_wrapper">
|
29 |
+
<div id="text_panel" class="panel current">
|
30 |
+
<fieldset>
|
31 |
+
<legend>{#style_dlg.text}</legend>
|
32 |
+
<table role="presentation" border="0" width="100%">
|
33 |
+
<tr>
|
34 |
+
<td><label for="text_font">{#style_dlg.text_font}</label></td>
|
35 |
+
<td colspan="3">
|
36 |
+
<select id="text_font" name="text_font" class="mceEditableSelect mceFocus"></select>
|
37 |
+
</td>
|
38 |
+
</tr>
|
39 |
+
<tr>
|
40 |
+
<td><label for="text_size">{#style_dlg.text_size}</label></td>
|
41 |
+
<td>
|
42 |
+
<table role="presentation" border="0" cellspacing="0" cellpadding="0">
|
43 |
+
<tr>
|
44 |
+
<td><select id="text_size" name="text_size" class="mceEditableSelect"></select></td>
|
45 |
+
<td> </td>
|
46 |
+
<td>
|
47 |
+
<label id="text_size_measurement_label" for="text_size_measurement" style="display: none; visibility: hidden;">Text Size Measurement Unit</label>
|
48 |
+
<select id="text_size_measurement" name="text_size_measurement" aria-labelledby="text_size_measurement_label"></select>
|
49 |
+
</td>
|
50 |
+
</tr>
|
51 |
+
</table>
|
52 |
+
</td>
|
53 |
+
<td><label for="text_weight">{#style_dlg.text_weight}</label></td>
|
54 |
+
<td>
|
55 |
+
<select id="text_weight" name="text_weight"></select>
|
56 |
+
</td>
|
57 |
+
</tr>
|
58 |
+
<tr>
|
59 |
+
<td><label for="text_style">{#style_dlg.text_style}</label></td>
|
60 |
+
<td>
|
61 |
+
<select id="text_style" name="text_style" class="mceEditableSelect"></select>
|
62 |
+
</td>
|
63 |
+
<td><label for="text_variant">{#style_dlg.text_variant}</label></td>
|
64 |
+
<td>
|
65 |
+
<select id="text_variant" name="text_variant"></select>
|
66 |
+
</td>
|
67 |
+
</tr>
|
68 |
+
<tr>
|
69 |
+
<td><label for="text_lineheight">{#style_dlg.text_lineheight}</label></td>
|
70 |
+
<td>
|
71 |
+
<table role="presentation" border="0" cellspacing="0" cellpadding="0">
|
72 |
+
<tr>
|
73 |
+
<td>
|
74 |
+
<select id="text_lineheight" name="text_lineheight" class="mceEditableSelect"></select>
|
75 |
+
</td>
|
76 |
+
<td> </td>
|
77 |
+
<td>
|
78 |
+
<label id="text_lineheight_measurement_label" for="text_lineheight_measurement" style="display: none; visibility: hidden;">Line Height Measurement Unit</label>
|
79 |
+
<select id="text_lineheight_measurement" name="text_lineheight_measurement" aria-labelledby="text_lineheight_measurement_label"></select>
|
80 |
+
</td>
|
81 |
+
</tr>
|
82 |
+
</table>
|
83 |
+
</td>
|
84 |
+
<td><label for="text_case">{#style_dlg.text_case}</label></td>
|
85 |
+
<td>
|
86 |
+
<select id="text_case" name="text_case"></select>
|
87 |
+
</td>
|
88 |
+
</tr>
|
89 |
+
<tr>
|
90 |
+
<td><label for="text_color">{#style_dlg.text_color}</label></td>
|
91 |
+
<td colspan="2">
|
92 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
93 |
+
<tr>
|
94 |
+
<td><input id="text_color" name="text_color" type="text" value="" size="9" onChange="updateColor('text_color_pick','text_color');" /></td>
|
95 |
+
<td id="text_color_pickcontainer"> </td>
|
96 |
+
</tr>
|
97 |
+
</table>
|
98 |
+
</td>
|
99 |
+
</tr>
|
100 |
+
<tr>
|
101 |
+
<td valign="top" style="vertical-align: top; padding-top: 3px;">{#style_dlg.text_decoration}</td>
|
102 |
+
<td colspan="2">
|
103 |
+
<table role="presentation" border="0" cellspacing="0" cellpadding="0">
|
104 |
+
<tr>
|
105 |
+
<td><input id="text_underline" name="text_underline" class="checkbox" type="checkbox" /></td>
|
106 |
+
<td><label for="text_underline">{#style_dlg.text_underline}</label></td>
|
107 |
+
</tr>
|
108 |
+
<tr>
|
109 |
+
<td><input id="text_overline" name="text_overline" class="checkbox" type="checkbox" /></td>
|
110 |
+
<td><label for="text_overline">{#style_dlg.text_overline}</label></td>
|
111 |
+
</tr>
|
112 |
+
<tr>
|
113 |
+
<td><input id="text_linethrough" name="text_linethrough" class="checkbox" type="checkbox" /></td>
|
114 |
+
<td><label for="text_linethrough">{#style_dlg.text_striketrough}</label></td>
|
115 |
+
</tr>
|
116 |
+
<tr>
|
117 |
+
<td><input id="text_blink" name="text_blink" class="checkbox" type="checkbox" /></td>
|
118 |
+
<td><label for="text_blink">{#style_dlg.text_blink}</label></td>
|
119 |
+
</tr>
|
120 |
+
<tr>
|
121 |
+
<td><input id="text_none" name="text_none" class="checkbox" type="checkbox" onclick="updateTextDecorations();"/></td>
|
122 |
+
<td><label for="text_none">{#style_dlg.text_none}</label></td>
|
123 |
+
</tr>
|
124 |
+
</table>
|
125 |
+
</td>
|
126 |
+
</tr>
|
127 |
+
</table>
|
128 |
+
</fieldset>
|
129 |
+
</div>
|
130 |
+
|
131 |
+
<div id="background_panel" class="panel">
|
132 |
+
<fieldset>
|
133 |
+
<legend>{#style_dlg.background}</legend>
|
134 |
+
<table role="presentation" border="0">
|
135 |
+
<tr>
|
136 |
+
<td><label for="background_color">{#style_dlg.background_color}</label></td>
|
137 |
+
<td>
|
138 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
139 |
+
<tr>
|
140 |
+
<td><input id="background_color" name="background_color" type="text" value="" size="9" onChange="updateColor('background_color_pick','background_color');" /></td>
|
141 |
+
<td id="background_color_pickcontainer"> </td>
|
142 |
+
</tr>
|
143 |
+
</table>
|
144 |
+
</td>
|
145 |
+
</tr>
|
146 |
+
|
147 |
+
<tr>
|
148 |
+
<td><label for="background_image">{#style_dlg.background_image}</label></td>
|
149 |
+
<td><table role="presentation" border="0" cellspacing="0" cellpadding="0">
|
150 |
+
<tr>
|
151 |
+
<td><input id="background_image" name="background_image" type="text" /></td>
|
152 |
+
<td id="background_image_browser"> </td>
|
153 |
+
</tr>
|
154 |
+
</table>
|
155 |
+
</td>
|
156 |
+
</tr>
|
157 |
+
|
158 |
+
<tr>
|
159 |
+
<td><label for="background_repeat">{#style_dlg.background_repeat}</label></td>
|
160 |
+
<td><select id="background_repeat" name="background_repeat" class="mceEditableSelect"></select></td>
|
161 |
+
</tr>
|
162 |
+
|
163 |
+
<tr>
|
164 |
+
<td><label for="background_attachment">{#style_dlg.background_attachment}</label></td>
|
165 |
+
<td><select id="background_attachment" name="background_attachment" class="mceEditableSelect"></select></td>
|
166 |
+
</tr>
|
167 |
+
|
168 |
+
<tr>
|
169 |
+
<td><label for="background_hpos">{#style_dlg.background_hpos}</label></td>
|
170 |
+
<td>
|
171 |
+
<table role="presentation" border="0" cellspacing="0" cellpadding="0">
|
172 |
+
<tr>
|
173 |
+
<td><select id="background_hpos" name="background_hpos" class="mceEditableSelect"></select></td>
|
174 |
+
<td> </td>
|
175 |
+
<td>
|
176 |
+
<label id="background_hpos_measurement_label" for="background_hpos_measurement" style="display: none; visibility: hidden;">Horizontal position measurement unit</label>
|
177 |
+
<select id="background_hpos_measurement" name="background_hpos_measurement" aria-labelledby="background_hpos_measurement_label"></select>
|
178 |
+
</td>
|
179 |
+
</tr>
|
180 |
+
</table>
|
181 |
+
</td>
|
182 |
+
</tr>
|
183 |
+
|
184 |
+
<tr>
|
185 |
+
<td><label for="background_vpos">{#style_dlg.background_vpos}</label></td>
|
186 |
+
<td>
|
187 |
+
<table role="presentation" border="0" cellspacing="0" cellpadding="0">
|
188 |
+
<tr>
|
189 |
+
<td><select id="background_vpos" name="background_vpos" class="mceEditableSelect"></select></td>
|
190 |
+
<td> </td>
|
191 |
+
<td>
|
192 |
+
|
193 |
+
<label id="background_vpos_measurement_label" for="background_vpos_measurement" style="display: none; visibility: hidden;">Vertical position measurement unit</label>
|
194 |
+
<select id="background_vpos_measurement" name="background_vpos_measurement" aria-labelledby="background_vpos_measurement_label">></select></td>
|
195 |
+
</tr>
|
196 |
+
</table>
|
197 |
+
</td>
|
198 |
+
</tr>
|
199 |
+
</table>
|
200 |
+
</fieldset>
|
201 |
+
</div>
|
202 |
+
|
203 |
+
<div id="block_panel" class="panel">
|
204 |
+
<fieldset>
|
205 |
+
<legend>{#style_dlg.block}</legend>
|
206 |
+
<table role="presentation" border="0">
|
207 |
+
<tr>
|
208 |
+
<td><label for="block_wordspacing">{#style_dlg.block_wordspacing}</label></td>
|
209 |
+
<td>
|
210 |
+
<table role="presentation" border="0" cellspacing="0" cellpadding="0">
|
211 |
+
<tr>
|
212 |
+
<td><select id="block_wordspacing" name="block_wordspacing" class="mceEditableSelect"></select></td>
|
213 |
+
<td> </td>
|
214 |
+
<td>
|
215 |
+
<label id="block_wordspacing_measurement_label" for="block_wordspacing_measurement" style="display: none; visibility: hidden;">Word spacing measurement unit</label>
|
216 |
+
<select id="block_wordspacing_measurement" name="block_wordspacing_measurement" aria-labelledby="block_wordspacing_measurement_label"></select>
|
217 |
+
</td>
|
218 |
+
</tr>
|
219 |
+
</table>
|
220 |
+
</td>
|
221 |
+
</tr>
|
222 |
+
|
223 |
+
<tr>
|
224 |
+
<td><label for="block_letterspacing">{#style_dlg.block_letterspacing}</label></td>
|
225 |
+
<td>
|
226 |
+
<table role="presentation" border="0" cellspacing="0" cellpadding="0">
|
227 |
+
<tr>
|
228 |
+
<td><select id="block_letterspacing" name="block_letterspacing" class="mceEditableSelect"></select></td>
|
229 |
+
<td> </td>
|
230 |
+
<td>
|
231 |
+
<label id="block_letterspacing_measurement_label" for="block_letterspacing_measurement" style="display: none; visibility: hidden;">Letter spacing measurement unit</label>
|
232 |
+
<select id="block_letterspacing_measurement" name="block_letterspacing_measurement" aria-labelledby="block_letterspacing_measurement_label"></select>
|
233 |
+
</td>
|
234 |
+
</tr>
|
235 |
+
</table>
|
236 |
+
</td>
|
237 |
+
</tr>
|
238 |
+
|
239 |
+
<tr>
|
240 |
+
<td><label for="block_vertical_alignment">{#style_dlg.block_vertical_alignment}</label></td>
|
241 |
+
<td><select id="block_vertical_alignment" name="block_vertical_alignment" class="mceEditableSelect"></select></td>
|
242 |
+
</tr>
|
243 |
+
|
244 |
+
<tr>
|
245 |
+
<td><label for="block_text_align">{#style_dlg.block_text_align}</label></td>
|
246 |
+
<td><select id="block_text_align" name="block_text_align" class="mceEditableSelect"></select></td>
|
247 |
+
</tr>
|
248 |
+
|
249 |
+
<tr>
|
250 |
+
<td><label for="block_text_indent">{#style_dlg.block_text_indent}</label></td>
|
251 |
+
<td>
|
252 |
+
<table role="presentation" border="0" cellspacing="0" cellpadding="0">
|
253 |
+
<tr>
|
254 |
+
<td><input type="text" id="block_text_indent" name="block_text_indent" /></td>
|
255 |
+
<td> </td>
|
256 |
+
<td>
|
257 |
+
<label id="block_text_indent_measurement_label" for="block_text_indent_measurement" style="display: none; visibility: hidden;">Text Indent Measurement Unit</label>
|
258 |
+
|
259 |
+
<select id="block_text_indent_measurement" name="block_text_indent_measurement" aria-labelledby="block_text_indent_measurement_label"></select>
|
260 |
+
</td>
|
261 |
+
</tr>
|
262 |
+
</table>
|
263 |
+
</td>
|
264 |
+
</tr>
|
265 |
+
|
266 |
+
<tr>
|
267 |
+
<td><label for="block_whitespace">{#style_dlg.block_whitespace}</label></td>
|
268 |
+
<td><select id="block_whitespace" name="block_whitespace" class="mceEditableSelect"></select></td>
|
269 |
+
</tr>
|
270 |
+
|
271 |
+
<tr>
|
272 |
+
<td><label for="block_display">{#style_dlg.block_display}</label></td>
|
273 |
+
<td><select id="block_display" name="block_display" class="mceEditableSelect"></select></td>
|
274 |
+
</tr>
|
275 |
+
</table>
|
276 |
+
</fieldset>
|
277 |
+
</div>
|
278 |
+
|
279 |
+
<div id="box_panel" class="panel">
|
280 |
+
<fieldset>
|
281 |
+
<legend>{#style_dlg.box}</legend>
|
282 |
+
<table role="presentation" border="0">
|
283 |
+
<tr>
|
284 |
+
<td><label for="box_width">{#style_dlg.box_width}</label></td>
|
285 |
+
<td>
|
286 |
+
<table role="presentation" border="0" cellspacing="0" cellpadding="0">
|
287 |
+
<tr>
|
288 |
+
<td><input type="text" id="box_width" name="box_width" class="mceEditableSelect" onChange="synch('box_width','positioning_width');" /></td>
|
289 |
+
<td> </td>
|
290 |
+
<td>
|
291 |
+
<label id="box_width_measurement_label" for="box_width_measurement" style="display: none; visibility: hidden;">Box Width Measurement Unit</label>
|
292 |
+
<select id="box_width_measurement" name="box_width_measurement" aria-labelledby="box_width_measurement_label"></select>
|
293 |
+
</td>
|
294 |
+
</tr>
|
295 |
+
</table>
|
296 |
+
</td>
|
297 |
+
<td> <label for="box_float">{#style_dlg.box_float}</label></td>
|
298 |
+
<td><select id="box_float" name="box_float" class="mceEditableSelect"></select></td>
|
299 |
+
</tr>
|
300 |
+
|
301 |
+
<tr>
|
302 |
+
<td><label for="box_height">{#style_dlg.box_height}</label></td>
|
303 |
+
<td>
|
304 |
+
<table role="presentation" border="0" cellspacing="0" cellpadding="0">
|
305 |
+
<tr>
|
306 |
+
<td><input type="text" id="box_height" name="box_height" class="mceEditableSelect" onChange="synch('box_height','positioning_height');" /></td>
|
307 |
+
<td> </td>
|
308 |
+
<td>
|
309 |
+
<label id="box_height_measurement_label" for="box_height_measurement" style="display: none; visibility: hidden;">Box Height Measurement Unit</label>
|
310 |
+
<select id="box_height_measurement" name="box_height_measurement" aria-labelledby="box_height_measurement_label"></select>
|
311 |
+
</td>
|
312 |
+
</tr>
|
313 |
+
</table>
|
314 |
+
</td>
|
315 |
+
<td> <label for="box_clear">{#style_dlg.box_clear}</label></td>
|
316 |
+
<td><select id="box_clear" name="box_clear" class="mceEditableSelect"></select></td>
|
317 |
+
</tr>
|
318 |
+
</table>
|
319 |
+
</fieldset>
|
320 |
+
|
321 |
+
<div style="float: left; width: 49%">
|
322 |
+
<fieldset>
|
323 |
+
<legend>{#style_dlg.padding}</legend>
|
324 |
+
|
325 |
+
<table role="presentation" border="0">
|
326 |
+
<tr>
|
327 |
+
<td> </td>
|
328 |
+
<td><input type="checkbox" id="box_padding_same" name="box_padding_same" class="checkbox" checked="checked" onClick="toggleSame(this,'box_padding');" /> <label for="box_padding_same">{#style_dlg.same}</label></td>
|
329 |
+
</tr>
|
330 |
+
<tr>
|
331 |
+
<td><label for="box_padding_top">{#style_dlg.top}</label></td>
|
332 |
+
<td>
|
333 |
+
<table role="presentation" border="0" cellspacing="0" cellpadding="0">
|
334 |
+
<tr>
|
335 |
+
<td><input type="text" id="box_padding_top" name="box_padding_top" class="mceEditableSelect" /></td>
|
336 |
+
<td> </td>
|
337 |
+
<td>
|
338 |
+
<label id="box_padding_top_measurement_label" for="box_padding_top_measurement" style="display: none; visibility: hidden;">Padding Top Measurement Unit</label>
|
339 |
+
<select id="box_padding_top_measurement" name="box_padding_top_measurement" aria-labelledby="box_padding_top_measurement_label"></select>
|
340 |
+
</td>
|
341 |
+
</tr>
|
342 |
+
</table>
|
343 |
+
</td>
|
344 |
+
</tr>
|
345 |
+
<tr>
|
346 |
+
<td><label for="box_padding_right">{#style_dlg.right}</label></td>
|
347 |
+
<td>
|
348 |
+
<table role="presentation" border="0" cellspacing="0" cellpadding="0">
|
349 |
+
<tr>
|
350 |
+
<td><input type="text" id="box_padding_right" name="box_padding_right" class="mceEditableSelect" disabled="disabled" /></td>
|
351 |
+
<td> </td>
|
352 |
+
<td>
|
353 |
+
<label id="box_padding_right_measurement_label" for="box_padding_right_measurement" style="display: none; visibility: hidden;">Padding Right Measurement Unit</label>
|
354 |
+
<select id="box_padding_right_measurement" name="box_padding_right_measurement" disabled="disabled" aria-labelledby="box_padding_right_measurement_label"></select>
|
355 |
+
</td>
|
356 |
+
</tr>
|
357 |
+
</table>
|
358 |
+
</td>
|
359 |
+
</tr>
|
360 |
+
<tr>
|
361 |
+
<td><label for="box_padding_bottom">{#style_dlg.bottom}</label></td>
|
362 |
+
<td>
|
363 |
+
<table role="presentation" border="0" cellspacing="0" cellpadding="0">
|
364 |
+
<tr>
|
365 |
+
<td><input type="text" id="box_padding_bottom" name="box_padding_bottom" class="mceEditableSelect" disabled="disabled" /></td>
|
366 |
+
<td> </td>
|
367 |
+
<td>
|
368 |
+
<label id="box_padding_bottom_measurement_label" for="box_padding_bottom_measurement" style="display: none; visibility: hidden;">Padding Bottom Measurement Unit</label>
|
369 |
+
<select id="box_padding_bottom_measurement" name="box_padding_bottom_measurement" disabled="disabled" aria-labelledby="box_padding_bottom_measurement_label"></select>
|
370 |
+
</td>
|
371 |
+
</tr>
|
372 |
+
</table>
|
373 |
+
</td>
|
374 |
+
</tr>
|
375 |
+
<tr>
|
376 |
+
<td><label for="box_padding_left">{#style_dlg.left}</label></td>
|
377 |
+
<td>
|
378 |
+
<table role="presentation" border="0" cellspacing="0" cellpadding="0">
|
379 |
+
<tr>
|
380 |
+
<td><input type="text" id="box_padding_left" name="box_padding_left" class="mceEditableSelect" disabled="disabled" /></td>
|
381 |
+
<td> </td>
|
382 |
+
<td>
|
383 |
+
<label id="box_padding_left_measurement_label" for="box_padding_left_measurement" style="display: none; visibility: hidden;">Padding Left Measurement Unit</label>
|
384 |
+
<select id="box_padding_left_measurement" name="box_padding_left_measurement" disabled="disabled" aria-labelledby="box_padding_left_measurement_label"></select>
|
385 |
+
</td>
|
386 |
+
</tr>
|
387 |
+
</table>
|
388 |
+
</td>
|
389 |
+
</tr>
|
390 |
+
</table>
|
391 |
+
</fieldset>
|
392 |
+
</div>
|
393 |
+
|
394 |
+
<div style="float: right; width: 49%">
|
395 |
+
<fieldset>
|
396 |
+
<legend>{#style_dlg.margin}</legend>
|
397 |
+
|
398 |
+
<table role="presentation" border="0">
|
399 |
+
<tr>
|
400 |
+
<td> </td>
|
401 |
+
<td><input type="checkbox" id="box_margin_same" name="box_margin_same" class="checkbox" checked="checked" onClick="toggleSame(this,'box_margin');" /> <label for="box_margin_same">{#style_dlg.same}</label></td>
|
402 |
+
</tr>
|
403 |
+
<tr>
|
404 |
+
<td><label for="box_margin_top">{#style_dlg.top}</label></td>
|
405 |
+
<td>
|
406 |
+
<table role="presentation" border="0" cellspacing="0" cellpadding="0">
|
407 |
+
<tr>
|
408 |
+
<td><input type="text" id="box_margin_top" name="box_margin_top" class="mceEditableSelect" /></td>
|
409 |
+
<td> </td>
|
410 |
+
<td>
|
411 |
+
<label id="box_margin_top_measurement_label" for="box_margin_top_measurement" style="display: none; visibility: hidden;">Margin Top Measurement Unit</label>
|
412 |
+
<select id="box_margin_top_measurement" name="box_margin_top_measurement" aria-labelledby="box_margin_top_measurement_label"></select>
|
413 |
+
</td>
|
414 |
+
</tr>
|
415 |
+
</table>
|
416 |
+
</td>
|
417 |
+
</tr>
|
418 |
+
<tr>
|
419 |
+
<td><label for="box_margin_right">{#style_dlg.right}</label></td>
|
420 |
+
<td>
|
421 |
+
<table role="presentation" border="0" cellspacing="0" cellpadding="0">
|
422 |
+
<tr>
|
423 |
+
<td><input type="text" id="box_margin_right" name="box_margin_right" class="mceEditableSelect" disabled="disabled" /></td>
|
424 |
+
<td> </td>
|
425 |
+
<td>
|
426 |
+
<label id="box_margin_right_measurement_label" for="box_margin_right_measurement" style="display: none; visibility: hidden;">Margin Right Measurement Unit</label>
|
427 |
+
<select id="box_margin_right_measurement" name="box_margin_right_measurement" disabled="disabled" aria-labelledby="box_margin_right_measurement_label"></select>
|
428 |
+
</td>
|
429 |
+
</tr>
|
430 |
+
</table>
|
431 |
+
</td>
|
432 |
+
</tr>
|
433 |
+
<tr>
|
434 |
+
<td><label for="box_margin_bottom">{#style_dlg.bottom}</label></td>
|
435 |
+
<td>
|
436 |
+
<table role="presentation" border="0" cellspacing="0" cellpadding="0">
|
437 |
+
<tr>
|
438 |
+
<td><input type="text" id="box_margin_bottom" name="box_margin_bottom" class="mceEditableSelect" disabled="disabled" /></td>
|
439 |
+
<td> </td>
|
440 |
+
<td>
|
441 |
+
<label id="box_margin_bottom_measurement_label" for="box_margin_bottom_measurement" style="display: none; visibility: hidden;">Margin Bottom Measurement Unit</label>
|
442 |
+
<select id="box_margin_bottom_measurement" name="box_margin_bottom_measurement" disabled="disabled" aria-labelledby="box_margin_bottom_measurement_label"></select>
|
443 |
+
</td>
|
444 |
+
</tr>
|
445 |
+
</table>
|
446 |
+
</td>
|
447 |
+
</tr>
|
448 |
+
<tr>
|
449 |
+
<td><label for="box_margin_left">{#style_dlg.left}</label></td>
|
450 |
+
<td>
|
451 |
+
<table role="presentation" border="0" cellspacing="0" cellpadding="0">
|
452 |
+
<tr>
|
453 |
+
<td><input type="text" id="box_margin_left" name="box_margin_left" class="mceEditableSelect" disabled="disabled" /></td>
|
454 |
+
<td> </td>
|
455 |
+
<td>
|
456 |
+
<label id="box_margin_left_measurement_label" for="box_margin_left_measurement" style="display: none; visibility: hidden;">Margin Left Measurement Unit</label>
|
457 |
+
<select id="box_margin_left_measurement" name="box_margin_left_measurement" disabled="disabled" aria-labelledby="box_margin_left_measurement_label"></select>
|
458 |
+
</td>
|
459 |
+
</tr>
|
460 |
+
</table>
|
461 |
+
</td>
|
462 |
+
</tr>
|
463 |
+
</table>
|
464 |
+
</fieldset>
|
465 |
+
</div>
|
466 |
+
<br style="clear: both" />
|
467 |
+
</div>
|
468 |
+
|
469 |
+
<div id="border_panel" class="panel">
|
470 |
+
<fieldset>
|
471 |
+
<legend>{#style_dlg.border}</legend>
|
472 |
+
<table role="presentation" border="0" cellspacing="0" cellpadding="0" width="100%">
|
473 |
+
<tr>
|
474 |
+
<td class="tdelim"> </td>
|
475 |
+
<td class="tdelim delim"> </td>
|
476 |
+
<td class="tdelim">{#style_dlg.style}</td>
|
477 |
+
<td class="tdelim delim"> </td>
|
478 |
+
<td class="tdelim">{#style_dlg.width}</td>
|
479 |
+
<td class="tdelim delim"> </td>
|
480 |
+
<td class="tdelim">{#style_dlg.color}</td>
|
481 |
+
</tr>
|
482 |
+
|
483 |
+
<tr>
|
484 |
+
<td> </td>
|
485 |
+
<td class="delim"> </td>
|
486 |
+
<td><input type="checkbox" id="border_style_same" name="border_style_same" class="checkbox" checked="checked" onClick="toggleSame(this,'border_style');" /> <label for="border_style_same">{#style_dlg.same}</label></td>
|
487 |
+
<td class="delim"> </td>
|
488 |
+
<td><input type="checkbox" id="border_width_same" name="border_width_same" class="checkbox" checked="checked" onClick="toggleSame(this,'border_width');" /> <label for="border_width_same">{#style_dlg.same}</label></td>
|
489 |
+
<td class="delim"> </td>
|
490 |
+
<td><input type="checkbox" id="border_color_same" name="border_color_same" class="checkbox" checked="checked" onClick="toggleSame(this,'border_color');" /> <label for="border_color_same">{#style_dlg.same}</label></td>
|
491 |
+
</tr>
|
492 |
+
|
493 |
+
<tr>
|
494 |
+
<td>{#style_dlg.top}</td>
|
495 |
+
<td class="delim"> </td>
|
496 |
+
<td><select id="border_style_top" name="border_style_top" class="mceEditableSelect"></select></td>
|
497 |
+
<td class="delim"> </td>
|
498 |
+
<td>
|
499 |
+
<table role="presentation" border="0" cellspacing="0" cellpadding="0">
|
500 |
+
<tr>
|
501 |
+
<td><select id="border_width_top" name="border_width_top" class="mceEditableSelect"></select></td>
|
502 |
+
<td> </td>
|
503 |
+
<td>
|
504 |
+
<label id="border_width_top_measurement_label" for="border_width_top_measurement" style="display: none; visibility: hidden;">Width top Measurement Unit</label>
|
505 |
+
<select id="border_width_top_measurement" name="border_width_top_measurement" aria-labelledby="border_width_top_measurement_label"></select>
|
506 |
+
</td>
|
507 |
+
</tr>
|
508 |
+
</table>
|
509 |
+
</td>
|
510 |
+
<td class="delim"> </td>
|
511 |
+
<td>
|
512 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
513 |
+
<tr>
|
514 |
+
<td><input id="border_color_top" name="border_color_top" type="text" value="" size="9" onChange="updateColor('border_color_top_pick','border_color_top');" /></td>
|
515 |
+
<td id="border_color_top_pickcontainer"> </td>
|
516 |
+
</tr>
|
517 |
+
</table>
|
518 |
+
</td>
|
519 |
+
</tr>
|
520 |
+
|
521 |
+
<tr>
|
522 |
+
<td>{#style_dlg.right}</td>
|
523 |
+
<td class="delim"> </td>
|
524 |
+
<td><select id="border_style_right" name="border_style_right" class="mceEditableSelect" disabled="disabled"></select></td>
|
525 |
+
<td class="delim"> </td>
|
526 |
+
<td>
|
527 |
+
<table role="presentation" border="0" cellspacing="0" cellpadding="0">
|
528 |
+
<tr>
|
529 |
+
<td><select id="border_width_right" name="border_width_right" class="mceEditableSelect" disabled="disabled"></select></td>
|
530 |
+
<td> </td>
|
531 |
+
<td>
|
532 |
+
<label id="border_width_right_measurement_label" for="border_width_right_measurement" style="display: none; visibility: hidden;">Width Right Measurement Unit</label>
|
533 |
+
<select id="border_width_right_measurement" name="border_width_right_measurement" disabled="disabled" aria-labelledby="border_width_right_measurement_label"></select>
|
534 |
+
</td>
|
535 |
+
</tr>
|
536 |
+
</table>
|
537 |
+
</td>
|
538 |
+
<td class="delim"> </td>
|
539 |
+
<td>
|
540 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
541 |
+
<tr>
|
542 |
+
<td><input id="border_color_right" name="border_color_right" type="text" value="" size="9" onChange="updateColor('border_color_right_pick','border_color_right');" disabled="disabled" /></td>
|
543 |
+
<td id="border_color_right_pickcontainer"> </td>
|
544 |
+
</tr>
|
545 |
+
</table>
|
546 |
+
</td>
|
547 |
+
</tr>
|
548 |
+
|
549 |
+
<tr>
|
550 |
+
<td>{#style_dlg.bottom}</td>
|
551 |
+
<td class="delim"> </td>
|
552 |
+
<td><select id="border_style_bottom" name="border_style_bottom" class="mceEditableSelect" disabled="disabled"></select></td>
|
553 |
+
<td class="delim"> </td>
|
554 |
+
<td>
|
555 |
+
<table role="presentation" border="0" cellspacing="0" cellpadding="0">
|
556 |
+
<tr>
|
557 |
+
<td><select id="border_width_bottom" name="border_width_bottom" class="mceEditableSelect" disabled="disabled"></select></td>
|
558 |
+
<td> </td>
|
559 |
+
<td>
|
560 |
+
<label id="border_width_bottom_measurement_label" for="border_width_bottom_measurement" style="display: none; visibility: hidden;">Width Bottom Measurement Unit</label>
|
561 |
+
<select id="border_width_bottom_measurement" name="border_width_bottom_measurement" disabled="disabled" aria-labelledby="border_width_bottom_measurement_label"></select>
|
562 |
+
</td>
|
563 |
+
</tr>
|
564 |
+
</table>
|
565 |
+
</td>
|
566 |
+
<td class="delim"> </td>
|
567 |
+
<td>
|
568 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
569 |
+
<tr>
|
570 |
+
<td><input id="border_color_bottom" name="border_color_bottom" type="text" value="" size="9" onChange="updateColor('border_color_bottom_pick','border_color_bottom');" disabled="disabled" /></td>
|
571 |
+
<td id="border_color_bottom_pickcontainer"> </td>
|
572 |
+
</tr>
|
573 |
+
</table>
|
574 |
+
</td>
|
575 |
+
</tr>
|
576 |
+
|
577 |
+
<tr>
|
578 |
+
<td>{#style_dlg.left}</td>
|
579 |
+
<td class="delim"> </td>
|
580 |
+
<td><select id="border_style_left" name="border_style_left" class="mceEditableSelect" disabled="disabled"></select></td>
|
581 |
+
<td class="delim"> </td>
|
582 |
+
<td>
|
583 |
+
<table role="presentation" border="0" cellspacing="0" cellpadding="0">
|
584 |
+
<tr>
|
585 |
+
<td><select id="border_width_left" name="border_width_left" class="mceEditableSelect" disabled="disabled"></select></td>
|
586 |
+
<td> </td>
|
587 |
+
<td>
|
588 |
+
<label id="border_width_left_measurement_label" for="border_width_left_measurement" style="display: none; visibility: hidden;">Width Left Measurement Unit</label>
|
589 |
+
<select id="border_width_left_measurement" name="border_width_left_measurement" disabled="disabled" aria-labelledby="border_width_left_measurement_label"></select>
|
590 |
+
</td>
|
591 |
+
</tr>
|
592 |
+
</table>
|
593 |
+
</td>
|
594 |
+
<td class="delim"> </td>
|
595 |
+
<td>
|
596 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
597 |
+
<tr>
|
598 |
+
<td><input id="border_color_left" name="border_color_left" type="text" value="" size="9" onChange="updateColor('border_color_left_pick','border_color_left');" disabled="disabled" /></td>
|
599 |
+
<td id="border_color_left_pickcontainer"> </td>
|
600 |
+
</tr>
|
601 |
+
</table>
|
602 |
+
</td>
|
603 |
+
</tr>
|
604 |
+
</table>
|
605 |
+
</fieldset>
|
606 |
+
</div>
|
607 |
+
|
608 |
+
<div id="list_panel" class="panel">
|
609 |
+
<fieldset>
|
610 |
+
<legend>{#style_dlg.list}</legend>
|
611 |
+
<table role="presentation" border="0">
|
612 |
+
<tr>
|
613 |
+
<td><label for="list_type">{#style_dlg.list_type}</label></td>
|
614 |
+
<td><select id="list_type" name="list_type" class="mceEditableSelect"></select></td>
|
615 |
+
</tr>
|
616 |
+
|
617 |
+
<tr>
|
618 |
+
<td><label for="list_bullet_image">{#style_dlg.bullet_image}</label></td>
|
619 |
+
<td><input id="list_bullet_image" name="list_bullet_image" type="text" /></td>
|
620 |
+
</tr>
|
621 |
+
|
622 |
+
<tr>
|
623 |
+
<td><label for="list_position">{#style_dlg.position}</label></td>
|
624 |
+
<td><select id="list_position" name="list_position" class="mceEditableSelect"></select></td>
|
625 |
+
</tr>
|
626 |
+
</table>
|
627 |
+
</fieldset>
|
628 |
+
</div>
|
629 |
+
|
630 |
+
<div id="positioning_panel" class="panel">
|
631 |
+
<fieldset>
|
632 |
+
<legend>{#style_dlg.position}</legend>
|
633 |
+
<table role="presentation" border="0">
|
634 |
+
<tr>
|
635 |
+
<td><label for="positioning_type">{#style_dlg.positioning_type}</label></td>
|
636 |
+
<td><select id="positioning_type" name="positioning_type" class="mceEditableSelect"></select></td>
|
637 |
+
<td> <label for="positioning_visibility">{#style_dlg.visibility}</label></td>
|
638 |
+
<td><select id="positioning_visibility" name="positioning_visibility" class="mceEditableSelect"></select></td>
|
639 |
+
</tr>
|
640 |
+
|
641 |
+
<tr>
|
642 |
+
<td><label for="positioning_width">{#style_dlg.width}</label></td>
|
643 |
+
<td>
|
644 |
+
<table role="presentation" border="0" cellspacing="0" cellpadding="0">
|
645 |
+
<tr>
|
646 |
+
<td><input type="text" id="positioning_width" name="positioning_width" onChange="synch('positioning_width','box_width');" /></td>
|
647 |
+
<td> </td>
|
648 |
+
<td>
|
649 |
+
<label id="positioning_width_measurement_label" for="positioning_width_measurement" style="display: none; visibility: hidden;">Positioning width Measurement Unit</label>
|
650 |
+
<select id="positioning_width_measurement" name="positioning_width_measurement" aria-labelledby="positioning_width_measurement_label"></select>
|
651 |
+
</td>
|
652 |
+
</tr>
|
653 |
+
</table>
|
654 |
+
</td>
|
655 |
+
<td> <label for="positioning_zindex">{#style_dlg.zindex}</label></td>
|
656 |
+
<td><input type="text" id="positioning_zindex" name="positioning_zindex" /></td>
|
657 |
+
</tr>
|
658 |
+
|
659 |
+
<tr>
|
660 |
+
<td><label for="positioning_height">{#style_dlg.height}</label></td>
|
661 |
+
<td>
|
662 |
+
<table role="presentation" border="0" cellspacing="0" cellpadding="0">
|
663 |
+
<tr>
|
664 |
+
<td><input type="text" id="positioning_height" name="positioning_height" onChange="synch('positioning_height','box_height');" /></td>
|
665 |
+
<td> </td>
|
666 |
+
<td>
|
667 |
+
<label id="positioning_height_measurement_label" for="positioning_height_measurement" style="display: none; visibility: hidden;">Positioning Height Measurement Unit</label>
|
668 |
+
<select id="positioning_height_measurement" name="positioning_height_measurement" aria-labelledby="positioning_height_measurement_label"></select>
|
669 |
+
</td>
|
670 |
+
</tr>
|
671 |
+
</table>
|
672 |
+
</td>
|
673 |
+
<td> <label for="positioning_overflow">{#style_dlg.overflow}</label></td>
|
674 |
+
<td><select id="positioning_overflow" name="positioning_overflow" class="mceEditableSelect"></select></td>
|
675 |
+
</tr>
|
676 |
+
</table>
|
677 |
+
</fieldset>
|
678 |
+
|
679 |
+
<div style="float: left; width: 49%">
|
680 |
+
<fieldset>
|
681 |
+
<legend>{#style_dlg.placement}</legend>
|
682 |
+
|
683 |
+
<table role="presentation" border="0">
|
684 |
+
<tr>
|
685 |
+
<td> </td>
|
686 |
+
<td><input type="checkbox" id="positioning_placement_same" name="positioning_placement_same" class="checkbox" checked="checked" onClick="toggleSame(this,'positioning_placement');" /> <label for="positioning_placement_same">{#style_dlg.same}</label></td>
|
687 |
+
</tr>
|
688 |
+
<tr>
|
689 |
+
<td>{#style_dlg.top}</td>
|
690 |
+
<td>
|
691 |
+
<table role="presentation" border="0" cellspacing="0" cellpadding="0">
|
692 |
+
<tr>
|
693 |
+
<td><input type="text" id="positioning_placement_top" name="positioning_placement_top" /></td>
|
694 |
+
<td> </td>
|
695 |
+
<td>
|
696 |
+
<label id="positioning_placement_top_measurement_label" for="positioning_placement_top_measurement" style="display: none; visibility: hidden;">Placement Top Measurement Unit</label>
|
697 |
+
<select id="positioning_placement_top_measurement" name="positioning_placement_top_measurement" aria-labelledby="positioning_placement_top_measurement_label"></select>
|
698 |
+
</td>
|
699 |
+
</tr>
|
700 |
+
</table>
|
701 |
+
</td>
|
702 |
+
</tr>
|
703 |
+
<tr>
|
704 |
+
<td>{#style_dlg.right}</td>
|
705 |
+
<td>
|
706 |
+
<table role="presentation" border="0" cellspacing="0" cellpadding="0">
|
707 |
+
<tr>
|
708 |
+
<td><input type="text" id="positioning_placement_right" name="positioning_placement_right" disabled="disabled" /></td>
|
709 |
+
<td> </td>
|
710 |
+
<td>
|
711 |
+
<label id="positioning_placement_right_measurement_label" for="positioning_placement_right_measurement" style="display: none; visibility: hidden;">Placement Right Measurement Unit</label>
|
712 |
+
<select id="positioning_placement_right_measurement" name="positioning_placement_right_measurement" disabled="disabled" aria-labelledby="positioning_placement_right_measurement_label"></select>
|
713 |
+
</td>
|
714 |
+
</tr>
|
715 |
+
</table>
|
716 |
+
</td>
|
717 |
+
</tr>
|
718 |
+
<tr>
|
719 |
+
<td>{#style_dlg.bottom}</td>
|
720 |
+
<td>
|
721 |
+
<table role="presentation" border="0" cellspacing="0" cellpadding="0">
|
722 |
+
<tr>
|
723 |
+
<td><input type="text" id="positioning_placement_bottom" name="positioning_placement_bottom" disabled="disabled" /></td>
|
724 |
+
<td> </td>
|
725 |
+
<td>
|
726 |
+
<label id="positioning_placement_bottom_measurement_label" for="positioning_placement_bottom_measurement" style="display: none; visibility: hidden;">Placement Bottom Measurement Unit</label>
|
727 |
+
<select id="positioning_placement_bottom_measurement" name="positioning_placement_bottom_measurement" disabled="disabled" aria-labelledby="positioning_placement_bottom_measurement_label"></select>
|
728 |
+
</td>
|
729 |
+
</tr>
|
730 |
+
</table>
|
731 |
+
</td>
|
732 |
+
</tr>
|
733 |
+
<tr>
|
734 |
+
<td>{#style_dlg.left}</td>
|
735 |
+
<td>
|
736 |
+
<table role="presentation" border="0" cellspacing="0" cellpadding="0">
|
737 |
+
<tr>
|
738 |
+
<td><input type="text" id="positioning_placement_left" name="positioning_placement_left" disabled="disabled" /></td>
|
739 |
+
<td> </td>
|
740 |
+
<td>
|
741 |
+
<label id="positioning_placement_left_measurement_label" for="positioning_placement_left_measurement" style="display: none; visibility: hidden;">Placement Left Measurement Unit</label>
|
742 |
+
<select id="positioning_placement_left_measurement" name="positioning_placement_left_measurement" disabled="disabled" aria-labelledby="positioning_placement_left_measurement_label"></select>
|
743 |
+
</td>
|
744 |
+
</tr>
|
745 |
+
</table>
|
746 |
+
</td>
|
747 |
+
</tr>
|
748 |
+
</table>
|
749 |
+
</fieldset>
|
750 |
+
</div>
|
751 |
+
|
752 |
+
<div style="float: right; width: 49%">
|
753 |
+
<fieldset>
|
754 |
+
<legend>{#style_dlg.clip}</legend>
|
755 |
+
|
756 |
+
<table role="presentation" border="0">
|
757 |
+
<tr>
|
758 |
+
<td> </td>
|
759 |
+
<td><input type="checkbox" id="positioning_clip_same" name="positioning_clip_same" class="checkbox" checked="checked" onClick="toggleSame(this,'positioning_clip');" /> <label for="positioning_clip_same">{#style_dlg.same}</label></td>
|
760 |
+
</tr>
|
761 |
+
<tr>
|
762 |
+
<td>{#style_dlg.top}</td>
|
763 |
+
<td>
|
764 |
+
<table role="presentation" border="0" cellspacing="0" cellpadding="0">
|
765 |
+
<tr>
|
766 |
+
<td><input type="text" id="positioning_clip_top" name="positioning_clip_top" /></td>
|
767 |
+
<td> </td>
|
768 |
+
<td>
|
769 |
+
<label id="positioning_clip_top_measurement_label" for="positioning_clip_top_measurement" style="display: none; visibility: hidden;">Clip Top Measurement Unit</label>
|
770 |
+
<select id="positioning_clip_top_measurement" name="positioning_clip_top_measurement" aria-labelledby="positioning_clip_top_measurement_label"></select>
|
771 |
+
</td>
|
772 |
+
</tr>
|
773 |
+
</table>
|
774 |
+
</td>
|
775 |
+
</tr>
|
776 |
+
<tr>
|
777 |
+
<td>{#style_dlg.right}</td>
|
778 |
+
<td>
|
779 |
+
<table role="presentation" border="0" cellspacing="0" cellpadding="0">
|
780 |
+
<tr>
|
781 |
+
<td><input type="text" id="positioning_clip_right" name="positioning_clip_right" disabled="disabled" /></td>
|
782 |
+
<td> </td>
|
783 |
+
<td>
|
784 |
+
<label id="positioning_clip_right_measurement_label" for="positioning_clip_right_measurement" style="display: none; visibility: hidden;">Clip Right Measurement Unit</label>
|
785 |
+
<select id="positioning_clip_right_measurement" name="positioning_clip_right_measurement" disabled="disabled" aria-labelledby="positioning_clip_right_measurement_label"></select>
|
786 |
+
</td>
|
787 |
+
</tr>
|
788 |
+
</table>
|
789 |
+
</td>
|
790 |
+
</tr>
|
791 |
+
<tr>
|
792 |
+
<td>{#style_dlg.bottom}</td>
|
793 |
+
<td>
|
794 |
+
<table role="presentation" border="0" cellspacing="0" cellpadding="0">
|
795 |
+
<tr>
|
796 |
+
<td><input type="text" id="positioning_clip_bottom" name="positioning_clip_bottom" disabled="disabled" /></td>
|
797 |
+
<td> </td>
|
798 |
+
<td>
|
799 |
+
<label id="positioning_clip_bottom_measurement_label" for="positioning_clip_bottom_measurement" style="display: none; visibility: hidden;">Clip Bottom Measurement Unit</label>
|
800 |
+
<select id="positioning_clip_bottom_measurement" name="positioning_clip_bottom_measurement" disabled="disabled" aria-labelledby="positioning_clip_bottom_measurement_label"></select>
|
801 |
+
</td>
|
802 |
+
</tr>
|
803 |
+
</table>
|
804 |
+
</td>
|
805 |
+
</tr>
|
806 |
+
<tr>
|
807 |
+
<td>{#style_dlg.left}</td>
|
808 |
+
<td>
|
809 |
+
<table role="presentation" border="0" cellspacing="0" cellpadding="0">
|
810 |
+
<tr>
|
811 |
+
<td><input type="text" id="positioning_clip_left" name="positioning_clip_left" disabled="disabled" /></td>
|
812 |
+
<td> </td>
|
813 |
+
<td>
|
814 |
+
<label id="positioning_clip_left_measurement_label" for="positioning_clip_left_measurement" style="display: none; visibility: hidden;">Clip Left Measurement Unit</label>
|
815 |
+
<select id="positioning_clip_left_measurement" name="positioning_clip_left_measurement" disabled="disabled" aria-labelledby="positioning_clip_left_measurement_label"></select>
|
816 |
+
</td>
|
817 |
+
</tr>
|
818 |
+
</table>
|
819 |
+
</td>
|
820 |
+
</tr>
|
821 |
+
</table>
|
822 |
+
</fieldset>
|
823 |
+
</div>
|
824 |
+
<br style="clear: both" />
|
825 |
+
</div>
|
826 |
+
</div>
|
827 |
+
|
828 |
+
<div class="panel_toggle_insert_span">
|
829 |
+
<input type="checkbox" class="checkbox" id="toggle_insert_span" name="toggle_insert_span" onClick="toggleApplyAction();" />
|
830 |
+
<label for="toggle_insert_span">{#style_dlg.toggle_insert_span}</label>
|
831 |
+
</div>
|
832 |
+
|
833 |
+
<div class="mceActionPanel">
|
834 |
+
<input type="submit" id="insert" name="insert" value="{#update}" />
|
835 |
+
<input type="button" class="button" id="apply" name="apply" value="{#style_dlg.apply}" onClick="applyAction();" />
|
836 |
+
<input type="button" id="cancel" name="cancel" value="{#cancel}" onClick="tinyMCEPopup.close();" />
|
837 |
+
</div>
|
838 |
+
</form>
|
839 |
+
|
840 |
+
<div style="display: none">
|
841 |
+
<div id="container"></div>
|
842 |
+
</div>
|
843 |
+
|
844 |
+
</body>
|
845 |
+
</html>
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/style/readme.txt
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Edit CSS Style plug-in notes
|
2 |
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
3 |
+
Unlike WYSIWYG editor functionality that operates only on the selected text,
|
4 |
+
typically by inserting new HTML elements with the specified styles.
|
5 |
+
This plug-in operates on the HTML blocks surrounding the selected text.
|
6 |
+
No new HTML elements are created.
|
7 |
+
|
8 |
+
This plug-in only operates on the surrounding blocks and not the nearest
|
9 |
+
parent node. This means that if a block encapsulates a node,
|
10 |
+
e.g <p><span>text</span></p>, then only the styles in the block are
|
11 |
+
recognized, not those in the span.
|
12 |
+
|
13 |
+
When selecting text that includes multiple blocks at the same level (peers),
|
14 |
+
this plug-in accumulates the specified styles in all of the surrounding blocks
|
15 |
+
and populates the dialogue checkboxes accordingly. There is no differentiation
|
16 |
+
between styles set in all the blocks versus styles set in some of the blocks.
|
17 |
+
|
18 |
+
When the [Update] or [Apply] buttons are pressed, the styles selected in the
|
19 |
+
checkboxes are applied to all blocks that surround the selected text.
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/tabfocus/editor_plugin.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(function(){var c=tinymce.DOM,a=tinymce.dom.Event,d=tinymce.each,b=tinymce.explode;tinymce.create("tinymce.plugins.TabFocusPlugin",{init:function(f,g){function e(i,j){if(j.keyCode===9){return a.cancel(j)}}function h(l,p){var j,m,o,n,k;function q(t){n=c.select(":input:enabled,*[tabindex]:not(iframe)");function s(v){return v.nodeName==="BODY"||(v.type!="hidden"&&!(v.style.display=="none")&&!(v.style.visibility=="hidden")&&s(v.parentNode))}function i(v){return v.attributes.tabIndex.specified||v.nodeName=="INPUT"||v.nodeName=="TEXTAREA"}function u(){return tinymce.isIE6||tinymce.isIE7}function r(v){return((!u()||i(v)))&&v.getAttribute("tabindex")!="-1"&&s(v)}d(n,function(w,v){if(w.id==l.id){j=v;return false}});if(t>0){for(m=j+1;m<n.length;m++){if(r(n[m])){return n[m]}}}else{for(m=j-1;m>=0;m--){if(r(n[m])){return n[m]}}}return null}if(p.keyCode===9){k=b(l.getParam("tab_focus",l.getParam("tabfocus_elements",":prev,:next")));if(k.length==1){k[1]=k[0];k[0]=":prev"}if(p.shiftKey){if(k[0]==":prev"){n=q(-1)}else{n=c.get(k[0])}}else{if(k[1]==":next"){n=q(1)}else{n=c.get(k[1])}}if(n){if(n.id&&(l=tinymce.get(n.id||n.name))){l.focus()}else{window.setTimeout(function(){if(!tinymce.isWebKit){window.focus()}n.focus()},10)}return a.cancel(p)}}}f.onKeyUp.add(e);if(tinymce.isGecko){f.onKeyPress.add(h);f.onKeyDown.add(e)}else{f.onKeyDown.add(h)}},getInfo:function(){return{longname:"Tabfocus",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/tabfocus",version:tinymce.majorVersion+"."+tinymce.minorVersion}}});tinymce.PluginManager.add("tabfocus",tinymce.plugins.TabFocusPlugin)})();
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/tabfocus/editor_plugin_src.js
ADDED
@@ -0,0 +1,122 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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, Event = tinymce.dom.Event, each = tinymce.each, explode = tinymce.explode;
|
13 |
+
|
14 |
+
tinymce.create('tinymce.plugins.TabFocusPlugin', {
|
15 |
+
init : function(ed, url) {
|
16 |
+
function tabCancel(ed, e) {
|
17 |
+
if (e.keyCode === 9)
|
18 |
+
return Event.cancel(e);
|
19 |
+
}
|
20 |
+
|
21 |
+
function tabHandler(ed, e) {
|
22 |
+
var x, i, f, el, v;
|
23 |
+
|
24 |
+
function find(d) {
|
25 |
+
el = DOM.select(':input:enabled,*[tabindex]:not(iframe)');
|
26 |
+
|
27 |
+
function canSelectRecursive(e) {
|
28 |
+
return e.nodeName==="BODY" || (e.type != 'hidden' &&
|
29 |
+
!(e.style.display == "none") &&
|
30 |
+
!(e.style.visibility == "hidden") && canSelectRecursive(e.parentNode));
|
31 |
+
}
|
32 |
+
function canSelectInOldIe(el) {
|
33 |
+
return el.attributes["tabIndex"].specified || el.nodeName == "INPUT" || el.nodeName == "TEXTAREA";
|
34 |
+
}
|
35 |
+
function isOldIe() {
|
36 |
+
return tinymce.isIE6 || tinymce.isIE7;
|
37 |
+
}
|
38 |
+
function canSelect(el) {
|
39 |
+
return ((!isOldIe() || canSelectInOldIe(el))) && el.getAttribute("tabindex") != '-1' && canSelectRecursive(el);
|
40 |
+
}
|
41 |
+
|
42 |
+
each(el, function(e, i) {
|
43 |
+
if (e.id == ed.id) {
|
44 |
+
x = i;
|
45 |
+
return false;
|
46 |
+
}
|
47 |
+
});
|
48 |
+
if (d > 0) {
|
49 |
+
for (i = x + 1; i < el.length; i++) {
|
50 |
+
if (canSelect(el[i]))
|
51 |
+
return el[i];
|
52 |
+
}
|
53 |
+
} else {
|
54 |
+
for (i = x - 1; i >= 0; i--) {
|
55 |
+
if (canSelect(el[i]))
|
56 |
+
return el[i];
|
57 |
+
}
|
58 |
+
}
|
59 |
+
|
60 |
+
return null;
|
61 |
+
}
|
62 |
+
|
63 |
+
if (e.keyCode === 9) {
|
64 |
+
v = explode(ed.getParam('tab_focus', ed.getParam('tabfocus_elements', ':prev,:next')));
|
65 |
+
|
66 |
+
if (v.length == 1) {
|
67 |
+
v[1] = v[0];
|
68 |
+
v[0] = ':prev';
|
69 |
+
}
|
70 |
+
|
71 |
+
// Find element to focus
|
72 |
+
if (e.shiftKey) {
|
73 |
+
if (v[0] == ':prev')
|
74 |
+
el = find(-1);
|
75 |
+
else
|
76 |
+
el = DOM.get(v[0]);
|
77 |
+
} else {
|
78 |
+
if (v[1] == ':next')
|
79 |
+
el = find(1);
|
80 |
+
else
|
81 |
+
el = DOM.get(v[1]);
|
82 |
+
}
|
83 |
+
|
84 |
+
if (el) {
|
85 |
+
if (el.id && (ed = tinymce.get(el.id || el.name)))
|
86 |
+
ed.focus();
|
87 |
+
else
|
88 |
+
window.setTimeout(function() {
|
89 |
+
if (!tinymce.isWebKit)
|
90 |
+
window.focus();
|
91 |
+
el.focus();
|
92 |
+
}, 10);
|
93 |
+
|
94 |
+
return Event.cancel(e);
|
95 |
+
}
|
96 |
+
}
|
97 |
+
}
|
98 |
+
|
99 |
+
ed.onKeyUp.add(tabCancel);
|
100 |
+
|
101 |
+
if (tinymce.isGecko) {
|
102 |
+
ed.onKeyPress.add(tabHandler);
|
103 |
+
ed.onKeyDown.add(tabCancel);
|
104 |
+
} else
|
105 |
+
ed.onKeyDown.add(tabHandler);
|
106 |
+
|
107 |
+
},
|
108 |
+
|
109 |
+
getInfo : function() {
|
110 |
+
return {
|
111 |
+
longname : 'Tabfocus',
|
112 |
+
author : 'Moxiecode Systems AB',
|
113 |
+
authorurl : 'http://tinymce.moxiecode.com',
|
114 |
+
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/tabfocus',
|
115 |
+
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
116 |
+
};
|
117 |
+
}
|
118 |
+
});
|
119 |
+
|
120 |
+
// Register plugin
|
121 |
+
tinymce.PluginManager.add('tabfocus', tinymce.plugins.TabFocusPlugin);
|
122 |
+
})();
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/table/cell.htm
ADDED
@@ -0,0 +1,180 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2 |
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
+
<head>
|
4 |
+
<title>{#table_dlg.cell_title}</title>
|
5 |
+
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
6 |
+
<script type="text/javascript" src="../../utils/mctabs.js"></script>
|
7 |
+
<script type="text/javascript" src="../../utils/form_utils.js"></script>
|
8 |
+
<script type="text/javascript" src="../../utils/validate.js"></script>
|
9 |
+
<script type="text/javascript" src="../../utils/editable_selects.js"></script>
|
10 |
+
<script type="text/javascript" src="js/cell.js"></script>
|
11 |
+
<link href="css/cell.css" rel="stylesheet" type="text/css" />
|
12 |
+
</head>
|
13 |
+
<body id="tablecell" style="display: none" role="application">
|
14 |
+
<form onsubmit="updateAction();return false;" action="#">
|
15 |
+
<div class="tabs">
|
16 |
+
<ul>
|
17 |
+
<li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#table_dlg.general_tab}</a></span></li>
|
18 |
+
<li id="advanced_tab" aria-controls="advanced_panel"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#table_dlg.advanced_tab}</a></span></li>
|
19 |
+
</ul>
|
20 |
+
</div>
|
21 |
+
|
22 |
+
<div class="panel_wrapper">
|
23 |
+
<div id="general_panel" class="panel current">
|
24 |
+
<fieldset>
|
25 |
+
<legend>{#table_dlg.general_props}</legend>
|
26 |
+
|
27 |
+
<table role="presentation" border="0" cellpadding="4" cellspacing="0">
|
28 |
+
<tr>
|
29 |
+
<td><label for="align">{#table_dlg.align}</label></td>
|
30 |
+
<td>
|
31 |
+
<select id="align" name="align" class="mceFocus">
|
32 |
+
<option value="">{#not_set}</option>
|
33 |
+
<option value="center">{#table_dlg.align_middle}</option>
|
34 |
+
<option value="left">{#table_dlg.align_left}</option>
|
35 |
+
<option value="right">{#table_dlg.align_right}</option>
|
36 |
+
</select>
|
37 |
+
</td>
|
38 |
+
|
39 |
+
<td><label for="celltype">{#table_dlg.cell_type}</label></td>
|
40 |
+
<td>
|
41 |
+
<select id="celltype" name="celltype">
|
42 |
+
<option value="td">{#table_dlg.td}</option>
|
43 |
+
<option value="th">{#table_dlg.th}</option>
|
44 |
+
</select>
|
45 |
+
</td>
|
46 |
+
</tr>
|
47 |
+
|
48 |
+
<tr>
|
49 |
+
<td><label for="valign">{#table_dlg.valign}</label></td>
|
50 |
+
<td>
|
51 |
+
<select id="valign" name="valign">
|
52 |
+
<option value="">{#not_set}</option>
|
53 |
+
<option value="top">{#table_dlg.align_top}</option>
|
54 |
+
<option value="middle">{#table_dlg.align_middle}</option>
|
55 |
+
<option value="bottom">{#table_dlg.align_bottom}</option>
|
56 |
+
</select>
|
57 |
+
</td>
|
58 |
+
|
59 |
+
<td><label for="scope">{#table_dlg.scope}</label></td>
|
60 |
+
<td>
|
61 |
+
<select id="scope" name="scope">
|
62 |
+
<option value="">{#not_set}</option>
|
63 |
+
<option value="col">{#table.col}</option>
|
64 |
+
<option value="row">{#table.row}</option>
|
65 |
+
<option value="rowgroup">{#table_dlg.rowgroup}</option>
|
66 |
+
<option value="colgroup">{#table_dlg.colgroup}</option>
|
67 |
+
</select>
|
68 |
+
</td>
|
69 |
+
|
70 |
+
</tr>
|
71 |
+
|
72 |
+
<tr>
|
73 |
+
<td><label for="width">{#table_dlg.width}</label></td>
|
74 |
+
<td><input id="width" name="width" type="text" value="" size="7" maxlength="7" onchange="changedSize();" class="size" /></td>
|
75 |
+
|
76 |
+
<td><label for="height">{#table_dlg.height}</label></td>
|
77 |
+
<td><input id="height" name="height" type="text" value="" size="7" maxlength="7" onchange="changedSize();" class="size" /></td>
|
78 |
+
</tr>
|
79 |
+
|
80 |
+
<tr id="styleSelectRow">
|
81 |
+
<td><label for="class">{#class_name}</label></td>
|
82 |
+
<td colspan="3">
|
83 |
+
<select id="class" name="class" class="mceEditableSelect">
|
84 |
+
<option value="" selected="selected">{#not_set}</option>
|
85 |
+
</select>
|
86 |
+
</td>
|
87 |
+
</tr>
|
88 |
+
</table>
|
89 |
+
</fieldset>
|
90 |
+
</div>
|
91 |
+
|
92 |
+
<div id="advanced_panel" class="panel">
|
93 |
+
<fieldset>
|
94 |
+
<legend>{#table_dlg.advanced_props}</legend>
|
95 |
+
|
96 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="4">
|
97 |
+
<tr>
|
98 |
+
<td class="column1"><label for="id">{#table_dlg.id}</label></td>
|
99 |
+
<td><input id="id" name="id" type="text" value="" style="width: 200px" /></td>
|
100 |
+
</tr>
|
101 |
+
|
102 |
+
<tr>
|
103 |
+
<td><label for="style">{#table_dlg.style}</label></td>
|
104 |
+
<td><input type="text" id="style" name="style" value="" style="width: 200px;" onchange="changedStyle();" /></td>
|
105 |
+
</tr>
|
106 |
+
|
107 |
+
<tr>
|
108 |
+
<td class="column1"><label for="dir">{#table_dlg.langdir}</label></td>
|
109 |
+
<td>
|
110 |
+
<select id="dir" name="dir" style="width: 200px">
|
111 |
+
<option value="">{#not_set}</option>
|
112 |
+
<option value="ltr">{#table_dlg.ltr}</option>
|
113 |
+
<option value="rtl">{#table_dlg.rtl}</option>
|
114 |
+
</select>
|
115 |
+
</td>
|
116 |
+
</tr>
|
117 |
+
|
118 |
+
<tr>
|
119 |
+
<td class="column1"><label for="lang">{#table_dlg.langcode}</label></td>
|
120 |
+
<td>
|
121 |
+
<input id="lang" name="lang" type="text" value="" style="width: 200px" />
|
122 |
+
</td>
|
123 |
+
</tr>
|
124 |
+
|
125 |
+
<tr>
|
126 |
+
<td class="column1"><label for="backgroundimage">{#table_dlg.bgimage}</label></td>
|
127 |
+
<td>
|
128 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
129 |
+
<tr>
|
130 |
+
<td><input id="backgroundimage" name="backgroundimage" type="text" value="" style="width: 200px" onchange="changedBackgroundImage();" /></td>
|
131 |
+
<td id="backgroundimagebrowsercontainer"> </td>
|
132 |
+
</tr>
|
133 |
+
</table>
|
134 |
+
</td>
|
135 |
+
</tr>
|
136 |
+
|
137 |
+
<tr role="group" aria-labelledby="bordercolor_label">
|
138 |
+
<td class="column1"><label id="bordercolor_label" for="bordercolor">{#table_dlg.bordercolor}</label></td>
|
139 |
+
<td>
|
140 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
141 |
+
<tr>
|
142 |
+
<td><input id="bordercolor" name="bordercolor" type="text" value="" size="9" onchange="updateColor('bordercolor_pick','bordercolor');changedColor();" /></td>
|
143 |
+
<td id="bordercolor_pickcontainer"> </td>
|
144 |
+
</tr>
|
145 |
+
</table>
|
146 |
+
</td>
|
147 |
+
</tr>
|
148 |
+
|
149 |
+
<tr role="group" aria-labelledby="bgcolor_label">
|
150 |
+
<td class="column1"><label id="bgcolor_label" for="bgcolor">{#table_dlg.bgcolor}</label></td>
|
151 |
+
<td>
|
152 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
153 |
+
<tr>
|
154 |
+
<td><input id="bgcolor" name="bgcolor" type="text" value="" size="9" onchange="updateColor('bgcolor_pick','bgcolor');changedColor();" /></td>
|
155 |
+
<td id="bgcolor_pickcontainer"> </td>
|
156 |
+
</tr>
|
157 |
+
</table>
|
158 |
+
</td>
|
159 |
+
</tr>
|
160 |
+
</table>
|
161 |
+
</fieldset>
|
162 |
+
</div>
|
163 |
+
</div>
|
164 |
+
|
165 |
+
<div class="mceActionPanel">
|
166 |
+
<div>
|
167 |
+
<select id="action" name="action">
|
168 |
+
<option value="cell">{#table_dlg.cell_cell}</option>
|
169 |
+
<option value="row">{#table_dlg.cell_row}</option>
|
170 |
+
<option value="col">{#table_dlg.cell_col}</option>
|
171 |
+
<option value="all">{#table_dlg.cell_all}</option>
|
172 |
+
</select>
|
173 |
+
</div>
|
174 |
+
|
175 |
+
<input type="submit" id="insert" name="insert" value="{#update}" />
|
176 |
+
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
177 |
+
</div>
|
178 |
+
</form>
|
179 |
+
</body>
|
180 |
+
</html>
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/table/css/cell.css
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* CSS file for cell dialog in the table plugin */
|
2 |
+
|
3 |
+
.panel_wrapper div.current {
|
4 |
+
height: 200px;
|
5 |
+
}
|
6 |
+
|
7 |
+
.advfield {
|
8 |
+
width: 200px;
|
9 |
+
}
|
10 |
+
|
11 |
+
#action {
|
12 |
+
margin-bottom: 3px;
|
13 |
+
}
|
14 |
+
|
15 |
+
#class {
|
16 |
+
width: 150px;
|
17 |
+
}
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/table/css/row.css
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* CSS file for row dialog in the table plugin */
|
2 |
+
|
3 |
+
.panel_wrapper div.current {
|
4 |
+
height: 200px;
|
5 |
+
}
|
6 |
+
|
7 |
+
.advfield {
|
8 |
+
width: 200px;
|
9 |
+
}
|
10 |
+
|
11 |
+
#action {
|
12 |
+
margin-bottom: 3px;
|
13 |
+
}
|
14 |
+
|
15 |
+
#rowtype,#align,#valign,#class,#height {
|
16 |
+
width: 150px;
|
17 |
+
}
|
18 |
+
|
19 |
+
#height {
|
20 |
+
width: 50px;
|
21 |
+
}
|
22 |
+
|
23 |
+
.col2 {
|
24 |
+
padding-left: 20px;
|
25 |
+
}
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/table/css/table.css
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* CSS file for table dialog in the table plugin */
|
2 |
+
|
3 |
+
.panel_wrapper div.current {
|
4 |
+
height: 245px;
|
5 |
+
}
|
6 |
+
|
7 |
+
.advfield {
|
8 |
+
width: 200px;
|
9 |
+
}
|
10 |
+
|
11 |
+
#class {
|
12 |
+
width: 150px;
|
13 |
+
}
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/table/editor_plugin.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(function(d){var e=d.each;function c(g,h){var j=h.ownerDocument,f=j.createRange(),k;f.setStartBefore(h);f.setEnd(g.endContainer,g.endOffset);k=j.createElement("body");k.appendChild(f.cloneContents());return k.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi,"-").replace(/<[^>]+>/g,"").length==0}function a(g,f){return parseInt(g.getAttribute(f)||1)}function b(H,G,K){var g,L,D,o;t();o=G.getParent(K.getStart(),"th,td");if(o){L=F(o);D=I();o=z(L.x,L.y)}function A(N,M){N=N.cloneNode(M);N.removeAttribute("id");return N}function t(){var M=0;g=[];e(["thead","tbody","tfoot"],function(N){var O=G.select("> "+N+" tr",H);e(O,function(P,Q){Q+=M;e(G.select("> td, > th",P),function(W,R){var S,T,U,V;if(g[Q]){while(g[Q][R]){R++}}U=a(W,"rowspan");V=a(W,"colspan");for(T=Q;T<Q+U;T++){if(!g[T]){g[T]=[]}for(S=R;S<R+V;S++){g[T][S]={part:N,real:T==Q&&S==R,elm:W,rowspan:U,colspan:V}}}})});M+=O.length})}function z(M,O){var N;N=g[O];if(N){return N[M]}}function s(O,M,N){if(O){N=parseInt(N);if(N===1){O.removeAttribute(M,1)}else{O.setAttribute(M,N,1)}}}function j(M){return M&&(G.hasClass(M.elm,"mceSelected")||M==o)}function k(){var M=[];e(H.rows,function(N){e(N.cells,function(O){if(G.hasClass(O,"mceSelected")||O==o.elm){M.push(N);return false}})});return M}function r(){var M=G.createRng();M.setStartAfter(H);M.setEndAfter(H);K.setRng(M);G.remove(H)}function f(M){var N;d.walk(M,function(P){var O;if(P.nodeType==3){e(G.getParents(P.parentNode,null,M).reverse(),function(Q){Q=A(Q,false);if(!N){N=O=Q}else{if(O){O.appendChild(Q)}}O=Q});if(O){O.innerHTML=d.isIE?" ":'<br data-mce-bogus="1" />'}return false}},"childNodes");M=A(M,false);s(M,"rowSpan",1);s(M,"colSpan",1);if(N){M.appendChild(N)}else{if(!d.isIE){M.innerHTML='<br data-mce-bogus="1" />'}}return M}function q(){var M=G.createRng();e(G.select("tr",H),function(N){if(N.cells.length==0){G.remove(N)}});if(G.select("tr",H).length==0){M.setStartAfter(H);M.setEndAfter(H);K.setRng(M);G.remove(H);return}e(G.select("thead,tbody,tfoot",H),function(N){if(N.rows.length==0){G.remove(N)}});t();row=g[Math.min(g.length-1,L.y)];if(row){K.select(row[Math.min(row.length-1,L.x)].elm,true);K.collapse(true)}}function u(S,Q,U,R){var P,N,M,O,T;P=g[Q][S].elm.parentNode;for(M=1;M<=U;M++){P=G.getNext(P,"tr");if(P){for(N=S;N>=0;N--){T=g[Q+M][N].elm;if(T.parentNode==P){for(O=1;O<=R;O++){G.insertAfter(f(T),T)}break}}if(N==-1){for(O=1;O<=R;O++){P.insertBefore(f(P.cells[0]),P.cells[0])}}}}}function C(){e(g,function(M,N){e(M,function(P,O){var S,R,T,Q;if(j(P)){P=P.elm;S=a(P,"colspan");R=a(P,"rowspan");if(S>1||R>1){s(P,"rowSpan",1);s(P,"colSpan",1);for(Q=0;Q<S-1;Q++){G.insertAfter(f(P),P)}u(O,N,R-1,S)}}})})}function p(V,S,Y){var P,O,X,W,U,R,T,M,V,N,Q;if(V){pos=F(V);P=pos.x;O=pos.y;X=P+(S-1);W=O+(Y-1)}else{P=L.x;O=L.y;X=D.x;W=D.y}T=z(P,O);M=z(X,W);if(T&&M&&T.part==M.part){C();t();T=z(P,O).elm;s(T,"colSpan",(X-P)+1);s(T,"rowSpan",(W-O)+1);for(R=O;R<=W;R++){for(U=P;U<=X;U++){if(!g[R]||!g[R][U]){continue}V=g[R][U].elm;if(V!=T){N=d.grep(V.childNodes);e(N,function(Z){T.appendChild(Z)});if(N.length){N=d.grep(T.childNodes);Q=0;e(N,function(Z){if(Z.nodeName=="BR"&&G.getAttrib(Z,"data-mce-bogus")&&Q++<N.length-1){T.removeChild(Z)}})}G.remove(V)}}}q()}}function l(Q){var M,S,P,R,T,U,N,V,O;e(g,function(W,X){e(W,function(Z,Y){if(j(Z)){Z=Z.elm;T=Z.parentNode;U=A(T,false);M=X;if(Q){return false}}});if(Q){return !M}});for(R=0;R<g[0].length;R++){if(!g[M][R]){continue}S=g[M][R].elm;if(S!=P){if(!Q){O=a(S,"rowspan");if(O>1){s(S,"rowSpan",O+1);continue}}else{if(M>0&&g[M-1][R]){V=g[M-1][R].elm;O=a(V,"rowSpan");if(O>1){s(V,"rowSpan",O+1);continue}}}N=f(S);s(N,"colSpan",S.colSpan);U.appendChild(N);P=S}}if(U.hasChildNodes()){if(!Q){G.insertAfter(U,T)}else{T.parentNode.insertBefore(U,T)}}}function h(N){var O,M;e(g,function(P,Q){e(P,function(S,R){if(j(S)){O=R;if(N){return false}}});if(N){return !O}});e(g,function(S,T){var P,Q,R;if(!S[O]){return}P=S[O].elm;if(P!=M){R=a(P,"colspan");Q=a(P,"rowspan");if(R==1){if(!N){G.insertAfter(f(P),P);u(O,T,Q-1,R)}else{P.parentNode.insertBefore(f(P),P);u(O,T,Q-1,R)}}else{s(P,"colSpan",P.colSpan+1)}M=P}})}function n(){var M=[];e(g,function(N,O){e(N,function(Q,P){if(j(Q)&&d.inArray(M,P)===-1){e(g,function(T){var R=T[P].elm,S;S=a(R,"colSpan");if(S>1){s(R,"colSpan",S-1)}else{G.remove(R)}});M.push(P)}})});q()}function m(){var N;function M(Q){var P,R,O;P=G.getNext(Q,"tr");e(Q.cells,function(S){var T=a(S,"rowSpan");if(T>1){s(S,"rowSpan",T-1);R=F(S);u(R.x,R.y,1,1)}});R=F(Q.cells[0]);e(g[R.y],function(S){var T;S=S.elm;if(S!=O){T=a(S,"rowSpan");if(T<=1){G.remove(S)}else{s(S,"rowSpan",T-1)}O=S}})}N=k();e(N.reverse(),function(O){M(O)});q()}function E(){var M=k();G.remove(M);q();return M}function J(){var M=k();e(M,function(O,N){M[N]=A(O,true)});return M}function B(O,N){var P=k(),M=P[N?0:P.length-1],Q=M.cells.length;e(g,function(S){var R;Q=0;e(S,function(U,T){if(U.real){Q+=U.colspan}if(U.elm.parentNode==M){R=1}});if(R){return false}});if(!N){O.reverse()}e(O,function(T){var S=T.cells.length,R;for(i=0;i<S;i++){R=T.cells[i];s(R,"colSpan",1);s(R,"rowSpan",1)}for(i=S;i<Q;i++){T.appendChild(f(T.cells[S-1]))}for(i=Q;i<S;i++){G.remove(T.cells[i])}if(N){M.parentNode.insertBefore(T,M)}else{G.insertAfter(T,M)}})}function F(M){var N;e(g,function(O,P){e(O,function(R,Q){if(R.elm==M){N={x:Q,y:P};return false}});return !N});return N}function w(M){L=F(M)}function I(){var O,N,M;N=M=0;e(g,function(P,Q){e(P,function(S,R){var U,T;if(j(S)){S=g[Q][R];if(R>N){N=R}if(Q>M){M=Q}if(S.real){U=S.colspan-1;T=S.rowspan-1;if(U){if(R+U>N){N=R+U}}if(T){if(Q+T>M){M=Q+T}}}}})});return{x:N,y:M}}function v(S){var P,O,U,T,N,M,Q,R;D=F(S);if(L&&D){P=Math.min(L.x,D.x);O=Math.min(L.y,D.y);U=Math.max(L.x,D.x);T=Math.max(L.y,D.y);N=U;M=T;for(y=O;y<=M;y++){S=g[y][P];if(!S.real){if(P-(S.colspan-1)<P){P-=S.colspan-1}}}for(x=P;x<=N;x++){S=g[O][x];if(!S.real){if(O-(S.rowspan-1)<O){O-=S.rowspan-1}}}for(y=O;y<=T;y++){for(x=P;x<=U;x++){S=g[y][x];if(S.real){Q=S.colspan-1;R=S.rowspan-1;if(Q){if(x+Q>N){N=x+Q}}if(R){if(y+R>M){M=y+R}}}}}G.removeClass(G.select("td.mceSelected,th.mceSelected"),"mceSelected");for(y=O;y<=M;y++){for(x=P;x<=N;x++){if(g[y][x]){G.addClass(g[y][x].elm,"mceSelected")}}}}}d.extend(this,{deleteTable:r,split:C,merge:p,insertRow:l,insertCol:h,deleteCols:n,deleteRows:m,cutRows:E,copyRows:J,pasteRows:B,getPos:F,setStartCell:w,setEndCell:v})}d.create("tinymce.plugins.TablePlugin",{init:function(g,h){var f,m,j=true;function l(p){var o=g.selection,n=g.dom.getParent(p||o.getNode(),"table");if(n){return new b(n,g.dom,o)}}function k(){g.getBody().style.webkitUserSelect="";if(j){g.dom.removeClass(g.dom.select("td.mceSelected,th.mceSelected"),"mceSelected");j=false}}e([["table","table.desc","mceInsertTable",true],["delete_table","table.del","mceTableDelete"],["delete_col","table.delete_col_desc","mceTableDeleteCol"],["delete_row","table.delete_row_desc","mceTableDeleteRow"],["col_after","table.col_after_desc","mceTableInsertColAfter"],["col_before","table.col_before_desc","mceTableInsertColBefore"],["row_after","table.row_after_desc","mceTableInsertRowAfter"],["row_before","table.row_before_desc","mceTableInsertRowBefore"],["row_props","table.row_desc","mceTableRowProps",true],["cell_props","table.cell_desc","mceTableCellProps",true],["split_cells","table.split_cells_desc","mceTableSplitCells",true],["merge_cells","table.merge_cells_desc","mceTableMergeCells",true]],function(n){g.addButton(n[0],{title:n[1],cmd:n[2],ui:n[3]})});if(!d.isIE){g.onClick.add(function(n,o){o=o.target;if(o.nodeName==="TABLE"){n.selection.select(o);n.nodeChanged()}})}g.onPreProcess.add(function(o,p){var n,q,r,t=o.dom,s;n=t.select("table",p.node);q=n.length;while(q--){r=n[q];t.setAttrib(r,"data-mce-style","");if((s=t.getAttrib(r,"width"))){t.setStyle(r,"width",s);t.setAttrib(r,"width","")}if((s=t.getAttrib(r,"height"))){t.setStyle(r,"height",s);t.setAttrib(r,"height","")}}});g.onNodeChange.add(function(q,o,s){var r;s=q.selection.getStart();r=q.dom.getParent(s,"td,th,caption");o.setActive("table",s.nodeName==="TABLE"||!!r);if(r&&r.nodeName==="CAPTION"){r=0}o.setDisabled("delete_table",!r);o.setDisabled("delete_col",!r);o.setDisabled("delete_table",!r);o.setDisabled("delete_row",!r);o.setDisabled("col_after",!r);o.setDisabled("col_before",!r);o.setDisabled("row_after",!r);o.setDisabled("row_before",!r);o.setDisabled("row_props",!r);o.setDisabled("cell_props",!r);o.setDisabled("split_cells",!r);o.setDisabled("merge_cells",!r)});g.onInit.add(function(r){var p,t,q=r.dom,u;f=r.windowManager;r.onMouseDown.add(function(w,z){if(z.button!=2){k();t=q.getParent(z.target,"td,th");p=q.getParent(t,"table")}});q.bind(r.getDoc(),"mouseover",function(C){var A,z,B=C.target;if(t&&(u||B!=t)&&(B.nodeName=="TD"||B.nodeName=="TH")){z=q.getParent(B,"table");if(z==p){if(!u){u=l(z);u.setStartCell(t);r.getBody().style.webkitUserSelect="none"}u.setEndCell(B);j=true}A=r.selection.getSel();try{if(A.removeAllRanges){A.removeAllRanges()}else{A.empty()}}catch(w){}C.preventDefault()}});r.onMouseUp.add(function(F,G){var z,B=F.selection,H,I=B.getSel(),w,C,A,E;if(t){if(u){F.getBody().style.webkitUserSelect=""}function D(J,L){var K=new d.dom.TreeWalker(J,J);do{if(J.nodeType==3&&d.trim(J.nodeValue).length!=0){if(L){z.setStart(J,0)}else{z.setEnd(J,J.nodeValue.length)}return}if(J.nodeName=="BR"){if(L){z.setStartBefore(J)}else{z.setEndBefore(J)}return}}while(J=(L?K.next():K.prev()))}H=q.select("td.mceSelected,th.mceSelected");if(H.length>0){z=q.createRng();C=H[0];E=H[H.length-1];z.setStartBefore(C);z.setEndAfter(C);D(C,1);w=new d.dom.TreeWalker(C,q.getParent(H[0],"table"));do{if(C.nodeName=="TD"||C.nodeName=="TH"){if(!q.hasClass(C,"mceSelected")){break}A=C}}while(C=w.next());D(A);B.setRng(z)}F.nodeChanged();t=u=p=null}});r.onKeyUp.add(function(w,z){k()});r.onKeyDown.add(function(w,z){n(w)});r.onMouseDown.add(function(w,z){if(z.button!=2){n(w)}});function o(D,z,A,F){var B=3,G=D.dom.getParent(z.startContainer,"TABLE"),C,w,E;if(G){C=G.parentNode}w=z.startContainer.nodeType==B&&z.startOffset==0&&z.endOffset==0&&F&&(A.nodeName=="TR"||A==C);E=(A.nodeName=="TD"||A.nodeName=="TH")&&!F;return w||E}function n(A){if(!d.isWebKit){return}var z=A.selection.getRng();var C=A.selection.getNode();var B=A.dom.getParent(z.startContainer,"TD,TH");if(!o(A,z,C,B)){return}if(!B){B=C}var w=B.lastChild;while(w.lastChild){w=w.lastChild}z.setEnd(w,w.nodeValue.length);A.selection.setRng(z)}r.plugins.table.fixTableCellSelection=n;if(r&&r.plugins.contextmenu){r.plugins.contextmenu.onContextMenu.add(function(A,w,C){var D,B=r.selection,z=B.getNode()||r.getBody();if(r.dom.getParent(C,"td")||r.dom.getParent(C,"th")||r.dom.select("td.mceSelected,th.mceSelected").length){w.removeAll();if(z.nodeName=="A"&&!r.dom.getAttrib(z,"name")){w.add({title:"advanced.link_desc",icon:"link",cmd:r.plugins.advlink?"mceAdvLink":"mceLink",ui:true});w.add({title:"advanced.unlink_desc",icon:"unlink",cmd:"UnLink"});w.addSeparator()}if(z.nodeName=="IMG"&&z.className.indexOf("mceItem")==-1){w.add({title:"advanced.image_desc",icon:"image",cmd:r.plugins.advimage?"mceAdvImage":"mceImage",ui:true});w.addSeparator()}w.add({title:"table.desc",icon:"table",cmd:"mceInsertTable",value:{action:"insert"}});w.add({title:"table.props_desc",icon:"table_props",cmd:"mceInsertTable"});w.add({title:"table.del",icon:"delete_table",cmd:"mceTableDelete"});w.addSeparator();D=w.addMenu({title:"table.cell"});D.add({title:"table.cell_desc",icon:"cell_props",cmd:"mceTableCellProps"});D.add({title:"table.split_cells_desc",icon:"split_cells",cmd:"mceTableSplitCells"});D.add({title:"table.merge_cells_desc",icon:"merge_cells",cmd:"mceTableMergeCells"});D=w.addMenu({title:"table.row"});D.add({title:"table.row_desc",icon:"row_props",cmd:"mceTableRowProps"});D.add({title:"table.row_before_desc",icon:"row_before",cmd:"mceTableInsertRowBefore"});D.add({title:"table.row_after_desc",icon:"row_after",cmd:"mceTableInsertRowAfter"});D.add({title:"table.delete_row_desc",icon:"delete_row",cmd:"mceTableDeleteRow"});D.addSeparator();D.add({title:"table.cut_row_desc",icon:"cut",cmd:"mceTableCutRow"});D.add({title:"table.copy_row_desc",icon:"copy",cmd:"mceTableCopyRow"});D.add({title:"table.paste_row_before_desc",icon:"paste",cmd:"mceTablePasteRowBefore"}).setDisabled(!m);D.add({title:"table.paste_row_after_desc",icon:"paste",cmd:"mceTablePasteRowAfter"}).setDisabled(!m);D=w.addMenu({title:"table.col"});D.add({title:"table.col_before_desc",icon:"col_before",cmd:"mceTableInsertColBefore"});D.add({title:"table.col_after_desc",icon:"col_after",cmd:"mceTableInsertColAfter"});D.add({title:"table.delete_col_desc",icon:"delete_col",cmd:"mceTableDeleteCol"})}else{w.add({title:"table.desc",icon:"table",cmd:"mceInsertTable"})}})}if(d.isWebKit){function v(C,N){var L=d.VK;var Q=N.keyCode;function O(Y,U,S){var T=Y?"previousSibling":"nextSibling";var Z=C.dom.getParent(U,"tr");var X=Z[T];if(X){z(C,U,X,Y);d.dom.Event.cancel(S);return true}else{var aa=C.dom.getParent(Z,"table");var W=Z.parentNode;var R=W.nodeName.toLowerCase();if(R==="tbody"||R===(Y?"tfoot":"thead")){var V=w(Y,aa,W,"tbody");if(V!==null){return K(Y,V,U,S)}}return M(Y,Z,T,aa,S)}}function w(V,T,U,X){var S=C.dom.select(">"+X,T);var R=S.indexOf(U);if(V&&R===0||!V&&R===S.length-1){return B(V,T)}else{if(R===-1){var W=U.tagName.toLowerCase()==="thead"?0:S.length-1;return S[W]}else{return S[R+(V?-1:1)]}}}function B(U,T){var S=U?"thead":"tfoot";var R=C.dom.select(">"+S,T);return R.length!==0?R[0]:null}function K(V,T,S,U){var R=J(T,V);R&&z(C,S,R,V);d.dom.Event.cancel(U);return true}function M(Y,U,R,X,W){var S=X[R];if(S){F(S);return true}else{var V=C.dom.getParent(X,"td,th");if(V){return O(Y,V,W)}else{var T=J(U,!Y);F(T);return d.dom.Event.cancel(W)}}}function J(S,R){var T=S&&S[R?"lastChild":"firstChild"];return T&&T.nodeName==="BR"?C.dom.getParent(T,"td,th"):T}function F(R){C.selection.setCursorLocation(R,0)}function A(){return Q==L.UP||Q==L.DOWN}function D(R){var T=R.selection.getNode();var S=R.dom.getParent(T,"tr");return S!==null}function P(S){var R=0;var T=S;while(T.previousSibling){T=T.previousSibling;R=R+a(T,"colspan")}return R}function E(T,R){var U=0;var S=0;e(T.children,function(V,W){U=U+a(V,"colspan");S=W;if(U>R){return false}});return S}function z(T,W,Y,V){var X=P(T.dom.getParent(W,"td,th"));var S=E(Y,X);var R=Y.childNodes[S];var U=J(R,V);F(U||R)}function H(R){var T=C.selection.getNode();var U=C.dom.getParent(T,"td,th");var S=C.dom.getParent(R,"td,th");return U&&U!==S&&I(U,S)}function I(S,R){return C.dom.getParent(S,"TABLE")===C.dom.getParent(R,"TABLE")}if(A()&&D(C)){var G=C.selection.getNode();setTimeout(function(){if(H(G)){O(!N.shiftKey&&Q===L.UP,G,N)}},0)}}r.onKeyDown.add(v)}if(!d.isIE){function s(){var w;for(w=r.getBody().lastChild;w&&w.nodeType==3&&!w.nodeValue.length;w=w.previousSibling){}if(w&&w.nodeName=="TABLE"){r.dom.add(r.getBody(),"p",null,'<br mce_bogus="1" />')}}if(d.isGecko){r.onKeyDown.add(function(z,B){var w,A,C=z.dom;if(B.keyCode==37||B.keyCode==38){w=z.selection.getRng();A=C.getParent(w.startContainer,"table");if(A&&z.getBody().firstChild==A){if(c(w,A)){w=C.createRng();w.setStartBefore(A);w.setEndBefore(A);z.selection.setRng(w);B.preventDefault()}}}})}r.onKeyUp.add(s);r.onSetContent.add(s);r.onVisualAid.add(s);r.onPreProcess.add(function(w,A){var z=A.node.lastChild;if(z&&z.childNodes.length==1&&z.firstChild.nodeName=="BR"){w.dom.remove(z)}});if(d.isGecko){r.onKeyDown.add(function(z,B){if(B.keyCode===d.VK.ENTER&&B.shiftKey){var A=z.selection.getRng().startContainer;var C=q.getParent(A,"td,th");if(C){var w=z.getDoc().createTextNode("\uFEFF");q.insertAfter(w,A)}}})}s();r.startContent=r.getContent({format:"raw"})}});e({mceTableSplitCells:function(n){n.split()},mceTableMergeCells:function(o){var p,q,n;n=g.dom.getParent(g.selection.getNode(),"th,td");if(n){p=n.rowSpan;q=n.colSpan}if(!g.dom.select("td.mceSelected,th.mceSelected").length){f.open({url:h+"/merge_cells.htm",width:240+parseInt(g.getLang("table.merge_cells_delta_width",0)),height:110+parseInt(g.getLang("table.merge_cells_delta_height",0)),inline:1},{rows:p,cols:q,onaction:function(r){o.merge(n,r.cols,r.rows)},plugin_url:h})}else{o.merge()}},mceTableInsertRowBefore:function(n){n.insertRow(true)},mceTableInsertRowAfter:function(n){n.insertRow()},mceTableInsertColBefore:function(n){n.insertCol(true)},mceTableInsertColAfter:function(n){n.insertCol()},mceTableDeleteCol:function(n){n.deleteCols()},mceTableDeleteRow:function(n){n.deleteRows()},mceTableCutRow:function(n){m=n.cutRows()},mceTableCopyRow:function(n){m=n.copyRows()},mceTablePasteRowBefore:function(n){n.pasteRows(m,true)},mceTablePasteRowAfter:function(n){n.pasteRows(m)},mceTableDelete:function(n){n.deleteTable()}},function(o,n){g.addCommand(n,function(){var p=l();if(p){o(p);g.execCommand("mceRepaint");k()}})});e({mceInsertTable:function(n){f.open({url:h+"/table.htm",width:400+parseInt(g.getLang("table.table_delta_width",0)),height:320+parseInt(g.getLang("table.table_delta_height",0)),inline:1},{plugin_url:h,action:n?n.action:0})},mceTableRowProps:function(){f.open({url:h+"/row.htm",width:400+parseInt(g.getLang("table.rowprops_delta_width",0)),height:295+parseInt(g.getLang("table.rowprops_delta_height",0)),inline:1},{plugin_url:h})},mceTableCellProps:function(){f.open({url:h+"/cell.htm",width:400+parseInt(g.getLang("table.cellprops_delta_width",0)),height:295+parseInt(g.getLang("table.cellprops_delta_height",0)),inline:1},{plugin_url:h})}},function(o,n){g.addCommand(n,function(p,q){o(q)})})}});d.PluginManager.add("table",d.plugins.TablePlugin)})(tinymce);
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/table/editor_plugin_src.js
ADDED
@@ -0,0 +1,1428 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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(tinymce) {
|
12 |
+
var each = tinymce.each;
|
13 |
+
|
14 |
+
// Checks if the selection/caret is at the start of the specified block element
|
15 |
+
function isAtStart(rng, par) {
|
16 |
+
var doc = par.ownerDocument, rng2 = doc.createRange(), elm;
|
17 |
+
|
18 |
+
rng2.setStartBefore(par);
|
19 |
+
rng2.setEnd(rng.endContainer, rng.endOffset);
|
20 |
+
|
21 |
+
elm = doc.createElement('body');
|
22 |
+
elm.appendChild(rng2.cloneContents());
|
23 |
+
|
24 |
+
// Check for text characters of other elements that should be treated as content
|
25 |
+
return elm.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi, '-').replace(/<[^>]+>/g, '').length == 0;
|
26 |
+
};
|
27 |
+
|
28 |
+
function getSpanVal(td, name) {
|
29 |
+
return parseInt(td.getAttribute(name) || 1);
|
30 |
+
}
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Table Grid class.
|
34 |
+
*/
|
35 |
+
function TableGrid(table, dom, selection) {
|
36 |
+
var grid, startPos, endPos, selectedCell;
|
37 |
+
|
38 |
+
buildGrid();
|
39 |
+
selectedCell = dom.getParent(selection.getStart(), 'th,td');
|
40 |
+
if (selectedCell) {
|
41 |
+
startPos = getPos(selectedCell);
|
42 |
+
endPos = findEndPos();
|
43 |
+
selectedCell = getCell(startPos.x, startPos.y);
|
44 |
+
}
|
45 |
+
|
46 |
+
function cloneNode(node, children) {
|
47 |
+
node = node.cloneNode(children);
|
48 |
+
node.removeAttribute('id');
|
49 |
+
|
50 |
+
return node;
|
51 |
+
}
|
52 |
+
|
53 |
+
function buildGrid() {
|
54 |
+
var startY = 0;
|
55 |
+
|
56 |
+
grid = [];
|
57 |
+
|
58 |
+
each(['thead', 'tbody', 'tfoot'], function(part) {
|
59 |
+
var rows = dom.select('> ' + part + ' tr', table);
|
60 |
+
|
61 |
+
each(rows, function(tr, y) {
|
62 |
+
y += startY;
|
63 |
+
|
64 |
+
each(dom.select('> td, > th', tr), function(td, x) {
|
65 |
+
var x2, y2, rowspan, colspan;
|
66 |
+
|
67 |
+
// Skip over existing cells produced by rowspan
|
68 |
+
if (grid[y]) {
|
69 |
+
while (grid[y][x])
|
70 |
+
x++;
|
71 |
+
}
|
72 |
+
|
73 |
+
// Get col/rowspan from cell
|
74 |
+
rowspan = getSpanVal(td, 'rowspan');
|
75 |
+
colspan = getSpanVal(td, 'colspan');
|
76 |
+
|
77 |
+
// Fill out rowspan/colspan right and down
|
78 |
+
for (y2 = y; y2 < y + rowspan; y2++) {
|
79 |
+
if (!grid[y2])
|
80 |
+
grid[y2] = [];
|
81 |
+
|
82 |
+
for (x2 = x; x2 < x + colspan; x2++) {
|
83 |
+
grid[y2][x2] = {
|
84 |
+
part : part,
|
85 |
+
real : y2 == y && x2 == x,
|
86 |
+
elm : td,
|
87 |
+
rowspan : rowspan,
|
88 |
+
colspan : colspan
|
89 |
+
};
|
90 |
+
}
|
91 |
+
}
|
92 |
+
});
|
93 |
+
});
|
94 |
+
|
95 |
+
startY += rows.length;
|
96 |
+
});
|
97 |
+
};
|
98 |
+
|
99 |
+
function getCell(x, y) {
|
100 |
+
var row;
|
101 |
+
|
102 |
+
row = grid[y];
|
103 |
+
if (row)
|
104 |
+
return row[x];
|
105 |
+
};
|
106 |
+
|
107 |
+
function setSpanVal(td, name, val) {
|
108 |
+
if (td) {
|
109 |
+
val = parseInt(val);
|
110 |
+
|
111 |
+
if (val === 1)
|
112 |
+
td.removeAttribute(name, 1);
|
113 |
+
else
|
114 |
+
td.setAttribute(name, val, 1);
|
115 |
+
}
|
116 |
+
}
|
117 |
+
|
118 |
+
function isCellSelected(cell) {
|
119 |
+
return cell && (dom.hasClass(cell.elm, 'mceSelected') || cell == selectedCell);
|
120 |
+
};
|
121 |
+
|
122 |
+
function getSelectedRows() {
|
123 |
+
var rows = [];
|
124 |
+
|
125 |
+
each(table.rows, function(row) {
|
126 |
+
each(row.cells, function(cell) {
|
127 |
+
if (dom.hasClass(cell, 'mceSelected') || cell == selectedCell.elm) {
|
128 |
+
rows.push(row);
|
129 |
+
return false;
|
130 |
+
}
|
131 |
+
});
|
132 |
+
});
|
133 |
+
|
134 |
+
return rows;
|
135 |
+
};
|
136 |
+
|
137 |
+
function deleteTable() {
|
138 |
+
var rng = dom.createRng();
|
139 |
+
|
140 |
+
rng.setStartAfter(table);
|
141 |
+
rng.setEndAfter(table);
|
142 |
+
|
143 |
+
selection.setRng(rng);
|
144 |
+
|
145 |
+
dom.remove(table);
|
146 |
+
};
|
147 |
+
|
148 |
+
function cloneCell(cell) {
|
149 |
+
var formatNode;
|
150 |
+
|
151 |
+
// Clone formats
|
152 |
+
tinymce.walk(cell, function(node) {
|
153 |
+
var curNode;
|
154 |
+
|
155 |
+
if (node.nodeType == 3) {
|
156 |
+
each(dom.getParents(node.parentNode, null, cell).reverse(), function(node) {
|
157 |
+
node = cloneNode(node, false);
|
158 |
+
|
159 |
+
if (!formatNode)
|
160 |
+
formatNode = curNode = node;
|
161 |
+
else if (curNode)
|
162 |
+
curNode.appendChild(node);
|
163 |
+
|
164 |
+
curNode = node;
|
165 |
+
});
|
166 |
+
|
167 |
+
// Add something to the inner node
|
168 |
+
if (curNode)
|
169 |
+
curNode.innerHTML = tinymce.isIE ? ' ' : '<br data-mce-bogus="1" />';
|
170 |
+
|
171 |
+
return false;
|
172 |
+
}
|
173 |
+
}, 'childNodes');
|
174 |
+
|
175 |
+
cell = cloneNode(cell, false);
|
176 |
+
setSpanVal(cell, 'rowSpan', 1);
|
177 |
+
setSpanVal(cell, 'colSpan', 1);
|
178 |
+
|
179 |
+
if (formatNode) {
|
180 |
+
cell.appendChild(formatNode);
|
181 |
+
} else {
|
182 |
+
if (!tinymce.isIE)
|
183 |
+
cell.innerHTML = '<br data-mce-bogus="1" />';
|
184 |
+
}
|
185 |
+
|
186 |
+
return cell;
|
187 |
+
};
|
188 |
+
|
189 |
+
function cleanup() {
|
190 |
+
var rng = dom.createRng();
|
191 |
+
|
192 |
+
// Empty rows
|
193 |
+
each(dom.select('tr', table), function(tr) {
|
194 |
+
if (tr.cells.length == 0)
|
195 |
+
dom.remove(tr);
|
196 |
+
});
|
197 |
+
|
198 |
+
// Empty table
|
199 |
+
if (dom.select('tr', table).length == 0) {
|
200 |
+
rng.setStartAfter(table);
|
201 |
+
rng.setEndAfter(table);
|
202 |
+
selection.setRng(rng);
|
203 |
+
dom.remove(table);
|
204 |
+
return;
|
205 |
+
}
|
206 |
+
|
207 |
+
// Empty header/body/footer
|
208 |
+
each(dom.select('thead,tbody,tfoot', table), function(part) {
|
209 |
+
if (part.rows.length == 0)
|
210 |
+
dom.remove(part);
|
211 |
+
});
|
212 |
+
|
213 |
+
// Restore selection to start position if it still exists
|
214 |
+
buildGrid();
|
215 |
+
|
216 |
+
// Restore the selection to the closest table position
|
217 |
+
row = grid[Math.min(grid.length - 1, startPos.y)];
|
218 |
+
if (row) {
|
219 |
+
selection.select(row[Math.min(row.length - 1, startPos.x)].elm, true);
|
220 |
+
selection.collapse(true);
|
221 |
+
}
|
222 |
+
};
|
223 |
+
|
224 |
+
function fillLeftDown(x, y, rows, cols) {
|
225 |
+
var tr, x2, r, c, cell;
|
226 |
+
|
227 |
+
tr = grid[y][x].elm.parentNode;
|
228 |
+
for (r = 1; r <= rows; r++) {
|
229 |
+
tr = dom.getNext(tr, 'tr');
|
230 |
+
|
231 |
+
if (tr) {
|
232 |
+
// Loop left to find real cell
|
233 |
+
for (x2 = x; x2 >= 0; x2--) {
|
234 |
+
cell = grid[y + r][x2].elm;
|
235 |
+
|
236 |
+
if (cell.parentNode == tr) {
|
237 |
+
// Append clones after
|
238 |
+
for (c = 1; c <= cols; c++)
|
239 |
+
dom.insertAfter(cloneCell(cell), cell);
|
240 |
+
|
241 |
+
break;
|
242 |
+
}
|
243 |
+
}
|
244 |
+
|
245 |
+
if (x2 == -1) {
|
246 |
+
// Insert nodes before first cell
|
247 |
+
for (c = 1; c <= cols; c++)
|
248 |
+
tr.insertBefore(cloneCell(tr.cells[0]), tr.cells[0]);
|
249 |
+
}
|
250 |
+
}
|
251 |
+
}
|
252 |
+
};
|
253 |
+
|
254 |
+
function split() {
|
255 |
+
each(grid, function(row, y) {
|
256 |
+
each(row, function(cell, x) {
|
257 |
+
var colSpan, rowSpan, newCell, i;
|
258 |
+
|
259 |
+
if (isCellSelected(cell)) {
|
260 |
+
cell = cell.elm;
|
261 |
+
colSpan = getSpanVal(cell, 'colspan');
|
262 |
+
rowSpan = getSpanVal(cell, 'rowspan');
|
263 |
+
|
264 |
+
if (colSpan > 1 || rowSpan > 1) {
|
265 |
+
setSpanVal(cell, 'rowSpan', 1);
|
266 |
+
setSpanVal(cell, 'colSpan', 1);
|
267 |
+
|
268 |
+
// Insert cells right
|
269 |
+
for (i = 0; i < colSpan - 1; i++)
|
270 |
+
dom.insertAfter(cloneCell(cell), cell);
|
271 |
+
|
272 |
+
fillLeftDown(x, y, rowSpan - 1, colSpan);
|
273 |
+
}
|
274 |
+
}
|
275 |
+
});
|
276 |
+
});
|
277 |
+
};
|
278 |
+
|
279 |
+
function merge(cell, cols, rows) {
|
280 |
+
var startX, startY, endX, endY, x, y, startCell, endCell, cell, children, count;
|
281 |
+
|
282 |
+
// Use specified cell and cols/rows
|
283 |
+
if (cell) {
|
284 |
+
pos = getPos(cell);
|
285 |
+
startX = pos.x;
|
286 |
+
startY = pos.y;
|
287 |
+
endX = startX + (cols - 1);
|
288 |
+
endY = startY + (rows - 1);
|
289 |
+
} else {
|
290 |
+
// Use selection
|
291 |
+
startX = startPos.x;
|
292 |
+
startY = startPos.y;
|
293 |
+
endX = endPos.x;
|
294 |
+
endY = endPos.y;
|
295 |
+
}
|
296 |
+
|
297 |
+
// Find start/end cells
|
298 |
+
startCell = getCell(startX, startY);
|
299 |
+
endCell = getCell(endX, endY);
|
300 |
+
|
301 |
+
// Check if the cells exists and if they are of the same part for example tbody = tbody
|
302 |
+
if (startCell && endCell && startCell.part == endCell.part) {
|
303 |
+
// Split and rebuild grid
|
304 |
+
split();
|
305 |
+
buildGrid();
|
306 |
+
|
307 |
+
// Set row/col span to start cell
|
308 |
+
startCell = getCell(startX, startY).elm;
|
309 |
+
setSpanVal(startCell, 'colSpan', (endX - startX) + 1);
|
310 |
+
setSpanVal(startCell, 'rowSpan', (endY - startY) + 1);
|
311 |
+
|
312 |
+
// Remove other cells and add it's contents to the start cell
|
313 |
+
for (y = startY; y <= endY; y++) {
|
314 |
+
for (x = startX; x <= endX; x++) {
|
315 |
+
if (!grid[y] || !grid[y][x])
|
316 |
+
continue;
|
317 |
+
|
318 |
+
cell = grid[y][x].elm;
|
319 |
+
|
320 |
+
if (cell != startCell) {
|
321 |
+
// Move children to startCell
|
322 |
+
children = tinymce.grep(cell.childNodes);
|
323 |
+
each(children, function(node) {
|
324 |
+
startCell.appendChild(node);
|
325 |
+
});
|
326 |
+
|
327 |
+
// Remove bogus nodes if there is children in the target cell
|
328 |
+
if (children.length) {
|
329 |
+
children = tinymce.grep(startCell.childNodes);
|
330 |
+
count = 0;
|
331 |
+
each(children, function(node) {
|
332 |
+
if (node.nodeName == 'BR' && dom.getAttrib(node, 'data-mce-bogus') && count++ < children.length - 1)
|
333 |
+
startCell.removeChild(node);
|
334 |
+
});
|
335 |
+
}
|
336 |
+
|
337 |
+
// Remove cell
|
338 |
+
dom.remove(cell);
|
339 |
+
}
|
340 |
+
}
|
341 |
+
}
|
342 |
+
|
343 |
+
// Remove empty rows etc and restore caret location
|
344 |
+
cleanup();
|
345 |
+
}
|
346 |
+
};
|
347 |
+
|
348 |
+
function insertRow(before) {
|
349 |
+
var posY, cell, lastCell, x, rowElm, newRow, newCell, otherCell, rowSpan;
|
350 |
+
|
351 |
+
// Find first/last row
|
352 |
+
each(grid, function(row, y) {
|
353 |
+
each(row, function(cell, x) {
|
354 |
+
if (isCellSelected(cell)) {
|
355 |
+
cell = cell.elm;
|
356 |
+
rowElm = cell.parentNode;
|
357 |
+
newRow = cloneNode(rowElm, false);
|
358 |
+
posY = y;
|
359 |
+
|
360 |
+
if (before)
|
361 |
+
return false;
|
362 |
+
}
|
363 |
+
});
|
364 |
+
|
365 |
+
if (before)
|
366 |
+
return !posY;
|
367 |
+
});
|
368 |
+
|
369 |
+
for (x = 0; x < grid[0].length; x++) {
|
370 |
+
// Cell not found could be because of an invalid table structure
|
371 |
+
if (!grid[posY][x])
|
372 |
+
continue;
|
373 |
+
|
374 |
+
cell = grid[posY][x].elm;
|
375 |
+
|
376 |
+
if (cell != lastCell) {
|
377 |
+
if (!before) {
|
378 |
+
rowSpan = getSpanVal(cell, 'rowspan');
|
379 |
+
if (rowSpan > 1) {
|
380 |
+
setSpanVal(cell, 'rowSpan', rowSpan + 1);
|
381 |
+
continue;
|
382 |
+
}
|
383 |
+
} else {
|
384 |
+
// Check if cell above can be expanded
|
385 |
+
if (posY > 0 && grid[posY - 1][x]) {
|
386 |
+
otherCell = grid[posY - 1][x].elm;
|
387 |
+
rowSpan = getSpanVal(otherCell, 'rowSpan');
|
388 |
+
if (rowSpan > 1) {
|
389 |
+
setSpanVal(otherCell, 'rowSpan', rowSpan + 1);
|
390 |
+
continue;
|
391 |
+
}
|
392 |
+
}
|
393 |
+
}
|
394 |
+
|
395 |
+
// Insert new cell into new row
|
396 |
+
newCell = cloneCell(cell);
|
397 |
+
setSpanVal(newCell, 'colSpan', cell.colSpan);
|
398 |
+
|
399 |
+
newRow.appendChild(newCell);
|
400 |
+
|
401 |
+
lastCell = cell;
|
402 |
+
}
|
403 |
+
}
|
404 |
+
|
405 |
+
if (newRow.hasChildNodes()) {
|
406 |
+
if (!before)
|
407 |
+
dom.insertAfter(newRow, rowElm);
|
408 |
+
else
|
409 |
+
rowElm.parentNode.insertBefore(newRow, rowElm);
|
410 |
+
}
|
411 |
+
};
|
412 |
+
|
413 |
+
function insertCol(before) {
|
414 |
+
var posX, lastCell;
|
415 |
+
|
416 |
+
// Find first/last column
|
417 |
+
each(grid, function(row, y) {
|
418 |
+
each(row, function(cell, x) {
|
419 |
+
if (isCellSelected(cell)) {
|
420 |
+
posX = x;
|
421 |
+
|
422 |
+
if (before)
|
423 |
+
return false;
|
424 |
+
}
|
425 |
+
});
|
426 |
+
|
427 |
+
if (before)
|
428 |
+
return !posX;
|
429 |
+
});
|
430 |
+
|
431 |
+
each(grid, function(row, y) {
|
432 |
+
var cell, rowSpan, colSpan;
|
433 |
+
|
434 |
+
if (!row[posX])
|
435 |
+
return;
|
436 |
+
|
437 |
+
cell = row[posX].elm;
|
438 |
+
if (cell != lastCell) {
|
439 |
+
colSpan = getSpanVal(cell, 'colspan');
|
440 |
+
rowSpan = getSpanVal(cell, 'rowspan');
|
441 |
+
|
442 |
+
if (colSpan == 1) {
|
443 |
+
if (!before) {
|
444 |
+
dom.insertAfter(cloneCell(cell), cell);
|
445 |
+
fillLeftDown(posX, y, rowSpan - 1, colSpan);
|
446 |
+
} else {
|
447 |
+
cell.parentNode.insertBefore(cloneCell(cell), cell);
|
448 |
+
fillLeftDown(posX, y, rowSpan - 1, colSpan);
|
449 |
+
}
|
450 |
+
} else
|
451 |
+
setSpanVal(cell, 'colSpan', cell.colSpan + 1);
|
452 |
+
|
453 |
+
lastCell = cell;
|
454 |
+
}
|
455 |
+
});
|
456 |
+
};
|
457 |
+
|
458 |
+
function deleteCols() {
|
459 |
+
var cols = [];
|
460 |
+
|
461 |
+
// Get selected column indexes
|
462 |
+
each(grid, function(row, y) {
|
463 |
+
each(row, function(cell, x) {
|
464 |
+
if (isCellSelected(cell) && tinymce.inArray(cols, x) === -1) {
|
465 |
+
each(grid, function(row) {
|
466 |
+
var cell = row[x].elm, colSpan;
|
467 |
+
|
468 |
+
colSpan = getSpanVal(cell, 'colSpan');
|
469 |
+
|
470 |
+
if (colSpan > 1)
|
471 |
+
setSpanVal(cell, 'colSpan', colSpan - 1);
|
472 |
+
else
|
473 |
+
dom.remove(cell);
|
474 |
+
});
|
475 |
+
|
476 |
+
cols.push(x);
|
477 |
+
}
|
478 |
+
});
|
479 |
+
});
|
480 |
+
|
481 |
+
cleanup();
|
482 |
+
};
|
483 |
+
|
484 |
+
function deleteRows() {
|
485 |
+
var rows;
|
486 |
+
|
487 |
+
function deleteRow(tr) {
|
488 |
+
var nextTr, pos, lastCell;
|
489 |
+
|
490 |
+
nextTr = dom.getNext(tr, 'tr');
|
491 |
+
|
492 |
+
// Move down row spanned cells
|
493 |
+
each(tr.cells, function(cell) {
|
494 |
+
var rowSpan = getSpanVal(cell, 'rowSpan');
|
495 |
+
|
496 |
+
if (rowSpan > 1) {
|
497 |
+
setSpanVal(cell, 'rowSpan', rowSpan - 1);
|
498 |
+
pos = getPos(cell);
|
499 |
+
fillLeftDown(pos.x, pos.y, 1, 1);
|
500 |
+
}
|
501 |
+
});
|
502 |
+
|
503 |
+
// Delete cells
|
504 |
+
pos = getPos(tr.cells[0]);
|
505 |
+
each(grid[pos.y], function(cell) {
|
506 |
+
var rowSpan;
|
507 |
+
|
508 |
+
cell = cell.elm;
|
509 |
+
|
510 |
+
if (cell != lastCell) {
|
511 |
+
rowSpan = getSpanVal(cell, 'rowSpan');
|
512 |
+
|
513 |
+
if (rowSpan <= 1)
|
514 |
+
dom.remove(cell);
|
515 |
+
else
|
516 |
+
setSpanVal(cell, 'rowSpan', rowSpan - 1);
|
517 |
+
|
518 |
+
lastCell = cell;
|
519 |
+
}
|
520 |
+
});
|
521 |
+
};
|
522 |
+
|
523 |
+
// Get selected rows and move selection out of scope
|
524 |
+
rows = getSelectedRows();
|
525 |
+
|
526 |
+
// Delete all selected rows
|
527 |
+
each(rows.reverse(), function(tr) {
|
528 |
+
deleteRow(tr);
|
529 |
+
});
|
530 |
+
|
531 |
+
cleanup();
|
532 |
+
};
|
533 |
+
|
534 |
+
function cutRows() {
|
535 |
+
var rows = getSelectedRows();
|
536 |
+
|
537 |
+
dom.remove(rows);
|
538 |
+
cleanup();
|
539 |
+
|
540 |
+
return rows;
|
541 |
+
};
|
542 |
+
|
543 |
+
function copyRows() {
|
544 |
+
var rows = getSelectedRows();
|
545 |
+
|
546 |
+
each(rows, function(row, i) {
|
547 |
+
rows[i] = cloneNode(row, true);
|
548 |
+
});
|
549 |
+
|
550 |
+
return rows;
|
551 |
+
};
|
552 |
+
|
553 |
+
function pasteRows(rows, before) {
|
554 |
+
var selectedRows = getSelectedRows(),
|
555 |
+
targetRow = selectedRows[before ? 0 : selectedRows.length - 1],
|
556 |
+
targetCellCount = targetRow.cells.length;
|
557 |
+
|
558 |
+
// Calc target cell count
|
559 |
+
each(grid, function(row) {
|
560 |
+
var match;
|
561 |
+
|
562 |
+
targetCellCount = 0;
|
563 |
+
each(row, function(cell, x) {
|
564 |
+
if (cell.real)
|
565 |
+
targetCellCount += cell.colspan;
|
566 |
+
|
567 |
+
if (cell.elm.parentNode == targetRow)
|
568 |
+
match = 1;
|
569 |
+
});
|
570 |
+
|
571 |
+
if (match)
|
572 |
+
return false;
|
573 |
+
});
|
574 |
+
|
575 |
+
if (!before)
|
576 |
+
rows.reverse();
|
577 |
+
|
578 |
+
each(rows, function(row) {
|
579 |
+
var cellCount = row.cells.length, cell;
|
580 |
+
|
581 |
+
// Remove col/rowspans
|
582 |
+
for (i = 0; i < cellCount; i++) {
|
583 |
+
cell = row.cells[i];
|
584 |
+
setSpanVal(cell, 'colSpan', 1);
|
585 |
+
setSpanVal(cell, 'rowSpan', 1);
|
586 |
+
}
|
587 |
+
|
588 |
+
// Needs more cells
|
589 |
+
for (i = cellCount; i < targetCellCount; i++)
|
590 |
+
row.appendChild(cloneCell(row.cells[cellCount - 1]));
|
591 |
+
|
592 |
+
// Needs less cells
|
593 |
+
for (i = targetCellCount; i < cellCount; i++)
|
594 |
+
dom.remove(row.cells[i]);
|
595 |
+
|
596 |
+
// Add before/after
|
597 |
+
if (before)
|
598 |
+
targetRow.parentNode.insertBefore(row, targetRow);
|
599 |
+
else
|
600 |
+
dom.insertAfter(row, targetRow);
|
601 |
+
});
|
602 |
+
};
|
603 |
+
|
604 |
+
function getPos(target) {
|
605 |
+
var pos;
|
606 |
+
|
607 |
+
each(grid, function(row, y) {
|
608 |
+
each(row, function(cell, x) {
|
609 |
+
if (cell.elm == target) {
|
610 |
+
pos = {x : x, y : y};
|
611 |
+
return false;
|
612 |
+
}
|
613 |
+
});
|
614 |
+
|
615 |
+
return !pos;
|
616 |
+
});
|
617 |
+
|
618 |
+
return pos;
|
619 |
+
};
|
620 |
+
|
621 |
+
function setStartCell(cell) {
|
622 |
+
startPos = getPos(cell);
|
623 |
+
};
|
624 |
+
|
625 |
+
function findEndPos() {
|
626 |
+
var pos, maxX, maxY;
|
627 |
+
|
628 |
+
maxX = maxY = 0;
|
629 |
+
|
630 |
+
each(grid, function(row, y) {
|
631 |
+
each(row, function(cell, x) {
|
632 |
+
var colSpan, rowSpan;
|
633 |
+
|
634 |
+
if (isCellSelected(cell)) {
|
635 |
+
cell = grid[y][x];
|
636 |
+
|
637 |
+
if (x > maxX)
|
638 |
+
maxX = x;
|
639 |
+
|
640 |
+
if (y > maxY)
|
641 |
+
maxY = y;
|
642 |
+
|
643 |
+
if (cell.real) {
|
644 |
+
colSpan = cell.colspan - 1;
|
645 |
+
rowSpan = cell.rowspan - 1;
|
646 |
+
|
647 |
+
if (colSpan) {
|
648 |
+
if (x + colSpan > maxX)
|
649 |
+
maxX = x + colSpan;
|
650 |
+
}
|
651 |
+
|
652 |
+
if (rowSpan) {
|
653 |
+
if (y + rowSpan > maxY)
|
654 |
+
maxY = y + rowSpan;
|
655 |
+
}
|
656 |
+
}
|
657 |
+
}
|
658 |
+
});
|
659 |
+
});
|
660 |
+
|
661 |
+
return {x : maxX, y : maxY};
|
662 |
+
};
|
663 |
+
|
664 |
+
function setEndCell(cell) {
|
665 |
+
var startX, startY, endX, endY, maxX, maxY, colSpan, rowSpan;
|
666 |
+
|
667 |
+
endPos = getPos(cell);
|
668 |
+
|
669 |
+
if (startPos && endPos) {
|
670 |
+
// Get start/end positions
|
671 |
+
startX = Math.min(startPos.x, endPos.x);
|
672 |
+
startY = Math.min(startPos.y, endPos.y);
|
673 |
+
endX = Math.max(startPos.x, endPos.x);
|
674 |
+
endY = Math.max(startPos.y, endPos.y);
|
675 |
+
|
676 |
+
// Expand end positon to include spans
|
677 |
+
maxX = endX;
|
678 |
+
maxY = endY;
|
679 |
+
|
680 |
+
// Expand startX
|
681 |
+
for (y = startY; y <= maxY; y++) {
|
682 |
+
cell = grid[y][startX];
|
683 |
+
|
684 |
+
if (!cell.real) {
|
685 |
+
if (startX - (cell.colspan - 1) < startX)
|
686 |
+
startX -= cell.colspan - 1;
|
687 |
+
}
|
688 |
+
}
|
689 |
+
|
690 |
+
// Expand startY
|
691 |
+
for (x = startX; x <= maxX; x++) {
|
692 |
+
cell = grid[startY][x];
|
693 |
+
|
694 |
+
if (!cell.real) {
|
695 |
+
if (startY - (cell.rowspan - 1) < startY)
|
696 |
+
startY -= cell.rowspan - 1;
|
697 |
+
}
|
698 |
+
}
|
699 |
+
|
700 |
+
// Find max X, Y
|
701 |
+
for (y = startY; y <= endY; y++) {
|
702 |
+
for (x = startX; x <= endX; x++) {
|
703 |
+
cell = grid[y][x];
|
704 |
+
|
705 |
+
if (cell.real) {
|
706 |
+
colSpan = cell.colspan - 1;
|
707 |
+
rowSpan = cell.rowspan - 1;
|
708 |
+
|
709 |
+
if (colSpan) {
|
710 |
+
if (x + colSpan > maxX)
|
711 |
+
maxX = x + colSpan;
|
712 |
+
}
|
713 |
+
|
714 |
+
if (rowSpan) {
|
715 |
+
if (y + rowSpan > maxY)
|
716 |
+
maxY = y + rowSpan;
|
717 |
+
}
|
718 |
+
}
|
719 |
+
}
|
720 |
+
}
|
721 |
+
|
722 |
+
// Remove current selection
|
723 |
+
dom.removeClass(dom.select('td.mceSelected,th.mceSelected'), 'mceSelected');
|
724 |
+
|
725 |
+
// Add new selection
|
726 |
+
for (y = startY; y <= maxY; y++) {
|
727 |
+
for (x = startX; x <= maxX; x++) {
|
728 |
+
if (grid[y][x])
|
729 |
+
dom.addClass(grid[y][x].elm, 'mceSelected');
|
730 |
+
}
|
731 |
+
}
|
732 |
+
}
|
733 |
+
};
|
734 |
+
|
735 |
+
// Expose to public
|
736 |
+
tinymce.extend(this, {
|
737 |
+
deleteTable : deleteTable,
|
738 |
+
split : split,
|
739 |
+
merge : merge,
|
740 |
+
insertRow : insertRow,
|
741 |
+
insertCol : insertCol,
|
742 |
+
deleteCols : deleteCols,
|
743 |
+
deleteRows : deleteRows,
|
744 |
+
cutRows : cutRows,
|
745 |
+
copyRows : copyRows,
|
746 |
+
pasteRows : pasteRows,
|
747 |
+
getPos : getPos,
|
748 |
+
setStartCell : setStartCell,
|
749 |
+
setEndCell : setEndCell
|
750 |
+
});
|
751 |
+
};
|
752 |
+
|
753 |
+
tinymce.create('tinymce.plugins.TablePlugin', {
|
754 |
+
init : function(ed, url) {
|
755 |
+
var winMan, clipboardRows, hasCellSelection = true; // Might be selected cells on reload
|
756 |
+
|
757 |
+
function createTableGrid(node) {
|
758 |
+
var selection = ed.selection, tblElm = ed.dom.getParent(node || selection.getNode(), 'table');
|
759 |
+
|
760 |
+
if (tblElm)
|
761 |
+
return new TableGrid(tblElm, ed.dom, selection);
|
762 |
+
};
|
763 |
+
|
764 |
+
function cleanup() {
|
765 |
+
// Restore selection possibilities
|
766 |
+
ed.getBody().style.webkitUserSelect = '';
|
767 |
+
|
768 |
+
if (hasCellSelection) {
|
769 |
+
ed.dom.removeClass(ed.dom.select('td.mceSelected,th.mceSelected'), 'mceSelected');
|
770 |
+
hasCellSelection = false;
|
771 |
+
}
|
772 |
+
};
|
773 |
+
|
774 |
+
// Register buttons
|
775 |
+
each([
|
776 |
+
['table', 'table.desc', 'mceInsertTable', true],
|
777 |
+
['delete_table', 'table.del', 'mceTableDelete'],
|
778 |
+
['delete_col', 'table.delete_col_desc', 'mceTableDeleteCol'],
|
779 |
+
['delete_row', 'table.delete_row_desc', 'mceTableDeleteRow'],
|
780 |
+
['col_after', 'table.col_after_desc', 'mceTableInsertColAfter'],
|
781 |
+
['col_before', 'table.col_before_desc', 'mceTableInsertColBefore'],
|
782 |
+
['row_after', 'table.row_after_desc', 'mceTableInsertRowAfter'],
|
783 |
+
['row_before', 'table.row_before_desc', 'mceTableInsertRowBefore'],
|
784 |
+
['row_props', 'table.row_desc', 'mceTableRowProps', true],
|
785 |
+
['cell_props', 'table.cell_desc', 'mceTableCellProps', true],
|
786 |
+
['split_cells', 'table.split_cells_desc', 'mceTableSplitCells', true],
|
787 |
+
['merge_cells', 'table.merge_cells_desc', 'mceTableMergeCells', true]
|
788 |
+
], function(c) {
|
789 |
+
ed.addButton(c[0], {title : c[1], cmd : c[2], ui : c[3]});
|
790 |
+
});
|
791 |
+
|
792 |
+
// Select whole table is a table border is clicked
|
793 |
+
if (!tinymce.isIE) {
|
794 |
+
ed.onClick.add(function(ed, e) {
|
795 |
+
e = e.target;
|
796 |
+
|
797 |
+
if (e.nodeName === 'TABLE') {
|
798 |
+
ed.selection.select(e);
|
799 |
+
ed.nodeChanged();
|
800 |
+
}
|
801 |
+
});
|
802 |
+
}
|
803 |
+
|
804 |
+
ed.onPreProcess.add(function(ed, args) {
|
805 |
+
var nodes, i, node, dom = ed.dom, value;
|
806 |
+
|
807 |
+
nodes = dom.select('table', args.node);
|
808 |
+
i = nodes.length;
|
809 |
+
while (i--) {
|
810 |
+
node = nodes[i];
|
811 |
+
dom.setAttrib(node, 'data-mce-style', '');
|
812 |
+
|
813 |
+
if ((value = dom.getAttrib(node, 'width'))) {
|
814 |
+
dom.setStyle(node, 'width', value);
|
815 |
+
dom.setAttrib(node, 'width', '');
|
816 |
+
}
|
817 |
+
|
818 |
+
if ((value = dom.getAttrib(node, 'height'))) {
|
819 |
+
dom.setStyle(node, 'height', value);
|
820 |
+
dom.setAttrib(node, 'height', '');
|
821 |
+
}
|
822 |
+
}
|
823 |
+
});
|
824 |
+
|
825 |
+
// Handle node change updates
|
826 |
+
ed.onNodeChange.add(function(ed, cm, n) {
|
827 |
+
var p;
|
828 |
+
|
829 |
+
n = ed.selection.getStart();
|
830 |
+
p = ed.dom.getParent(n, 'td,th,caption');
|
831 |
+
cm.setActive('table', n.nodeName === 'TABLE' || !!p);
|
832 |
+
|
833 |
+
// Disable table tools if we are in caption
|
834 |
+
if (p && p.nodeName === 'CAPTION')
|
835 |
+
p = 0;
|
836 |
+
|
837 |
+
cm.setDisabled('delete_table', !p);
|
838 |
+
cm.setDisabled('delete_col', !p);
|
839 |
+
cm.setDisabled('delete_table', !p);
|
840 |
+
cm.setDisabled('delete_row', !p);
|
841 |
+
cm.setDisabled('col_after', !p);
|
842 |
+
cm.setDisabled('col_before', !p);
|
843 |
+
cm.setDisabled('row_after', !p);
|
844 |
+
cm.setDisabled('row_before', !p);
|
845 |
+
cm.setDisabled('row_props', !p);
|
846 |
+
cm.setDisabled('cell_props', !p);
|
847 |
+
cm.setDisabled('split_cells', !p);
|
848 |
+
cm.setDisabled('merge_cells', !p);
|
849 |
+
});
|
850 |
+
|
851 |
+
ed.onInit.add(function(ed) {
|
852 |
+
var startTable, startCell, dom = ed.dom, tableGrid;
|
853 |
+
|
854 |
+
winMan = ed.windowManager;
|
855 |
+
|
856 |
+
// Add cell selection logic
|
857 |
+
ed.onMouseDown.add(function(ed, e) {
|
858 |
+
if (e.button != 2) {
|
859 |
+
cleanup();
|
860 |
+
|
861 |
+
startCell = dom.getParent(e.target, 'td,th');
|
862 |
+
startTable = dom.getParent(startCell, 'table');
|
863 |
+
}
|
864 |
+
});
|
865 |
+
|
866 |
+
dom.bind(ed.getDoc(), 'mouseover', function(e) {
|
867 |
+
var sel, table, target = e.target;
|
868 |
+
|
869 |
+
if (startCell && (tableGrid || target != startCell) && (target.nodeName == 'TD' || target.nodeName == 'TH')) {
|
870 |
+
table = dom.getParent(target, 'table');
|
871 |
+
if (table == startTable) {
|
872 |
+
if (!tableGrid) {
|
873 |
+
tableGrid = createTableGrid(table);
|
874 |
+
tableGrid.setStartCell(startCell);
|
875 |
+
|
876 |
+
ed.getBody().style.webkitUserSelect = 'none';
|
877 |
+
}
|
878 |
+
|
879 |
+
tableGrid.setEndCell(target);
|
880 |
+
hasCellSelection = true;
|
881 |
+
}
|
882 |
+
|
883 |
+
// Remove current selection
|
884 |
+
sel = ed.selection.getSel();
|
885 |
+
|
886 |
+
try {
|
887 |
+
if (sel.removeAllRanges)
|
888 |
+
sel.removeAllRanges();
|
889 |
+
else
|
890 |
+
sel.empty();
|
891 |
+
} catch (ex) {
|
892 |
+
// IE9 might throw errors here
|
893 |
+
}
|
894 |
+
|
895 |
+
e.preventDefault();
|
896 |
+
}
|
897 |
+
});
|
898 |
+
|
899 |
+
ed.onMouseUp.add(function(ed, e) {
|
900 |
+
var rng, sel = ed.selection, selectedCells, nativeSel = sel.getSel(), walker, node, lastNode, endNode;
|
901 |
+
|
902 |
+
// Move selection to startCell
|
903 |
+
if (startCell) {
|
904 |
+
if (tableGrid)
|
905 |
+
ed.getBody().style.webkitUserSelect = '';
|
906 |
+
|
907 |
+
function setPoint(node, start) {
|
908 |
+
var walker = new tinymce.dom.TreeWalker(node, node);
|
909 |
+
|
910 |
+
do {
|
911 |
+
// Text node
|
912 |
+
if (node.nodeType == 3 && tinymce.trim(node.nodeValue).length != 0) {
|
913 |
+
if (start)
|
914 |
+
rng.setStart(node, 0);
|
915 |
+
else
|
916 |
+
rng.setEnd(node, node.nodeValue.length);
|
917 |
+
|
918 |
+
return;
|
919 |
+
}
|
920 |
+
|
921 |
+
// BR element
|
922 |
+
if (node.nodeName == 'BR') {
|
923 |
+
if (start)
|
924 |
+
rng.setStartBefore(node);
|
925 |
+
else
|
926 |
+
rng.setEndBefore(node);
|
927 |
+
|
928 |
+
return;
|
929 |
+
}
|
930 |
+
} while (node = (start ? walker.next() : walker.prev()));
|
931 |
+
}
|
932 |
+
|
933 |
+
// Try to expand text selection as much as we can only Gecko supports cell selection
|
934 |
+
selectedCells = dom.select('td.mceSelected,th.mceSelected');
|
935 |
+
if (selectedCells.length > 0) {
|
936 |
+
rng = dom.createRng();
|
937 |
+
node = selectedCells[0];
|
938 |
+
endNode = selectedCells[selectedCells.length - 1];
|
939 |
+
rng.setStartBefore(node);
|
940 |
+
rng.setEndAfter(node);
|
941 |
+
|
942 |
+
setPoint(node, 1);
|
943 |
+
walker = new tinymce.dom.TreeWalker(node, dom.getParent(selectedCells[0], 'table'));
|
944 |
+
|
945 |
+
do {
|
946 |
+
if (node.nodeName == 'TD' || node.nodeName == 'TH') {
|
947 |
+
if (!dom.hasClass(node, 'mceSelected'))
|
948 |
+
break;
|
949 |
+
|
950 |
+
lastNode = node;
|
951 |
+
}
|
952 |
+
} while (node = walker.next());
|
953 |
+
|
954 |
+
setPoint(lastNode);
|
955 |
+
|
956 |
+
sel.setRng(rng);
|
957 |
+
}
|
958 |
+
|
959 |
+
ed.nodeChanged();
|
960 |
+
startCell = tableGrid = startTable = null;
|
961 |
+
}
|
962 |
+
});
|
963 |
+
|
964 |
+
ed.onKeyUp.add(function(ed, e) {
|
965 |
+
cleanup();
|
966 |
+
});
|
967 |
+
|
968 |
+
ed.onKeyDown.add(function (ed, e) {
|
969 |
+
fixTableCellSelection(ed);
|
970 |
+
});
|
971 |
+
|
972 |
+
ed.onMouseDown.add(function (ed, e) {
|
973 |
+
if (e.button != 2) {
|
974 |
+
fixTableCellSelection(ed);
|
975 |
+
}
|
976 |
+
});
|
977 |
+
function tableCellSelected(ed, rng, n, currentCell) {
|
978 |
+
// The decision of when a table cell is selected is somewhat involved. The fact that this code is
|
979 |
+
// required is actually a pointer to the root cause of this bug. A cell is selected when the start
|
980 |
+
// and end offsets are 0, the start container is a text, and the selection node is either a TR (most cases)
|
981 |
+
// or the parent of the table (in the case of the selection containing the last cell of a table).
|
982 |
+
var TEXT_NODE = 3, table = ed.dom.getParent(rng.startContainer, 'TABLE'),
|
983 |
+
tableParent, allOfCellSelected, tableCellSelection;
|
984 |
+
if (table)
|
985 |
+
tableParent = table.parentNode;
|
986 |
+
allOfCellSelected =rng.startContainer.nodeType == TEXT_NODE &&
|
987 |
+
rng.startOffset == 0 &&
|
988 |
+
rng.endOffset == 0 &&
|
989 |
+
currentCell &&
|
990 |
+
(n.nodeName=="TR" || n==tableParent);
|
991 |
+
tableCellSelection = (n.nodeName=="TD"||n.nodeName=="TH")&& !currentCell;
|
992 |
+
return allOfCellSelected || tableCellSelection;
|
993 |
+
// return false;
|
994 |
+
}
|
995 |
+
|
996 |
+
// this nasty hack is here to work around some WebKit selection bugs.
|
997 |
+
function fixTableCellSelection(ed) {
|
998 |
+
if (!tinymce.isWebKit)
|
999 |
+
return;
|
1000 |
+
|
1001 |
+
var rng = ed.selection.getRng();
|
1002 |
+
var n = ed.selection.getNode();
|
1003 |
+
var currentCell = ed.dom.getParent(rng.startContainer, 'TD,TH');
|
1004 |
+
|
1005 |
+
if (!tableCellSelected(ed, rng, n, currentCell))
|
1006 |
+
return;
|
1007 |
+
if (!currentCell) {
|
1008 |
+
currentCell=n;
|
1009 |
+
}
|
1010 |
+
|
1011 |
+
// Get the very last node inside the table cell
|
1012 |
+
var end = currentCell.lastChild;
|
1013 |
+
while (end.lastChild)
|
1014 |
+
end = end.lastChild;
|
1015 |
+
|
1016 |
+
// Select the entire table cell. Nothing outside of the table cell should be selected.
|
1017 |
+
rng.setEnd(end, end.nodeValue.length);
|
1018 |
+
ed.selection.setRng(rng);
|
1019 |
+
}
|
1020 |
+
ed.plugins.table.fixTableCellSelection=fixTableCellSelection;
|
1021 |
+
|
1022 |
+
// Add context menu
|
1023 |
+
if (ed && ed.plugins.contextmenu) {
|
1024 |
+
ed.plugins.contextmenu.onContextMenu.add(function(th, m, e) {
|
1025 |
+
var sm, se = ed.selection, el = se.getNode() || ed.getBody();
|
1026 |
+
|
1027 |
+
if (ed.dom.getParent(e, 'td') || ed.dom.getParent(e, 'th') || ed.dom.select('td.mceSelected,th.mceSelected').length) {
|
1028 |
+
m.removeAll();
|
1029 |
+
|
1030 |
+
if (el.nodeName == 'A' && !ed.dom.getAttrib(el, 'name')) {
|
1031 |
+
m.add({title : 'advanced.link_desc', icon : 'link', cmd : ed.plugins.advlink ? 'mceAdvLink' : 'mceLink', ui : true});
|
1032 |
+
m.add({title : 'advanced.unlink_desc', icon : 'unlink', cmd : 'UnLink'});
|
1033 |
+
m.addSeparator();
|
1034 |
+
}
|
1035 |
+
|
1036 |
+
if (el.nodeName == 'IMG' && el.className.indexOf('mceItem') == -1) {
|
1037 |
+
m.add({title : 'advanced.image_desc', icon : 'image', cmd : ed.plugins.advimage ? 'mceAdvImage' : 'mceImage', ui : true});
|
1038 |
+
m.addSeparator();
|
1039 |
+
}
|
1040 |
+
|
1041 |
+
m.add({title : 'table.desc', icon : 'table', cmd : 'mceInsertTable', value : {action : 'insert'}});
|
1042 |
+
m.add({title : 'table.props_desc', icon : 'table_props', cmd : 'mceInsertTable'});
|
1043 |
+
m.add({title : 'table.del', icon : 'delete_table', cmd : 'mceTableDelete'});
|
1044 |
+
m.addSeparator();
|
1045 |
+
|
1046 |
+
// Cell menu
|
1047 |
+
sm = m.addMenu({title : 'table.cell'});
|
1048 |
+
sm.add({title : 'table.cell_desc', icon : 'cell_props', cmd : 'mceTableCellProps'});
|
1049 |
+
sm.add({title : 'table.split_cells_desc', icon : 'split_cells', cmd : 'mceTableSplitCells'});
|
1050 |
+
sm.add({title : 'table.merge_cells_desc', icon : 'merge_cells', cmd : 'mceTableMergeCells'});
|
1051 |
+
|
1052 |
+
// Row menu
|
1053 |
+
sm = m.addMenu({title : 'table.row'});
|
1054 |
+
sm.add({title : 'table.row_desc', icon : 'row_props', cmd : 'mceTableRowProps'});
|
1055 |
+
sm.add({title : 'table.row_before_desc', icon : 'row_before', cmd : 'mceTableInsertRowBefore'});
|
1056 |
+
sm.add({title : 'table.row_after_desc', icon : 'row_after', cmd : 'mceTableInsertRowAfter'});
|
1057 |
+
sm.add({title : 'table.delete_row_desc', icon : 'delete_row', cmd : 'mceTableDeleteRow'});
|
1058 |
+
sm.addSeparator();
|
1059 |
+
sm.add({title : 'table.cut_row_desc', icon : 'cut', cmd : 'mceTableCutRow'});
|
1060 |
+
sm.add({title : 'table.copy_row_desc', icon : 'copy', cmd : 'mceTableCopyRow'});
|
1061 |
+
sm.add({title : 'table.paste_row_before_desc', icon : 'paste', cmd : 'mceTablePasteRowBefore'}).setDisabled(!clipboardRows);
|
1062 |
+
sm.add({title : 'table.paste_row_after_desc', icon : 'paste', cmd : 'mceTablePasteRowAfter'}).setDisabled(!clipboardRows);
|
1063 |
+
|
1064 |
+
// Column menu
|
1065 |
+
sm = m.addMenu({title : 'table.col'});
|
1066 |
+
sm.add({title : 'table.col_before_desc', icon : 'col_before', cmd : 'mceTableInsertColBefore'});
|
1067 |
+
sm.add({title : 'table.col_after_desc', icon : 'col_after', cmd : 'mceTableInsertColAfter'});
|
1068 |
+
sm.add({title : 'table.delete_col_desc', icon : 'delete_col', cmd : 'mceTableDeleteCol'});
|
1069 |
+
} else
|
1070 |
+
m.add({title : 'table.desc', icon : 'table', cmd : 'mceInsertTable'});
|
1071 |
+
});
|
1072 |
+
}
|
1073 |
+
|
1074 |
+
// Fix to allow navigating up and down in a table in WebKit browsers.
|
1075 |
+
if (tinymce.isWebKit) {
|
1076 |
+
function moveSelection(ed, e) {
|
1077 |
+
var VK = tinymce.VK;
|
1078 |
+
var key = e.keyCode;
|
1079 |
+
|
1080 |
+
function handle(upBool, sourceNode, event) {
|
1081 |
+
var siblingDirection = upBool ? 'previousSibling' : 'nextSibling';
|
1082 |
+
var currentRow = ed.dom.getParent(sourceNode, 'tr');
|
1083 |
+
var siblingRow = currentRow[siblingDirection];
|
1084 |
+
|
1085 |
+
if (siblingRow) {
|
1086 |
+
moveCursorToRow(ed, sourceNode, siblingRow, upBool);
|
1087 |
+
tinymce.dom.Event.cancel(event);
|
1088 |
+
return true;
|
1089 |
+
} else {
|
1090 |
+
var tableNode = ed.dom.getParent(currentRow, 'table');
|
1091 |
+
var middleNode = currentRow.parentNode;
|
1092 |
+
var parentNodeName = middleNode.nodeName.toLowerCase();
|
1093 |
+
if (parentNodeName === 'tbody' || parentNodeName === (upBool ? 'tfoot' : 'thead')) {
|
1094 |
+
var targetParent = getTargetParent(upBool, tableNode, middleNode, 'tbody');
|
1095 |
+
if (targetParent !== null) {
|
1096 |
+
return moveToRowInTarget(upBool, targetParent, sourceNode, event);
|
1097 |
+
}
|
1098 |
+
}
|
1099 |
+
return escapeTable(upBool, currentRow, siblingDirection, tableNode, event);
|
1100 |
+
}
|
1101 |
+
}
|
1102 |
+
|
1103 |
+
function getTargetParent(upBool, topNode, secondNode, nodeName) {
|
1104 |
+
var tbodies = ed.dom.select('>' + nodeName, topNode);
|
1105 |
+
var position = tbodies.indexOf(secondNode);
|
1106 |
+
if (upBool && position === 0 || !upBool && position === tbodies.length - 1) {
|
1107 |
+
return getFirstHeadOrFoot(upBool, topNode);
|
1108 |
+
} else if (position === -1) {
|
1109 |
+
var topOrBottom = secondNode.tagName.toLowerCase() === 'thead' ? 0 : tbodies.length - 1;
|
1110 |
+
return tbodies[topOrBottom];
|
1111 |
+
} else {
|
1112 |
+
return tbodies[position + (upBool ? -1 : 1)];
|
1113 |
+
}
|
1114 |
+
}
|
1115 |
+
|
1116 |
+
function getFirstHeadOrFoot(upBool, parent) {
|
1117 |
+
var tagName = upBool ? 'thead' : 'tfoot';
|
1118 |
+
var headOrFoot = ed.dom.select('>' + tagName, parent);
|
1119 |
+
return headOrFoot.length !== 0 ? headOrFoot[0] : null;
|
1120 |
+
}
|
1121 |
+
|
1122 |
+
function moveToRowInTarget(upBool, targetParent, sourceNode, event) {
|
1123 |
+
var targetRow = getChildForDirection(targetParent, upBool);
|
1124 |
+
targetRow && moveCursorToRow(ed, sourceNode, targetRow, upBool);
|
1125 |
+
tinymce.dom.Event.cancel(event);
|
1126 |
+
return true;
|
1127 |
+
}
|
1128 |
+
|
1129 |
+
function escapeTable(upBool, currentRow, siblingDirection, table, event) {
|
1130 |
+
var tableSibling = table[siblingDirection];
|
1131 |
+
if (tableSibling) {
|
1132 |
+
moveCursorToStartOfElement(tableSibling);
|
1133 |
+
return true;
|
1134 |
+
} else {
|
1135 |
+
var parentCell = ed.dom.getParent(table, 'td,th');
|
1136 |
+
if (parentCell) {
|
1137 |
+
return handle(upBool, parentCell, event);
|
1138 |
+
} else {
|
1139 |
+
var backUpSibling = getChildForDirection(currentRow, !upBool);
|
1140 |
+
moveCursorToStartOfElement(backUpSibling);
|
1141 |
+
return tinymce.dom.Event.cancel(event);
|
1142 |
+
}
|
1143 |
+
}
|
1144 |
+
}
|
1145 |
+
|
1146 |
+
function getChildForDirection(parent, up) {
|
1147 |
+
var child = parent && parent[up ? 'lastChild' : 'firstChild'];
|
1148 |
+
// BR is not a valid table child to return in this case we return the table cell
|
1149 |
+
return child && child.nodeName === 'BR' ? ed.dom.getParent(child, 'td,th') : child;
|
1150 |
+
}
|
1151 |
+
|
1152 |
+
function moveCursorToStartOfElement(n) {
|
1153 |
+
ed.selection.setCursorLocation(n, 0);
|
1154 |
+
}
|
1155 |
+
|
1156 |
+
function isVerticalMovement() {
|
1157 |
+
return key == VK.UP || key == VK.DOWN;
|
1158 |
+
}
|
1159 |
+
|
1160 |
+
function isInTable(ed) {
|
1161 |
+
var node = ed.selection.getNode();
|
1162 |
+
var currentRow = ed.dom.getParent(node, 'tr');
|
1163 |
+
return currentRow !== null;
|
1164 |
+
}
|
1165 |
+
|
1166 |
+
function columnIndex(column) {
|
1167 |
+
var colIndex = 0;
|
1168 |
+
var c = column;
|
1169 |
+
while (c.previousSibling) {
|
1170 |
+
c = c.previousSibling;
|
1171 |
+
colIndex = colIndex + getSpanVal(c, "colspan");
|
1172 |
+
}
|
1173 |
+
return colIndex;
|
1174 |
+
}
|
1175 |
+
|
1176 |
+
function findColumn(rowElement, columnIndex) {
|
1177 |
+
var c = 0;
|
1178 |
+
var r = 0;
|
1179 |
+
each(rowElement.children, function(cell, i) {
|
1180 |
+
c = c + getSpanVal(cell, "colspan");
|
1181 |
+
r = i;
|
1182 |
+
if (c > columnIndex)
|
1183 |
+
return false;
|
1184 |
+
});
|
1185 |
+
return r;
|
1186 |
+
}
|
1187 |
+
|
1188 |
+
function moveCursorToRow(ed, node, row, upBool) {
|
1189 |
+
var srcColumnIndex = columnIndex(ed.dom.getParent(node, 'td,th'));
|
1190 |
+
var tgtColumnIndex = findColumn(row, srcColumnIndex);
|
1191 |
+
var tgtNode = row.childNodes[tgtColumnIndex];
|
1192 |
+
var rowCellTarget = getChildForDirection(tgtNode, upBool);
|
1193 |
+
moveCursorToStartOfElement(rowCellTarget || tgtNode);
|
1194 |
+
}
|
1195 |
+
|
1196 |
+
function shouldFixCaret(preBrowserNode) {
|
1197 |
+
var newNode = ed.selection.getNode();
|
1198 |
+
var newParent = ed.dom.getParent(newNode, 'td,th');
|
1199 |
+
var oldParent = ed.dom.getParent(preBrowserNode, 'td,th');
|
1200 |
+
return newParent && newParent !== oldParent && checkSameParentTable(newParent, oldParent)
|
1201 |
+
}
|
1202 |
+
|
1203 |
+
function checkSameParentTable(nodeOne, NodeTwo) {
|
1204 |
+
return ed.dom.getParent(nodeOne, 'TABLE') === ed.dom.getParent(NodeTwo, 'TABLE');
|
1205 |
+
}
|
1206 |
+
|
1207 |
+
if (isVerticalMovement() && isInTable(ed)) {
|
1208 |
+
var preBrowserNode = ed.selection.getNode();
|
1209 |
+
setTimeout(function() {
|
1210 |
+
if (shouldFixCaret(preBrowserNode)) {
|
1211 |
+
handle(!e.shiftKey && key === VK.UP, preBrowserNode, e);
|
1212 |
+
}
|
1213 |
+
}, 0);
|
1214 |
+
}
|
1215 |
+
}
|
1216 |
+
|
1217 |
+
ed.onKeyDown.add(moveSelection);
|
1218 |
+
}
|
1219 |
+
|
1220 |
+
// Fixes an issue on Gecko where it's impossible to place the caret behind a table
|
1221 |
+
// This fix will force a paragraph element after the table but only when the forced_root_block setting is enabled
|
1222 |
+
if (!tinymce.isIE) {
|
1223 |
+
function fixTableCaretPos() {
|
1224 |
+
var last;
|
1225 |
+
|
1226 |
+
// Skip empty text nodes form the end
|
1227 |
+
for (last = ed.getBody().lastChild; last && last.nodeType == 3 && !last.nodeValue.length; last = last.previousSibling) ;
|
1228 |
+
|
1229 |
+
if (last && last.nodeName == 'TABLE')
|
1230 |
+
ed.dom.add(ed.getBody(), 'p', null, '<br mce_bogus="1" />');
|
1231 |
+
};
|
1232 |
+
|
1233 |
+
// Fixes an bug where it's impossible to place the caret before a table in Gecko
|
1234 |
+
// this fix solves it by detecting when the caret is at the beginning of such a table
|
1235 |
+
// and then manually moves the caret infront of the table
|
1236 |
+
if (tinymce.isGecko) {
|
1237 |
+
ed.onKeyDown.add(function(ed, e) {
|
1238 |
+
var rng, table, dom = ed.dom;
|
1239 |
+
|
1240 |
+
// On gecko it's not possible to place the caret before a table
|
1241 |
+
if (e.keyCode == 37 || e.keyCode == 38) {
|
1242 |
+
rng = ed.selection.getRng();
|
1243 |
+
table = dom.getParent(rng.startContainer, 'table');
|
1244 |
+
|
1245 |
+
if (table && ed.getBody().firstChild == table) {
|
1246 |
+
if (isAtStart(rng, table)) {
|
1247 |
+
rng = dom.createRng();
|
1248 |
+
|
1249 |
+
rng.setStartBefore(table);
|
1250 |
+
rng.setEndBefore(table);
|
1251 |
+
|
1252 |
+
ed.selection.setRng(rng);
|
1253 |
+
|
1254 |
+
e.preventDefault();
|
1255 |
+
}
|
1256 |
+
}
|
1257 |
+
}
|
1258 |
+
});
|
1259 |
+
}
|
1260 |
+
|
1261 |
+
ed.onKeyUp.add(fixTableCaretPos);
|
1262 |
+
ed.onSetContent.add(fixTableCaretPos);
|
1263 |
+
ed.onVisualAid.add(fixTableCaretPos);
|
1264 |
+
|
1265 |
+
ed.onPreProcess.add(function(ed, o) {
|
1266 |
+
var last = o.node.lastChild;
|
1267 |
+
|
1268 |
+
if (last && last.childNodes.length == 1 && last.firstChild.nodeName == 'BR')
|
1269 |
+
ed.dom.remove(last);
|
1270 |
+
});
|
1271 |
+
|
1272 |
+
|
1273 |
+
/**
|
1274 |
+
* Fixes bug in Gecko where shift-enter in table cell does not place caret on new line
|
1275 |
+
*/
|
1276 |
+
if (tinymce.isGecko) {
|
1277 |
+
ed.onKeyDown.add(function(ed, e) {
|
1278 |
+
if (e.keyCode === tinymce.VK.ENTER && e.shiftKey) {
|
1279 |
+
var node = ed.selection.getRng().startContainer;
|
1280 |
+
var tableCell = dom.getParent(node, 'td,th');
|
1281 |
+
if (tableCell) {
|
1282 |
+
var zeroSizedNbsp = ed.getDoc().createTextNode("\uFEFF");
|
1283 |
+
dom.insertAfter(zeroSizedNbsp, node);
|
1284 |
+
}
|
1285 |
+
}
|
1286 |
+
});
|
1287 |
+
}
|
1288 |
+
|
1289 |
+
|
1290 |
+
fixTableCaretPos();
|
1291 |
+
ed.startContent = ed.getContent({format : 'raw'});
|
1292 |
+
}
|
1293 |
+
});
|
1294 |
+
|
1295 |
+
// Register action commands
|
1296 |
+
each({
|
1297 |
+
mceTableSplitCells : function(grid) {
|
1298 |
+
grid.split();
|
1299 |
+
},
|
1300 |
+
|
1301 |
+
mceTableMergeCells : function(grid) {
|
1302 |
+
var rowSpan, colSpan, cell;
|
1303 |
+
|
1304 |
+
cell = ed.dom.getParent(ed.selection.getNode(), 'th,td');
|
1305 |
+
if (cell) {
|
1306 |
+
rowSpan = cell.rowSpan;
|
1307 |
+
colSpan = cell.colSpan;
|
1308 |
+
}
|
1309 |
+
|
1310 |
+
if (!ed.dom.select('td.mceSelected,th.mceSelected').length) {
|
1311 |
+
winMan.open({
|
1312 |
+
url : url + '/merge_cells.htm',
|
1313 |
+
width : 240 + parseInt(ed.getLang('table.merge_cells_delta_width', 0)),
|
1314 |
+
height : 110 + parseInt(ed.getLang('table.merge_cells_delta_height', 0)),
|
1315 |
+
inline : 1
|
1316 |
+
}, {
|
1317 |
+
rows : rowSpan,
|
1318 |
+
cols : colSpan,
|
1319 |
+
onaction : function(data) {
|
1320 |
+
grid.merge(cell, data.cols, data.rows);
|
1321 |
+
},
|
1322 |
+
plugin_url : url
|
1323 |
+
});
|
1324 |
+
} else
|
1325 |
+
grid.merge();
|
1326 |
+
},
|
1327 |
+
|
1328 |
+
mceTableInsertRowBefore : function(grid) {
|
1329 |
+
grid.insertRow(true);
|
1330 |
+
},
|
1331 |
+
|
1332 |
+
mceTableInsertRowAfter : function(grid) {
|
1333 |
+
grid.insertRow();
|
1334 |
+
},
|
1335 |
+
|
1336 |
+
mceTableInsertColBefore : function(grid) {
|
1337 |
+
grid.insertCol(true);
|
1338 |
+
},
|
1339 |
+
|
1340 |
+
mceTableInsertColAfter : function(grid) {
|
1341 |
+
grid.insertCol();
|
1342 |
+
},
|
1343 |
+
|
1344 |
+
mceTableDeleteCol : function(grid) {
|
1345 |
+
grid.deleteCols();
|
1346 |
+
},
|
1347 |
+
|
1348 |
+
mceTableDeleteRow : function(grid) {
|
1349 |
+
grid.deleteRows();
|
1350 |
+
},
|
1351 |
+
|
1352 |
+
mceTableCutRow : function(grid) {
|
1353 |
+
clipboardRows = grid.cutRows();
|
1354 |
+
},
|
1355 |
+
|
1356 |
+
mceTableCopyRow : function(grid) {
|
1357 |
+
clipboardRows = grid.copyRows();
|
1358 |
+
},
|
1359 |
+
|
1360 |
+
mceTablePasteRowBefore : function(grid) {
|
1361 |
+
grid.pasteRows(clipboardRows, true);
|
1362 |
+
},
|
1363 |
+
|
1364 |
+
mceTablePasteRowAfter : function(grid) {
|
1365 |
+
grid.pasteRows(clipboardRows);
|
1366 |
+
},
|
1367 |
+
|
1368 |
+
mceTableDelete : function(grid) {
|
1369 |
+
grid.deleteTable();
|
1370 |
+
}
|
1371 |
+
}, function(func, name) {
|
1372 |
+
ed.addCommand(name, function() {
|
1373 |
+
var grid = createTableGrid();
|
1374 |
+
|
1375 |
+
if (grid) {
|
1376 |
+
func(grid);
|
1377 |
+
ed.execCommand('mceRepaint');
|
1378 |
+
cleanup();
|
1379 |
+
}
|
1380 |
+
});
|
1381 |
+
});
|
1382 |
+
|
1383 |
+
// Register dialog commands
|
1384 |
+
each({
|
1385 |
+
mceInsertTable : function(val) {
|
1386 |
+
winMan.open({
|
1387 |
+
url : url + '/table.htm',
|
1388 |
+
width : 400 + parseInt(ed.getLang('table.table_delta_width', 0)),
|
1389 |
+
height : 320 + parseInt(ed.getLang('table.table_delta_height', 0)),
|
1390 |
+
inline : 1
|
1391 |
+
}, {
|
1392 |
+
plugin_url : url,
|
1393 |
+
action : val ? val.action : 0
|
1394 |
+
});
|
1395 |
+
},
|
1396 |
+
|
1397 |
+
mceTableRowProps : function() {
|
1398 |
+
winMan.open({
|
1399 |
+
url : url + '/row.htm',
|
1400 |
+
width : 400 + parseInt(ed.getLang('table.rowprops_delta_width', 0)),
|
1401 |
+
height : 295 + parseInt(ed.getLang('table.rowprops_delta_height', 0)),
|
1402 |
+
inline : 1
|
1403 |
+
}, {
|
1404 |
+
plugin_url : url
|
1405 |
+
});
|
1406 |
+
},
|
1407 |
+
|
1408 |
+
mceTableCellProps : function() {
|
1409 |
+
winMan.open({
|
1410 |
+
url : url + '/cell.htm',
|
1411 |
+
width : 400 + parseInt(ed.getLang('table.cellprops_delta_width', 0)),
|
1412 |
+
height : 295 + parseInt(ed.getLang('table.cellprops_delta_height', 0)),
|
1413 |
+
inline : 1
|
1414 |
+
}, {
|
1415 |
+
plugin_url : url
|
1416 |
+
});
|
1417 |
+
}
|
1418 |
+
}, function(func, name) {
|
1419 |
+
ed.addCommand(name, function(ui, val) {
|
1420 |
+
func(val);
|
1421 |
+
});
|
1422 |
+
});
|
1423 |
+
}
|
1424 |
+
});
|
1425 |
+
|
1426 |
+
// Register plugin
|
1427 |
+
tinymce.PluginManager.add('table', tinymce.plugins.TablePlugin);
|
1428 |
+
})(tinymce);
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/table/js/cell.js
ADDED
@@ -0,0 +1,319 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
if (!AutoValidator.validate(formObj)) {
|
67 |
+
tinyMCEPopup.alert(AutoValidator.getErrorMessages(formObj).join('. ') + '.');
|
68 |
+
return false;
|
69 |
+
}
|
70 |
+
|
71 |
+
tinyMCEPopup.restoreSelection();
|
72 |
+
el = ed.selection.getStart();
|
73 |
+
tdElm = ed.dom.getParent(el, "td,th");
|
74 |
+
trElm = ed.dom.getParent(el, "tr");
|
75 |
+
tableElm = ed.dom.getParent(el, "table");
|
76 |
+
|
77 |
+
// Cell is selected
|
78 |
+
if (ed.dom.hasClass(tdElm, 'mceSelected')) {
|
79 |
+
// Update all selected sells
|
80 |
+
tinymce.each(ed.dom.select('td.mceSelected,th.mceSelected'), function(td) {
|
81 |
+
updateCell(td);
|
82 |
+
});
|
83 |
+
|
84 |
+
ed.addVisual();
|
85 |
+
ed.nodeChanged();
|
86 |
+
inst.execCommand('mceEndUndoLevel');
|
87 |
+
tinyMCEPopup.close();
|
88 |
+
return;
|
89 |
+
}
|
90 |
+
|
91 |
+
switch (getSelectValue(formObj, 'action')) {
|
92 |
+
case "cell":
|
93 |
+
var celltype = getSelectValue(formObj, 'celltype');
|
94 |
+
var scope = getSelectValue(formObj, 'scope');
|
95 |
+
|
96 |
+
function doUpdate(s) {
|
97 |
+
if (s) {
|
98 |
+
updateCell(tdElm);
|
99 |
+
|
100 |
+
ed.addVisual();
|
101 |
+
ed.nodeChanged();
|
102 |
+
inst.execCommand('mceEndUndoLevel');
|
103 |
+
tinyMCEPopup.close();
|
104 |
+
}
|
105 |
+
};
|
106 |
+
|
107 |
+
if (ed.getParam("accessibility_warnings", 1)) {
|
108 |
+
if (celltype == "th" && scope == "")
|
109 |
+
tinyMCEPopup.confirm(ed.getLang('table_dlg.missing_scope', '', true), doUpdate);
|
110 |
+
else
|
111 |
+
doUpdate(1);
|
112 |
+
|
113 |
+
return;
|
114 |
+
}
|
115 |
+
|
116 |
+
updateCell(tdElm);
|
117 |
+
break;
|
118 |
+
|
119 |
+
case "row":
|
120 |
+
var cell = trElm.firstChild;
|
121 |
+
|
122 |
+
if (cell.nodeName != "TD" && cell.nodeName != "TH")
|
123 |
+
cell = nextCell(cell);
|
124 |
+
|
125 |
+
do {
|
126 |
+
cell = updateCell(cell, true);
|
127 |
+
} while ((cell = nextCell(cell)) != null);
|
128 |
+
|
129 |
+
break;
|
130 |
+
|
131 |
+
case "col":
|
132 |
+
var curr, col = 0, cell = trElm.firstChild, rows = tableElm.getElementsByTagName("tr");
|
133 |
+
|
134 |
+
if (cell.nodeName != "TD" && cell.nodeName != "TH")
|
135 |
+
cell = nextCell(cell);
|
136 |
+
|
137 |
+
do {
|
138 |
+
if (cell == tdElm)
|
139 |
+
break;
|
140 |
+
col += cell.getAttribute("colspan")?cell.getAttribute("colspan"):1;
|
141 |
+
} while ((cell = nextCell(cell)) != null);
|
142 |
+
|
143 |
+
for (var i=0; i<rows.length; i++) {
|
144 |
+
cell = rows[i].firstChild;
|
145 |
+
|
146 |
+
if (cell.nodeName != "TD" && cell.nodeName != "TH")
|
147 |
+
cell = nextCell(cell);
|
148 |
+
|
149 |
+
curr = 0;
|
150 |
+
do {
|
151 |
+
if (curr == col) {
|
152 |
+
cell = updateCell(cell, true);
|
153 |
+
break;
|
154 |
+
}
|
155 |
+
curr += cell.getAttribute("colspan")?cell.getAttribute("colspan"):1;
|
156 |
+
} while ((cell = nextCell(cell)) != null);
|
157 |
+
}
|
158 |
+
|
159 |
+
break;
|
160 |
+
|
161 |
+
case "all":
|
162 |
+
var rows = tableElm.getElementsByTagName("tr");
|
163 |
+
|
164 |
+
for (var i=0; i<rows.length; i++) {
|
165 |
+
var cell = rows[i].firstChild;
|
166 |
+
|
167 |
+
if (cell.nodeName != "TD" && cell.nodeName != "TH")
|
168 |
+
cell = nextCell(cell);
|
169 |
+
|
170 |
+
do {
|
171 |
+
cell = updateCell(cell, true);
|
172 |
+
} while ((cell = nextCell(cell)) != null);
|
173 |
+
}
|
174 |
+
|
175 |
+
break;
|
176 |
+
}
|
177 |
+
|
178 |
+
ed.addVisual();
|
179 |
+
ed.nodeChanged();
|
180 |
+
inst.execCommand('mceEndUndoLevel');
|
181 |
+
tinyMCEPopup.close();
|
182 |
+
}
|
183 |
+
|
184 |
+
function nextCell(elm) {
|
185 |
+
while ((elm = elm.nextSibling) != null) {
|
186 |
+
if (elm.nodeName == "TD" || elm.nodeName == "TH")
|
187 |
+
return elm;
|
188 |
+
}
|
189 |
+
|
190 |
+
return null;
|
191 |
+
}
|
192 |
+
|
193 |
+
function updateCell(td, skip_id) {
|
194 |
+
var inst = ed;
|
195 |
+
var formObj = document.forms[0];
|
196 |
+
var curCellType = td.nodeName.toLowerCase();
|
197 |
+
var celltype = getSelectValue(formObj, 'celltype');
|
198 |
+
var doc = inst.getDoc();
|
199 |
+
var dom = ed.dom;
|
200 |
+
|
201 |
+
if (!skip_id)
|
202 |
+
dom.setAttrib(td, 'id', formObj.id.value);
|
203 |
+
|
204 |
+
dom.setAttrib(td, 'align', formObj.align.value);
|
205 |
+
dom.setAttrib(td, 'vAlign', formObj.valign.value);
|
206 |
+
dom.setAttrib(td, 'lang', formObj.lang.value);
|
207 |
+
dom.setAttrib(td, 'dir', getSelectValue(formObj, 'dir'));
|
208 |
+
dom.setAttrib(td, 'style', ed.dom.serializeStyle(ed.dom.parseStyle(formObj.style.value)));
|
209 |
+
dom.setAttrib(td, 'scope', formObj.scope.value);
|
210 |
+
dom.setAttrib(td, 'class', getSelectValue(formObj, 'class'));
|
211 |
+
|
212 |
+
// Clear deprecated attributes
|
213 |
+
ed.dom.setAttrib(td, 'width', '');
|
214 |
+
ed.dom.setAttrib(td, 'height', '');
|
215 |
+
ed.dom.setAttrib(td, 'bgColor', '');
|
216 |
+
ed.dom.setAttrib(td, 'borderColor', '');
|
217 |
+
ed.dom.setAttrib(td, 'background', '');
|
218 |
+
|
219 |
+
// Set styles
|
220 |
+
td.style.width = getCSSSize(formObj.width.value);
|
221 |
+
td.style.height = getCSSSize(formObj.height.value);
|
222 |
+
if (formObj.bordercolor.value != "") {
|
223 |
+
td.style.borderColor = formObj.bordercolor.value;
|
224 |
+
td.style.borderStyle = td.style.borderStyle == "" ? "solid" : td.style.borderStyle;
|
225 |
+
td.style.borderWidth = td.style.borderWidth == "" ? "1px" : td.style.borderWidth;
|
226 |
+
} else
|
227 |
+
td.style.borderColor = '';
|
228 |
+
|
229 |
+
td.style.backgroundColor = formObj.bgcolor.value;
|
230 |
+
|
231 |
+
if (formObj.backgroundimage.value != "")
|
232 |
+
td.style.backgroundImage = "url('" + formObj.backgroundimage.value + "')";
|
233 |
+
else
|
234 |
+
td.style.backgroundImage = '';
|
235 |
+
|
236 |
+
if (curCellType != celltype) {
|
237 |
+
// changing to a different node type
|
238 |
+
var newCell = doc.createElement(celltype);
|
239 |
+
|
240 |
+
for (var c=0; c<td.childNodes.length; c++)
|
241 |
+
newCell.appendChild(td.childNodes[c].cloneNode(1));
|
242 |
+
|
243 |
+
for (var a=0; a<td.attributes.length; a++)
|
244 |
+
ed.dom.setAttrib(newCell, td.attributes[a].name, ed.dom.getAttrib(td, td.attributes[a].name));
|
245 |
+
|
246 |
+
td.parentNode.replaceChild(newCell, td);
|
247 |
+
td = newCell;
|
248 |
+
}
|
249 |
+
|
250 |
+
dom.setAttrib(td, 'style', dom.serializeStyle(dom.parseStyle(td.style.cssText)));
|
251 |
+
|
252 |
+
return td;
|
253 |
+
}
|
254 |
+
|
255 |
+
function changedBackgroundImage() {
|
256 |
+
var formObj = document.forms[0];
|
257 |
+
var st = ed.dom.parseStyle(formObj.style.value);
|
258 |
+
|
259 |
+
st['background-image'] = "url('" + formObj.backgroundimage.value + "')";
|
260 |
+
|
261 |
+
formObj.style.value = ed.dom.serializeStyle(st);
|
262 |
+
}
|
263 |
+
|
264 |
+
function changedSize() {
|
265 |
+
var formObj = document.forms[0];
|
266 |
+
var st = ed.dom.parseStyle(formObj.style.value);
|
267 |
+
|
268 |
+
var width = formObj.width.value;
|
269 |
+
if (width != "")
|
270 |
+
st['width'] = getCSSSize(width);
|
271 |
+
else
|
272 |
+
st['width'] = "";
|
273 |
+
|
274 |
+
var height = formObj.height.value;
|
275 |
+
if (height != "")
|
276 |
+
st['height'] = getCSSSize(height);
|
277 |
+
else
|
278 |
+
st['height'] = "";
|
279 |
+
|
280 |
+
formObj.style.value = ed.dom.serializeStyle(st);
|
281 |
+
}
|
282 |
+
|
283 |
+
function changedColor() {
|
284 |
+
var formObj = document.forms[0];
|
285 |
+
var st = ed.dom.parseStyle(formObj.style.value);
|
286 |
+
|
287 |
+
st['background-color'] = formObj.bgcolor.value;
|
288 |
+
st['border-color'] = formObj.bordercolor.value;
|
289 |
+
|
290 |
+
formObj.style.value = ed.dom.serializeStyle(st);
|
291 |
+
}
|
292 |
+
|
293 |
+
function changedStyle() {
|
294 |
+
var formObj = document.forms[0];
|
295 |
+
var st = ed.dom.parseStyle(formObj.style.value);
|
296 |
+
|
297 |
+
if (st['background-image'])
|
298 |
+
formObj.backgroundimage.value = st['background-image'].replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");
|
299 |
+
else
|
300 |
+
formObj.backgroundimage.value = '';
|
301 |
+
|
302 |
+
if (st['width'])
|
303 |
+
formObj.width.value = trimSize(st['width']);
|
304 |
+
|
305 |
+
if (st['height'])
|
306 |
+
formObj.height.value = trimSize(st['height']);
|
307 |
+
|
308 |
+
if (st['background-color']) {
|
309 |
+
formObj.bgcolor.value = st['background-color'];
|
310 |
+
updateColor('bgcolor_pick','bgcolor');
|
311 |
+
}
|
312 |
+
|
313 |
+
if (st['border-color']) {
|
314 |
+
formObj.bordercolor.value = st['border-color'];
|
315 |
+
updateColor('bordercolor_pick','bordercolor');
|
316 |
+
}
|
317 |
+
}
|
318 |
+
|
319 |
+
tinyMCEPopup.onInit.add(init);
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/table/js/merge_cells.js
ADDED
@@ -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);
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/table/js/row.js
ADDED
@@ -0,0 +1,237 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
if (!AutoValidator.validate(formObj)) {
|
60 |
+
tinyMCEPopup.alert(AutoValidator.getErrorMessages(formObj).join('. ') + '.');
|
61 |
+
return false;
|
62 |
+
}
|
63 |
+
|
64 |
+
tinyMCEPopup.restoreSelection();
|
65 |
+
trElm = dom.getParent(inst.selection.getStart(), "tr");
|
66 |
+
tableElm = dom.getParent(inst.selection.getStart(), "table");
|
67 |
+
|
68 |
+
// Update all selected rows
|
69 |
+
if (dom.select('td.mceSelected,th.mceSelected', trElm).length > 0) {
|
70 |
+
tinymce.each(tableElm.rows, function(tr) {
|
71 |
+
var i;
|
72 |
+
|
73 |
+
for (i = 0; i < tr.cells.length; i++) {
|
74 |
+
if (dom.hasClass(tr.cells[i], 'mceSelected')) {
|
75 |
+
updateRow(tr, true);
|
76 |
+
return;
|
77 |
+
}
|
78 |
+
}
|
79 |
+
});
|
80 |
+
|
81 |
+
inst.addVisual();
|
82 |
+
inst.nodeChanged();
|
83 |
+
inst.execCommand('mceEndUndoLevel');
|
84 |
+
tinyMCEPopup.close();
|
85 |
+
return;
|
86 |
+
}
|
87 |
+
|
88 |
+
switch (action) {
|
89 |
+
case "row":
|
90 |
+
updateRow(trElm);
|
91 |
+
break;
|
92 |
+
|
93 |
+
case "all":
|
94 |
+
var rows = tableElm.getElementsByTagName("tr");
|
95 |
+
|
96 |
+
for (var i=0; i<rows.length; i++)
|
97 |
+
updateRow(rows[i], true);
|
98 |
+
|
99 |
+
break;
|
100 |
+
|
101 |
+
case "odd":
|
102 |
+
case "even":
|
103 |
+
var rows = tableElm.getElementsByTagName("tr");
|
104 |
+
|
105 |
+
for (var i=0; i<rows.length; i++) {
|
106 |
+
if ((i % 2 == 0 && action == "odd") || (i % 2 != 0 && action == "even"))
|
107 |
+
updateRow(rows[i], true, true);
|
108 |
+
}
|
109 |
+
|
110 |
+
break;
|
111 |
+
}
|
112 |
+
|
113 |
+
inst.addVisual();
|
114 |
+
inst.nodeChanged();
|
115 |
+
inst.execCommand('mceEndUndoLevel');
|
116 |
+
tinyMCEPopup.close();
|
117 |
+
}
|
118 |
+
|
119 |
+
function updateRow(tr_elm, skip_id, skip_parent) {
|
120 |
+
var inst = tinyMCEPopup.editor;
|
121 |
+
var formObj = document.forms[0];
|
122 |
+
var dom = inst.dom;
|
123 |
+
var curRowType = tr_elm.parentNode.nodeName.toLowerCase();
|
124 |
+
var rowtype = getSelectValue(formObj, 'rowtype');
|
125 |
+
var doc = inst.getDoc();
|
126 |
+
|
127 |
+
// Update row element
|
128 |
+
if (!skip_id)
|
129 |
+
dom.setAttrib(tr_elm, 'id', formObj.id.value);
|
130 |
+
|
131 |
+
dom.setAttrib(tr_elm, 'align', getSelectValue(formObj, 'align'));
|
132 |
+
dom.setAttrib(tr_elm, 'vAlign', getSelectValue(formObj, 'valign'));
|
133 |
+
dom.setAttrib(tr_elm, 'lang', formObj.lang.value);
|
134 |
+
dom.setAttrib(tr_elm, 'dir', getSelectValue(formObj, 'dir'));
|
135 |
+
dom.setAttrib(tr_elm, 'style', dom.serializeStyle(dom.parseStyle(formObj.style.value)));
|
136 |
+
dom.setAttrib(tr_elm, 'class', getSelectValue(formObj, 'class'));
|
137 |
+
|
138 |
+
// Clear deprecated attributes
|
139 |
+
dom.setAttrib(tr_elm, 'background', '');
|
140 |
+
dom.setAttrib(tr_elm, 'bgColor', '');
|
141 |
+
dom.setAttrib(tr_elm, 'height', '');
|
142 |
+
|
143 |
+
// Set styles
|
144 |
+
tr_elm.style.height = getCSSSize(formObj.height.value);
|
145 |
+
tr_elm.style.backgroundColor = formObj.bgcolor.value;
|
146 |
+
|
147 |
+
if (formObj.backgroundimage.value != "")
|
148 |
+
tr_elm.style.backgroundImage = "url('" + formObj.backgroundimage.value + "')";
|
149 |
+
else
|
150 |
+
tr_elm.style.backgroundImage = '';
|
151 |
+
|
152 |
+
// Setup new rowtype
|
153 |
+
if (curRowType != rowtype && !skip_parent) {
|
154 |
+
// first, clone the node we are working on
|
155 |
+
var newRow = tr_elm.cloneNode(1);
|
156 |
+
|
157 |
+
// next, find the parent of its new destination (creating it if necessary)
|
158 |
+
var theTable = dom.getParent(tr_elm, "table");
|
159 |
+
var dest = rowtype;
|
160 |
+
var newParent = null;
|
161 |
+
for (var i = 0; i < theTable.childNodes.length; i++) {
|
162 |
+
if (theTable.childNodes[i].nodeName.toLowerCase() == dest)
|
163 |
+
newParent = theTable.childNodes[i];
|
164 |
+
}
|
165 |
+
|
166 |
+
if (newParent == null) {
|
167 |
+
newParent = doc.createElement(dest);
|
168 |
+
|
169 |
+
if (theTable.firstChild.nodeName == 'CAPTION')
|
170 |
+
inst.dom.insertAfter(newParent, theTable.firstChild);
|
171 |
+
else
|
172 |
+
theTable.insertBefore(newParent, theTable.firstChild);
|
173 |
+
}
|
174 |
+
|
175 |
+
// append the row to the new parent
|
176 |
+
newParent.appendChild(newRow);
|
177 |
+
|
178 |
+
// remove the original
|
179 |
+
tr_elm.parentNode.removeChild(tr_elm);
|
180 |
+
|
181 |
+
// set tr_elm to the new node
|
182 |
+
tr_elm = newRow;
|
183 |
+
}
|
184 |
+
|
185 |
+
dom.setAttrib(tr_elm, 'style', dom.serializeStyle(dom.parseStyle(tr_elm.style.cssText)));
|
186 |
+
}
|
187 |
+
|
188 |
+
function changedBackgroundImage() {
|
189 |
+
var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
|
190 |
+
var st = dom.parseStyle(formObj.style.value);
|
191 |
+
|
192 |
+
st['background-image'] = "url('" + formObj.backgroundimage.value + "')";
|
193 |
+
|
194 |
+
formObj.style.value = dom.serializeStyle(st);
|
195 |
+
}
|
196 |
+
|
197 |
+
function changedStyle() {
|
198 |
+
var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
|
199 |
+
var st = dom.parseStyle(formObj.style.value);
|
200 |
+
|
201 |
+
if (st['background-image'])
|
202 |
+
formObj.backgroundimage.value = st['background-image'].replace(new RegExp("url\\('?([^']*)'?\\)", 'gi'), "$1");
|
203 |
+
else
|
204 |
+
formObj.backgroundimage.value = '';
|
205 |
+
|
206 |
+
if (st['height'])
|
207 |
+
formObj.height.value = trimSize(st['height']);
|
208 |
+
|
209 |
+
if (st['background-color']) {
|
210 |
+
formObj.bgcolor.value = st['background-color'];
|
211 |
+
updateColor('bgcolor_pick','bgcolor');
|
212 |
+
}
|
213 |
+
}
|
214 |
+
|
215 |
+
function changedSize() {
|
216 |
+
var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
|
217 |
+
var st = dom.parseStyle(formObj.style.value);
|
218 |
+
|
219 |
+
var height = formObj.height.value;
|
220 |
+
if (height != "")
|
221 |
+
st['height'] = getCSSSize(height);
|
222 |
+
else
|
223 |
+
st['height'] = "";
|
224 |
+
|
225 |
+
formObj.style.value = dom.serializeStyle(st);
|
226 |
+
}
|
227 |
+
|
228 |
+
function changedColor() {
|
229 |
+
var formObj = document.forms[0], dom = tinyMCEPopup.editor.dom;
|
230 |
+
var st = dom.parseStyle(formObj.style.value);
|
231 |
+
|
232 |
+
st['background-color'] = formObj.bgcolor.value;
|
233 |
+
|
234 |
+
formObj.style.value = dom.serializeStyle(st);
|
235 |
+
}
|
236 |
+
|
237 |
+
tinyMCEPopup.onInit.add(init);
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/table/js/table.js
ADDED
@@ -0,0 +1,489 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
tinyMCEPopup.requireLangPack();
|
2 |
+
|
3 |
+
var action, orgTableWidth, orgTableHeight, dom = tinyMCEPopup.editor.dom;
|
4 |
+
|
5 |
+
function insertTable() {
|
6 |
+
var formObj = document.forms[0];
|
7 |
+
var inst = tinyMCEPopup.editor, dom = inst.dom;
|
8 |
+
var cols = 2, rows = 2, border = 0, cellpadding = -1, cellspacing = -1, align, width, height, className, caption, frame, rules;
|
9 |
+
var html = '', capEl, elm;
|
10 |
+
var cellLimit, rowLimit, colLimit;
|
11 |
+
|
12 |
+
tinyMCEPopup.restoreSelection();
|
13 |
+
|
14 |
+
if (!AutoValidator.validate(formObj)) {
|
15 |
+
tinyMCEPopup.alert(AutoValidator.getErrorMessages(formObj).join('. ') + '.');
|
16 |
+
return false;
|
17 |
+
}
|
18 |
+
|
19 |
+
elm = dom.getParent(inst.selection.getNode(), 'table');
|
20 |
+
|
21 |
+
// Get form data
|
22 |
+
cols = formObj.elements['cols'].value;
|
23 |
+
rows = formObj.elements['rows'].value;
|
24 |
+
border = formObj.elements['border'].value != "" ? formObj.elements['border'].value : 0;
|
25 |
+
cellpadding = formObj.elements['cellpadding'].value != "" ? formObj.elements['cellpadding'].value : "";
|
26 |
+
cellspacing = formObj.elements['cellspacing'].value != "" ? formObj.elements['cellspacing'].value : "";
|
27 |
+
align = getSelectValue(formObj, "align");
|
28 |
+
frame = getSelectValue(formObj, "tframe");
|
29 |
+
rules = getSelectValue(formObj, "rules");
|
30 |
+
width = formObj.elements['width'].value;
|
31 |
+
height = formObj.elements['height'].value;
|
32 |
+
bordercolor = formObj.elements['bordercolor'].value;
|
33 |
+
bgcolor = formObj.elements['bgcolor'].value;
|
34 |
+
className = getSelectValue(formObj, "class");
|
35 |
+
id = formObj.elements['id'].value;
|
36 |
+
summary = formObj.elements['summary'].value;
|
37 |
+
style = formObj.elements['style'].value;
|
38 |
+
dir = formObj.elements['dir'].value;
|
39 |
+
lang = formObj.elements['lang'].value;
|
40 |
+
background = formObj.elements['backgroundimage'].value;
|
41 |
+
caption = formObj.elements['caption'].checked;
|
42 |
+
|
43 |
+
cellLimit = tinyMCEPopup.getParam('table_cell_limit', false);
|
44 |
+
rowLimit = tinyMCEPopup.getParam('table_row_limit', false);
|
45 |
+
colLimit = tinyMCEPopup.getParam('table_col_limit', false);
|
46 |
+
|
47 |
+
// Validate table size
|
48 |
+
if (colLimit && cols > colLimit) {
|
49 |
+
tinyMCEPopup.alert(inst.getLang('table_dlg.col_limit').replace(/\{\$cols\}/g, colLimit));
|
50 |
+
return false;
|
51 |
+
} else if (rowLimit && rows > rowLimit) {
|
52 |
+
tinyMCEPopup.alert(inst.getLang('table_dlg.row_limit').replace(/\{\$rows\}/g, rowLimit));
|
53 |
+
return false;
|
54 |
+
} else if (cellLimit && cols * rows > cellLimit) {
|
55 |
+
tinyMCEPopup.alert(inst.getLang('table_dlg.cell_limit').replace(/\{\$cells\}/g, cellLimit));
|
56 |
+
return false;
|
57 |
+
}
|
58 |
+
|
59 |
+
// Update table
|
60 |
+
if (action == "update") {
|
61 |
+
dom.setAttrib(elm, 'cellPadding', cellpadding, true);
|
62 |
+
dom.setAttrib(elm, 'cellSpacing', cellspacing, true);
|
63 |
+
|
64 |
+
if (!isCssSize(border)) {
|
65 |
+
dom.setAttrib(elm, 'border', border);
|
66 |
+
} else {
|
67 |
+
dom.setAttrib(elm, 'border', '');
|
68 |
+
}
|
69 |
+
|
70 |
+
if (border == '') {
|
71 |
+
dom.setStyle(elm, 'border-width', '');
|
72 |
+
dom.setStyle(elm, 'border', '');
|
73 |
+
dom.setAttrib(elm, 'border', '');
|
74 |
+
}
|
75 |
+
|
76 |
+
dom.setAttrib(elm, 'align', align);
|
77 |
+
dom.setAttrib(elm, 'frame', frame);
|
78 |
+
dom.setAttrib(elm, 'rules', rules);
|
79 |
+
dom.setAttrib(elm, 'class', className);
|
80 |
+
dom.setAttrib(elm, 'style', style);
|
81 |
+
dom.setAttrib(elm, 'id', id);
|
82 |
+
dom.setAttrib(elm, 'summary', summary);
|
83 |
+
dom.setAttrib(elm, 'dir', dir);
|
84 |
+
dom.setAttrib(elm, 'lang', lang);
|
85 |
+
|
86 |
+
capEl = inst.dom.select('caption', elm)[0];
|
87 |
+
|
88 |
+
if (capEl && !caption)
|
89 |
+
capEl.parentNode.removeChild(capEl);
|
90 |
+
|
91 |
+
if (!capEl && caption) {
|
92 |
+
capEl = elm.ownerDocument.createElement('caption');
|
93 |
+
|
94 |
+
if (!tinymce.isIE)
|
95 |
+
capEl.innerHTML = '<br data-mce-bogus="1"/>';
|
96 |
+
|
97 |
+
elm.insertBefore(capEl, elm.firstChild);
|
98 |
+
}
|
99 |
+
|
100 |
+
if (width && inst.settings.inline_styles) {
|
101 |
+
dom.setStyle(elm, 'width', width);
|
102 |
+
dom.setAttrib(elm, 'width', '');
|
103 |
+
} else {
|
104 |
+
dom.setAttrib(elm, 'width', width, true);
|
105 |
+
dom.setStyle(elm, 'width', '');
|
106 |
+
}
|
107 |
+
|
108 |
+
// Remove these since they are not valid XHTML
|
109 |
+
dom.setAttrib(elm, 'borderColor', '');
|
110 |
+
dom.setAttrib(elm, 'bgColor', '');
|
111 |
+
dom.setAttrib(elm, 'background', '');
|
112 |
+
|
113 |
+
if (height && inst.settings.inline_styles) {
|
114 |
+
dom.setStyle(elm, 'height', height);
|
115 |
+
dom.setAttrib(elm, 'height', '');
|
116 |
+
} else {
|
117 |
+
dom.setAttrib(elm, 'height', height, true);
|
118 |
+
dom.setStyle(elm, 'height', '');
|
119 |
+
}
|
120 |
+
|
121 |
+
if (background != '')
|
122 |
+
elm.style.backgroundImage = "url('" + background + "')";
|
123 |
+
else
|
124 |
+
elm.style.backgroundImage = '';
|
125 |
+
|
126 |
+
/* if (tinyMCEPopup.getParam("inline_styles")) {
|
127 |
+
if (width != '')
|
128 |
+
elm.style.width = getCSSSize(width);
|
129 |
+
}*/
|
130 |
+
|
131 |
+
if (bordercolor != "") {
|
132 |
+
elm.style.borderColor = bordercolor;
|
133 |
+
elm.style.borderStyle = elm.style.borderStyle == "" ? "solid" : elm.style.borderStyle;
|
134 |
+
elm.style.borderWidth = cssSize(border);
|
135 |
+
} else
|
136 |
+
elm.style.borderColor = '';
|
137 |
+
|
138 |
+
elm.style.backgroundColor = bgcolor;
|
139 |
+
elm.style.height = getCSSSize(height);
|
140 |
+
|
141 |
+
inst.addVisual();
|
142 |
+
|
143 |
+
// Fix for stange MSIE align bug
|
144 |
+
//elm.outerHTML = elm.outerHTML;
|
145 |
+
|
146 |
+
inst.nodeChanged();
|
147 |
+
inst.execCommand('mceEndUndoLevel', false, {}, {skip_undo: true});
|
148 |
+
|
149 |
+
// Repaint if dimensions changed
|
150 |
+
if (formObj.width.value != orgTableWidth || formObj.height.value != orgTableHeight)
|
151 |
+
inst.execCommand('mceRepaint');
|
152 |
+
|
153 |
+
tinyMCEPopup.close();
|
154 |
+
return true;
|
155 |
+
}
|
156 |
+
|
157 |
+
// Create new table
|
158 |
+
html += '<table';
|
159 |
+
|
160 |
+
html += makeAttrib('id', id);
|
161 |
+
if (!isCssSize(border)) {
|
162 |
+
html += makeAttrib('border', border);
|
163 |
+
}
|
164 |
+
|
165 |
+
html += makeAttrib('cellpadding', cellpadding);
|
166 |
+
html += makeAttrib('cellspacing', cellspacing);
|
167 |
+
html += makeAttrib('data-mce-new', '1');
|
168 |
+
|
169 |
+
if (width && inst.settings.inline_styles) {
|
170 |
+
if (style)
|
171 |
+
style += '; ';
|
172 |
+
|
173 |
+
// Force px
|
174 |
+
if (/^[0-9\.]+$/.test(width))
|
175 |
+
width += 'px';
|
176 |
+
|
177 |
+
style += 'width: ' + width;
|
178 |
+
} else
|
179 |
+
html += makeAttrib('width', width);
|
180 |
+
|
181 |
+
/* if (height) {
|
182 |
+
if (style)
|
183 |
+
style += '; ';
|
184 |
+
|
185 |
+
style += 'height: ' + height;
|
186 |
+
}*/
|
187 |
+
|
188 |
+
//html += makeAttrib('height', height);
|
189 |
+
//html += makeAttrib('bordercolor', bordercolor);
|
190 |
+
//html += makeAttrib('bgcolor', bgcolor);
|
191 |
+
html += makeAttrib('align', align);
|
192 |
+
html += makeAttrib('frame', frame);
|
193 |
+
html += makeAttrib('rules', rules);
|
194 |
+
html += makeAttrib('class', className);
|
195 |
+
html += makeAttrib('style', style);
|
196 |
+
html += makeAttrib('summary', summary);
|
197 |
+
html += makeAttrib('dir', dir);
|
198 |
+
html += makeAttrib('lang', lang);
|
199 |
+
html += '>';
|
200 |
+
|
201 |
+
if (caption) {
|
202 |
+
if (!tinymce.isIE)
|
203 |
+
html += '<caption><br data-mce-bogus="1"/></caption>';
|
204 |
+
else
|
205 |
+
html += '<caption></caption>';
|
206 |
+
}
|
207 |
+
|
208 |
+
for (var y=0; y<rows; y++) {
|
209 |
+
html += "<tr>";
|
210 |
+
|
211 |
+
for (var x=0; x<cols; x++) {
|
212 |
+
if (!tinymce.isIE)
|
213 |
+
html += '<td><br data-mce-bogus="1"/></td>';
|
214 |
+
else
|
215 |
+
html += '<td></td>';
|
216 |
+
}
|
217 |
+
|
218 |
+
html += "</tr>";
|
219 |
+
}
|
220 |
+
|
221 |
+
html += "</table>";
|
222 |
+
|
223 |
+
// Move table
|
224 |
+
if (inst.settings.fix_table_elements) {
|
225 |
+
var patt = '';
|
226 |
+
|
227 |
+
inst.focus();
|
228 |
+
inst.selection.setContent('<br class="_mce_marker" />');
|
229 |
+
|
230 |
+
tinymce.each('h1,h2,h3,h4,h5,h6,p'.split(','), function(n) {
|
231 |
+
if (patt)
|
232 |
+
patt += ',';
|
233 |
+
|
234 |
+
patt += n + ' ._mce_marker';
|
235 |
+
});
|
236 |
+
|
237 |
+
tinymce.each(inst.dom.select(patt), function(n) {
|
238 |
+
inst.dom.split(inst.dom.getParent(n, 'h1,h2,h3,h4,h5,h6,p'), n);
|
239 |
+
});
|
240 |
+
|
241 |
+
dom.setOuterHTML(dom.select('br._mce_marker')[0], html);
|
242 |
+
} else
|
243 |
+
inst.execCommand('mceInsertContent', false, html);
|
244 |
+
|
245 |
+
tinymce.each(dom.select('table[data-mce-new]'), function(node) {
|
246 |
+
var tdorth = dom.select('td,th', node);
|
247 |
+
|
248 |
+
// Fixes a bug in IE where the caret cannot be placed after the table if the table is at the end of the document
|
249 |
+
if (tinymce.isIE && node.nextSibling == null) {
|
250 |
+
dom.insertAfter(dom.create('p'), node);
|
251 |
+
}
|
252 |
+
|
253 |
+
try {
|
254 |
+
// IE9 might fail to do this selection
|
255 |
+
inst.selection.setCursorLocation(tdorth[0], 0);
|
256 |
+
} catch (ex) {
|
257 |
+
// Ignore
|
258 |
+
}
|
259 |
+
|
260 |
+
dom.setAttrib(node, 'data-mce-new', '');
|
261 |
+
});
|
262 |
+
|
263 |
+
inst.addVisual();
|
264 |
+
inst.execCommand('mceEndUndoLevel', false, {}, {skip_undo: true});
|
265 |
+
|
266 |
+
tinyMCEPopup.close();
|
267 |
+
}
|
268 |
+
|
269 |
+
function makeAttrib(attrib, value) {
|
270 |
+
var formObj = document.forms[0];
|
271 |
+
var valueElm = formObj.elements[attrib];
|
272 |
+
|
273 |
+
if (typeof(value) == "undefined" || value == null) {
|
274 |
+
value = "";
|
275 |
+
|
276 |
+
if (valueElm)
|
277 |
+
value = valueElm.value;
|
278 |
+
}
|
279 |
+
|
280 |
+
if (value == "")
|
281 |
+
return "";
|
282 |
+
|
283 |
+
// XML encode it
|
284 |
+
value = value.replace(/&/g, '&');
|
285 |
+
value = value.replace(/\"/g, '"');
|
286 |
+
value = value.replace(/</g, '<');
|
287 |
+
value = value.replace(/>/g, '>');
|
288 |
+
|
289 |
+
return ' ' + attrib + '="' + value + '"';
|
290 |
+
}
|
291 |
+
|
292 |
+
function init() {
|
293 |
+
tinyMCEPopup.resizeToInnerSize();
|
294 |
+
|
295 |
+
document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table');
|
296 |
+
document.getElementById('backgroundimagebrowsercontainer').innerHTML = getBrowserHTML('backgroundimagebrowser','backgroundimage','image','table');
|
297 |
+
document.getElementById('bordercolor_pickcontainer').innerHTML = getColorPickerHTML('bordercolor_pick','bordercolor');
|
298 |
+
document.getElementById('bgcolor_pickcontainer').innerHTML = getColorPickerHTML('bgcolor_pick','bgcolor');
|
299 |
+
|
300 |
+
var cols = 2, rows = 2, border = tinyMCEPopup.getParam('table_default_border', '0'), cellpadding = tinyMCEPopup.getParam('table_default_cellpadding', ''), cellspacing = tinyMCEPopup.getParam('table_default_cellspacing', '');
|
301 |
+
var align = "", width = "", height = "", bordercolor = "", bgcolor = "", className = "";
|
302 |
+
var id = "", summary = "", style = "", dir = "", lang = "", background = "", bgcolor = "", bordercolor = "", rules = "", frame = "";
|
303 |
+
var inst = tinyMCEPopup.editor, dom = inst.dom;
|
304 |
+
var formObj = document.forms[0];
|
305 |
+
var elm = dom.getParent(inst.selection.getNode(), "table");
|
306 |
+
|
307 |
+
action = tinyMCEPopup.getWindowArg('action');
|
308 |
+
|
309 |
+
if (!action)
|
310 |
+
action = elm ? "update" : "insert";
|
311 |
+
|
312 |
+
if (elm && action != "insert") {
|
313 |
+
var rowsAr = elm.rows;
|
314 |
+
var cols = 0;
|
315 |
+
for (var i=0; i<rowsAr.length; i++)
|
316 |
+
if (rowsAr[i].cells.length > cols)
|
317 |
+
cols = rowsAr[i].cells.length;
|
318 |
+
|
319 |
+
cols = cols;
|
320 |
+
rows = rowsAr.length;
|
321 |
+
|
322 |
+
st = dom.parseStyle(dom.getAttrib(elm, "style"));
|
323 |
+
border = trimSize(getStyle(elm, 'border', 'borderWidth'));
|
324 |
+
cellpadding = dom.getAttrib(elm, 'cellpadding', "");
|
325 |
+
cellspacing = dom.getAttrib(elm, 'cellspacing', "");
|
326 |
+
width = trimSize(getStyle(elm, 'width', 'width'));
|
327 |
+
height = trimSize(getStyle(elm, 'height', 'height'));
|
328 |
+
bordercolor = convertRGBToHex(getStyle(elm, 'bordercolor', 'borderLeftColor'));
|
329 |
+
bgcolor = convertRGBToHex(getStyle(elm, 'bgcolor', 'backgroundColor'));
|
330 |
+
align = dom.getAttrib(elm, 'align', align);
|
331 |
+
frame = dom.getAttrib(elm, 'frame');
|
332 |
+
rules = dom.getAttrib(elm, 'rules');
|
333 |
+
className = tinymce.trim(dom.getAttrib(elm, 'class').replace(/mceItem.+/g, ''));
|
334 |
+
id = dom.getAttrib(elm, 'id');
|
335 |
+
summary = dom.getAttrib(elm, 'summary');
|
336 |
+
style = dom.serializeStyle(st);
|
337 |
+
dir = dom.getAttrib(elm, 'dir');
|
338 |
+
lang = dom.getAttrib(elm, 'lang');
|
339 |
+
background = getStyle(elm, 'background', 'backgroundImage').replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1");
|
340 |
+
formObj.caption.checked = elm.getElementsByTagName('caption').length > 0;
|
341 |
+
|
342 |
+
orgTableWidth = width;
|
343 |
+
orgTableHeight = height;
|
344 |
+
|
345 |
+
action = "update";
|
346 |
+
formObj.insert.value = inst.getLang('update');
|
347 |
+
}
|
348 |
+
|
349 |
+
addClassesToList('class', "table_styles");
|
350 |
+
TinyMCE_EditableSelects.init();
|
351 |
+
|
352 |
+
// Update form
|
353 |
+
selectByValue(formObj, 'align', align);
|
354 |
+
selectByValue(formObj, 'tframe', frame);
|
355 |
+
selectByValue(formObj, 'rules', rules);
|
356 |
+
selectByValue(formObj, 'class', className, true, true);
|
357 |
+
formObj.cols.value = cols;
|
358 |
+
formObj.rows.value = rows;
|
359 |
+
formObj.border.value = border;
|
360 |
+
formObj.cellpadding.value = cellpadding;
|
361 |
+
formObj.cellspacing.value = cellspacing;
|
362 |
+
formObj.width.value = width;
|
363 |
+
formObj.height.value = height;
|
364 |
+
formObj.bordercolor.value = bordercolor;
|
365 |
+
formObj.bgcolor.value = bgcolor;
|
366 |
+
formObj.id.value = id;
|
367 |
+
formObj.summary.value = summary;
|
368 |
+
formObj.style.value = style;
|
369 |
+
formObj.dir.value = dir;
|
370 |
+
formObj.lang.value = lang;
|
371 |
+
formObj.backgroundimage.value = background;
|
372 |
+
|
373 |
+
updateColor('bordercolor_pick', 'bordercolor');
|
374 |
+
updateColor('bgcolor_pick', 'bgcolor');
|
375 |
+
|
376 |
+
// Resize some elements
|
377 |
+
if (isVisible('backgroundimagebrowser'))
|
378 |
+
document.getElementById('backgroundimage').style.width = '180px';
|
379 |
+
|
380 |
+
// Disable some fields in update mode
|
381 |
+
if (action == "update") {
|
382 |
+
formObj.cols.disabled = true;
|
383 |
+
formObj.rows.disabled = true;
|
384 |
+
}
|
385 |
+
}
|
386 |
+
|
387 |
+
function changedSize() {
|
388 |
+
var formObj = document.forms[0];
|
389 |
+
var st = dom.parseStyle(formObj.style.value);
|
390 |
+
|
391 |
+
/* var width = formObj.width.value;
|
392 |
+
if (width != "")
|
393 |
+
st['width'] = tinyMCEPopup.getParam("inline_styles") ? getCSSSize(width) : "";
|
394 |
+
else
|
395 |
+
st['width'] = "";*/
|
396 |
+
|
397 |
+
var height = formObj.height.value;
|
398 |
+
if (height != "")
|
399 |
+
st['height'] = getCSSSize(height);
|
400 |
+
else
|
401 |
+
st['height'] = "";
|
402 |
+
|
403 |
+
formObj.style.value = dom.serializeStyle(st);
|
404 |
+
}
|
405 |
+
|
406 |
+
function isCssSize(value) {
|
407 |
+
return /^[0-9.]+(%|in|cm|mm|em|ex|pt|pc|px)$/.test(value);
|
408 |
+
}
|
409 |
+
|
410 |
+
function cssSize(value, def) {
|
411 |
+
value = tinymce.trim(value || def);
|
412 |
+
|
413 |
+
if (!isCssSize(value)) {
|
414 |
+
return parseInt(value, 10) + 'px';
|
415 |
+
}
|
416 |
+
|
417 |
+
return value;
|
418 |
+
}
|
419 |
+
|
420 |
+
function changedBackgroundImage() {
|
421 |
+
var formObj = document.forms[0];
|
422 |
+
var st = dom.parseStyle(formObj.style.value);
|
423 |
+
|
424 |
+
st['background-image'] = "url('" + formObj.backgroundimage.value + "')";
|
425 |
+
|
426 |
+
formObj.style.value = dom.serializeStyle(st);
|
427 |
+
}
|
428 |
+
|
429 |
+
function changedBorder() {
|
430 |
+
var formObj = document.forms[0];
|
431 |
+
var st = dom.parseStyle(formObj.style.value);
|
432 |
+
|
433 |
+
// Update border width if the element has a color
|
434 |
+
if (formObj.border.value != "" && (isCssSize(formObj.border.value) || formObj.bordercolor.value != ""))
|
435 |
+
st['border-width'] = cssSize(formObj.border.value);
|
436 |
+
else {
|
437 |
+
if (!formObj.border.value) {
|
438 |
+
st['border'] = '';
|
439 |
+
st['border-width'] = '';
|
440 |
+
}
|
441 |
+
}
|
442 |
+
|
443 |
+
formObj.style.value = dom.serializeStyle(st);
|
444 |
+
}
|
445 |
+
|
446 |
+
function changedColor() {
|
447 |
+
var formObj = document.forms[0];
|
448 |
+
var st = dom.parseStyle(formObj.style.value);
|
449 |
+
|
450 |
+
st['background-color'] = formObj.bgcolor.value;
|
451 |
+
|
452 |
+
if (formObj.bordercolor.value != "") {
|
453 |
+
st['border-color'] = formObj.bordercolor.value;
|
454 |
+
|
455 |
+
// Add border-width if it's missing
|
456 |
+
if (!st['border-width'])
|
457 |
+
st['border-width'] = cssSize(formObj.border.value, 1);
|
458 |
+
}
|
459 |
+
|
460 |
+
formObj.style.value = dom.serializeStyle(st);
|
461 |
+
}
|
462 |
+
|
463 |
+
function changedStyle() {
|
464 |
+
var formObj = document.forms[0];
|
465 |
+
var st = dom.parseStyle(formObj.style.value);
|
466 |
+
|
467 |
+
if (st['background-image'])
|
468 |
+
formObj.backgroundimage.value = st['background-image'].replace(new RegExp("url\\(['\"]?([^'\"]*)['\"]?\\)", 'gi'), "$1");
|
469 |
+
else
|
470 |
+
formObj.backgroundimage.value = '';
|
471 |
+
|
472 |
+
if (st['width'])
|
473 |
+
formObj.width.value = trimSize(st['width']);
|
474 |
+
|
475 |
+
if (st['height'])
|
476 |
+
formObj.height.value = trimSize(st['height']);
|
477 |
+
|
478 |
+
if (st['background-color']) {
|
479 |
+
formObj.bgcolor.value = st['background-color'];
|
480 |
+
updateColor('bgcolor_pick','bgcolor');
|
481 |
+
}
|
482 |
+
|
483 |
+
if (st['border-color']) {
|
484 |
+
formObj.bordercolor.value = st['border-color'];
|
485 |
+
updateColor('bordercolor_pick','bordercolor');
|
486 |
+
}
|
487 |
+
}
|
488 |
+
|
489 |
+
tinyMCEPopup.onInit.add(init);
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/table/langs/en_dlg.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
tinyMCE.addI18n('en.table_dlg',{"rules_border":"border","rules_box":"box","rules_vsides":"vsides","rules_rhs":"rhs","rules_lhs":"lhs","rules_hsides":"hsides","rules_below":"below","rules_above":"above","rules_void":"void",rules:"Rules","frame_all":"all","frame_cols":"cols","frame_rows":"rows","frame_groups":"groups","frame_none":"none",frame:"Frame",caption:"Table Caption","missing_scope":"Are you sure you want to continue without specifying a scope for this table header cell. Without it, it may be difficult for some users with disabilities to understand the content or data displayed of the table.","cell_limit":"You\'ve exceeded the maximum number of cells of {$cells}.","row_limit":"You\'ve exceeded the maximum number of rows of {$rows}.","col_limit":"You\'ve exceeded the maximum number of columns of {$cols}.",colgroup:"Col Group",rowgroup:"Row Group",scope:"Scope",tfoot:"Footer",tbody:"Body",thead:"Header","row_all":"Update All Rows in Table","row_even":"Update Even Rows in Table","row_odd":"Update Odd Rows in Table","row_row":"Update Current Row","cell_all":"Update All Cells in Table","cell_row":"Update All Cells in Row","cell_cell":"Update Current Cell",th:"Header",td:"Data",summary:"Summary",bgimage:"Background Image",rtl:"Right to Left",ltr:"Left to Right",mime:"Target MIME Type",langcode:"Language Code",langdir:"Language Direction",style:"Style",id:"ID","merge_cells_title":"Merge Table Cells",bgcolor:"Background Color",bordercolor:"Border Color","align_bottom":"Bottom","align_top":"Top",valign:"Vertical Alignment","cell_type":"Cell Type","cell_title":"Table Cell Properties","row_title":"Table Row Properties","align_middle":"Center","align_right":"Right","align_left":"Left","align_default":"Default",align:"Alignment",border:"Border",cellpadding:"Cell Padding",cellspacing:"Cell Spacing",rows:"Rows",cols:"Columns",height:"Height",width:"Width",title:"Insert/Edit Table",rowtype:"Row Type","advanced_props":"Advanced Properties","general_props":"General Properties","advanced_tab":"Advanced","general_tab":"General","cell_col":"Update all cells in column"});
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/table/merge_cells.htm
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2 |
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
+
<head>
|
4 |
+
<title>{#table_dlg.merge_cells_title}</title>
|
5 |
+
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
6 |
+
<script type="text/javascript" src="../../utils/mctabs.js"></script>
|
7 |
+
<script type="text/javascript" src="../../utils/validate.js"></script>
|
8 |
+
<script type="text/javascript" src="js/merge_cells.js"></script>
|
9 |
+
</head>
|
10 |
+
<body style="margin: 8px" role="application">
|
11 |
+
<form onsubmit="MergeCellsDialog.merge();return false;" action="#">
|
12 |
+
<fieldset>
|
13 |
+
<legend>{#table_dlg.merge_cells_title}</legend>
|
14 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="3" width="100%">
|
15 |
+
<tr>
|
16 |
+
<td><label for="numcols">{#table_dlg.cols}</label>:</td>
|
17 |
+
<td align="right"><input type="text" id="numcols" name="numcols" value="" class="number min1 mceFocus" style="width: 30px" aria-required="true" /></td>
|
18 |
+
</tr>
|
19 |
+
<tr>
|
20 |
+
<td><label for="numrows">{#table_dlg.rows}</label>:</td>
|
21 |
+
<td align="right"><input type="text" id="numrows" name="numrows" value="" class="number min1" style="width: 30px" aria-required="true" /></td>
|
22 |
+
</tr>
|
23 |
+
</table>
|
24 |
+
</fieldset>
|
25 |
+
|
26 |
+
<div class="mceActionPanel">
|
27 |
+
<input type="submit" id="insert" name="insert" value="{#update}" />
|
28 |
+
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
29 |
+
</div>
|
30 |
+
</form>
|
31 |
+
</body>
|
32 |
+
</html>
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/table/row.htm
ADDED
@@ -0,0 +1,158 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2 |
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
+
<head>
|
4 |
+
<title>{#table_dlg.row_title}</title>
|
5 |
+
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
6 |
+
<script type="text/javascript" src="../../utils/mctabs.js"></script>
|
7 |
+
<script type="text/javascript" src="../../utils/form_utils.js"></script>
|
8 |
+
<script type="text/javascript" src="../../utils/validate.js"></script>
|
9 |
+
<script type="text/javascript" src="../../utils/editable_selects.js"></script>
|
10 |
+
<script type="text/javascript" src="js/row.js"></script>
|
11 |
+
<link href="css/row.css" rel="stylesheet" type="text/css" />
|
12 |
+
</head>
|
13 |
+
<body id="tablerow" style="display: none" role="application">
|
14 |
+
<form onsubmit="updateAction();return false;" action="#">
|
15 |
+
<div class="tabs">
|
16 |
+
<ul>
|
17 |
+
<li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#table_dlg.general_tab}</a></span></li>
|
18 |
+
<li id="advanced_tab" aria-controls="advanced_panel"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#table_dlg.advanced_tab}</a></span></li>
|
19 |
+
</ul>
|
20 |
+
</div>
|
21 |
+
|
22 |
+
<div class="panel_wrapper">
|
23 |
+
<div id="general_panel" class="panel current">
|
24 |
+
<fieldset>
|
25 |
+
<legend>{#table_dlg.general_props}</legend>
|
26 |
+
|
27 |
+
<table role="presentation" border="0" cellpadding="4" cellspacing="0">
|
28 |
+
<tr>
|
29 |
+
<td><label for="rowtype">{#table_dlg.rowtype}</label></td>
|
30 |
+
<td class="col2">
|
31 |
+
<select id="rowtype" name="rowtype" class="mceFocus">
|
32 |
+
<option value="thead">{#table_dlg.thead}</option>
|
33 |
+
<option value="tbody">{#table_dlg.tbody}</option>
|
34 |
+
<option value="tfoot">{#table_dlg.tfoot}</option>
|
35 |
+
</select>
|
36 |
+
</td>
|
37 |
+
</tr>
|
38 |
+
|
39 |
+
<tr>
|
40 |
+
<td><label for="align">{#table_dlg.align}</label></td>
|
41 |
+
<td class="col2">
|
42 |
+
<select id="align" name="align">
|
43 |
+
<option value="">{#not_set}</option>
|
44 |
+
<option value="center">{#table_dlg.align_middle}</option>
|
45 |
+
<option value="left">{#table_dlg.align_left}</option>
|
46 |
+
<option value="right">{#table_dlg.align_right}</option>
|
47 |
+
</select>
|
48 |
+
</td>
|
49 |
+
</tr>
|
50 |
+
|
51 |
+
<tr>
|
52 |
+
<td><label for="valign">{#table_dlg.valign}</label></td>
|
53 |
+
<td class="col2">
|
54 |
+
<select id="valign" name="valign">
|
55 |
+
<option value="">{#not_set}</option>
|
56 |
+
<option value="top">{#table_dlg.align_top}</option>
|
57 |
+
<option value="middle">{#table_dlg.align_middle}</option>
|
58 |
+
<option value="bottom">{#table_dlg.align_bottom}</option>
|
59 |
+
</select>
|
60 |
+
</td>
|
61 |
+
</tr>
|
62 |
+
|
63 |
+
<tr id="styleSelectRow">
|
64 |
+
<td><label for="class">{#class_name}</label></td>
|
65 |
+
<td class="col2">
|
66 |
+
<select id="class" name="class" class="mceEditableSelect">
|
67 |
+
<option value="" selected="selected">{#not_set}</option>
|
68 |
+
</select>
|
69 |
+
</td>
|
70 |
+
</tr>
|
71 |
+
|
72 |
+
<tr>
|
73 |
+
<td><label for="height">{#table_dlg.height}</label></td>
|
74 |
+
<td class="col2"><input name="height" type="text" id="height" value="" size="7" maxlength="7" onchange="changedSize();" class="size" /></td>
|
75 |
+
</tr>
|
76 |
+
</table>
|
77 |
+
</fieldset>
|
78 |
+
</div>
|
79 |
+
|
80 |
+
<div id="advanced_panel" class="panel">
|
81 |
+
<fieldset>
|
82 |
+
<legend>{#table_dlg.advanced_props}</legend>
|
83 |
+
|
84 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="4">
|
85 |
+
<tr>
|
86 |
+
<td class="column1"><label for="id">{#table_dlg.id}</label></td>
|
87 |
+
<td><input id="id" name="id" type="text" value="" style="width: 200px" /></td>
|
88 |
+
</tr>
|
89 |
+
|
90 |
+
<tr>
|
91 |
+
<td><label for="style">{#table_dlg.style}</label></td>
|
92 |
+
<td><input type="text" id="style" name="style" value="" style="width: 200px;" onchange="changedStyle();" /></td>
|
93 |
+
</tr>
|
94 |
+
|
95 |
+
<tr>
|
96 |
+
<td class="column1"><label for="dir">{#table_dlg.langdir}</label></td>
|
97 |
+
<td>
|
98 |
+
<select id="dir" name="dir" style="width: 200px">
|
99 |
+
<option value="">{#not_set}</option>
|
100 |
+
<option value="ltr">{#table_dlg.ltr}</option>
|
101 |
+
<option value="rtl">{#table_dlg.rtl}</option>
|
102 |
+
</select>
|
103 |
+
</td>
|
104 |
+
</tr>
|
105 |
+
|
106 |
+
<tr>
|
107 |
+
<td class="column1"><label for="lang">{#table_dlg.langcode}</label></td>
|
108 |
+
<td>
|
109 |
+
<input id="lang" name="lang" type="text" value="" style="width: 200px" />
|
110 |
+
</td>
|
111 |
+
</tr>
|
112 |
+
|
113 |
+
<tr>
|
114 |
+
<td class="column1"><label for="backgroundimage">{#table_dlg.bgimage}</label></td>
|
115 |
+
<td>
|
116 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
117 |
+
<tr>
|
118 |
+
<td><input id="backgroundimage" name="backgroundimage" type="text" value="" style="width: 200px" onchange="changedBackgroundImage();" /></td>
|
119 |
+
<td id="backgroundimagebrowsercontainer"> </td>
|
120 |
+
</tr>
|
121 |
+
</table>
|
122 |
+
</td>
|
123 |
+
</tr>
|
124 |
+
|
125 |
+
<tr>
|
126 |
+
<td class="column1"><label for="bgcolor" id="bgcolor_label">{#table_dlg.bgcolor}</label></td>
|
127 |
+
<td>
|
128 |
+
<span role="group" aria-labelledby="bgcolor_label">
|
129 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
130 |
+
<tr>
|
131 |
+
<td><input id="bgcolor" name="bgcolor" type="text" value="" size="9" onchange="updateColor('bgcolor_pick','bgcolor');changedColor();" /></td>
|
132 |
+
<td id="bgcolor_pickcontainer"> </td>
|
133 |
+
</tr>
|
134 |
+
</table>
|
135 |
+
</span>
|
136 |
+
</td>
|
137 |
+
</tr>
|
138 |
+
</table>
|
139 |
+
</fieldset>
|
140 |
+
</div>
|
141 |
+
</div>
|
142 |
+
|
143 |
+
<div class="mceActionPanel">
|
144 |
+
<div>
|
145 |
+
<select id="action" name="action">
|
146 |
+
<option value="row">{#table_dlg.row_row}</option>
|
147 |
+
<option value="odd">{#table_dlg.row_odd}</option>
|
148 |
+
<option value="even">{#table_dlg.row_even}</option>
|
149 |
+
<option value="all">{#table_dlg.row_all}</option>
|
150 |
+
</select>
|
151 |
+
</div>
|
152 |
+
|
153 |
+
<input type="submit" id="insert" name="insert" value="{#update}" />
|
154 |
+
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
155 |
+
</div>
|
156 |
+
</form>
|
157 |
+
</body>
|
158 |
+
</html>
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/table/table.htm
ADDED
@@ -0,0 +1,188 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2 |
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
3 |
+
<head>
|
4 |
+
<title>{#table_dlg.title}</title>
|
5 |
+
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
6 |
+
<script type="text/javascript" src="../../utils/mctabs.js"></script>
|
7 |
+
<script type="text/javascript" src="../../utils/form_utils.js"></script>
|
8 |
+
<script type="text/javascript" src="../../utils/validate.js"></script>
|
9 |
+
<script type="text/javascript" src="../../utils/editable_selects.js"></script>
|
10 |
+
<script type="text/javascript" src="js/table.js"></script>
|
11 |
+
<link href="css/table.css" rel="stylesheet" type="text/css" />
|
12 |
+
</head>
|
13 |
+
<body id="table" style="display: none" role="application" aria-labelledby="app_title">
|
14 |
+
<span style="display:none;" id="app_title">{#table_dlg.title}</span>
|
15 |
+
<form onsubmit="insertTable();return false;" action="#">
|
16 |
+
<div class="tabs">
|
17 |
+
<ul>
|
18 |
+
<li id="general_tab" aria-controls="general_panel" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#table_dlg.general_tab}</a></span></li>
|
19 |
+
<li id="advanced_tab" aria-controls="advanced_panel"><span><a href="javascript:mcTabs.displayTab('advanced_tab','advanced_panel');" onmousedown="return false;">{#table_dlg.advanced_tab}</a></span></li>
|
20 |
+
</ul>
|
21 |
+
</div>
|
22 |
+
|
23 |
+
<div class="panel_wrapper">
|
24 |
+
<div id="general_panel" class="panel current">
|
25 |
+
<fieldset>
|
26 |
+
<legend>{#table_dlg.general_props}</legend>
|
27 |
+
<table role="presentation" border="0" cellpadding="4" cellspacing="0" width="100%">
|
28 |
+
<tr>
|
29 |
+
<td><label id="colslabel" for="cols">{#table_dlg.cols}</label></td>
|
30 |
+
<td><input id="cols" name="cols" type="text" value="" size="3" maxlength="3" class="required number min1 mceFocus" aria-required="true" /></td>
|
31 |
+
<td><label id="rowslabel" for="rows">{#table_dlg.rows}</label></td>
|
32 |
+
<td><input id="rows" name="rows" type="text" value="" size="3" maxlength="3" class="required number min1" aria-required="true" /></td>
|
33 |
+
</tr>
|
34 |
+
<tr>
|
35 |
+
<td><label id="cellpaddinglabel" for="cellpadding">{#table_dlg.cellpadding}</label></td>
|
36 |
+
<td><input id="cellpadding" name="cellpadding" type="text" value="" size="3" maxlength="3" class="number" /></td>
|
37 |
+
<td><label id="cellspacinglabel" for="cellspacing">{#table_dlg.cellspacing}</label></td>
|
38 |
+
<td><input id="cellspacing" name="cellspacing" type="text" value="" size="3" maxlength="3" class="number" /></td>
|
39 |
+
</tr>
|
40 |
+
<tr>
|
41 |
+
<td><label id="alignlabel" for="align">{#table_dlg.align}</label></td>
|
42 |
+
<td><select id="align" name="align">
|
43 |
+
<option value="">{#not_set}</option>
|
44 |
+
<option value="center">{#table_dlg.align_middle}</option>
|
45 |
+
<option value="left">{#table_dlg.align_left}</option>
|
46 |
+
<option value="right">{#table_dlg.align_right}</option>
|
47 |
+
</select></td>
|
48 |
+
<td><label id="borderlabel" for="border">{#table_dlg.border}</label></td>
|
49 |
+
<td><input id="border" name="border" type="text" value="" size="3" maxlength="5" onchange="changedBorder();" class="size" /></td>
|
50 |
+
</tr>
|
51 |
+
<tr id="width_row">
|
52 |
+
<td><label id="widthlabel" for="width">{#table_dlg.width}</label></td>
|
53 |
+
<td><input name="width" type="text" id="width" value="" size="7" maxlength="7" onchange="changedSize();" class="size" /></td>
|
54 |
+
<td><label id="heightlabel" for="height">{#table_dlg.height}</label></td>
|
55 |
+
<td><input name="height" type="text" id="height" value="" size="7" maxlength="7" onchange="changedSize();" class="size" /></td>
|
56 |
+
</tr>
|
57 |
+
<tr id="styleSelectRow" >
|
58 |
+
<td><label id="classlabel" for="class">{#class_name}</label></td>
|
59 |
+
<td colspan="3" >
|
60 |
+
<select id="class" name="class" class="mceEditableSelect">
|
61 |
+
<option value="" selected="selected">{#not_set}</option>
|
62 |
+
</select></td>
|
63 |
+
</tr>
|
64 |
+
<tr>
|
65 |
+
<td class="column1" ><label for="caption">{#table_dlg.caption}</label></td>
|
66 |
+
<td><input id="caption" name="caption" type="checkbox" class="checkbox" value="true" /></td>
|
67 |
+
</tr>
|
68 |
+
</table>
|
69 |
+
</fieldset>
|
70 |
+
</div>
|
71 |
+
|
72 |
+
<div id="advanced_panel" class="panel">
|
73 |
+
<fieldset>
|
74 |
+
<legend>{#table_dlg.advanced_props}</legend>
|
75 |
+
|
76 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="4">
|
77 |
+
<tr>
|
78 |
+
<td class="column1"><label for="id">{#table_dlg.id}</label></td>
|
79 |
+
<td><input id="id" name="id" type="text" value="" class="advfield" /></td>
|
80 |
+
</tr>
|
81 |
+
|
82 |
+
<tr>
|
83 |
+
<td class="column1"><label for="summary">{#table_dlg.summary}</label></td>
|
84 |
+
<td><input id="summary" name="summary" type="text" value="" class="advfield" /></td>
|
85 |
+
</tr>
|
86 |
+
|
87 |
+
<tr>
|
88 |
+
<td><label for="style">{#table_dlg.style}</label></td>
|
89 |
+
<td><input type="text" id="style" name="style" value="" class="advfield" onchange="changedStyle();" /></td>
|
90 |
+
</tr>
|
91 |
+
|
92 |
+
<tr>
|
93 |
+
<td class="column1"><label id="langlabel" for="lang">{#table_dlg.langcode}</label></td>
|
94 |
+
<td>
|
95 |
+
<input id="lang" name="lang" type="text" value="" class="advfield" />
|
96 |
+
</td>
|
97 |
+
</tr>
|
98 |
+
|
99 |
+
<tr>
|
100 |
+
<td class="column1"><label for="backgroundimage">{#table_dlg.bgimage}</label></td>
|
101 |
+
<td>
|
102 |
+
<table role="presentation" aria-labelledby="backgroundimage_label" border="0" cellpadding="0" cellspacing="0">
|
103 |
+
<tr>
|
104 |
+
<td><input id="backgroundimage" name="backgroundimage" type="text" value="" class="advfield" onchange="changedBackgroundImage();" /></td>
|
105 |
+
<td id="backgroundimagebrowsercontainer"> </td>
|
106 |
+
</tr>
|
107 |
+
</table>
|
108 |
+
</td>
|
109 |
+
</tr>
|
110 |
+
|
111 |
+
<tr>
|
112 |
+
<td class="column1"><label for="tframe">{#table_dlg.frame}</label></td>
|
113 |
+
<td>
|
114 |
+
<select id="tframe" name="tframe" class="advfield">
|
115 |
+
<option value="">{#not_set}</option>
|
116 |
+
<option value="void">{#table_dlg.rules_void}</option>
|
117 |
+
<option value="above">{#table_dlg.rules_above}</option>
|
118 |
+
<option value="below">{#table_dlg.rules_below}</option>
|
119 |
+
<option value="hsides">{#table_dlg.rules_hsides}</option>
|
120 |
+
<option value="lhs">{#table_dlg.rules_lhs}</option>
|
121 |
+
<option value="rhs">{#table_dlg.rules_rhs}</option>
|
122 |
+
<option value="vsides">{#table_dlg.rules_vsides}</option>
|
123 |
+
<option value="box">{#table_dlg.rules_box}</option>
|
124 |
+
<option value="border">{#table_dlg.rules_border}</option>
|
125 |
+
</select>
|
126 |
+
</td>
|
127 |
+
</tr>
|
128 |
+
|
129 |
+
<tr>
|
130 |
+
<td class="column1"><label for="rules">{#table_dlg.rules}</label></td>
|
131 |
+
<td>
|
132 |
+
<select id="rules" name="rules" class="advfield">
|
133 |
+
<option value="">{#not_set}</option>
|
134 |
+
<option value="none">{#table_dlg.frame_none}</option>
|
135 |
+
<option value="groups">{#table_dlg.frame_groups}</option>
|
136 |
+
<option value="rows">{#table_dlg.frame_rows}</option>
|
137 |
+
<option value="cols">{#table_dlg.frame_cols}</option>
|
138 |
+
<option value="all">{#table_dlg.frame_all}</option>
|
139 |
+
</select>
|
140 |
+
</td>
|
141 |
+
</tr>
|
142 |
+
|
143 |
+
<tr>
|
144 |
+
<td class="column1"><label for="dir">{#table_dlg.langdir}</label></td>
|
145 |
+
<td>
|
146 |
+
<select id="dir" name="dir" class="advfield">
|
147 |
+
<option value="">{#not_set}</option>
|
148 |
+
<option value="ltr">{#table_dlg.ltr}</option>
|
149 |
+
<option value="rtl">{#table_dlg.rtl}</option>
|
150 |
+
</select>
|
151 |
+
</td>
|
152 |
+
</tr>
|
153 |
+
|
154 |
+
<tr role="group" aria-labelledby="bordercolor_label">
|
155 |
+
<td class="column1"><label id="bordercolor_label" for="bordercolor">{#table_dlg.bordercolor}</label></td>
|
156 |
+
<td>
|
157 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
158 |
+
<tr>
|
159 |
+
<td><input id="bordercolor" name="bordercolor" type="text" value="" size="9" onchange="updateColor('bordercolor_pick','bordercolor');changedColor();" /></td>
|
160 |
+
<td id="bordercolor_pickcontainer"> </td>
|
161 |
+
</tr>
|
162 |
+
</table>
|
163 |
+
</td>
|
164 |
+
</tr>
|
165 |
+
|
166 |
+
<tr role="group" aria-labelledby="bgcolor_label">
|
167 |
+
<td class="column1"><label id="bgcolor_label" for="bgcolor">{#table_dlg.bgcolor}</label></td>
|
168 |
+
<td>
|
169 |
+
<table role="presentation" border="0" cellpadding="0" cellspacing="0">
|
170 |
+
<tr>
|
171 |
+
<td><input id="bgcolor" name="bgcolor" type="text" value="" size="9" onchange="updateColor('bgcolor_pick','bgcolor');changedColor();" /></td>
|
172 |
+
<td id="bgcolor_pickcontainer"> </td>
|
173 |
+
</tr>
|
174 |
+
</table>
|
175 |
+
</td>
|
176 |
+
</tr>
|
177 |
+
</table>
|
178 |
+
</fieldset>
|
179 |
+
</div>
|
180 |
+
</div>
|
181 |
+
|
182 |
+
<div class="mceActionPanel">
|
183 |
+
<input type="submit" id="insert" name="insert" value="{#insert}" />
|
184 |
+
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
185 |
+
</div>
|
186 |
+
</form>
|
187 |
+
</body>
|
188 |
+
</html>
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/template/blank.htm
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
2 |
+
<head>
|
3 |
+
<title>blank_page</title>
|
4 |
+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
5 |
+
<script type="text/javascript">
|
6 |
+
parent.TemplateDialog.loadCSSFiles(document);
|
7 |
+
</script>
|
8 |
+
</head>
|
9 |
+
<body id="mceTemplatePreview" class="mceContentBody">
|
10 |
+
|
11 |
+
</body>
|
12 |
+
</html>
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/template/css/template.css
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#frmbody {
|
2 |
+
padding: 10px;
|
3 |
+
background-color: #FFF;
|
4 |
+
border: 1px solid #CCC;
|
5 |
+
}
|
6 |
+
|
7 |
+
.frmRow {
|
8 |
+
margin-bottom: 10px;
|
9 |
+
}
|
10 |
+
|
11 |
+
#templatesrc {
|
12 |
+
border: none;
|
13 |
+
width: 320px;
|
14 |
+
height: 240px;
|
15 |
+
}
|
16 |
+
|
17 |
+
.title {
|
18 |
+
padding-bottom: 5px;
|
19 |
+
}
|
20 |
+
|
21 |
+
.mceActionPanel {
|
22 |
+
padding-top: 5px;
|
23 |
+
}
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/template/editor_plugin.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(function(){var a=tinymce.each;tinymce.create("tinymce.plugins.TemplatePlugin",{init:function(b,c){var d=this;d.editor=b;b.addCommand("mceTemplate",function(e){b.windowManager.open({file:c+"/template.htm",width:b.getParam("template_popup_width",750),height:b.getParam("template_popup_height",600),inline:1},{plugin_url:c})});b.addCommand("mceInsertTemplate",d._insertTemplate,d);b.addButton("template",{title:"template.desc",cmd:"mceTemplate"});b.onPreProcess.add(function(e,g){var f=e.dom;a(f.select("div",g.node),function(h){if(f.hasClass(h,"mceTmpl")){a(f.select("*",h),function(i){if(f.hasClass(i,e.getParam("template_mdate_classes","mdate").replace(/\s+/g,"|"))){i.innerHTML=d._getDateTime(new Date(),e.getParam("template_mdate_format",e.getLang("template.mdate_format")))}});d._replaceVals(h)}})})},getInfo:function(){return{longname:"Template plugin",author:"Moxiecode Systems AB",authorurl:"http://www.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/template",version:tinymce.majorVersion+"."+tinymce.minorVersion}},_insertTemplate:function(i,j){var k=this,g=k.editor,f,c,d=g.dom,b=g.selection.getContent();f=j.content;a(k.editor.getParam("template_replace_values"),function(l,h){if(typeof(l)!="function"){f=f.replace(new RegExp("\\{\\$"+h+"\\}","g"),l)}});c=d.create("div",null,f);n=d.select(".mceTmpl",c);if(n&&n.length>0){c=d.create("div",null);c.appendChild(n[0].cloneNode(true))}function e(l,h){return new RegExp("\\b"+h+"\\b","g").test(l.className)}a(d.select("*",c),function(h){if(e(h,g.getParam("template_cdate_classes","cdate").replace(/\s+/g,"|"))){h.innerHTML=k._getDateTime(new Date(),g.getParam("template_cdate_format",g.getLang("template.cdate_format")))}if(e(h,g.getParam("template_mdate_classes","mdate").replace(/\s+/g,"|"))){h.innerHTML=k._getDateTime(new Date(),g.getParam("template_mdate_format",g.getLang("template.mdate_format")))}if(e(h,g.getParam("template_selected_content_classes","selcontent").replace(/\s+/g,"|"))){h.innerHTML=b}});k._replaceVals(c);g.execCommand("mceInsertContent",false,c.innerHTML);g.addVisual()},_replaceVals:function(c){var d=this.editor.dom,b=this.editor.getParam("template_replace_values");a(d.select("*",c),function(f){a(b,function(g,e){if(d.hasClass(f,e)){if(typeof(b[e])=="function"){b[e](f)}}})})},_getDateTime:function(e,b){if(!b){return""}function c(g,d){var f;g=""+g;if(g.length<d){for(f=0;f<(d-g.length);f++){g="0"+g}}return g}b=b.replace("%D","%m/%d/%y");b=b.replace("%r","%I:%M:%S %p");b=b.replace("%Y",""+e.getFullYear());b=b.replace("%y",""+e.getYear());b=b.replace("%m",c(e.getMonth()+1,2));b=b.replace("%d",c(e.getDate(),2));b=b.replace("%H",""+c(e.getHours(),2));b=b.replace("%M",""+c(e.getMinutes(),2));b=b.replace("%S",""+c(e.getSeconds(),2));b=b.replace("%I",""+((e.getHours()+11)%12+1));b=b.replace("%p",""+(e.getHours()<12?"AM":"PM"));b=b.replace("%B",""+this.editor.getLang("template_months_long").split(",")[e.getMonth()]);b=b.replace("%b",""+this.editor.getLang("template_months_short").split(",")[e.getMonth()]);b=b.replace("%A",""+this.editor.getLang("template_day_long").split(",")[e.getDay()]);b=b.replace("%a",""+this.editor.getLang("template_day_short").split(",")[e.getDay()]);b=b.replace("%%","%");return b}});tinymce.PluginManager.add("template",tinymce.plugins.TemplatePlugin)})();
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/template/editor_plugin_src.js
ADDED
@@ -0,0 +1,159 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 each = tinymce.each;
|
13 |
+
|
14 |
+
tinymce.create('tinymce.plugins.TemplatePlugin', {
|
15 |
+
init : function(ed, url) {
|
16 |
+
var t = this;
|
17 |
+
|
18 |
+
t.editor = ed;
|
19 |
+
|
20 |
+
// Register commands
|
21 |
+
ed.addCommand('mceTemplate', function(ui) {
|
22 |
+
ed.windowManager.open({
|
23 |
+
file : url + '/template.htm',
|
24 |
+
width : ed.getParam('template_popup_width', 750),
|
25 |
+
height : ed.getParam('template_popup_height', 600),
|
26 |
+
inline : 1
|
27 |
+
}, {
|
28 |
+
plugin_url : url
|
29 |
+
});
|
30 |
+
});
|
31 |
+
|
32 |
+
ed.addCommand('mceInsertTemplate', t._insertTemplate, t);
|
33 |
+
|
34 |
+
// Register buttons
|
35 |
+
ed.addButton('template', {title : 'template.desc', cmd : 'mceTemplate'});
|
36 |
+
|
37 |
+
ed.onPreProcess.add(function(ed, o) {
|
38 |
+
var dom = ed.dom;
|
39 |
+
|
40 |
+
each(dom.select('div', o.node), function(e) {
|
41 |
+
if (dom.hasClass(e, 'mceTmpl')) {
|
42 |
+
each(dom.select('*', e), function(e) {
|
43 |
+
if (dom.hasClass(e, ed.getParam('template_mdate_classes', 'mdate').replace(/\s+/g, '|')))
|
44 |
+
e.innerHTML = t._getDateTime(new Date(), ed.getParam("template_mdate_format", ed.getLang("template.mdate_format")));
|
45 |
+
});
|
46 |
+
|
47 |
+
t._replaceVals(e);
|
48 |
+
}
|
49 |
+
});
|
50 |
+
});
|
51 |
+
},
|
52 |
+
|
53 |
+
getInfo : function() {
|
54 |
+
return {
|
55 |
+
longname : 'Template plugin',
|
56 |
+
author : 'Moxiecode Systems AB',
|
57 |
+
authorurl : 'http://www.moxiecode.com',
|
58 |
+
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/template',
|
59 |
+
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
60 |
+
};
|
61 |
+
},
|
62 |
+
|
63 |
+
_insertTemplate : function(ui, v) {
|
64 |
+
var t = this, ed = t.editor, h, el, dom = ed.dom, sel = ed.selection.getContent();
|
65 |
+
|
66 |
+
h = v.content;
|
67 |
+
|
68 |
+
each(t.editor.getParam('template_replace_values'), function(v, k) {
|
69 |
+
if (typeof(v) != 'function')
|
70 |
+
h = h.replace(new RegExp('\\{\\$' + k + '\\}', 'g'), v);
|
71 |
+
});
|
72 |
+
|
73 |
+
el = dom.create('div', null, h);
|
74 |
+
|
75 |
+
// Find template element within div
|
76 |
+
n = dom.select('.mceTmpl', el);
|
77 |
+
if (n && n.length > 0) {
|
78 |
+
el = dom.create('div', null);
|
79 |
+
el.appendChild(n[0].cloneNode(true));
|
80 |
+
}
|
81 |
+
|
82 |
+
function hasClass(n, c) {
|
83 |
+
return new RegExp('\\b' + c + '\\b', 'g').test(n.className);
|
84 |
+
};
|
85 |
+
|
86 |
+
each(dom.select('*', el), function(n) {
|
87 |
+
// Replace cdate
|
88 |
+
if (hasClass(n, ed.getParam('template_cdate_classes', 'cdate').replace(/\s+/g, '|')))
|
89 |
+
n.innerHTML = t._getDateTime(new Date(), ed.getParam("template_cdate_format", ed.getLang("template.cdate_format")));
|
90 |
+
|
91 |
+
// Replace mdate
|
92 |
+
if (hasClass(n, ed.getParam('template_mdate_classes', 'mdate').replace(/\s+/g, '|')))
|
93 |
+
n.innerHTML = t._getDateTime(new Date(), ed.getParam("template_mdate_format", ed.getLang("template.mdate_format")));
|
94 |
+
|
95 |
+
// Replace selection
|
96 |
+
if (hasClass(n, ed.getParam('template_selected_content_classes', 'selcontent').replace(/\s+/g, '|')))
|
97 |
+
n.innerHTML = sel;
|
98 |
+
});
|
99 |
+
|
100 |
+
t._replaceVals(el);
|
101 |
+
|
102 |
+
ed.execCommand('mceInsertContent', false, el.innerHTML);
|
103 |
+
ed.addVisual();
|
104 |
+
},
|
105 |
+
|
106 |
+
_replaceVals : function(e) {
|
107 |
+
var dom = this.editor.dom, vl = this.editor.getParam('template_replace_values');
|
108 |
+
|
109 |
+
each(dom.select('*', e), function(e) {
|
110 |
+
each(vl, function(v, k) {
|
111 |
+
if (dom.hasClass(e, k)) {
|
112 |
+
if (typeof(vl[k]) == 'function')
|
113 |
+
vl[k](e);
|
114 |
+
}
|
115 |
+
});
|
116 |
+
});
|
117 |
+
},
|
118 |
+
|
119 |
+
_getDateTime : function(d, fmt) {
|
120 |
+
if (!fmt)
|
121 |
+
return "";
|
122 |
+
|
123 |
+
function addZeros(value, len) {
|
124 |
+
var i;
|
125 |
+
|
126 |
+
value = "" + value;
|
127 |
+
|
128 |
+
if (value.length < len) {
|
129 |
+
for (i=0; i<(len-value.length); i++)
|
130 |
+
value = "0" + value;
|
131 |
+
}
|
132 |
+
|
133 |
+
return value;
|
134 |
+
}
|
135 |
+
|
136 |
+
fmt = fmt.replace("%D", "%m/%d/%y");
|
137 |
+
fmt = fmt.replace("%r", "%I:%M:%S %p");
|
138 |
+
fmt = fmt.replace("%Y", "" + d.getFullYear());
|
139 |
+
fmt = fmt.replace("%y", "" + d.getYear());
|
140 |
+
fmt = fmt.replace("%m", addZeros(d.getMonth()+1, 2));
|
141 |
+
fmt = fmt.replace("%d", addZeros(d.getDate(), 2));
|
142 |
+
fmt = fmt.replace("%H", "" + addZeros(d.getHours(), 2));
|
143 |
+
fmt = fmt.replace("%M", "" + addZeros(d.getMinutes(), 2));
|
144 |
+
fmt = fmt.replace("%S", "" + addZeros(d.getSeconds(), 2));
|
145 |
+
fmt = fmt.replace("%I", "" + ((d.getHours() + 11) % 12 + 1));
|
146 |
+
fmt = fmt.replace("%p", "" + (d.getHours() < 12 ? "AM" : "PM"));
|
147 |
+
fmt = fmt.replace("%B", "" + this.editor.getLang("template_months_long").split(',')[d.getMonth()]);
|
148 |
+
fmt = fmt.replace("%b", "" + this.editor.getLang("template_months_short").split(',')[d.getMonth()]);
|
149 |
+
fmt = fmt.replace("%A", "" + this.editor.getLang("template_day_long").split(',')[d.getDay()]);
|
150 |
+
fmt = fmt.replace("%a", "" + this.editor.getLang("template_day_short").split(',')[d.getDay()]);
|
151 |
+
fmt = fmt.replace("%%", "%");
|
152 |
+
|
153 |
+
return fmt;
|
154 |
+
}
|
155 |
+
});
|
156 |
+
|
157 |
+
// Register plugin
|
158 |
+
tinymce.PluginManager.add('template', tinymce.plugins.TemplatePlugin);
|
159 |
+
})();
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/template/js/template.js
ADDED
@@ -0,0 +1,106 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
tinyMCEPopup.requireLangPack();
|
2 |
+
|
3 |
+
var TemplateDialog = {
|
4 |
+
preInit : function() {
|
5 |
+
var url = tinyMCEPopup.getParam("template_external_list_url");
|
6 |
+
|
7 |
+
if (url != null)
|
8 |
+
document.write('<sc'+'ript language="javascript" type="text/javascript" src="' + tinyMCEPopup.editor.documentBaseURI.toAbsolute(url) + '"></sc'+'ript>');
|
9 |
+
},
|
10 |
+
|
11 |
+
init : function() {
|
12 |
+
var ed = tinyMCEPopup.editor, tsrc, sel, x, u;
|
13 |
+
|
14 |
+
tsrc = ed.getParam("template_templates", false);
|
15 |
+
sel = document.getElementById('tpath');
|
16 |
+
|
17 |
+
// Setup external template list
|
18 |
+
if (!tsrc && typeof(tinyMCETemplateList) != 'undefined') {
|
19 |
+
for (x=0, tsrc = []; x<tinyMCETemplateList.length; x++)
|
20 |
+
tsrc.push({title : tinyMCETemplateList[x][0], src : tinyMCETemplateList[x][1], description : tinyMCETemplateList[x][2]});
|
21 |
+
}
|
22 |
+
|
23 |
+
for (x=0; x<tsrc.length; x++)
|
24 |
+
sel.options[sel.options.length] = new Option(tsrc[x].title, tinyMCEPopup.editor.documentBaseURI.toAbsolute(tsrc[x].src));
|
25 |
+
|
26 |
+
this.resize();
|
27 |
+
this.tsrc = tsrc;
|
28 |
+
},
|
29 |
+
|
30 |
+
resize : function() {
|
31 |
+
var w, h, e;
|
32 |
+
|
33 |
+
if (!self.innerWidth) {
|
34 |
+
w = document.body.clientWidth - 50;
|
35 |
+
h = document.body.clientHeight - 160;
|
36 |
+
} else {
|
37 |
+
w = self.innerWidth - 50;
|
38 |
+
h = self.innerHeight - 170;
|
39 |
+
}
|
40 |
+
|
41 |
+
e = document.getElementById('templatesrc');
|
42 |
+
|
43 |
+
if (e) {
|
44 |
+
e.style.height = Math.abs(h) + 'px';
|
45 |
+
e.style.width = Math.abs(w - 5) + 'px';
|
46 |
+
}
|
47 |
+
},
|
48 |
+
|
49 |
+
loadCSSFiles : function(d) {
|
50 |
+
var ed = tinyMCEPopup.editor;
|
51 |
+
|
52 |
+
tinymce.each(ed.getParam("content_css", '').split(','), function(u) {
|
53 |
+
d.write('<link href="' + ed.documentBaseURI.toAbsolute(u) + '" rel="stylesheet" type="text/css" />');
|
54 |
+
});
|
55 |
+
},
|
56 |
+
|
57 |
+
selectTemplate : function(u, ti) {
|
58 |
+
var d = window.frames['templatesrc'].document, x, tsrc = this.tsrc;
|
59 |
+
|
60 |
+
if (!u)
|
61 |
+
return;
|
62 |
+
|
63 |
+
d.body.innerHTML = this.templateHTML = this.getFileContents(u);
|
64 |
+
|
65 |
+
for (x=0; x<tsrc.length; x++) {
|
66 |
+
if (tsrc[x].title == ti)
|
67 |
+
document.getElementById('tmpldesc').innerHTML = tsrc[x].description || '';
|
68 |
+
}
|
69 |
+
},
|
70 |
+
|
71 |
+
insert : function() {
|
72 |
+
tinyMCEPopup.execCommand('mceInsertTemplate', false, {
|
73 |
+
content : this.templateHTML,
|
74 |
+
selection : tinyMCEPopup.editor.selection.getContent()
|
75 |
+
});
|
76 |
+
|
77 |
+
tinyMCEPopup.close();
|
78 |
+
},
|
79 |
+
|
80 |
+
getFileContents : function(u) {
|
81 |
+
var x, d, t = 'text/plain';
|
82 |
+
|
83 |
+
function g(s) {
|
84 |
+
x = 0;
|
85 |
+
|
86 |
+
try {
|
87 |
+
x = new ActiveXObject(s);
|
88 |
+
} catch (s) {
|
89 |
+
}
|
90 |
+
|
91 |
+
return x;
|
92 |
+
};
|
93 |
+
|
94 |
+
x = window.ActiveXObject ? g('Msxml2.XMLHTTP') || g('Microsoft.XMLHTTP') : new XMLHttpRequest();
|
95 |
+
|
96 |
+
// Synchronous AJAX load file
|
97 |
+
x.overrideMimeType && x.overrideMimeType(t);
|
98 |
+
x.open("GET", u, false);
|
99 |
+
x.send(null);
|
100 |
+
|
101 |
+
return x.responseText;
|
102 |
+
}
|
103 |
+
};
|
104 |
+
|
105 |
+
TemplateDialog.preInit();
|
106 |
+
tinyMCEPopup.onInit.add(TemplateDialog.init, TemplateDialog);
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/template/langs/en_dlg.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
tinyMCE.addI18n('en.template_dlg',{title:"Templates",label:"Template","desc_label":"Description",desc:"Insert Predefined Template Content",select:"Select a Template",preview:"Preview",warning:"Warning: Updating a template with a different one may cause data loss.","mdate_format":"%Y-%m-%d %H:%M:%S","cdate_format":"%Y-%m-%d %H:%M:%S","months_long":"January,February,March,April,May,June,July,August,September,October,November,December","months_short":"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec","day_long":"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday","day_short":"Sun,Mon,Tue,Wed,Thu,Fri,Sat,Sun"});
|
js/ip_pdffree/tinymce/jscripts/tiny_mce/plugins/template/template.htm
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
2 |
+
<head>
|
3 |
+
<title>{#template_dlg.title}</title>
|
4 |
+
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
5 |
+
<script type="text/javascript" src="js/template.js"></script>
|
6 |
+
<link href="css/template.css" rel="stylesheet" type="text/css" />
|
7 |
+
</head>
|
8 |
+
<body onresize="TemplateDialog.resize();">
|
9 |
+
<form onsubmit="TemplateDialog.insert();return false;">
|
10 |
+
<div id="frmbody">
|
11 |
+
<div class="title">{#template_dlg.desc}</div>
|
12 |
+
<div class="frmRow"><label for="tpath" title="{#template_dlg.select}">{#template_dlg.label}:</label>
|
13 |
+
<select id="tpath" name="tpath" onchange="TemplateDialog.se
|