tinymce-rails 3.5.11.1 → 4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +1 -1
- data/README.md +40 -103
- data/Rakefile +10 -15
- data/app/assets/javascripts/tinymce-jquery.js +1 -1
- data/app/assets/javascripts/tinymce.js +1 -1
- data/app/assets/javascripts/tinymce/preinit.js.erb +1 -2
- data/lib/tasks/tinymce-assets.rake +3 -6
- data/lib/tinymce/rails.rb +1 -1
- data/lib/tinymce/rails/asset_installer.rb +36 -34
- data/lib/tinymce/rails/asset_manifest.rb +89 -108
- data/lib/tinymce/rails/configuration.rb +36 -29
- data/lib/tinymce/rails/engine.rb +1 -40
- data/lib/tinymce/rails/helper.rb +5 -9
- data/lib/tinymce/rails/version.rb +2 -2
- data/vendor/assets/javascripts/tinymce/jquery.tinymce.js +1 -1
- data/vendor/assets/javascripts/tinymce/langs/readme.md +3 -0
- data/vendor/assets/javascripts/tinymce/license.txt +504 -504
- data/vendor/assets/javascripts/tinymce/plugins/advlist/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/anchor/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/autolink/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/autoresize/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/autosave/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/bbcode/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/charmap/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/code/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/{utils → plugins/compat3x}/editable_selects.js +70 -70
- data/vendor/assets/javascripts/tinymce/{utils → plugins/compat3x}/form_utils.js +210 -210
- data/vendor/assets/javascripts/tinymce/{utils → plugins/compat3x}/mctabs.js +161 -161
- data/vendor/assets/javascripts/tinymce/plugins/compat3x/tiny_mce_popup.js +435 -0
- data/vendor/assets/javascripts/tinymce/{utils → plugins/compat3x}/validate.js +252 -252
- data/vendor/assets/javascripts/tinymce/plugins/contextmenu/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/directionality/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-cool.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-cry.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-embarassed.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-foot-in-mouth.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-frown.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-innocent.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-kiss.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-laughing.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-money-mouth.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-sealed.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-smile.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-surprised.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-tongue-out.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-undecided.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-wink.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/{emotions → emoticons}/img/smiley-yell.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/emoticons/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/example/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/example_dependency/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/fullpage/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/fullscreen/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/hr/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/image/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/insertdatetime/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/layer/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/legacyoutput/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/link/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/lists/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/media/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/nonbreaking/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/noneditable/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/pagebreak/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/paste/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/preview/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/print/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/save/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/searchreplace/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/spellchecker/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/tabfocus/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/table/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/template/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/textcolor/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/visualblocks/css/visualblocks.css +114 -21
- data/vendor/assets/javascripts/tinymce/plugins/visualblocks/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/visualchars/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/plugins/wordcount/plugin.js +1 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/content.inline.min.css +1 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/content.min.css +1 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/fonts/icomoon-small.eot +0 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/fonts/icomoon-small.svg +166 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/fonts/icomoon-small.ttf +0 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/fonts/icomoon-small.woff +0 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/fonts/icomoon.eot +0 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/fonts/icomoon.svg +150 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/fonts/icomoon.ttf +0 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/fonts/icomoon.woff +0 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/fonts/readme.md +1 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/img/anchor.gif +0 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/img/loader.gif +0 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/img/object.gif +0 -0
- data/vendor/assets/javascripts/tinymce/{themes/advanced → skins/lightgray}/img/trans.gif +0 -0
- data/vendor/assets/javascripts/tinymce/{plugins/spellchecker → skins/lightgray}/img/wline.gif +0 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/skin.ie7.min.css +1 -0
- data/vendor/assets/javascripts/tinymce/skins/lightgray/skin.min.css +1 -0
- data/vendor/assets/javascripts/tinymce/themes/modern/theme.js +1 -0
- data/vendor/assets/javascripts/tinymce/tinymce.js +10 -0
- data/vendor/assets/javascripts/tinymce/tinymce_jquery.js +9 -0
- metadata +100 -272
- checksums.yaml +0 -7
- data/lib/tinymce/rails/asset_installer/compile.rb +0 -44
- data/lib/tinymce/rails/asset_installer/copy.rb +0 -52
- data/vendor/assets/javascripts/tinymce/langs/en.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/advhr/css/advhr.css +0 -5
- data/vendor/assets/javascripts/tinymce/plugins/advhr/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/advhr/editor_plugin_src.js +0 -57
- data/vendor/assets/javascripts/tinymce/plugins/advhr/js/rule.js +0 -43
- data/vendor/assets/javascripts/tinymce/plugins/advhr/langs/en_dlg.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/advhr/rule.htm +0 -58
- data/vendor/assets/javascripts/tinymce/plugins/advimage/css/advimage.css +0 -13
- data/vendor/assets/javascripts/tinymce/plugins/advimage/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/advimage/editor_plugin_src.js +0 -50
- data/vendor/assets/javascripts/tinymce/plugins/advimage/image.htm +0 -235
- data/vendor/assets/javascripts/tinymce/plugins/advimage/img/sample.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/advimage/js/image.js +0 -464
- data/vendor/assets/javascripts/tinymce/plugins/advimage/langs/en_dlg.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/advlink/css/advlink.css +0 -8
- data/vendor/assets/javascripts/tinymce/plugins/advlink/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/advlink/editor_plugin_src.js +0 -61
- data/vendor/assets/javascripts/tinymce/plugins/advlink/js/advlink.js +0 -543
- data/vendor/assets/javascripts/tinymce/plugins/advlink/langs/en_dlg.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/advlink/link.htm +0 -338
- data/vendor/assets/javascripts/tinymce/plugins/advlist/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/advlist/editor_plugin_src.js +0 -176
- data/vendor/assets/javascripts/tinymce/plugins/autolink/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/autolink/editor_plugin_src.js +0 -184
- data/vendor/assets/javascripts/tinymce/plugins/autoresize/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/autoresize/editor_plugin_src.js +0 -119
- data/vendor/assets/javascripts/tinymce/plugins/autosave/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/autosave/editor_plugin_src.js +0 -433
- data/vendor/assets/javascripts/tinymce/plugins/bbcode/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/bbcode/editor_plugin_src.js +0 -120
- data/vendor/assets/javascripts/tinymce/plugins/contextmenu/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/contextmenu/editor_plugin_src.js +0 -163
- data/vendor/assets/javascripts/tinymce/plugins/directionality/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/directionality/editor_plugin_src.js +0 -85
- data/vendor/assets/javascripts/tinymce/plugins/emotions/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/emotions/editor_plugin_src.js +0 -43
- data/vendor/assets/javascripts/tinymce/plugins/emotions/emotions.htm +0 -42
- data/vendor/assets/javascripts/tinymce/plugins/emotions/js/emotions.js +0 -43
- data/vendor/assets/javascripts/tinymce/plugins/emotions/langs/en_dlg.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/example/dialog.htm +0 -22
- data/vendor/assets/javascripts/tinymce/plugins/example/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/example/editor_plugin_src.js +0 -84
- data/vendor/assets/javascripts/tinymce/plugins/example/img/example.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/example/js/dialog.js +0 -19
- data/vendor/assets/javascripts/tinymce/plugins/example/langs/en.js +0 -3
- data/vendor/assets/javascripts/tinymce/plugins/example/langs/en_dlg.js +0 -3
- data/vendor/assets/javascripts/tinymce/plugins/example_dependency/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/example_dependency/editor_plugin_src.js +0 -50
- data/vendor/assets/javascripts/tinymce/plugins/fullpage/css/fullpage.css +0 -143
- data/vendor/assets/javascripts/tinymce/plugins/fullpage/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/fullpage/editor_plugin_src.js +0 -405
- data/vendor/assets/javascripts/tinymce/plugins/fullpage/fullpage.htm +0 -259
- data/vendor/assets/javascripts/tinymce/plugins/fullpage/js/fullpage.js +0 -232
- data/vendor/assets/javascripts/tinymce/plugins/fullpage/langs/en_dlg.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/fullscreen/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/fullscreen/editor_plugin_src.js +0 -234
- data/vendor/assets/javascripts/tinymce/plugins/fullscreen/fullscreen.htm +0 -117
- data/vendor/assets/javascripts/tinymce/plugins/iespell/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/iespell/editor_plugin_src.js +0 -54
- data/vendor/assets/javascripts/tinymce/plugins/inlinepopups/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/inlinepopups/editor_plugin_src.js +0 -699
- data/vendor/assets/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/img/alert.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/img/button.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/img/buttons.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/img/confirm.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/img/corners.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/img/horizontal.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/img/vertical.gif +0 -0
- data/vendor/assets/javascripts/tinymce/plugins/inlinepopups/skins/clearlooks2/window.css +0 -90
- data/vendor/assets/javascripts/tinymce/plugins/inlinepopups/template.htm +0 -387
- data/vendor/assets/javascripts/tinymce/plugins/insertdatetime/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/insertdatetime/editor_plugin_src.js +0 -83
- data/vendor/assets/javascripts/tinymce/plugins/layer/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/layer/editor_plugin_src.js +0 -262
- data/vendor/assets/javascripts/tinymce/plugins/legacyoutput/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/legacyoutput/editor_plugin_src.js +0 -139
- data/vendor/assets/javascripts/tinymce/plugins/lists/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/lists/editor_plugin_src.js +0 -955
- data/vendor/assets/javascripts/tinymce/plugins/media/css/media.css +0 -17
- data/vendor/assets/javascripts/tinymce/plugins/media/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/media/editor_plugin_src.js +0 -898
- data/vendor/assets/javascripts/tinymce/plugins/media/js/embed.js +0 -73
- data/vendor/assets/javascripts/tinymce/plugins/media/js/media.js +0 -513
- data/vendor/assets/javascripts/tinymce/plugins/media/langs/en_dlg.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/media/media.htm +0 -922
- data/vendor/assets/javascripts/tinymce/plugins/nonbreaking/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/nonbreaking/editor_plugin_src.js +0 -54
- data/vendor/assets/javascripts/tinymce/plugins/noneditable/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/noneditable/editor_plugin_src.js +0 -537
- data/vendor/assets/javascripts/tinymce/plugins/pagebreak/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/pagebreak/editor_plugin_src.js +0 -74
- data/vendor/assets/javascripts/tinymce/plugins/paste/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/paste/editor_plugin_src.js +0 -887
- data/vendor/assets/javascripts/tinymce/plugins/paste/js/pastetext.js +0 -36
- data/vendor/assets/javascripts/tinymce/plugins/paste/js/pasteword.js +0 -51
- data/vendor/assets/javascripts/tinymce/plugins/paste/langs/en_dlg.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/paste/pastetext.htm +0 -27
- data/vendor/assets/javascripts/tinymce/plugins/paste/pasteword.htm +0 -21
- data/vendor/assets/javascripts/tinymce/plugins/preview/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/preview/editor_plugin_src.js +0 -53
- data/vendor/assets/javascripts/tinymce/plugins/preview/example.html +0 -28
- data/vendor/assets/javascripts/tinymce/plugins/preview/jscripts/embed.js +0 -73
- data/vendor/assets/javascripts/tinymce/plugins/preview/preview.html +0 -17
- data/vendor/assets/javascripts/tinymce/plugins/print/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/print/editor_plugin_src.js +0 -34
- data/vendor/assets/javascripts/tinymce/plugins/save/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/save/editor_plugin_src.js +0 -101
- data/vendor/assets/javascripts/tinymce/plugins/searchreplace/css/searchreplace.css +0 -6
- data/vendor/assets/javascripts/tinymce/plugins/searchreplace/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/searchreplace/editor_plugin_src.js +0 -61
- data/vendor/assets/javascripts/tinymce/plugins/searchreplace/js/searchreplace.js +0 -152
- data/vendor/assets/javascripts/tinymce/plugins/searchreplace/langs/en_dlg.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/searchreplace/searchreplace.htm +0 -100
- data/vendor/assets/javascripts/tinymce/plugins/spellchecker/css/content.css +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/spellchecker/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/spellchecker/editor_plugin_src.js +0 -471
- data/vendor/assets/javascripts/tinymce/plugins/style/css/props.css +0 -14
- data/vendor/assets/javascripts/tinymce/plugins/style/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/style/editor_plugin_src.js +0 -71
- data/vendor/assets/javascripts/tinymce/plugins/style/js/props.js +0 -709
- data/vendor/assets/javascripts/tinymce/plugins/style/langs/en_dlg.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/style/props.htm +0 -845
- data/vendor/assets/javascripts/tinymce/plugins/style/readme.txt +0 -19
- data/vendor/assets/javascripts/tinymce/plugins/tabfocus/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/tabfocus/editor_plugin_src.js +0 -122
- data/vendor/assets/javascripts/tinymce/plugins/table/cell.htm +0 -180
- data/vendor/assets/javascripts/tinymce/plugins/table/css/cell.css +0 -17
- data/vendor/assets/javascripts/tinymce/plugins/table/css/row.css +0 -25
- data/vendor/assets/javascripts/tinymce/plugins/table/css/table.css +0 -13
- data/vendor/assets/javascripts/tinymce/plugins/table/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/table/editor_plugin_src.js +0 -1456
- data/vendor/assets/javascripts/tinymce/plugins/table/js/cell.js +0 -319
- data/vendor/assets/javascripts/tinymce/plugins/table/js/merge_cells.js +0 -27
- data/vendor/assets/javascripts/tinymce/plugins/table/js/row.js +0 -254
- data/vendor/assets/javascripts/tinymce/plugins/table/js/table.js +0 -501
- data/vendor/assets/javascripts/tinymce/plugins/table/langs/en_dlg.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/table/merge_cells.htm +0 -32
- data/vendor/assets/javascripts/tinymce/plugins/table/row.htm +0 -158
- data/vendor/assets/javascripts/tinymce/plugins/table/table.htm +0 -188
- data/vendor/assets/javascripts/tinymce/plugins/template/blank.htm +0 -12
- data/vendor/assets/javascripts/tinymce/plugins/template/css/template.css +0 -23
- data/vendor/assets/javascripts/tinymce/plugins/template/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/template/editor_plugin_src.js +0 -159
- data/vendor/assets/javascripts/tinymce/plugins/template/js/template.js +0 -106
- data/vendor/assets/javascripts/tinymce/plugins/template/langs/en_dlg.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/template/template.htm +0 -31
- data/vendor/assets/javascripts/tinymce/plugins/visualblocks/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/visualblocks/editor_plugin_src.js +0 -63
- data/vendor/assets/javascripts/tinymce/plugins/visualchars/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/visualchars/editor_plugin_src.js +0 -83
- data/vendor/assets/javascripts/tinymce/plugins/wordcount/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/wordcount/editor_plugin_src.js +0 -122
- data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/abbr.htm +0 -142
- data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/acronym.htm +0 -142
- data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/attributes.htm +0 -149
- data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/cite.htm +0 -142
- data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/css/attributes.css +0 -11
- data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/css/popup.css +0 -9
- data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/del.htm +0 -162
- data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/editor_plugin.js +0 -1
- data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/editor_plugin_src.js +0 -132
- data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/ins.htm +0 -162
- data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/js/abbr.js +0 -28
- data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/js/acronym.js +0 -28
- data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/js/attributes.js +0 -111
- data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/js/cite.js +0 -28
- data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/js/del.js +0 -53
- data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/js/element_common.js +0 -229
- data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/js/ins.js +0 -53
- data/vendor/assets/javascripts/tinymce/plugins/xhtmlxtras/langs/en_dlg.js +0 -1
- data/vendor/assets/javascripts/tinymce/themes/advanced/about.htm +0 -52
- data/vendor/assets/javascripts/tinymce/themes/advanced/anchor.htm +0 -26
- data/vendor/assets/javascripts/tinymce/themes/advanced/charmap.htm +0 -55
- data/vendor/assets/javascripts/tinymce/themes/advanced/color_picker.htm +0 -70
- data/vendor/assets/javascripts/tinymce/themes/advanced/editor_template.js +0 -1
- data/vendor/assets/javascripts/tinymce/themes/advanced/editor_template_src.js +0 -1490
- data/vendor/assets/javascripts/tinymce/themes/advanced/image.htm +0 -80
- data/vendor/assets/javascripts/tinymce/themes/advanced/img/colorpicker.jpg +0 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/img/flash.gif +0 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/img/icons.gif +0 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/img/iframe.gif +0 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/img/pagebreak.gif +0 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/img/quicktime.gif +0 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/img/realmedia.gif +0 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/img/shockwave.gif +0 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/img/video.gif +0 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/img/windowsmedia.gif +0 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/js/about.js +0 -73
- data/vendor/assets/javascripts/tinymce/themes/advanced/js/anchor.js +0 -56
- data/vendor/assets/javascripts/tinymce/themes/advanced/js/charmap.js +0 -363
- data/vendor/assets/javascripts/tinymce/themes/advanced/js/color_picker.js +0 -345
- data/vendor/assets/javascripts/tinymce/themes/advanced/js/image.js +0 -253
- data/vendor/assets/javascripts/tinymce/themes/advanced/js/link.js +0 -159
- data/vendor/assets/javascripts/tinymce/themes/advanced/js/source_editor.js +0 -78
- data/vendor/assets/javascripts/tinymce/themes/advanced/langs/en.js +0 -1
- data/vendor/assets/javascripts/tinymce/themes/advanced/langs/en_dlg.js +0 -1
- data/vendor/assets/javascripts/tinymce/themes/advanced/link.htm +0 -57
- data/vendor/assets/javascripts/tinymce/themes/advanced/shortcuts.htm +0 -47
- data/vendor/assets/javascripts/tinymce/themes/advanced/skins/default/content.css +0 -50
- data/vendor/assets/javascripts/tinymce/themes/advanced/skins/default/dialog.css +0 -118
- data/vendor/assets/javascripts/tinymce/themes/advanced/skins/default/img/buttons.png +0 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/skins/default/img/items.gif +0 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/skins/default/img/menu_arrow.gif +0 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/skins/default/img/menu_check.gif +0 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/skins/default/img/progress.gif +0 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/skins/default/img/tabs.gif +0 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/skins/default/ui.css +0 -219
- data/vendor/assets/javascripts/tinymce/themes/advanced/skins/highcontrast/content.css +0 -24
- data/vendor/assets/javascripts/tinymce/themes/advanced/skins/highcontrast/dialog.css +0 -106
- data/vendor/assets/javascripts/tinymce/themes/advanced/skins/highcontrast/ui.css +0 -106
- data/vendor/assets/javascripts/tinymce/themes/advanced/skins/o2k7/content.css +0 -48
- data/vendor/assets/javascripts/tinymce/themes/advanced/skins/o2k7/dialog.css +0 -118
- data/vendor/assets/javascripts/tinymce/themes/advanced/skins/o2k7/img/button_bg.png +0 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/skins/o2k7/img/button_bg_black.png +0 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/skins/o2k7/img/button_bg_silver.png +0 -0
- data/vendor/assets/javascripts/tinymce/themes/advanced/skins/o2k7/ui.css +0 -222
- data/vendor/assets/javascripts/tinymce/themes/advanced/skins/o2k7/ui_black.css +0 -8
- data/vendor/assets/javascripts/tinymce/themes/advanced/skins/o2k7/ui_silver.css +0 -5
- data/vendor/assets/javascripts/tinymce/themes/advanced/source_editor.htm +0 -25
- data/vendor/assets/javascripts/tinymce/themes/simple/editor_template.js +0 -1
- data/vendor/assets/javascripts/tinymce/themes/simple/editor_template_src.js +0 -84
- data/vendor/assets/javascripts/tinymce/themes/simple/img/icons.gif +0 -0
- data/vendor/assets/javascripts/tinymce/themes/simple/langs/en.js +0 -1
- data/vendor/assets/javascripts/tinymce/themes/simple/skins/default/content.css +0 -25
- data/vendor/assets/javascripts/tinymce/themes/simple/skins/default/ui.css +0 -32
- data/vendor/assets/javascripts/tinymce/themes/simple/skins/o2k7/content.css +0 -17
- data/vendor/assets/javascripts/tinymce/themes/simple/skins/o2k7/img/button_bg.png +0 -0
- data/vendor/assets/javascripts/tinymce/themes/simple/skins/o2k7/ui.css +0 -35
- data/vendor/assets/javascripts/tinymce/tiny_mce.js +0 -1
- data/vendor/assets/javascripts/tinymce/tiny_mce_jquery.js +0 -1
- data/vendor/assets/javascripts/tinymce/tiny_mce_jquery_src.js +0 -17942
- data/vendor/assets/javascripts/tinymce/tiny_mce_popup.js +0 -5
- data/vendor/assets/javascripts/tinymce/tiny_mce_src.js +0 -19156
@@ -1,53 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* ins.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 init() {
|
12
|
-
SXE.initElementDialog('ins');
|
13
|
-
if (SXE.currentAction == "update") {
|
14
|
-
setFormValue('datetime', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'datetime'));
|
15
|
-
setFormValue('cite', tinyMCEPopup.editor.dom.getAttrib(SXE.updateElement, 'cite'));
|
16
|
-
SXE.showRemoveButton();
|
17
|
-
}
|
18
|
-
}
|
19
|
-
|
20
|
-
function setElementAttribs(elm) {
|
21
|
-
setAllCommonAttribs(elm);
|
22
|
-
setAttrib(elm, 'datetime');
|
23
|
-
setAttrib(elm, 'cite');
|
24
|
-
elm.removeAttribute('data-mce-new');
|
25
|
-
}
|
26
|
-
|
27
|
-
function insertIns() {
|
28
|
-
var elm = tinyMCEPopup.editor.dom.getParent(SXE.focusElement, 'INS');
|
29
|
-
|
30
|
-
if (elm == null) {
|
31
|
-
var s = SXE.inst.selection.getContent();
|
32
|
-
if(s.length > 0) {
|
33
|
-
insertInlineElement('ins');
|
34
|
-
var elementArray = SXE.inst.dom.select('ins[data-mce-new]');
|
35
|
-
for (var i=0; i<elementArray.length; i++) {
|
36
|
-
var elm = elementArray[i];
|
37
|
-
setElementAttribs(elm);
|
38
|
-
}
|
39
|
-
}
|
40
|
-
} else {
|
41
|
-
setElementAttribs(elm);
|
42
|
-
}
|
43
|
-
tinyMCEPopup.editor.nodeChanged();
|
44
|
-
tinyMCEPopup.execCommand('mceEndUndoLevel');
|
45
|
-
tinyMCEPopup.close();
|
46
|
-
}
|
47
|
-
|
48
|
-
function removeIns() {
|
49
|
-
SXE.removeElement('ins');
|
50
|
-
tinyMCEPopup.close();
|
51
|
-
}
|
52
|
-
|
53
|
-
tinyMCEPopup.onInit.add(init);
|
@@ -1 +0,0 @@
|
|
1
|
-
tinyMCE.addI18n('en.xhtmlxtras_dlg',{"attribs_title":"Insert/Edit Attributes","option_rtl":"Right to Left","option_ltr":"Left to Right","insert_date":"Insert Current Date/Time",remove:"Remove","title_cite_element":"Citation Element","title_abbr_element":"Abbreviation Element","title_acronym_element":"Acronym Element","title_del_element":"Deletion Element","title_ins_element":"Insertion Element","fieldset_events_tab":"Element Events","fieldset_attrib_tab":"Element Attributes","fieldset_general_tab":"General Settings","events_tab":"Events","attrib_tab":"Attributes","general_tab":"General","attribute_attrib_tab":"Attributes","attribute_events_tab":"Events","attribute_label_accesskey":"AccessKey","attribute_label_tabindex":"TabIndex","attribute_label_langcode":"Language","attribute_option_rtl":"Right to Left","attribute_option_ltr":"Left to Right","attribute_label_langdir":"Text Direction","attribute_label_datetime":"Date/Time","attribute_label_cite":"Cite","attribute_label_style":"Style","attribute_label_class":"Class","attribute_label_id":"ID","attribute_label_title":"Title"});
|
@@ -1,52 +0,0 @@
|
|
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>{#advanced_dlg.about_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="js/about.js"></script>
|
8
|
-
</head>
|
9
|
-
<body id="about" style="display: none">
|
10
|
-
<div class="tabs">
|
11
|
-
<ul>
|
12
|
-
<li id="general_tab" class="current" aria-controls="general_panel"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">{#advanced_dlg.about_general}</a></span></li>
|
13
|
-
<li id="help_tab" style="display:none" aria-hidden="true" aria-controls="help_panel"><span><a href="javascript:mcTabs.displayTab('help_tab','help_panel');" onmousedown="return false;">{#advanced_dlg.about_help}</a></span></li>
|
14
|
-
<li id="plugins_tab" aria-controls="plugins_panel"><span><a href="javascript:mcTabs.displayTab('plugins_tab','plugins_panel');" onmousedown="return false;">{#advanced_dlg.about_plugins}</a></span></li>
|
15
|
-
</ul>
|
16
|
-
</div>
|
17
|
-
|
18
|
-
<div class="panel_wrapper">
|
19
|
-
<div id="general_panel" class="panel current">
|
20
|
-
<h3>{#advanced_dlg.about_title}</h3>
|
21
|
-
<p>Version: <span id="version"></span> (<span id="date"></span>)</p>
|
22
|
-
<p>TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control released as Open Source under <a href="../../license.txt" target="_blank">LGPL</a>
|
23
|
-
by Moxiecode Systems AB. It has the ability to convert HTML TEXTAREA fields or other HTML elements to editor instances.</p>
|
24
|
-
<p>Copyright © 2003-2008, <a href="http://www.moxiecode.com" target="_blank">Moxiecode Systems AB</a>, All rights reserved.</p>
|
25
|
-
<p>For more information about this software visit the <a href="http://tinymce.moxiecode.com" target="_blank">TinyMCE website</a>.</p>
|
26
|
-
|
27
|
-
<div id="buttoncontainer">
|
28
|
-
<a href="http://www.moxiecode.com" target="_blank"><img src="http://tinymce.moxiecode.com/images/gotmoxie.png" alt="Got Moxie?" border="0" /></a>
|
29
|
-
</div>
|
30
|
-
</div>
|
31
|
-
|
32
|
-
<div id="plugins_panel" class="panel">
|
33
|
-
<div id="pluginscontainer">
|
34
|
-
<h3>{#advanced_dlg.about_loaded}</h3>
|
35
|
-
|
36
|
-
<div id="plugintablecontainer">
|
37
|
-
</div>
|
38
|
-
|
39
|
-
<p> </p>
|
40
|
-
</div>
|
41
|
-
</div>
|
42
|
-
|
43
|
-
<div id="help_panel" class="panel noscroll" style="overflow: visible;">
|
44
|
-
<div id="iframecontainer"></div>
|
45
|
-
</div>
|
46
|
-
</div>
|
47
|
-
|
48
|
-
<div class="mceActionPanel">
|
49
|
-
<input type="button" id="cancel" name="cancel" value="{#close}" onclick="tinyMCEPopup.close();" />
|
50
|
-
</div>
|
51
|
-
</body>
|
52
|
-
</html>
|
@@ -1,26 +0,0 @@
|
|
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>{#advanced_dlg.anchor_title}</title>
|
5
|
-
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
6
|
-
<script type="text/javascript" src="js/anchor.js"></script>
|
7
|
-
</head>
|
8
|
-
<body style="display: none" role="application" aria-labelledby="app_title">
|
9
|
-
<form onsubmit="AnchorDialog.update();return false;" action="#">
|
10
|
-
<table border="0" cellpadding="4" cellspacing="0" role="presentation">
|
11
|
-
<tr>
|
12
|
-
<td colspan="2" class="title" id="app_title">{#advanced_dlg.anchor_title}</td>
|
13
|
-
</tr>
|
14
|
-
<tr>
|
15
|
-
<td class="nowrap"><label for="anchorName">{#advanced_dlg.anchor_name}:</label></td>
|
16
|
-
<td><input name="anchorName" type="text" class="mceFocus" id="anchorName" value="" style="width: 200px" aria-required="true" /></td>
|
17
|
-
</tr>
|
18
|
-
</table>
|
19
|
-
|
20
|
-
<div class="mceActionPanel">
|
21
|
-
<input type="submit" id="insert" name="insert" value="{#update}" />
|
22
|
-
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();" />
|
23
|
-
</div>
|
24
|
-
</form>
|
25
|
-
</body>
|
26
|
-
</html>
|
@@ -1,55 +0,0 @@
|
|
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>{#advanced_dlg.charmap_title}</title>
|
5
|
-
<script type="text/javascript" src="../../tiny_mce_popup.js"></script>
|
6
|
-
<script type="text/javascript" src="js/charmap.js"></script>
|
7
|
-
</head>
|
8
|
-
<body id="charmap" style="display:none" role="application">
|
9
|
-
<table align="center" border="0" cellspacing="0" cellpadding="2" role="presentation">
|
10
|
-
<tr>
|
11
|
-
<td colspan="2" class="title" ><label for="charmapView" id="charmap_label">{#advanced_dlg.charmap_title}</label></td>
|
12
|
-
</tr>
|
13
|
-
<tr>
|
14
|
-
<td id="charmapView" rowspan="2" align="left" valign="top">
|
15
|
-
<!-- Chars will be rendered here -->
|
16
|
-
</td>
|
17
|
-
<td width="100" align="center" valign="top">
|
18
|
-
<table border="0" cellpadding="0" cellspacing="0" width="100" style="height:100px" role="presentation">
|
19
|
-
<tr>
|
20
|
-
<td id="codeV"> </td>
|
21
|
-
</tr>
|
22
|
-
<tr>
|
23
|
-
<td id="codeN"> </td>
|
24
|
-
</tr>
|
25
|
-
</table>
|
26
|
-
</td>
|
27
|
-
</tr>
|
28
|
-
<tr>
|
29
|
-
<td valign="bottom" style="padding-bottom: 3px;">
|
30
|
-
<table width="100" align="center" border="0" cellpadding="2" cellspacing="0" role="presentation">
|
31
|
-
<tr>
|
32
|
-
<td align="center" style="border-left: 1px solid #666699; border-top: 1px solid #666699; border-right: 1px solid #666699;"><label for="codeA">HTML-Code</label></td>
|
33
|
-
</tr>
|
34
|
-
<tr>
|
35
|
-
<td style="font-size: 16px; font-weight: bold; border-left: 1px solid #666699; border-bottom: 1px solid #666699; border-right: 1px solid #666699;" id="codeA" align="center"> </td>
|
36
|
-
</tr>
|
37
|
-
<tr>
|
38
|
-
<td style="font-size: 1px;"> </td>
|
39
|
-
</tr>
|
40
|
-
<tr>
|
41
|
-
<td align="center" style="border-left: 1px solid #666699; border-top: 1px solid #666699; border-right: 1px solid #666699;"><label for="codeB">NUM-Code</label></td>
|
42
|
-
</tr>
|
43
|
-
<tr>
|
44
|
-
<td style="font-size: 16px; font-weight: bold; border-left: 1px solid #666699; border-bottom: 1px solid #666699; border-right: 1px solid #666699;" id="codeB" align="center"> </td>
|
45
|
-
</tr>
|
46
|
-
</table>
|
47
|
-
</td>
|
48
|
-
</tr>
|
49
|
-
<tr>
|
50
|
-
<td colspan="2" id="charmap_usage">{#advanced_dlg.charmap_usage}</td>
|
51
|
-
</tr>
|
52
|
-
|
53
|
-
</table>
|
54
|
-
</body>
|
55
|
-
</html>
|
@@ -1,70 +0,0 @@
|
|
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>{#advanced_dlg.colorpicker_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="js/color_picker.js"></script>
|
8
|
-
</head>
|
9
|
-
<body id="colorpicker" style="display: none" role="application" aria-labelledby="app_label">
|
10
|
-
<span class="mceVoiceLabel" id="app_label" style="display:none;">{#advanced_dlg.colorpicker_title}</span>
|
11
|
-
<form onsubmit="insertAction();return false" action="#">
|
12
|
-
<div class="tabs">
|
13
|
-
<ul>
|
14
|
-
<li id="picker_tab" aria-controls="picker_panel" class="current"><span><a href="javascript:mcTabs.displayTab('picker_tab','picker_panel');" onmousedown="return false;">{#advanced_dlg.colorpicker_picker_tab}</a></span></li>
|
15
|
-
<li id="rgb_tab" aria-controls="rgb_panel"><span><a href="javascript:;" onclick="mcTabs.displayTab('rgb_tab','rgb_panel');" onmousedown="return false;">{#advanced_dlg.colorpicker_palette_tab}</a></span></li>
|
16
|
-
<li id="named_tab" aria-controls="named_panel"><span><a href="javascript:;" onclick="javascript:mcTabs.displayTab('named_tab','named_panel');" onmousedown="return false;">{#advanced_dlg.colorpicker_named_tab}</a></span></li>
|
17
|
-
</ul>
|
18
|
-
</div>
|
19
|
-
|
20
|
-
<div class="panel_wrapper">
|
21
|
-
<div id="picker_panel" class="panel current">
|
22
|
-
<fieldset>
|
23
|
-
<legend>{#advanced_dlg.colorpicker_picker_title}</legend>
|
24
|
-
<div id="picker">
|
25
|
-
<img id="colors" src="img/colorpicker.jpg" onclick="computeColor(event)" onmousedown="isMouseDown = true;return false;" onmouseup="isMouseDown = false;" onmousemove="if (isMouseDown && isMouseOver) computeColor(event); return false;" onmouseover="isMouseOver=true;" onmouseout="isMouseOver=false;" alt="" />
|
26
|
-
|
27
|
-
<div id="light">
|
28
|
-
<!-- Will be filled with divs -->
|
29
|
-
</div>
|
30
|
-
|
31
|
-
<br style="clear: both" />
|
32
|
-
</div>
|
33
|
-
</fieldset>
|
34
|
-
</div>
|
35
|
-
|
36
|
-
<div id="rgb_panel" class="panel">
|
37
|
-
<fieldset>
|
38
|
-
<legend id="webcolors_title">{#advanced_dlg.colorpicker_palette_title}</legend>
|
39
|
-
<div id="webcolors">
|
40
|
-
<!-- Gets filled with web safe colors-->
|
41
|
-
</div>
|
42
|
-
|
43
|
-
<br style="clear: both" />
|
44
|
-
</fieldset>
|
45
|
-
</div>
|
46
|
-
|
47
|
-
<div id="named_panel" class="panel">
|
48
|
-
<fieldset id="named_picker_label">
|
49
|
-
<legend id="named_title">{#advanced_dlg.colorpicker_named_title}</legend>
|
50
|
-
<div id="namedcolors" role="listbox" tabindex="0" aria-labelledby="named_picker_label">
|
51
|
-
<!-- Gets filled with named colors-->
|
52
|
-
</div>
|
53
|
-
|
54
|
-
<br style="clear: both" />
|
55
|
-
|
56
|
-
<div id="colornamecontainer">
|
57
|
-
{#advanced_dlg.colorpicker_name} <span id="colorname"></span>
|
58
|
-
</div>
|
59
|
-
</fieldset>
|
60
|
-
</div>
|
61
|
-
</div>
|
62
|
-
|
63
|
-
<div class="mceActionPanel">
|
64
|
-
<input type="submit" id="insert" name="insert" value="{#apply}" />
|
65
|
-
<input type="button" id="cancel" name="cancel" value="{#cancel}" onclick="tinyMCEPopup.close();"/>
|
66
|
-
<div id="preview_wrapper"><div id="previewblock"><label for="color">{#advanced_dlg.colorpicker_color}</label> <input id="color" type="text" size="8" class="text mceFocus" aria-required="true" /></div><span id="preview"></span></div>
|
67
|
-
</div>
|
68
|
-
</form>
|
69
|
-
</body>
|
70
|
-
</html>
|
@@ -1 +0,0 @@
|
|
1
|
-
(function(h){var i=h.DOM,g=h.dom.Event,c=h.extend,f=h.each,a=h.util.Cookie,e,d=h.explode;function b(p,m){var k,l,o=p.dom,j="",n,r;previewStyles=p.settings.preview_styles;if(previewStyles===false){return""}if(!previewStyles){previewStyles="font-family font-size font-weight text-decoration text-transform color background-color"}function q(s){return s.replace(/%(\w+)/g,"")}k=m.block||m.inline||"span";l=o.create(k);f(m.styles,function(t,s){t=q(t);if(t){o.setStyle(l,s,t)}});f(m.attributes,function(t,s){t=q(t);if(t){o.setAttrib(l,s,t)}});f(m.classes,function(s){s=q(s);if(!o.hasClass(l,s)){o.addClass(l,s)}});o.setStyles(l,{position:"absolute",left:-65535});p.getBody().appendChild(l);n=o.getStyle(p.getBody(),"fontSize",true);n=/px$/.test(n)?parseInt(n,10):0;f(previewStyles.split(" "),function(s){var t=o.getStyle(l,s,true);if(s=="background-color"&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(t)){t=o.getStyle(p.getBody(),s,true);if(o.toHex(t).toLowerCase()=="#ffffff"){return}}if(s=="font-size"){if(/em|%$/.test(t)){if(n===0){return}t=parseFloat(t,10)/(/%$/.test(t)?100:1);t=(t*n)+"px"}}j+=s+":"+t+";"});o.remove(l);return j}h.ThemeManager.requireLangPack("advanced");h.create("tinymce.themes.AdvancedTheme",{sizes:[8,10,12,14,18,24,36],controls:{bold:["bold_desc","Bold"],italic:["italic_desc","Italic"],underline:["underline_desc","Underline"],strikethrough:["striketrough_desc","Strikethrough"],justifyleft:["justifyleft_desc","JustifyLeft"],justifycenter:["justifycenter_desc","JustifyCenter"],justifyright:["justifyright_desc","JustifyRight"],justifyfull:["justifyfull_desc","JustifyFull"],bullist:["bullist_desc","InsertUnorderedList"],numlist:["numlist_desc","InsertOrderedList"],outdent:["outdent_desc","Outdent"],indent:["indent_desc","Indent"],cut:["cut_desc","Cut"],copy:["copy_desc","Copy"],paste:["paste_desc","Paste"],undo:["undo_desc","Undo"],redo:["redo_desc","Redo"],link:["link_desc","mceLink"],unlink:["unlink_desc","unlink"],image:["image_desc","mceImage"],cleanup:["cleanup_desc","mceCleanup"],help:["help_desc","mceHelp"],code:["code_desc","mceCodeEditor"],hr:["hr_desc","InsertHorizontalRule"],removeformat:["removeformat_desc","RemoveFormat"],sub:["sub_desc","subscript"],sup:["sup_desc","superscript"],forecolor:["forecolor_desc","ForeColor"],forecolorpicker:["forecolor_desc","mceForeColor"],backcolor:["backcolor_desc","HiliteColor"],backcolorpicker:["backcolor_desc","mceBackColor"],charmap:["charmap_desc","mceCharMap"],visualaid:["visualaid_desc","mceToggleVisualAid"],anchor:["anchor_desc","mceInsertAnchor"],newdocument:["newdocument_desc","mceNewDocument"],blockquote:["blockquote_desc","mceBlockQuote"]},stateControls:["bold","italic","underline","strikethrough","bullist","numlist","justifyleft","justifycenter","justifyright","justifyfull","sub","sup","blockquote"],init:function(k,l){var m=this,n,j,p;m.editor=k;m.url=l;m.onResolveName=new h.util.Dispatcher(this);n=k.settings;k.forcedHighContrastMode=k.settings.detect_highcontrast&&m._isHighContrast();k.settings.skin=k.forcedHighContrastMode?"highcontrast":k.settings.skin;if(!n.theme_advanced_buttons1){n=c({theme_advanced_buttons1:"bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect",theme_advanced_buttons2:"bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code",theme_advanced_buttons3:"hr,removeformat,visualaid,|,sub,sup,|,charmap"},n)}m.settings=n=c({theme_advanced_path:true,theme_advanced_toolbar_location:"top",theme_advanced_blockformats:"p,address,pre,h1,h2,h3,h4,h5,h6",theme_advanced_toolbar_align:"left",theme_advanced_statusbar_location:"bottom",theme_advanced_fonts:"Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats",theme_advanced_more_colors:1,theme_advanced_row_height:23,theme_advanced_resize_horizontal:1,theme_advanced_resizing_use_cookie:1,theme_advanced_font_sizes:"1,2,3,4,5,6,7",theme_advanced_font_selector:"span",theme_advanced_show_current_color:0,readonly:k.settings.readonly},n);if(!n.font_size_style_values){n.font_size_style_values="8pt,10pt,12pt,14pt,18pt,24pt,36pt"}if(h.is(n.theme_advanced_font_sizes,"string")){n.font_size_style_values=h.explode(n.font_size_style_values);n.font_size_classes=h.explode(n.font_size_classes||"");p={};k.settings.theme_advanced_font_sizes=n.theme_advanced_font_sizes;f(k.getParam("theme_advanced_font_sizes","","hash"),function(r,q){var o;if(q==r&&r>=1&&r<=7){q=r+" ("+m.sizes[r-1]+"pt)";o=n.font_size_classes[r-1];r=n.font_size_style_values[r-1]||(m.sizes[r-1]+"pt")}if(/^\s*\./.test(r)){o=r.replace(/\./g,"")}p[q]=o?{"class":o}:{fontSize:r}});n.theme_advanced_font_sizes=p}if((j=n.theme_advanced_path_location)&&j!="none"){n.theme_advanced_statusbar_location=n.theme_advanced_path_location}if(n.theme_advanced_statusbar_location=="none"){n.theme_advanced_statusbar_location=0}if(k.settings.content_css!==false){k.contentCSS.push(k.baseURI.toAbsolute(l+"/skins/"+k.settings.skin+"/content.css"))}k.onInit.add(function(){if(!k.settings.readonly){k.onNodeChange.add(m._nodeChanged,m);k.onKeyUp.add(m._updateUndoStatus,m);k.onMouseUp.add(m._updateUndoStatus,m);k.dom.bind(k.dom.getRoot(),"dragend",function(){m._updateUndoStatus(k)})}});k.onSetProgressState.add(function(r,o,s){var t,u=r.id,q;if(o){m.progressTimer=setTimeout(function(){t=r.getContainer();t=t.insertBefore(i.create("DIV",{style:"position:relative"}),t.firstChild);q=i.get(r.id+"_tbl");i.add(t,"div",{id:u+"_blocker","class":"mceBlocker",style:{width:q.clientWidth+2,height:q.clientHeight+2}});i.add(t,"div",{id:u+"_progress","class":"mceProgress",style:{left:q.clientWidth/2,top:q.clientHeight/2}})},s||0)}else{i.remove(u+"_blocker");i.remove(u+"_progress");clearTimeout(m.progressTimer)}});i.loadCSS(n.editor_css?k.documentBaseURI.toAbsolute(n.editor_css):l+"/skins/"+k.settings.skin+"/ui.css");if(n.skin_variant){i.loadCSS(l+"/skins/"+k.settings.skin+"/ui_"+n.skin_variant+".css")}},_isHighContrast:function(){var j,k=i.add(i.getRoot(),"div",{style:"background-color: rgb(171,239,86);"});j=(i.getStyle(k,"background-color",true)+"").toLowerCase().replace(/ /g,"");i.remove(k);return j!="rgb(171,239,86)"&&j!="#abef56"},createControl:function(m,j){var k,l;if(l=j.createControl(m)){return l}switch(m){case"styleselect":return this._createStyleSelect();case"formatselect":return this._createBlockFormats();case"fontselect":return this._createFontSelect();case"fontsizeselect":return this._createFontSizeSelect();case"forecolor":return this._createForeColorMenu();case"backcolor":return this._createBackColorMenu()}if((k=this.controls[m])){return j.createButton(m,{title:"advanced."+k[0],cmd:k[1],ui:k[2],value:k[3]})}},execCommand:function(l,k,m){var j=this["_"+l];if(j){j.call(this,k,m);return true}return false},_importClasses:function(l){var j=this.editor,k=j.controlManager.get("styleselect");if(k.getLength()==0){f(j.dom.getClasses(),function(q,m){var p="style_"+m,n;n={inline:"span",attributes:{"class":q["class"]},selector:"*"};j.formatter.register(p,n);k.add(q["class"],p,{style:function(){return b(j,n)}})})}},_createStyleSelect:function(o){var l=this,j=l.editor,k=j.controlManager,m;m=k.createListBox("styleselect",{title:"advanced.style_select",onselect:function(q){var r,n=[],p;f(m.items,function(s){n.push(s.value)});j.focus();j.undoManager.add();r=j.formatter.matchAll(n);h.each(r,function(s){if(!q||s==q){if(s){j.formatter.remove(s)}p=true}});if(!p){j.formatter.apply(q)}j.undoManager.add();j.nodeChanged();return false}});j.onPreInit.add(function(){var p=0,n=j.getParam("style_formats");if(n){f(n,function(q){var r,s=0;f(q,function(){s++});if(s>1){r=q.name=q.name||"style_"+(p++);j.formatter.register(r,q);m.add(q.title,r,{style:function(){return b(j,q)}})}else{m.add(q.title)}})}else{f(j.getParam("theme_advanced_styles","","hash"),function(t,s){var r,q;if(t){r="style_"+(p++);q={inline:"span",classes:t,selector:"*"};j.formatter.register(r,q);m.add(l.editor.translate(s),r,{style:function(){return b(j,q)}})}})}});if(m.getLength()==0){m.onPostRender.add(function(p,q){if(!m.NativeListBox){g.add(q.id+"_text","focus",l._importClasses,l);g.add(q.id+"_text","mousedown",l._importClasses,l);g.add(q.id+"_open","focus",l._importClasses,l);g.add(q.id+"_open","mousedown",l._importClasses,l)}else{g.add(q.id,"focus",l._importClasses,l)}})}return m},_createFontSelect:function(){var l,k=this,j=k.editor;l=j.controlManager.createListBox("fontselect",{title:"advanced.fontdefault",onselect:function(m){var n=l.items[l.selectedIndex];if(!m&&n){j.execCommand("FontName",false,n.value);return}j.execCommand("FontName",false,m);l.select(function(o){return m==o});if(n&&n.value==m){l.select(null)}return false}});if(l){f(j.getParam("theme_advanced_fonts",k.settings.theme_advanced_fonts,"hash"),function(n,m){l.add(j.translate(m),n,{style:n.indexOf("dings")==-1?"font-family:"+n:""})})}return l},_createFontSizeSelect:function(){var m=this,k=m.editor,n,l=0,j=[];n=k.controlManager.createListBox("fontsizeselect",{title:"advanced.font_size",onselect:function(o){var p=n.items[n.selectedIndex];if(!o&&p){p=p.value;if(p["class"]){k.formatter.toggle("fontsize_class",{value:p["class"]});k.undoManager.add();k.nodeChanged()}else{k.execCommand("FontSize",false,p.fontSize)}return}if(o["class"]){k.focus();k.undoManager.add();k.formatter.toggle("fontsize_class",{value:o["class"]});k.undoManager.add();k.nodeChanged()}else{k.execCommand("FontSize",false,o.fontSize)}n.select(function(q){return o==q});if(p&&(p.value.fontSize==o.fontSize||p.value["class"]&&p.value["class"]==o["class"])){n.select(null)}return false}});if(n){f(m.settings.theme_advanced_font_sizes,function(p,o){var q=p.fontSize;if(q>=1&&q<=7){q=m.sizes[parseInt(q)-1]+"pt"}n.add(o,p,{style:"font-size:"+q,"class":"mceFontSize"+(l++)+(" "+(p["class"]||""))})})}return n},_createBlockFormats:function(){var l,j={p:"advanced.paragraph",address:"advanced.address",pre:"advanced.pre",h1:"advanced.h1",h2:"advanced.h2",h3:"advanced.h3",h4:"advanced.h4",h5:"advanced.h5",h6:"advanced.h6",div:"advanced.div",blockquote:"advanced.blockquote",code:"advanced.code",dt:"advanced.dt",dd:"advanced.dd",samp:"advanced.samp"},k=this;l=k.editor.controlManager.createListBox("formatselect",{title:"advanced.block",onselect:function(m){k.editor.execCommand("FormatBlock",false,m);return false}});if(l){f(k.editor.getParam("theme_advanced_blockformats",k.settings.theme_advanced_blockformats,"hash"),function(n,m){l.add(k.editor.translate(m!=n?m:j[n]),n,{"class":"mce_formatPreview mce_"+n,style:function(){return b(k.editor,{block:n})}})})}return l},_createForeColorMenu:function(){var n,k=this,l=k.settings,m={},j;if(l.theme_advanced_more_colors){m.more_colors_func=function(){k._mceColorPicker(0,{color:n.value,func:function(o){n.setColor(o)}})}}if(j=l.theme_advanced_text_colors){m.colors=j}if(l.theme_advanced_default_foreground_color){m.default_color=l.theme_advanced_default_foreground_color}m.title="advanced.forecolor_desc";m.cmd="ForeColor";m.scope=this;n=k.editor.controlManager.createColorSplitButton("forecolor",m);return n},_createBackColorMenu:function(){var n,k=this,l=k.settings,m={},j;if(l.theme_advanced_more_colors){m.more_colors_func=function(){k._mceColorPicker(0,{color:n.value,func:function(o){n.setColor(o)}})}}if(j=l.theme_advanced_background_colors){m.colors=j}if(l.theme_advanced_default_background_color){m.default_color=l.theme_advanced_default_background_color}m.title="advanced.backcolor_desc";m.cmd="HiliteColor";m.scope=this;n=k.editor.controlManager.createColorSplitButton("backcolor",m);return n},renderUI:function(l){var q,m,r,w=this,u=w.editor,x=w.settings,v,k,j;if(u.settings){u.settings.aria_label=x.aria_label+u.getLang("advanced.help_shortcut")}q=k=i.create("span",{role:"application","aria-labelledby":u.id+"_voice",id:u.id+"_parent","class":"mceEditor "+u.settings.skin+"Skin"+(x.skin_variant?" "+u.settings.skin+"Skin"+w._ufirst(x.skin_variant):"")+(u.settings.directionality=="rtl"?" mceRtl":"")});i.add(q,"span",{"class":"mceVoiceLabel",style:"display:none;",id:u.id+"_voice"},x.aria_label);if(!i.boxModel){q=i.add(q,"div",{"class":"mceOldBoxModel"})}q=v=i.add(q,"table",{role:"presentation",id:u.id+"_tbl","class":"mceLayout",cellSpacing:0,cellPadding:0});q=r=i.add(q,"tbody");switch((x.theme_advanced_layout_manager||"").toLowerCase()){case"rowlayout":m=w._rowLayout(x,r,l);break;case"customlayout":m=u.execCallback("theme_advanced_custom_layout",x,r,l,k);break;default:m=w._simpleLayout(x,r,l,k)}q=l.targetNode;j=v.rows;i.addClass(j[0],"mceFirst");i.addClass(j[j.length-1],"mceLast");f(i.select("tr",r),function(o){i.addClass(o.firstChild,"mceFirst");i.addClass(o.childNodes[o.childNodes.length-1],"mceLast")});if(i.get(x.theme_advanced_toolbar_container)){i.get(x.theme_advanced_toolbar_container).appendChild(k)}else{i.insertAfter(k,q)}g.add(u.id+"_path_row","click",function(n){n=n.target;if(n.nodeName=="A"){w._sel(n.className.replace(/^.*mcePath_([0-9]+).*$/,"$1"));return false}});if(!u.getParam("accessibility_focus")){g.add(i.add(k,"a",{href:"#"},"<!-- IE -->"),"focus",function(){tinyMCE.get(u.id).focus()})}if(x.theme_advanced_toolbar_location=="external"){l.deltaHeight=0}w.deltaHeight=l.deltaHeight;l.targetNode=null;u.onKeyDown.add(function(p,n){var s=121,o=122;if(n.altKey){if(n.keyCode===s){if(h.isWebKit){window.focus()}w.toolbarGroup.focus();return g.cancel(n)}else{if(n.keyCode===o){i.get(p.id+"_path_row").focus();return g.cancel(n)}}}});u.addShortcut("alt+0","","mceShortcuts",w);return{iframeContainer:m,editorContainer:u.id+"_parent",sizeContainer:v,deltaHeight:l.deltaHeight}},getInfo:function(){return{longname:"Advanced theme",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",version:h.majorVersion+"."+h.minorVersion}},resizeBy:function(j,k){var l=i.get(this.editor.id+"_ifr");this.resizeTo(l.clientWidth+j,l.clientHeight+k)},resizeTo:function(j,n,l){var k=this.editor,m=this.settings,o=i.get(k.id+"_tbl"),p=i.get(k.id+"_ifr");j=Math.max(m.theme_advanced_resizing_min_width||100,j);n=Math.max(m.theme_advanced_resizing_min_height||100,n);j=Math.min(m.theme_advanced_resizing_max_width||65535,j);n=Math.min(m.theme_advanced_resizing_max_height||65535,n);i.setStyle(o,"height","");i.setStyle(p,"height",n);if(m.theme_advanced_resize_horizontal){i.setStyle(o,"width","");i.setStyle(p,"width",j);if(j<o.clientWidth){j=o.clientWidth;i.setStyle(p,"width",o.clientWidth)}}if(l&&m.theme_advanced_resizing_use_cookie){a.setHash("TinyMCE_"+k.id+"_size",{cw:j,ch:n})}},destroy:function(){var j=this.editor.id;g.clear(j+"_resize");g.clear(j+"_path_row");g.clear(j+"_external_close")},_simpleLayout:function(z,u,l,j){var y=this,v=y.editor,w=z.theme_advanced_toolbar_location,q=z.theme_advanced_statusbar_location,m,k,r,x;if(z.readonly){m=i.add(u,"tr");m=k=i.add(m,"td",{"class":"mceIframeContainer"});return k}if(w=="top"){y._addToolbars(u,l)}if(w=="external"){m=x=i.create("div",{style:"position:relative"});m=i.add(m,"div",{id:v.id+"_external","class":"mceExternalToolbar"});i.add(m,"a",{id:v.id+"_external_close",href:"javascript:;","class":"mceExternalClose"});m=i.add(m,"table",{id:v.id+"_tblext",cellSpacing:0,cellPadding:0});r=i.add(m,"tbody");if(j.firstChild.className=="mceOldBoxModel"){j.firstChild.appendChild(x)}else{j.insertBefore(x,j.firstChild)}y._addToolbars(r,l);v.onMouseUp.add(function(){var o=i.get(v.id+"_external");i.show(o);i.hide(e);var n=g.add(v.id+"_external_close","click",function(){i.hide(v.id+"_external");g.remove(v.id+"_external_close","click",n);return false});i.show(o);i.setStyle(o,"top",0-i.getRect(v.id+"_tblext").h-1);i.hide(o);i.show(o);o.style.filter="";e=v.id+"_external";o=null})}if(q=="top"){y._addStatusBar(u,l)}if(!z.theme_advanced_toolbar_container){m=i.add(u,"tr");m=k=i.add(m,"td",{"class":"mceIframeContainer"})}if(w=="bottom"){y._addToolbars(u,l)}if(q=="bottom"){y._addStatusBar(u,l)}return k},_rowLayout:function(x,p,l){var w=this,q=w.editor,v,y,j=q.controlManager,m,k,u,r;v=x.theme_advanced_containers_default_class||"";y=x.theme_advanced_containers_default_align||"center";f(d(x.theme_advanced_containers||""),function(s,o){var n=x["theme_advanced_container_"+s]||"";switch(s.toLowerCase()){case"mceeditor":m=i.add(p,"tr");m=k=i.add(m,"td",{"class":"mceIframeContainer"});break;case"mceelementpath":w._addStatusBar(p,l);break;default:r=(x["theme_advanced_container_"+s+"_align"]||y).toLowerCase();r="mce"+w._ufirst(r);m=i.add(i.add(p,"tr"),"td",{"class":"mceToolbar "+(x["theme_advanced_container_"+s+"_class"]||v)+" "+r||y});u=j.createToolbar("toolbar"+o);w._addControls(n,u);i.setHTML(m,u.renderHTML());l.deltaHeight-=x.theme_advanced_row_height}});return k},_addControls:function(k,j){var l=this,m=l.settings,n,o=l.editor.controlManager;if(m.theme_advanced_disable&&!l._disabled){n={};f(d(m.theme_advanced_disable),function(p){n[p]=1});l._disabled=n}else{n=l._disabled}f(d(k),function(q){var p;if(n&&n[q]){return}if(q=="tablecontrols"){f(["table","|","row_props","cell_props","|","row_before","row_after","delete_row","|","col_before","col_after","delete_col","|","split_cells","merge_cells"],function(r){r=l.createControl(r,o);if(r){j.add(r)}});return}p=l.createControl(q,o);if(p){j.add(p)}})},_addToolbars:function(y,k){var B=this,q,p,u=B.editor,C=B.settings,A,j=u.controlManager,w,l,r=[],z,x,m=false;x=j.createToolbarGroup("toolbargroup",{name:u.getLang("advanced.toolbar"),tab_focus_toolbar:u.getParam("theme_advanced_tab_focus_toolbar")});B.toolbarGroup=x;z=C.theme_advanced_toolbar_align.toLowerCase();z="mce"+B._ufirst(z);l=i.add(i.add(y,"tr",{role:"presentation"}),"td",{"class":"mceToolbar "+z,role:"toolbar"});for(q=1;(A=C["theme_advanced_buttons"+q]);q++){m=true;p=j.createToolbar("toolbar"+q,{"class":"mceToolbarRow"+q});if(C["theme_advanced_buttons"+q+"_add"]){A+=","+C["theme_advanced_buttons"+q+"_add"]}if(C["theme_advanced_buttons"+q+"_add_before"]){A=C["theme_advanced_buttons"+q+"_add_before"]+","+A}B._addControls(A,p);x.add(p);k.deltaHeight-=C.theme_advanced_row_height}if(!m){k.deltaHeight-=C.theme_advanced_row_height}r.push(x.renderHTML());r.push(i.createHTML("a",{href:"#",accesskey:"z",title:u.getLang("advanced.toolbar_focus"),onfocus:"tinyMCE.getInstanceById('"+u.id+"').focus();"},"<!-- IE -->"));i.setHTML(l,r.join(""))},_addStatusBar:function(p,k){var l,w=this,q=w.editor,x=w.settings,j,u,v,m;l=i.add(p,"tr");l=m=i.add(l,"td",{"class":"mceStatusbar"});l=i.add(l,"div",{id:q.id+"_path_row",role:"group","aria-labelledby":q.id+"_path_voice"});if(x.theme_advanced_path){i.add(l,"span",{id:q.id+"_path_voice"},q.translate("advanced.path"));i.add(l,"span",{},": ")}else{i.add(l,"span",{}," ")}if(x.theme_advanced_resizing){i.add(m,"a",{id:q.id+"_resize",href:"javascript:;",onclick:"return false;","class":"mceResize",tabIndex:"-1"});if(x.theme_advanced_resizing_use_cookie){q.onPostRender.add(function(){var n=a.getHash("TinyMCE_"+q.id+"_size"),r=i.get(q.id+"_tbl");if(!n){return}w.resizeTo(n.cw,n.ch)})}q.onPostRender.add(function(){g.add(q.id+"_resize","click",function(n){n.preventDefault()});g.add(q.id+"_resize","mousedown",function(E){var t,r,s,o,D,A,B,G,n,F,y;function z(H){H.preventDefault();n=B+(H.screenX-D);F=G+(H.screenY-A);w.resizeTo(n,F)}function C(H){g.remove(i.doc,"mousemove",t);g.remove(q.getDoc(),"mousemove",r);g.remove(i.doc,"mouseup",s);g.remove(q.getDoc(),"mouseup",o);n=B+(H.screenX-D);F=G+(H.screenY-A);w.resizeTo(n,F,true);q.nodeChanged()}E.preventDefault();D=E.screenX;A=E.screenY;y=i.get(w.editor.id+"_ifr");B=n=y.clientWidth;G=F=y.clientHeight;t=g.add(i.doc,"mousemove",z);r=g.add(q.getDoc(),"mousemove",z);s=g.add(i.doc,"mouseup",C);o=g.add(q.getDoc(),"mouseup",C)})})}k.deltaHeight-=21;l=p=null},_updateUndoStatus:function(k){var j=k.controlManager,l=k.undoManager;j.setDisabled("undo",!l.hasUndo()&&!l.typing);j.setDisabled("redo",!l.hasRedo())},_nodeChanged:function(o,u,E,r,F){var z=this,D,G=0,y,H,A=z.settings,x,l,w,C,m,k,j;h.each(z.stateControls,function(n){u.setActive(n,o.queryCommandState(z.controls[n][1]))});function q(p){var s,n=F.parents,t=p;if(typeof(p)=="string"){t=function(v){return v.nodeName==p}}for(s=0;s<n.length;s++){if(t(n[s])){return n[s]}}}u.setActive("visualaid",o.hasVisual);z._updateUndoStatus(o);u.setDisabled("outdent",!o.queryCommandState("Outdent"));D=q("A");if(H=u.get("link")){H.setDisabled((!D&&r)||(D&&!D.href));H.setActive(!!D&&(!D.name&&!D.id))}if(H=u.get("unlink")){H.setDisabled(!D&&r);H.setActive(!!D&&!D.name&&!D.id)}if(H=u.get("anchor")){H.setActive(!r&&!!D&&(D.name||(D.id&&!D.href)))}D=q("IMG");if(H=u.get("image")){H.setActive(!r&&!!D&&E.className.indexOf("mceItem")==-1)}if(H=u.get("styleselect")){z._importClasses();k=[];f(H.items,function(n){k.push(n.value)});j=o.formatter.matchAll(k);H.select(j[0]);h.each(j,function(p,n){if(n>0){H.mark(p)}})}if(H=u.get("formatselect")){D=q(o.dom.isBlock);if(D){H.select(D.nodeName.toLowerCase())}}q(function(p){if(p.nodeName==="SPAN"){if(!x&&p.className){x=p.className}}if(o.dom.is(p,A.theme_advanced_font_selector)){if(!l&&p.style.fontSize){l=p.style.fontSize}if(!w&&p.style.fontFamily){w=p.style.fontFamily.replace(/[\"\']+/g,"").replace(/^([^,]+).*/,"$1").toLowerCase()}if(!C&&p.style.color){C=p.style.color}if(!m&&p.style.backgroundColor){m=p.style.backgroundColor}}return false});if(H=u.get("fontselect")){H.select(function(n){return n.replace(/^([^,]+).*/,"$1").toLowerCase()==w})}if(H=u.get("fontsizeselect")){if(A.theme_advanced_runtime_fontsize&&!l&&!x){l=o.dom.getStyle(E,"fontSize",true)}H.select(function(n){if(n.fontSize&&n.fontSize===l){return true}if(n["class"]&&n["class"]===x){return true}})}if(A.theme_advanced_show_current_color){function B(p,n){if(H=u.get(p)){if(!n){n=H.settings.default_color}if(n!==H.value){H.displayColor(n)}}}B("forecolor",C);B("backcolor",m)}if(A.theme_advanced_show_current_color){function B(p,n){if(H=u.get(p)){if(!n){n=H.settings.default_color}if(n!==H.value){H.displayColor(n)}}}B("forecolor",C);B("backcolor",m)}if(A.theme_advanced_path&&A.theme_advanced_statusbar_location){D=i.get(o.id+"_path")||i.add(o.id+"_path_row","span",{id:o.id+"_path"});if(z.statusKeyboardNavigation){z.statusKeyboardNavigation.destroy();z.statusKeyboardNavigation=null}i.setHTML(D,"");q(function(I){var p=I.nodeName.toLowerCase(),s,v,t="";if(I.nodeType!=1||p==="br"||I.getAttribute("data-mce-bogus")||i.hasClass(I,"mceItemHidden")||i.hasClass(I,"mceItemRemoved")){return}if(h.isIE&&I.scopeName!=="HTML"&&I.scopeName){p=I.scopeName+":"+p}p=p.replace(/mce\:/g,"");switch(p){case"b":p="strong";break;case"i":p="em";break;case"img":if(y=i.getAttrib(I,"src")){t+="src: "+y+" "}break;case"a":if(y=i.getAttrib(I,"name")){t+="name: "+y+" ";p+="#"+y}if(y=i.getAttrib(I,"href")){t+="href: "+y+" "}break;case"font":if(y=i.getAttrib(I,"face")){t+="font: "+y+" "}if(y=i.getAttrib(I,"size")){t+="size: "+y+" "}if(y=i.getAttrib(I,"color")){t+="color: "+y+" "}break;case"span":if(y=i.getAttrib(I,"style")){t+="style: "+y+" "}break}if(y=i.getAttrib(I,"id")){t+="id: "+y+" "}if(y=I.className){y=y.replace(/\b\s*(webkit|mce|Apple-)\w+\s*\b/g,"");if(y){t+="class: "+y+" ";if(o.dom.isBlock(I)||p=="img"||p=="span"){p+="."+y}}}p=p.replace(/(html:)/g,"");p={name:p,node:I,title:t};z.onResolveName.dispatch(z,p);t=p.title;p=p.name;v=i.create("a",{href:"javascript:;",role:"button",onmousedown:"return false;",title:t,"class":"mcePath_"+(G++)},p);if(D.hasChildNodes()){D.insertBefore(i.create("span",{"aria-hidden":"true"},"\u00a0\u00bb "),D.firstChild);D.insertBefore(v,D.firstChild)}else{D.appendChild(v)}},o.getBody());if(i.select("a",D).length>0){z.statusKeyboardNavigation=new h.ui.KeyboardNavigation({root:o.id+"_path_row",items:i.select("a",D),excludeFromTabOrder:true,onCancel:function(){o.focus()}},i)}}},_sel:function(j){this.editor.execCommand("mceSelectNodeDepth",false,j)},_mceInsertAnchor:function(l,k){var j=this.editor;j.windowManager.open({url:this.url+"/anchor.htm",width:320+parseInt(j.getLang("advanced.anchor_delta_width",0)),height:90+parseInt(j.getLang("advanced.anchor_delta_height",0)),inline:true},{theme_url:this.url})},_mceCharMap:function(){var j=this.editor;j.windowManager.open({url:this.url+"/charmap.htm",width:550+parseInt(j.getLang("advanced.charmap_delta_width",0)),height:265+parseInt(j.getLang("advanced.charmap_delta_height",0)),inline:true},{theme_url:this.url})},_mceHelp:function(){var j=this.editor;j.windowManager.open({url:this.url+"/about.htm",width:480,height:380,inline:true},{theme_url:this.url})},_mceShortcuts:function(){var j=this.editor;j.windowManager.open({url:this.url+"/shortcuts.htm",width:480,height:380,inline:true},{theme_url:this.url})},_mceColorPicker:function(l,k){var j=this.editor;k=k||{};j.windowManager.open({url:this.url+"/color_picker.htm",width:375+parseInt(j.getLang("advanced.colorpicker_delta_width",0)),height:250+parseInt(j.getLang("advanced.colorpicker_delta_height",0)),close_previous:false,inline:true},{input_color:k.color,func:k.func,theme_url:this.url})},_mceCodeEditor:function(k,l){var j=this.editor;j.windowManager.open({url:this.url+"/source_editor.htm",width:parseInt(j.getParam("theme_advanced_source_editor_width",720)),height:parseInt(j.getParam("theme_advanced_source_editor_height",580)),inline:true,resizable:true,maximizable:true},{theme_url:this.url})},_mceImage:function(k,l){var j=this.editor;if(j.dom.getAttrib(j.selection.getNode(),"class","").indexOf("mceItem")!=-1){return}j.windowManager.open({url:this.url+"/image.htm",width:355+parseInt(j.getLang("advanced.image_delta_width",0)),height:275+parseInt(j.getLang("advanced.image_delta_height",0)),inline:true},{theme_url:this.url})},_mceLink:function(k,l){var j=this.editor;j.windowManager.open({url:this.url+"/link.htm",width:310+parseInt(j.getLang("advanced.link_delta_width",0)),height:200+parseInt(j.getLang("advanced.link_delta_height",0)),inline:true},{theme_url:this.url})},_mceNewDocument:function(){var j=this.editor;j.windowManager.confirm("advanced.newdocument",function(k){if(k){j.execCommand("mceSetContent",false,"")}})},_mceForeColor:function(){var j=this;this._mceColorPicker(0,{color:j.fgColor,func:function(k){j.fgColor=k;j.editor.execCommand("ForeColor",false,k)}})},_mceBackColor:function(){var j=this;this._mceColorPicker(0,{color:j.bgColor,func:function(k){j.bgColor=k;j.editor.execCommand("HiliteColor",false,k)}})},_ufirst:function(j){return j.substring(0,1).toUpperCase()+j.substring(1)}});h.ThemeManager.add("advanced",h.themes.AdvancedTheme)}(tinymce));
|
@@ -1,1490 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* editor_template_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 DOM = tinymce.DOM, Event = tinymce.dom.Event, extend = tinymce.extend, each = tinymce.each, Cookie = tinymce.util.Cookie, lastExtID, explode = tinymce.explode;
|
13
|
-
|
14
|
-
// Generates a preview for a format
|
15
|
-
function getPreviewCss(ed, fmt) {
|
16
|
-
var name, previewElm, dom = ed.dom, previewCss = '', parentFontSize, previewStylesName;
|
17
|
-
|
18
|
-
previewStyles = ed.settings.preview_styles;
|
19
|
-
|
20
|
-
// No preview forced
|
21
|
-
if (previewStyles === false)
|
22
|
-
return '';
|
23
|
-
|
24
|
-
// Default preview
|
25
|
-
if (!previewStyles)
|
26
|
-
previewStyles = 'font-family font-size font-weight text-decoration text-transform color background-color';
|
27
|
-
|
28
|
-
// Removes any variables since these can't be previewed
|
29
|
-
function removeVars(val) {
|
30
|
-
return val.replace(/%(\w+)/g, '');
|
31
|
-
};
|
32
|
-
|
33
|
-
// Create block/inline element to use for preview
|
34
|
-
name = fmt.block || fmt.inline || 'span';
|
35
|
-
previewElm = dom.create(name);
|
36
|
-
|
37
|
-
// Add format styles to preview element
|
38
|
-
each(fmt.styles, function(value, name) {
|
39
|
-
value = removeVars(value);
|
40
|
-
|
41
|
-
if (value)
|
42
|
-
dom.setStyle(previewElm, name, value);
|
43
|
-
});
|
44
|
-
|
45
|
-
// Add attributes to preview element
|
46
|
-
each(fmt.attributes, function(value, name) {
|
47
|
-
value = removeVars(value);
|
48
|
-
|
49
|
-
if (value)
|
50
|
-
dom.setAttrib(previewElm, name, value);
|
51
|
-
});
|
52
|
-
|
53
|
-
// Add classes to preview element
|
54
|
-
each(fmt.classes, function(value) {
|
55
|
-
value = removeVars(value);
|
56
|
-
|
57
|
-
if (!dom.hasClass(previewElm, value))
|
58
|
-
dom.addClass(previewElm, value);
|
59
|
-
});
|
60
|
-
|
61
|
-
// Add the previewElm outside the visual area
|
62
|
-
dom.setStyles(previewElm, {position: 'absolute', left: -0xFFFF});
|
63
|
-
ed.getBody().appendChild(previewElm);
|
64
|
-
|
65
|
-
// Get parent container font size so we can compute px values out of em/% for older IE:s
|
66
|
-
parentFontSize = dom.getStyle(ed.getBody(), 'fontSize', true);
|
67
|
-
parentFontSize = /px$/.test(parentFontSize) ? parseInt(parentFontSize, 10) : 0;
|
68
|
-
|
69
|
-
each(previewStyles.split(' '), function(name) {
|
70
|
-
var value = dom.getStyle(previewElm, name, true);
|
71
|
-
|
72
|
-
// If background is transparent then check if the body has a background color we can use
|
73
|
-
if (name == 'background-color' && /transparent|rgba\s*\([^)]+,\s*0\)/.test(value)) {
|
74
|
-
value = dom.getStyle(ed.getBody(), name, true);
|
75
|
-
|
76
|
-
// Ignore white since it's the default color, not the nicest fix
|
77
|
-
if (dom.toHex(value).toLowerCase() == '#ffffff') {
|
78
|
-
return;
|
79
|
-
}
|
80
|
-
}
|
81
|
-
|
82
|
-
// Old IE won't calculate the font size so we need to do that manually
|
83
|
-
if (name == 'font-size') {
|
84
|
-
if (/em|%$/.test(value)) {
|
85
|
-
if (parentFontSize === 0) {
|
86
|
-
return;
|
87
|
-
}
|
88
|
-
|
89
|
-
// Convert font size from em/% to px
|
90
|
-
value = parseFloat(value, 10) / (/%$/.test(value) ? 100 : 1);
|
91
|
-
value = (value * parentFontSize) + 'px';
|
92
|
-
}
|
93
|
-
}
|
94
|
-
|
95
|
-
previewCss += name + ':' + value + ';';
|
96
|
-
});
|
97
|
-
|
98
|
-
dom.remove(previewElm);
|
99
|
-
|
100
|
-
return previewCss;
|
101
|
-
};
|
102
|
-
|
103
|
-
// Tell it to load theme specific language pack(s)
|
104
|
-
tinymce.ThemeManager.requireLangPack('advanced');
|
105
|
-
|
106
|
-
tinymce.create('tinymce.themes.AdvancedTheme', {
|
107
|
-
sizes : [8, 10, 12, 14, 18, 24, 36],
|
108
|
-
|
109
|
-
// Control name lookup, format: title, command
|
110
|
-
controls : {
|
111
|
-
bold : ['bold_desc', 'Bold'],
|
112
|
-
italic : ['italic_desc', 'Italic'],
|
113
|
-
underline : ['underline_desc', 'Underline'],
|
114
|
-
strikethrough : ['striketrough_desc', 'Strikethrough'],
|
115
|
-
justifyleft : ['justifyleft_desc', 'JustifyLeft'],
|
116
|
-
justifycenter : ['justifycenter_desc', 'JustifyCenter'],
|
117
|
-
justifyright : ['justifyright_desc', 'JustifyRight'],
|
118
|
-
justifyfull : ['justifyfull_desc', 'JustifyFull'],
|
119
|
-
bullist : ['bullist_desc', 'InsertUnorderedList'],
|
120
|
-
numlist : ['numlist_desc', 'InsertOrderedList'],
|
121
|
-
outdent : ['outdent_desc', 'Outdent'],
|
122
|
-
indent : ['indent_desc', 'Indent'],
|
123
|
-
cut : ['cut_desc', 'Cut'],
|
124
|
-
copy : ['copy_desc', 'Copy'],
|
125
|
-
paste : ['paste_desc', 'Paste'],
|
126
|
-
undo : ['undo_desc', 'Undo'],
|
127
|
-
redo : ['redo_desc', 'Redo'],
|
128
|
-
link : ['link_desc', 'mceLink'],
|
129
|
-
unlink : ['unlink_desc', 'unlink'],
|
130
|
-
image : ['image_desc', 'mceImage'],
|
131
|
-
cleanup : ['cleanup_desc', 'mceCleanup'],
|
132
|
-
help : ['help_desc', 'mceHelp'],
|
133
|
-
code : ['code_desc', 'mceCodeEditor'],
|
134
|
-
hr : ['hr_desc', 'InsertHorizontalRule'],
|
135
|
-
removeformat : ['removeformat_desc', 'RemoveFormat'],
|
136
|
-
sub : ['sub_desc', 'subscript'],
|
137
|
-
sup : ['sup_desc', 'superscript'],
|
138
|
-
forecolor : ['forecolor_desc', 'ForeColor'],
|
139
|
-
forecolorpicker : ['forecolor_desc', 'mceForeColor'],
|
140
|
-
backcolor : ['backcolor_desc', 'HiliteColor'],
|
141
|
-
backcolorpicker : ['backcolor_desc', 'mceBackColor'],
|
142
|
-
charmap : ['charmap_desc', 'mceCharMap'],
|
143
|
-
visualaid : ['visualaid_desc', 'mceToggleVisualAid'],
|
144
|
-
anchor : ['anchor_desc', 'mceInsertAnchor'],
|
145
|
-
newdocument : ['newdocument_desc', 'mceNewDocument'],
|
146
|
-
blockquote : ['blockquote_desc', 'mceBlockQuote']
|
147
|
-
},
|
148
|
-
|
149
|
-
stateControls : ['bold', 'italic', 'underline', 'strikethrough', 'bullist', 'numlist', 'justifyleft', 'justifycenter', 'justifyright', 'justifyfull', 'sub', 'sup', 'blockquote'],
|
150
|
-
|
151
|
-
init : function(ed, url) {
|
152
|
-
var t = this, s, v, o;
|
153
|
-
|
154
|
-
t.editor = ed;
|
155
|
-
t.url = url;
|
156
|
-
t.onResolveName = new tinymce.util.Dispatcher(this);
|
157
|
-
s = ed.settings;
|
158
|
-
|
159
|
-
ed.forcedHighContrastMode = ed.settings.detect_highcontrast && t._isHighContrast();
|
160
|
-
ed.settings.skin = ed.forcedHighContrastMode ? 'highcontrast' : ed.settings.skin;
|
161
|
-
|
162
|
-
// Setup default buttons
|
163
|
-
if (!s.theme_advanced_buttons1) {
|
164
|
-
s = extend({
|
165
|
-
theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect",
|
166
|
-
theme_advanced_buttons2 : "bullist,numlist,|,outdent,indent,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code",
|
167
|
-
theme_advanced_buttons3 : "hr,removeformat,visualaid,|,sub,sup,|,charmap"
|
168
|
-
}, s);
|
169
|
-
}
|
170
|
-
|
171
|
-
// Default settings
|
172
|
-
t.settings = s = extend({
|
173
|
-
theme_advanced_path : true,
|
174
|
-
theme_advanced_toolbar_location : 'top',
|
175
|
-
theme_advanced_blockformats : "p,address,pre,h1,h2,h3,h4,h5,h6",
|
176
|
-
theme_advanced_toolbar_align : "left",
|
177
|
-
theme_advanced_statusbar_location : "bottom",
|
178
|
-
theme_advanced_fonts : "Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats",
|
179
|
-
theme_advanced_more_colors : 1,
|
180
|
-
theme_advanced_row_height : 23,
|
181
|
-
theme_advanced_resize_horizontal : 1,
|
182
|
-
theme_advanced_resizing_use_cookie : 1,
|
183
|
-
theme_advanced_font_sizes : "1,2,3,4,5,6,7",
|
184
|
-
theme_advanced_font_selector : "span",
|
185
|
-
theme_advanced_show_current_color: 0,
|
186
|
-
readonly : ed.settings.readonly
|
187
|
-
}, s);
|
188
|
-
|
189
|
-
// Setup default font_size_style_values
|
190
|
-
if (!s.font_size_style_values)
|
191
|
-
s.font_size_style_values = "8pt,10pt,12pt,14pt,18pt,24pt,36pt";
|
192
|
-
|
193
|
-
if (tinymce.is(s.theme_advanced_font_sizes, 'string')) {
|
194
|
-
s.font_size_style_values = tinymce.explode(s.font_size_style_values);
|
195
|
-
s.font_size_classes = tinymce.explode(s.font_size_classes || '');
|
196
|
-
|
197
|
-
// Parse string value
|
198
|
-
o = {};
|
199
|
-
ed.settings.theme_advanced_font_sizes = s.theme_advanced_font_sizes;
|
200
|
-
each(ed.getParam('theme_advanced_font_sizes', '', 'hash'), function(v, k) {
|
201
|
-
var cl;
|
202
|
-
|
203
|
-
if (k == v && v >= 1 && v <= 7) {
|
204
|
-
k = v + ' (' + t.sizes[v - 1] + 'pt)';
|
205
|
-
cl = s.font_size_classes[v - 1];
|
206
|
-
v = s.font_size_style_values[v - 1] || (t.sizes[v - 1] + 'pt');
|
207
|
-
}
|
208
|
-
|
209
|
-
if (/^\s*\./.test(v))
|
210
|
-
cl = v.replace(/\./g, '');
|
211
|
-
|
212
|
-
o[k] = cl ? {'class' : cl} : {fontSize : v};
|
213
|
-
});
|
214
|
-
|
215
|
-
s.theme_advanced_font_sizes = o;
|
216
|
-
}
|
217
|
-
|
218
|
-
if ((v = s.theme_advanced_path_location) && v != 'none')
|
219
|
-
s.theme_advanced_statusbar_location = s.theme_advanced_path_location;
|
220
|
-
|
221
|
-
if (s.theme_advanced_statusbar_location == 'none')
|
222
|
-
s.theme_advanced_statusbar_location = 0;
|
223
|
-
|
224
|
-
if (ed.settings.content_css !== false)
|
225
|
-
ed.contentCSS.push(ed.baseURI.toAbsolute(url + "/skins/" + ed.settings.skin + "/content.css"));
|
226
|
-
|
227
|
-
// Init editor
|
228
|
-
ed.onInit.add(function() {
|
229
|
-
if (!ed.settings.readonly) {
|
230
|
-
ed.onNodeChange.add(t._nodeChanged, t);
|
231
|
-
ed.onKeyUp.add(t._updateUndoStatus, t);
|
232
|
-
ed.onMouseUp.add(t._updateUndoStatus, t);
|
233
|
-
ed.dom.bind(ed.dom.getRoot(), 'dragend', function() {
|
234
|
-
t._updateUndoStatus(ed);
|
235
|
-
});
|
236
|
-
}
|
237
|
-
});
|
238
|
-
|
239
|
-
ed.onSetProgressState.add(function(ed, b, ti) {
|
240
|
-
var co, id = ed.id, tb;
|
241
|
-
|
242
|
-
if (b) {
|
243
|
-
t.progressTimer = setTimeout(function() {
|
244
|
-
co = ed.getContainer();
|
245
|
-
co = co.insertBefore(DOM.create('DIV', {style : 'position:relative'}), co.firstChild);
|
246
|
-
tb = DOM.get(ed.id + '_tbl');
|
247
|
-
|
248
|
-
DOM.add(co, 'div', {id : id + '_blocker', 'class' : 'mceBlocker', style : {width : tb.clientWidth + 2, height : tb.clientHeight + 2}});
|
249
|
-
DOM.add(co, 'div', {id : id + '_progress', 'class' : 'mceProgress', style : {left : tb.clientWidth / 2, top : tb.clientHeight / 2}});
|
250
|
-
}, ti || 0);
|
251
|
-
} else {
|
252
|
-
DOM.remove(id + '_blocker');
|
253
|
-
DOM.remove(id + '_progress');
|
254
|
-
clearTimeout(t.progressTimer);
|
255
|
-
}
|
256
|
-
});
|
257
|
-
|
258
|
-
DOM.loadCSS(s.editor_css ? ed.documentBaseURI.toAbsolute(s.editor_css) : url + "/skins/" + ed.settings.skin + "/ui.css");
|
259
|
-
|
260
|
-
if (s.skin_variant)
|
261
|
-
DOM.loadCSS(url + "/skins/" + ed.settings.skin + "/ui_" + s.skin_variant + ".css");
|
262
|
-
},
|
263
|
-
|
264
|
-
_isHighContrast : function() {
|
265
|
-
var actualColor, div = DOM.add(DOM.getRoot(), 'div', {'style': 'background-color: rgb(171,239,86);'});
|
266
|
-
|
267
|
-
actualColor = (DOM.getStyle(div, 'background-color', true) + '').toLowerCase().replace(/ /g, '');
|
268
|
-
DOM.remove(div);
|
269
|
-
|
270
|
-
return actualColor != 'rgb(171,239,86)' && actualColor != '#abef56';
|
271
|
-
},
|
272
|
-
|
273
|
-
createControl : function(n, cf) {
|
274
|
-
var cd, c;
|
275
|
-
|
276
|
-
if (c = cf.createControl(n))
|
277
|
-
return c;
|
278
|
-
|
279
|
-
switch (n) {
|
280
|
-
case "styleselect":
|
281
|
-
return this._createStyleSelect();
|
282
|
-
|
283
|
-
case "formatselect":
|
284
|
-
return this._createBlockFormats();
|
285
|
-
|
286
|
-
case "fontselect":
|
287
|
-
return this._createFontSelect();
|
288
|
-
|
289
|
-
case "fontsizeselect":
|
290
|
-
return this._createFontSizeSelect();
|
291
|
-
|
292
|
-
case "forecolor":
|
293
|
-
return this._createForeColorMenu();
|
294
|
-
|
295
|
-
case "backcolor":
|
296
|
-
return this._createBackColorMenu();
|
297
|
-
}
|
298
|
-
|
299
|
-
if ((cd = this.controls[n]))
|
300
|
-
return cf.createButton(n, {title : "advanced." + cd[0], cmd : cd[1], ui : cd[2], value : cd[3]});
|
301
|
-
},
|
302
|
-
|
303
|
-
execCommand : function(cmd, ui, val) {
|
304
|
-
var f = this['_' + cmd];
|
305
|
-
|
306
|
-
if (f) {
|
307
|
-
f.call(this, ui, val);
|
308
|
-
return true;
|
309
|
-
}
|
310
|
-
|
311
|
-
return false;
|
312
|
-
},
|
313
|
-
|
314
|
-
_importClasses : function(e) {
|
315
|
-
var ed = this.editor, ctrl = ed.controlManager.get('styleselect');
|
316
|
-
|
317
|
-
if (ctrl.getLength() == 0) {
|
318
|
-
each(ed.dom.getClasses(), function(o, idx) {
|
319
|
-
var name = 'style_' + idx, fmt;
|
320
|
-
|
321
|
-
fmt = {
|
322
|
-
inline : 'span',
|
323
|
-
attributes : {'class' : o['class']},
|
324
|
-
selector : '*'
|
325
|
-
};
|
326
|
-
|
327
|
-
ed.formatter.register(name, fmt);
|
328
|
-
|
329
|
-
ctrl.add(o['class'], name, {
|
330
|
-
style: function() {
|
331
|
-
return getPreviewCss(ed, fmt);
|
332
|
-
}
|
333
|
-
});
|
334
|
-
});
|
335
|
-
}
|
336
|
-
},
|
337
|
-
|
338
|
-
_createStyleSelect : function(n) {
|
339
|
-
var t = this, ed = t.editor, ctrlMan = ed.controlManager, ctrl;
|
340
|
-
|
341
|
-
// Setup style select box
|
342
|
-
ctrl = ctrlMan.createListBox('styleselect', {
|
343
|
-
title : 'advanced.style_select',
|
344
|
-
onselect : function(name) {
|
345
|
-
var matches, formatNames = [], removedFormat;
|
346
|
-
|
347
|
-
each(ctrl.items, function(item) {
|
348
|
-
formatNames.push(item.value);
|
349
|
-
});
|
350
|
-
|
351
|
-
ed.focus();
|
352
|
-
ed.undoManager.add();
|
353
|
-
|
354
|
-
// Toggle off the current format(s)
|
355
|
-
matches = ed.formatter.matchAll(formatNames);
|
356
|
-
tinymce.each(matches, function(match) {
|
357
|
-
if (!name || match == name) {
|
358
|
-
if (match)
|
359
|
-
ed.formatter.remove(match);
|
360
|
-
|
361
|
-
removedFormat = true;
|
362
|
-
}
|
363
|
-
});
|
364
|
-
|
365
|
-
if (!removedFormat)
|
366
|
-
ed.formatter.apply(name);
|
367
|
-
|
368
|
-
ed.undoManager.add();
|
369
|
-
ed.nodeChanged();
|
370
|
-
|
371
|
-
return false; // No auto select
|
372
|
-
}
|
373
|
-
});
|
374
|
-
|
375
|
-
// Handle specified format
|
376
|
-
ed.onPreInit.add(function() {
|
377
|
-
var counter = 0, formats = ed.getParam('style_formats');
|
378
|
-
|
379
|
-
if (formats) {
|
380
|
-
each(formats, function(fmt) {
|
381
|
-
var name, keys = 0;
|
382
|
-
|
383
|
-
each(fmt, function() {keys++;});
|
384
|
-
|
385
|
-
if (keys > 1) {
|
386
|
-
name = fmt.name = fmt.name || 'style_' + (counter++);
|
387
|
-
ed.formatter.register(name, fmt);
|
388
|
-
ctrl.add(fmt.title, name, {
|
389
|
-
style: function() {
|
390
|
-
return getPreviewCss(ed, fmt);
|
391
|
-
}
|
392
|
-
});
|
393
|
-
} else
|
394
|
-
ctrl.add(fmt.title);
|
395
|
-
});
|
396
|
-
} else {
|
397
|
-
each(ed.getParam('theme_advanced_styles', '', 'hash'), function(val, key) {
|
398
|
-
var name, fmt;
|
399
|
-
|
400
|
-
if (val) {
|
401
|
-
name = 'style_' + (counter++);
|
402
|
-
fmt = {
|
403
|
-
inline : 'span',
|
404
|
-
classes : val,
|
405
|
-
selector : '*'
|
406
|
-
};
|
407
|
-
|
408
|
-
ed.formatter.register(name, fmt);
|
409
|
-
ctrl.add(t.editor.translate(key), name, {
|
410
|
-
style: function() {
|
411
|
-
return getPreviewCss(ed, fmt);
|
412
|
-
}
|
413
|
-
});
|
414
|
-
}
|
415
|
-
});
|
416
|
-
}
|
417
|
-
});
|
418
|
-
|
419
|
-
// Auto import classes if the ctrl box is empty
|
420
|
-
if (ctrl.getLength() == 0) {
|
421
|
-
ctrl.onPostRender.add(function(ed, n) {
|
422
|
-
if (!ctrl.NativeListBox) {
|
423
|
-
Event.add(n.id + '_text', 'focus', t._importClasses, t);
|
424
|
-
Event.add(n.id + '_text', 'mousedown', t._importClasses, t);
|
425
|
-
Event.add(n.id + '_open', 'focus', t._importClasses, t);
|
426
|
-
Event.add(n.id + '_open', 'mousedown', t._importClasses, t);
|
427
|
-
} else
|
428
|
-
Event.add(n.id, 'focus', t._importClasses, t);
|
429
|
-
});
|
430
|
-
}
|
431
|
-
|
432
|
-
return ctrl;
|
433
|
-
},
|
434
|
-
|
435
|
-
_createFontSelect : function() {
|
436
|
-
var c, t = this, ed = t.editor;
|
437
|
-
|
438
|
-
c = ed.controlManager.createListBox('fontselect', {
|
439
|
-
title : 'advanced.fontdefault',
|
440
|
-
onselect : function(v) {
|
441
|
-
var cur = c.items[c.selectedIndex];
|
442
|
-
|
443
|
-
if (!v && cur) {
|
444
|
-
ed.execCommand('FontName', false, cur.value);
|
445
|
-
return;
|
446
|
-
}
|
447
|
-
|
448
|
-
ed.execCommand('FontName', false, v);
|
449
|
-
|
450
|
-
// Fake selection, execCommand will fire a nodeChange and update the selection
|
451
|
-
c.select(function(sv) {
|
452
|
-
return v == sv;
|
453
|
-
});
|
454
|
-
|
455
|
-
if (cur && cur.value == v) {
|
456
|
-
c.select(null);
|
457
|
-
}
|
458
|
-
|
459
|
-
return false; // No auto select
|
460
|
-
}
|
461
|
-
});
|
462
|
-
|
463
|
-
if (c) {
|
464
|
-
each(ed.getParam('theme_advanced_fonts', t.settings.theme_advanced_fonts, 'hash'), function(v, k) {
|
465
|
-
c.add(ed.translate(k), v, {style : v.indexOf('dings') == -1 ? 'font-family:' + v : ''});
|
466
|
-
});
|
467
|
-
}
|
468
|
-
|
469
|
-
return c;
|
470
|
-
},
|
471
|
-
|
472
|
-
_createFontSizeSelect : function() {
|
473
|
-
var t = this, ed = t.editor, c, i = 0, cl = [];
|
474
|
-
|
475
|
-
c = ed.controlManager.createListBox('fontsizeselect', {title : 'advanced.font_size', onselect : function(v) {
|
476
|
-
var cur = c.items[c.selectedIndex];
|
477
|
-
|
478
|
-
if (!v && cur) {
|
479
|
-
cur = cur.value;
|
480
|
-
|
481
|
-
if (cur['class']) {
|
482
|
-
ed.formatter.toggle('fontsize_class', {value : cur['class']});
|
483
|
-
ed.undoManager.add();
|
484
|
-
ed.nodeChanged();
|
485
|
-
} else {
|
486
|
-
ed.execCommand('FontSize', false, cur.fontSize);
|
487
|
-
}
|
488
|
-
|
489
|
-
return;
|
490
|
-
}
|
491
|
-
|
492
|
-
if (v['class']) {
|
493
|
-
ed.focus();
|
494
|
-
ed.undoManager.add();
|
495
|
-
ed.formatter.toggle('fontsize_class', {value : v['class']});
|
496
|
-
ed.undoManager.add();
|
497
|
-
ed.nodeChanged();
|
498
|
-
} else
|
499
|
-
ed.execCommand('FontSize', false, v.fontSize);
|
500
|
-
|
501
|
-
// Fake selection, execCommand will fire a nodeChange and update the selection
|
502
|
-
c.select(function(sv) {
|
503
|
-
return v == sv;
|
504
|
-
});
|
505
|
-
|
506
|
-
if (cur && (cur.value.fontSize == v.fontSize || cur.value['class'] && cur.value['class'] == v['class'])) {
|
507
|
-
c.select(null);
|
508
|
-
}
|
509
|
-
|
510
|
-
return false; // No auto select
|
511
|
-
}});
|
512
|
-
|
513
|
-
if (c) {
|
514
|
-
each(t.settings.theme_advanced_font_sizes, function(v, k) {
|
515
|
-
var fz = v.fontSize;
|
516
|
-
|
517
|
-
if (fz >= 1 && fz <= 7)
|
518
|
-
fz = t.sizes[parseInt(fz) - 1] + 'pt';
|
519
|
-
|
520
|
-
c.add(k, v, {'style' : 'font-size:' + fz, 'class' : 'mceFontSize' + (i++) + (' ' + (v['class'] || ''))});
|
521
|
-
});
|
522
|
-
}
|
523
|
-
|
524
|
-
return c;
|
525
|
-
},
|
526
|
-
|
527
|
-
_createBlockFormats : function() {
|
528
|
-
var c, fmts = {
|
529
|
-
p : 'advanced.paragraph',
|
530
|
-
address : 'advanced.address',
|
531
|
-
pre : 'advanced.pre',
|
532
|
-
h1 : 'advanced.h1',
|
533
|
-
h2 : 'advanced.h2',
|
534
|
-
h3 : 'advanced.h3',
|
535
|
-
h4 : 'advanced.h4',
|
536
|
-
h5 : 'advanced.h5',
|
537
|
-
h6 : 'advanced.h6',
|
538
|
-
div : 'advanced.div',
|
539
|
-
blockquote : 'advanced.blockquote',
|
540
|
-
code : 'advanced.code',
|
541
|
-
dt : 'advanced.dt',
|
542
|
-
dd : 'advanced.dd',
|
543
|
-
samp : 'advanced.samp'
|
544
|
-
}, t = this;
|
545
|
-
|
546
|
-
c = t.editor.controlManager.createListBox('formatselect', {title : 'advanced.block', onselect : function(v) {
|
547
|
-
t.editor.execCommand('FormatBlock', false, v);
|
548
|
-
return false;
|
549
|
-
}});
|
550
|
-
|
551
|
-
if (c) {
|
552
|
-
each(t.editor.getParam('theme_advanced_blockformats', t.settings.theme_advanced_blockformats, 'hash'), function(v, k) {
|
553
|
-
c.add(t.editor.translate(k != v ? k : fmts[v]), v, {'class' : 'mce_formatPreview mce_' + v, style: function() {
|
554
|
-
return getPreviewCss(t.editor, {block: v});
|
555
|
-
}});
|
556
|
-
});
|
557
|
-
}
|
558
|
-
|
559
|
-
return c;
|
560
|
-
},
|
561
|
-
|
562
|
-
_createForeColorMenu : function() {
|
563
|
-
var c, t = this, s = t.settings, o = {}, v;
|
564
|
-
|
565
|
-
if (s.theme_advanced_more_colors) {
|
566
|
-
o.more_colors_func = function() {
|
567
|
-
t._mceColorPicker(0, {
|
568
|
-
color : c.value,
|
569
|
-
func : function(co) {
|
570
|
-
c.setColor(co);
|
571
|
-
}
|
572
|
-
});
|
573
|
-
};
|
574
|
-
}
|
575
|
-
|
576
|
-
if (v = s.theme_advanced_text_colors)
|
577
|
-
o.colors = v;
|
578
|
-
|
579
|
-
if (s.theme_advanced_default_foreground_color)
|
580
|
-
o.default_color = s.theme_advanced_default_foreground_color;
|
581
|
-
|
582
|
-
o.title = 'advanced.forecolor_desc';
|
583
|
-
o.cmd = 'ForeColor';
|
584
|
-
o.scope = this;
|
585
|
-
|
586
|
-
c = t.editor.controlManager.createColorSplitButton('forecolor', o);
|
587
|
-
|
588
|
-
return c;
|
589
|
-
},
|
590
|
-
|
591
|
-
_createBackColorMenu : function() {
|
592
|
-
var c, t = this, s = t.settings, o = {}, v;
|
593
|
-
|
594
|
-
if (s.theme_advanced_more_colors) {
|
595
|
-
o.more_colors_func = function() {
|
596
|
-
t._mceColorPicker(0, {
|
597
|
-
color : c.value,
|
598
|
-
func : function(co) {
|
599
|
-
c.setColor(co);
|
600
|
-
}
|
601
|
-
});
|
602
|
-
};
|
603
|
-
}
|
604
|
-
|
605
|
-
if (v = s.theme_advanced_background_colors)
|
606
|
-
o.colors = v;
|
607
|
-
|
608
|
-
if (s.theme_advanced_default_background_color)
|
609
|
-
o.default_color = s.theme_advanced_default_background_color;
|
610
|
-
|
611
|
-
o.title = 'advanced.backcolor_desc';
|
612
|
-
o.cmd = 'HiliteColor';
|
613
|
-
o.scope = this;
|
614
|
-
|
615
|
-
c = t.editor.controlManager.createColorSplitButton('backcolor', o);
|
616
|
-
|
617
|
-
return c;
|
618
|
-
},
|
619
|
-
|
620
|
-
renderUI : function(o) {
|
621
|
-
var n, ic, tb, t = this, ed = t.editor, s = t.settings, sc, p, nl;
|
622
|
-
|
623
|
-
if (ed.settings) {
|
624
|
-
ed.settings.aria_label = s.aria_label + ed.getLang('advanced.help_shortcut');
|
625
|
-
}
|
626
|
-
|
627
|
-
// TODO: ACC Should have an aria-describedby attribute which is user-configurable to describe what this field is actually for.
|
628
|
-
// Maybe actually inherit it from the original textara?
|
629
|
-
n = p = DOM.create('span', {role : 'application', 'aria-labelledby' : ed.id + '_voice', id : ed.id + '_parent', 'class' : 'mceEditor ' + ed.settings.skin + 'Skin' + (s.skin_variant ? ' ' + ed.settings.skin + 'Skin' + t._ufirst(s.skin_variant) : '') + (ed.settings.directionality == "rtl" ? ' mceRtl' : '')});
|
630
|
-
DOM.add(n, 'span', {'class': 'mceVoiceLabel', 'style': 'display:none;', id: ed.id + '_voice'}, s.aria_label);
|
631
|
-
|
632
|
-
if (!DOM.boxModel)
|
633
|
-
n = DOM.add(n, 'div', {'class' : 'mceOldBoxModel'});
|
634
|
-
|
635
|
-
n = sc = DOM.add(n, 'table', {role : "presentation", id : ed.id + '_tbl', 'class' : 'mceLayout', cellSpacing : 0, cellPadding : 0});
|
636
|
-
n = tb = DOM.add(n, 'tbody');
|
637
|
-
|
638
|
-
switch ((s.theme_advanced_layout_manager || '').toLowerCase()) {
|
639
|
-
case "rowlayout":
|
640
|
-
ic = t._rowLayout(s, tb, o);
|
641
|
-
break;
|
642
|
-
|
643
|
-
case "customlayout":
|
644
|
-
ic = ed.execCallback("theme_advanced_custom_layout", s, tb, o, p);
|
645
|
-
break;
|
646
|
-
|
647
|
-
default:
|
648
|
-
ic = t._simpleLayout(s, tb, o, p);
|
649
|
-
}
|
650
|
-
|
651
|
-
n = o.targetNode;
|
652
|
-
|
653
|
-
// Add classes to first and last TRs
|
654
|
-
nl = sc.rows;
|
655
|
-
DOM.addClass(nl[0], 'mceFirst');
|
656
|
-
DOM.addClass(nl[nl.length - 1], 'mceLast');
|
657
|
-
|
658
|
-
// Add classes to first and last TDs
|
659
|
-
each(DOM.select('tr', tb), function(n) {
|
660
|
-
DOM.addClass(n.firstChild, 'mceFirst');
|
661
|
-
DOM.addClass(n.childNodes[n.childNodes.length - 1], 'mceLast');
|
662
|
-
});
|
663
|
-
|
664
|
-
if (DOM.get(s.theme_advanced_toolbar_container))
|
665
|
-
DOM.get(s.theme_advanced_toolbar_container).appendChild(p);
|
666
|
-
else
|
667
|
-
DOM.insertAfter(p, n);
|
668
|
-
|
669
|
-
Event.add(ed.id + '_path_row', 'click', function(e) {
|
670
|
-
e = e.target;
|
671
|
-
|
672
|
-
if (e.nodeName == 'A') {
|
673
|
-
t._sel(e.className.replace(/^.*mcePath_([0-9]+).*$/, '$1'));
|
674
|
-
return false;
|
675
|
-
}
|
676
|
-
});
|
677
|
-
/*
|
678
|
-
if (DOM.get(ed.id + '_path_row')) {
|
679
|
-
Event.add(ed.id + '_tbl', 'mouseover', function(e) {
|
680
|
-
var re;
|
681
|
-
|
682
|
-
e = e.target;
|
683
|
-
|
684
|
-
if (e.nodeName == 'SPAN' && DOM.hasClass(e.parentNode, 'mceButton')) {
|
685
|
-
re = DOM.get(ed.id + '_path_row');
|
686
|
-
t.lastPath = re.innerHTML;
|
687
|
-
DOM.setHTML(re, e.parentNode.title);
|
688
|
-
}
|
689
|
-
});
|
690
|
-
|
691
|
-
Event.add(ed.id + '_tbl', 'mouseout', function(e) {
|
692
|
-
if (t.lastPath) {
|
693
|
-
DOM.setHTML(ed.id + '_path_row', t.lastPath);
|
694
|
-
t.lastPath = 0;
|
695
|
-
}
|
696
|
-
});
|
697
|
-
}
|
698
|
-
*/
|
699
|
-
|
700
|
-
if (!ed.getParam('accessibility_focus'))
|
701
|
-
Event.add(DOM.add(p, 'a', {href : '#'}, '<!-- IE -->'), 'focus', function() {tinyMCE.get(ed.id).focus();});
|
702
|
-
|
703
|
-
if (s.theme_advanced_toolbar_location == 'external')
|
704
|
-
o.deltaHeight = 0;
|
705
|
-
|
706
|
-
t.deltaHeight = o.deltaHeight;
|
707
|
-
o.targetNode = null;
|
708
|
-
|
709
|
-
ed.onKeyDown.add(function(ed, evt) {
|
710
|
-
var DOM_VK_F10 = 121, DOM_VK_F11 = 122;
|
711
|
-
|
712
|
-
if (evt.altKey) {
|
713
|
-
if (evt.keyCode === DOM_VK_F10) {
|
714
|
-
// Make sure focus is given to toolbar in Safari.
|
715
|
-
// We can't do this in IE as it prevents giving focus to toolbar when editor is in a frame
|
716
|
-
if (tinymce.isWebKit) {
|
717
|
-
window.focus();
|
718
|
-
}
|
719
|
-
t.toolbarGroup.focus();
|
720
|
-
return Event.cancel(evt);
|
721
|
-
} else if (evt.keyCode === DOM_VK_F11) {
|
722
|
-
DOM.get(ed.id + '_path_row').focus();
|
723
|
-
return Event.cancel(evt);
|
724
|
-
}
|
725
|
-
}
|
726
|
-
});
|
727
|
-
|
728
|
-
// alt+0 is the UK recommended shortcut for accessing the list of access controls.
|
729
|
-
ed.addShortcut('alt+0', '', 'mceShortcuts', t);
|
730
|
-
|
731
|
-
return {
|
732
|
-
iframeContainer : ic,
|
733
|
-
editorContainer : ed.id + '_parent',
|
734
|
-
sizeContainer : sc,
|
735
|
-
deltaHeight : o.deltaHeight
|
736
|
-
};
|
737
|
-
},
|
738
|
-
|
739
|
-
getInfo : function() {
|
740
|
-
return {
|
741
|
-
longname : 'Advanced theme',
|
742
|
-
author : 'Moxiecode Systems AB',
|
743
|
-
authorurl : 'http://tinymce.moxiecode.com',
|
744
|
-
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
745
|
-
}
|
746
|
-
},
|
747
|
-
|
748
|
-
resizeBy : function(dw, dh) {
|
749
|
-
var e = DOM.get(this.editor.id + '_ifr');
|
750
|
-
|
751
|
-
this.resizeTo(e.clientWidth + dw, e.clientHeight + dh);
|
752
|
-
},
|
753
|
-
|
754
|
-
resizeTo : function(w, h, store) {
|
755
|
-
var ed = this.editor, s = this.settings, e = DOM.get(ed.id + '_tbl'), ifr = DOM.get(ed.id + '_ifr');
|
756
|
-
|
757
|
-
// Boundery fix box
|
758
|
-
w = Math.max(s.theme_advanced_resizing_min_width || 100, w);
|
759
|
-
h = Math.max(s.theme_advanced_resizing_min_height || 100, h);
|
760
|
-
w = Math.min(s.theme_advanced_resizing_max_width || 0xFFFF, w);
|
761
|
-
h = Math.min(s.theme_advanced_resizing_max_height || 0xFFFF, h);
|
762
|
-
|
763
|
-
// Resize iframe and container
|
764
|
-
DOM.setStyle(e, 'height', '');
|
765
|
-
DOM.setStyle(ifr, 'height', h);
|
766
|
-
|
767
|
-
if (s.theme_advanced_resize_horizontal) {
|
768
|
-
DOM.setStyle(e, 'width', '');
|
769
|
-
DOM.setStyle(ifr, 'width', w);
|
770
|
-
|
771
|
-
// Make sure that the size is never smaller than the over all ui
|
772
|
-
if (w < e.clientWidth) {
|
773
|
-
w = e.clientWidth;
|
774
|
-
DOM.setStyle(ifr, 'width', e.clientWidth);
|
775
|
-
}
|
776
|
-
}
|
777
|
-
|
778
|
-
// Store away the size
|
779
|
-
if (store && s.theme_advanced_resizing_use_cookie) {
|
780
|
-
Cookie.setHash("TinyMCE_" + ed.id + "_size", {
|
781
|
-
cw : w,
|
782
|
-
ch : h
|
783
|
-
});
|
784
|
-
}
|
785
|
-
},
|
786
|
-
|
787
|
-
destroy : function() {
|
788
|
-
var id = this.editor.id;
|
789
|
-
|
790
|
-
Event.clear(id + '_resize');
|
791
|
-
Event.clear(id + '_path_row');
|
792
|
-
Event.clear(id + '_external_close');
|
793
|
-
},
|
794
|
-
|
795
|
-
// Internal functions
|
796
|
-
|
797
|
-
_simpleLayout : function(s, tb, o, p) {
|
798
|
-
var t = this, ed = t.editor, lo = s.theme_advanced_toolbar_location, sl = s.theme_advanced_statusbar_location, n, ic, etb, c;
|
799
|
-
|
800
|
-
if (s.readonly) {
|
801
|
-
n = DOM.add(tb, 'tr');
|
802
|
-
n = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'});
|
803
|
-
return ic;
|
804
|
-
}
|
805
|
-
|
806
|
-
// Create toolbar container at top
|
807
|
-
if (lo == 'top')
|
808
|
-
t._addToolbars(tb, o);
|
809
|
-
|
810
|
-
// Create external toolbar
|
811
|
-
if (lo == 'external') {
|
812
|
-
n = c = DOM.create('div', {style : 'position:relative'});
|
813
|
-
n = DOM.add(n, 'div', {id : ed.id + '_external', 'class' : 'mceExternalToolbar'});
|
814
|
-
DOM.add(n, 'a', {id : ed.id + '_external_close', href : 'javascript:;', 'class' : 'mceExternalClose'});
|
815
|
-
n = DOM.add(n, 'table', {id : ed.id + '_tblext', cellSpacing : 0, cellPadding : 0});
|
816
|
-
etb = DOM.add(n, 'tbody');
|
817
|
-
|
818
|
-
if (p.firstChild.className == 'mceOldBoxModel')
|
819
|
-
p.firstChild.appendChild(c);
|
820
|
-
else
|
821
|
-
p.insertBefore(c, p.firstChild);
|
822
|
-
|
823
|
-
t._addToolbars(etb, o);
|
824
|
-
|
825
|
-
ed.onMouseUp.add(function() {
|
826
|
-
var e = DOM.get(ed.id + '_external');
|
827
|
-
DOM.show(e);
|
828
|
-
|
829
|
-
DOM.hide(lastExtID);
|
830
|
-
|
831
|
-
var f = Event.add(ed.id + '_external_close', 'click', function() {
|
832
|
-
DOM.hide(ed.id + '_external');
|
833
|
-
Event.remove(ed.id + '_external_close', 'click', f);
|
834
|
-
return false;
|
835
|
-
});
|
836
|
-
|
837
|
-
DOM.show(e);
|
838
|
-
DOM.setStyle(e, 'top', 0 - DOM.getRect(ed.id + '_tblext').h - 1);
|
839
|
-
|
840
|
-
// Fixes IE rendering bug
|
841
|
-
DOM.hide(e);
|
842
|
-
DOM.show(e);
|
843
|
-
e.style.filter = '';
|
844
|
-
|
845
|
-
lastExtID = ed.id + '_external';
|
846
|
-
|
847
|
-
e = null;
|
848
|
-
});
|
849
|
-
}
|
850
|
-
|
851
|
-
if (sl == 'top')
|
852
|
-
t._addStatusBar(tb, o);
|
853
|
-
|
854
|
-
// Create iframe container
|
855
|
-
if (!s.theme_advanced_toolbar_container) {
|
856
|
-
n = DOM.add(tb, 'tr');
|
857
|
-
n = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'});
|
858
|
-
}
|
859
|
-
|
860
|
-
// Create toolbar container at bottom
|
861
|
-
if (lo == 'bottom')
|
862
|
-
t._addToolbars(tb, o);
|
863
|
-
|
864
|
-
if (sl == 'bottom')
|
865
|
-
t._addStatusBar(tb, o);
|
866
|
-
|
867
|
-
return ic;
|
868
|
-
},
|
869
|
-
|
870
|
-
_rowLayout : function(s, tb, o) {
|
871
|
-
var t = this, ed = t.editor, dc, da, cf = ed.controlManager, n, ic, to, a;
|
872
|
-
|
873
|
-
dc = s.theme_advanced_containers_default_class || '';
|
874
|
-
da = s.theme_advanced_containers_default_align || 'center';
|
875
|
-
|
876
|
-
each(explode(s.theme_advanced_containers || ''), function(c, i) {
|
877
|
-
var v = s['theme_advanced_container_' + c] || '';
|
878
|
-
|
879
|
-
switch (c.toLowerCase()) {
|
880
|
-
case 'mceeditor':
|
881
|
-
n = DOM.add(tb, 'tr');
|
882
|
-
n = ic = DOM.add(n, 'td', {'class' : 'mceIframeContainer'});
|
883
|
-
break;
|
884
|
-
|
885
|
-
case 'mceelementpath':
|
886
|
-
t._addStatusBar(tb, o);
|
887
|
-
break;
|
888
|
-
|
889
|
-
default:
|
890
|
-
a = (s['theme_advanced_container_' + c + '_align'] || da).toLowerCase();
|
891
|
-
a = 'mce' + t._ufirst(a);
|
892
|
-
|
893
|
-
n = DOM.add(DOM.add(tb, 'tr'), 'td', {
|
894
|
-
'class' : 'mceToolbar ' + (s['theme_advanced_container_' + c + '_class'] || dc) + ' ' + a || da
|
895
|
-
});
|
896
|
-
|
897
|
-
to = cf.createToolbar("toolbar" + i);
|
898
|
-
t._addControls(v, to);
|
899
|
-
DOM.setHTML(n, to.renderHTML());
|
900
|
-
o.deltaHeight -= s.theme_advanced_row_height;
|
901
|
-
}
|
902
|
-
});
|
903
|
-
|
904
|
-
return ic;
|
905
|
-
},
|
906
|
-
|
907
|
-
_addControls : function(v, tb) {
|
908
|
-
var t = this, s = t.settings, di, cf = t.editor.controlManager;
|
909
|
-
|
910
|
-
if (s.theme_advanced_disable && !t._disabled) {
|
911
|
-
di = {};
|
912
|
-
|
913
|
-
each(explode(s.theme_advanced_disable), function(v) {
|
914
|
-
di[v] = 1;
|
915
|
-
});
|
916
|
-
|
917
|
-
t._disabled = di;
|
918
|
-
} else
|
919
|
-
di = t._disabled;
|
920
|
-
|
921
|
-
each(explode(v), function(n) {
|
922
|
-
var c;
|
923
|
-
|
924
|
-
if (di && di[n])
|
925
|
-
return;
|
926
|
-
|
927
|
-
// Compatiblity with 2.x
|
928
|
-
if (n == 'tablecontrols') {
|
929
|
-
each(["table","|","row_props","cell_props","|","row_before","row_after","delete_row","|","col_before","col_after","delete_col","|","split_cells","merge_cells"], function(n) {
|
930
|
-
n = t.createControl(n, cf);
|
931
|
-
|
932
|
-
if (n)
|
933
|
-
tb.add(n);
|
934
|
-
});
|
935
|
-
|
936
|
-
return;
|
937
|
-
}
|
938
|
-
|
939
|
-
c = t.createControl(n, cf);
|
940
|
-
|
941
|
-
if (c)
|
942
|
-
tb.add(c);
|
943
|
-
});
|
944
|
-
},
|
945
|
-
|
946
|
-
_addToolbars : function(c, o) {
|
947
|
-
var t = this, i, tb, ed = t.editor, s = t.settings, v, cf = ed.controlManager, di, n, h = [], a, toolbarGroup, toolbarsExist = false;
|
948
|
-
|
949
|
-
toolbarGroup = cf.createToolbarGroup('toolbargroup', {
|
950
|
-
'name': ed.getLang('advanced.toolbar'),
|
951
|
-
'tab_focus_toolbar':ed.getParam('theme_advanced_tab_focus_toolbar')
|
952
|
-
});
|
953
|
-
|
954
|
-
t.toolbarGroup = toolbarGroup;
|
955
|
-
|
956
|
-
a = s.theme_advanced_toolbar_align.toLowerCase();
|
957
|
-
a = 'mce' + t._ufirst(a);
|
958
|
-
|
959
|
-
n = DOM.add(DOM.add(c, 'tr', {role: 'presentation'}), 'td', {'class' : 'mceToolbar ' + a, "role":"toolbar"});
|
960
|
-
|
961
|
-
// Create toolbar and add the controls
|
962
|
-
for (i=1; (v = s['theme_advanced_buttons' + i]); i++) {
|
963
|
-
toolbarsExist = true;
|
964
|
-
tb = cf.createToolbar("toolbar" + i, {'class' : 'mceToolbarRow' + i});
|
965
|
-
|
966
|
-
if (s['theme_advanced_buttons' + i + '_add'])
|
967
|
-
v += ',' + s['theme_advanced_buttons' + i + '_add'];
|
968
|
-
|
969
|
-
if (s['theme_advanced_buttons' + i + '_add_before'])
|
970
|
-
v = s['theme_advanced_buttons' + i + '_add_before'] + ',' + v;
|
971
|
-
|
972
|
-
t._addControls(v, tb);
|
973
|
-
toolbarGroup.add(tb);
|
974
|
-
|
975
|
-
o.deltaHeight -= s.theme_advanced_row_height;
|
976
|
-
}
|
977
|
-
// Handle case when there are no toolbar buttons and ensure editor height is adjusted accordingly
|
978
|
-
if (!toolbarsExist)
|
979
|
-
o.deltaHeight -= s.theme_advanced_row_height;
|
980
|
-
h.push(toolbarGroup.renderHTML());
|
981
|
-
h.push(DOM.createHTML('a', {href : '#', accesskey : 'z', title : ed.getLang("advanced.toolbar_focus"), onfocus : 'tinyMCE.getInstanceById(\'' + ed.id + '\').focus();'}, '<!-- IE -->'));
|
982
|
-
DOM.setHTML(n, h.join(''));
|
983
|
-
},
|
984
|
-
|
985
|
-
_addStatusBar : function(tb, o) {
|
986
|
-
var n, t = this, ed = t.editor, s = t.settings, r, mf, me, td;
|
987
|
-
|
988
|
-
n = DOM.add(tb, 'tr');
|
989
|
-
n = td = DOM.add(n, 'td', {'class' : 'mceStatusbar'});
|
990
|
-
n = DOM.add(n, 'div', {id : ed.id + '_path_row', 'role': 'group', 'aria-labelledby': ed.id + '_path_voice'});
|
991
|
-
if (s.theme_advanced_path) {
|
992
|
-
DOM.add(n, 'span', {id: ed.id + '_path_voice'}, ed.translate('advanced.path'));
|
993
|
-
DOM.add(n, 'span', {}, ': ');
|
994
|
-
} else {
|
995
|
-
DOM.add(n, 'span', {}, ' ');
|
996
|
-
}
|
997
|
-
|
998
|
-
|
999
|
-
if (s.theme_advanced_resizing) {
|
1000
|
-
DOM.add(td, 'a', {id : ed.id + '_resize', href : 'javascript:;', onclick : "return false;", 'class' : 'mceResize', tabIndex:"-1"});
|
1001
|
-
|
1002
|
-
if (s.theme_advanced_resizing_use_cookie) {
|
1003
|
-
ed.onPostRender.add(function() {
|
1004
|
-
var o = Cookie.getHash("TinyMCE_" + ed.id + "_size"), c = DOM.get(ed.id + '_tbl');
|
1005
|
-
|
1006
|
-
if (!o)
|
1007
|
-
return;
|
1008
|
-
|
1009
|
-
t.resizeTo(o.cw, o.ch);
|
1010
|
-
});
|
1011
|
-
}
|
1012
|
-
|
1013
|
-
ed.onPostRender.add(function() {
|
1014
|
-
Event.add(ed.id + '_resize', 'click', function(e) {
|
1015
|
-
e.preventDefault();
|
1016
|
-
});
|
1017
|
-
|
1018
|
-
Event.add(ed.id + '_resize', 'mousedown', function(e) {
|
1019
|
-
var mouseMoveHandler1, mouseMoveHandler2,
|
1020
|
-
mouseUpHandler1, mouseUpHandler2,
|
1021
|
-
startX, startY, startWidth, startHeight, width, height, ifrElm;
|
1022
|
-
|
1023
|
-
function resizeOnMove(e) {
|
1024
|
-
e.preventDefault();
|
1025
|
-
|
1026
|
-
width = startWidth + (e.screenX - startX);
|
1027
|
-
height = startHeight + (e.screenY - startY);
|
1028
|
-
|
1029
|
-
t.resizeTo(width, height);
|
1030
|
-
};
|
1031
|
-
|
1032
|
-
function endResize(e) {
|
1033
|
-
// Stop listening
|
1034
|
-
Event.remove(DOM.doc, 'mousemove', mouseMoveHandler1);
|
1035
|
-
Event.remove(ed.getDoc(), 'mousemove', mouseMoveHandler2);
|
1036
|
-
Event.remove(DOM.doc, 'mouseup', mouseUpHandler1);
|
1037
|
-
Event.remove(ed.getDoc(), 'mouseup', mouseUpHandler2);
|
1038
|
-
|
1039
|
-
width = startWidth + (e.screenX - startX);
|
1040
|
-
height = startHeight + (e.screenY - startY);
|
1041
|
-
t.resizeTo(width, height, true);
|
1042
|
-
|
1043
|
-
ed.nodeChanged();
|
1044
|
-
};
|
1045
|
-
|
1046
|
-
e.preventDefault();
|
1047
|
-
|
1048
|
-
// Get the current rect size
|
1049
|
-
startX = e.screenX;
|
1050
|
-
startY = e.screenY;
|
1051
|
-
ifrElm = DOM.get(t.editor.id + '_ifr');
|
1052
|
-
startWidth = width = ifrElm.clientWidth;
|
1053
|
-
startHeight = height = ifrElm.clientHeight;
|
1054
|
-
|
1055
|
-
// Register envent handlers
|
1056
|
-
mouseMoveHandler1 = Event.add(DOM.doc, 'mousemove', resizeOnMove);
|
1057
|
-
mouseMoveHandler2 = Event.add(ed.getDoc(), 'mousemove', resizeOnMove);
|
1058
|
-
mouseUpHandler1 = Event.add(DOM.doc, 'mouseup', endResize);
|
1059
|
-
mouseUpHandler2 = Event.add(ed.getDoc(), 'mouseup', endResize);
|
1060
|
-
});
|
1061
|
-
});
|
1062
|
-
}
|
1063
|
-
|
1064
|
-
o.deltaHeight -= 21;
|
1065
|
-
n = tb = null;
|
1066
|
-
},
|
1067
|
-
|
1068
|
-
_updateUndoStatus : function(ed) {
|
1069
|
-
var cm = ed.controlManager, um = ed.undoManager;
|
1070
|
-
|
1071
|
-
cm.setDisabled('undo', !um.hasUndo() && !um.typing);
|
1072
|
-
cm.setDisabled('redo', !um.hasRedo());
|
1073
|
-
},
|
1074
|
-
|
1075
|
-
_nodeChanged : function(ed, cm, n, co, ob) {
|
1076
|
-
var t = this, p, de = 0, v, c, s = t.settings, cl, fz, fn, fc, bc, formatNames, matches;
|
1077
|
-
|
1078
|
-
tinymce.each(t.stateControls, function(c) {
|
1079
|
-
cm.setActive(c, ed.queryCommandState(t.controls[c][1]));
|
1080
|
-
});
|
1081
|
-
|
1082
|
-
function getParent(name) {
|
1083
|
-
var i, parents = ob.parents, func = name;
|
1084
|
-
|
1085
|
-
if (typeof(name) == 'string') {
|
1086
|
-
func = function(node) {
|
1087
|
-
return node.nodeName == name;
|
1088
|
-
};
|
1089
|
-
}
|
1090
|
-
|
1091
|
-
for (i = 0; i < parents.length; i++) {
|
1092
|
-
if (func(parents[i]))
|
1093
|
-
return parents[i];
|
1094
|
-
}
|
1095
|
-
};
|
1096
|
-
|
1097
|
-
cm.setActive('visualaid', ed.hasVisual);
|
1098
|
-
t._updateUndoStatus(ed);
|
1099
|
-
cm.setDisabled('outdent', !ed.queryCommandState('Outdent'));
|
1100
|
-
|
1101
|
-
p = getParent('A');
|
1102
|
-
if (c = cm.get('link')) {
|
1103
|
-
c.setDisabled((!p && co) || (p && !p.href));
|
1104
|
-
c.setActive(!!p && (!p.name && !p.id));
|
1105
|
-
}
|
1106
|
-
|
1107
|
-
if (c = cm.get('unlink')) {
|
1108
|
-
c.setDisabled(!p && co);
|
1109
|
-
c.setActive(!!p && !p.name && !p.id);
|
1110
|
-
}
|
1111
|
-
|
1112
|
-
if (c = cm.get('anchor')) {
|
1113
|
-
c.setActive(!co && !!p && (p.name || (p.id && !p.href)));
|
1114
|
-
}
|
1115
|
-
|
1116
|
-
p = getParent('IMG');
|
1117
|
-
if (c = cm.get('image'))
|
1118
|
-
c.setActive(!co && !!p && n.className.indexOf('mceItem') == -1);
|
1119
|
-
|
1120
|
-
if (c = cm.get('styleselect')) {
|
1121
|
-
t._importClasses();
|
1122
|
-
|
1123
|
-
formatNames = [];
|
1124
|
-
each(c.items, function(item) {
|
1125
|
-
formatNames.push(item.value);
|
1126
|
-
});
|
1127
|
-
|
1128
|
-
matches = ed.formatter.matchAll(formatNames);
|
1129
|
-
c.select(matches[0]);
|
1130
|
-
tinymce.each(matches, function(match, index) {
|
1131
|
-
if (index > 0) {
|
1132
|
-
c.mark(match);
|
1133
|
-
}
|
1134
|
-
});
|
1135
|
-
}
|
1136
|
-
|
1137
|
-
if (c = cm.get('formatselect')) {
|
1138
|
-
p = getParent(ed.dom.isBlock);
|
1139
|
-
|
1140
|
-
if (p)
|
1141
|
-
c.select(p.nodeName.toLowerCase());
|
1142
|
-
}
|
1143
|
-
|
1144
|
-
// Find out current fontSize, fontFamily and fontClass
|
1145
|
-
getParent(function(n) {
|
1146
|
-
if (n.nodeName === 'SPAN') {
|
1147
|
-
if (!cl && n.className)
|
1148
|
-
cl = n.className;
|
1149
|
-
}
|
1150
|
-
|
1151
|
-
if (ed.dom.is(n, s.theme_advanced_font_selector)) {
|
1152
|
-
if (!fz && n.style.fontSize)
|
1153
|
-
fz = n.style.fontSize;
|
1154
|
-
|
1155
|
-
if (!fn && n.style.fontFamily)
|
1156
|
-
fn = n.style.fontFamily.replace(/[\"\']+/g, '').replace(/^([^,]+).*/, '$1').toLowerCase();
|
1157
|
-
|
1158
|
-
if (!fc && n.style.color)
|
1159
|
-
fc = n.style.color;
|
1160
|
-
|
1161
|
-
if (!bc && n.style.backgroundColor)
|
1162
|
-
bc = n.style.backgroundColor;
|
1163
|
-
}
|
1164
|
-
|
1165
|
-
return false;
|
1166
|
-
});
|
1167
|
-
|
1168
|
-
if (c = cm.get('fontselect')) {
|
1169
|
-
c.select(function(v) {
|
1170
|
-
return v.replace(/^([^,]+).*/, '$1').toLowerCase() == fn;
|
1171
|
-
});
|
1172
|
-
}
|
1173
|
-
|
1174
|
-
// Select font size
|
1175
|
-
if (c = cm.get('fontsizeselect')) {
|
1176
|
-
// Use computed style
|
1177
|
-
if (s.theme_advanced_runtime_fontsize && !fz && !cl)
|
1178
|
-
fz = ed.dom.getStyle(n, 'fontSize', true);
|
1179
|
-
|
1180
|
-
c.select(function(v) {
|
1181
|
-
if (v.fontSize && v.fontSize === fz)
|
1182
|
-
return true;
|
1183
|
-
|
1184
|
-
if (v['class'] && v['class'] === cl)
|
1185
|
-
return true;
|
1186
|
-
});
|
1187
|
-
}
|
1188
|
-
|
1189
|
-
if (s.theme_advanced_show_current_color) {
|
1190
|
-
function updateColor(controlId, color) {
|
1191
|
-
if (c = cm.get(controlId)) {
|
1192
|
-
if (!color)
|
1193
|
-
color = c.settings.default_color;
|
1194
|
-
if (color !== c.value) {
|
1195
|
-
c.displayColor(color);
|
1196
|
-
}
|
1197
|
-
}
|
1198
|
-
}
|
1199
|
-
updateColor('forecolor', fc);
|
1200
|
-
updateColor('backcolor', bc);
|
1201
|
-
}
|
1202
|
-
|
1203
|
-
if (s.theme_advanced_show_current_color) {
|
1204
|
-
function updateColor(controlId, color) {
|
1205
|
-
if (c = cm.get(controlId)) {
|
1206
|
-
if (!color)
|
1207
|
-
color = c.settings.default_color;
|
1208
|
-
if (color !== c.value) {
|
1209
|
-
c.displayColor(color);
|
1210
|
-
}
|
1211
|
-
}
|
1212
|
-
};
|
1213
|
-
|
1214
|
-
updateColor('forecolor', fc);
|
1215
|
-
updateColor('backcolor', bc);
|
1216
|
-
}
|
1217
|
-
|
1218
|
-
if (s.theme_advanced_path && s.theme_advanced_statusbar_location) {
|
1219
|
-
p = DOM.get(ed.id + '_path') || DOM.add(ed.id + '_path_row', 'span', {id : ed.id + '_path'});
|
1220
|
-
|
1221
|
-
if (t.statusKeyboardNavigation) {
|
1222
|
-
t.statusKeyboardNavigation.destroy();
|
1223
|
-
t.statusKeyboardNavigation = null;
|
1224
|
-
}
|
1225
|
-
|
1226
|
-
DOM.setHTML(p, '');
|
1227
|
-
|
1228
|
-
getParent(function(n) {
|
1229
|
-
var na = n.nodeName.toLowerCase(), u, pi, ti = '';
|
1230
|
-
|
1231
|
-
// Ignore non element and bogus/hidden elements
|
1232
|
-
if (n.nodeType != 1 || na === 'br' || n.getAttribute('data-mce-bogus') || DOM.hasClass(n, 'mceItemHidden') || DOM.hasClass(n, 'mceItemRemoved'))
|
1233
|
-
return;
|
1234
|
-
|
1235
|
-
// Handle prefix
|
1236
|
-
if (tinymce.isIE && n.scopeName !== 'HTML' && n.scopeName)
|
1237
|
-
na = n.scopeName + ':' + na;
|
1238
|
-
|
1239
|
-
// Remove internal prefix
|
1240
|
-
na = na.replace(/mce\:/g, '');
|
1241
|
-
|
1242
|
-
// Handle node name
|
1243
|
-
switch (na) {
|
1244
|
-
case 'b':
|
1245
|
-
na = 'strong';
|
1246
|
-
break;
|
1247
|
-
|
1248
|
-
case 'i':
|
1249
|
-
na = 'em';
|
1250
|
-
break;
|
1251
|
-
|
1252
|
-
case 'img':
|
1253
|
-
if (v = DOM.getAttrib(n, 'src'))
|
1254
|
-
ti += 'src: ' + v + ' ';
|
1255
|
-
|
1256
|
-
break;
|
1257
|
-
|
1258
|
-
case 'a':
|
1259
|
-
if (v = DOM.getAttrib(n, 'name')) {
|
1260
|
-
ti += 'name: ' + v + ' ';
|
1261
|
-
na += '#' + v;
|
1262
|
-
}
|
1263
|
-
|
1264
|
-
if (v = DOM.getAttrib(n, 'href'))
|
1265
|
-
ti += 'href: ' + v + ' ';
|
1266
|
-
|
1267
|
-
break;
|
1268
|
-
|
1269
|
-
case 'font':
|
1270
|
-
if (v = DOM.getAttrib(n, 'face'))
|
1271
|
-
ti += 'font: ' + v + ' ';
|
1272
|
-
|
1273
|
-
if (v = DOM.getAttrib(n, 'size'))
|
1274
|
-
ti += 'size: ' + v + ' ';
|
1275
|
-
|
1276
|
-
if (v = DOM.getAttrib(n, 'color'))
|
1277
|
-
ti += 'color: ' + v + ' ';
|
1278
|
-
|
1279
|
-
break;
|
1280
|
-
|
1281
|
-
case 'span':
|
1282
|
-
if (v = DOM.getAttrib(n, 'style'))
|
1283
|
-
ti += 'style: ' + v + ' ';
|
1284
|
-
|
1285
|
-
break;
|
1286
|
-
}
|
1287
|
-
|
1288
|
-
if (v = DOM.getAttrib(n, 'id'))
|
1289
|
-
ti += 'id: ' + v + ' ';
|
1290
|
-
|
1291
|
-
if (v = n.className) {
|
1292
|
-
v = v.replace(/\b\s*(webkit|mce|Apple-)\w+\s*\b/g, '');
|
1293
|
-
|
1294
|
-
if (v) {
|
1295
|
-
ti += 'class: ' + v + ' ';
|
1296
|
-
|
1297
|
-
if (ed.dom.isBlock(n) || na == 'img' || na == 'span')
|
1298
|
-
na += '.' + v;
|
1299
|
-
}
|
1300
|
-
}
|
1301
|
-
|
1302
|
-
na = na.replace(/(html:)/g, '');
|
1303
|
-
na = {name : na, node : n, title : ti};
|
1304
|
-
t.onResolveName.dispatch(t, na);
|
1305
|
-
ti = na.title;
|
1306
|
-
na = na.name;
|
1307
|
-
|
1308
|
-
//u = "javascript:tinymce.EditorManager.get('" + ed.id + "').theme._sel('" + (de++) + "');";
|
1309
|
-
pi = DOM.create('a', {'href' : "javascript:;", role: 'button', onmousedown : "return false;", title : ti, 'class' : 'mcePath_' + (de++)}, na);
|
1310
|
-
|
1311
|
-
if (p.hasChildNodes()) {
|
1312
|
-
p.insertBefore(DOM.create('span', {'aria-hidden': 'true'}, '\u00a0\u00bb '), p.firstChild);
|
1313
|
-
p.insertBefore(pi, p.firstChild);
|
1314
|
-
} else
|
1315
|
-
p.appendChild(pi);
|
1316
|
-
}, ed.getBody());
|
1317
|
-
|
1318
|
-
if (DOM.select('a', p).length > 0) {
|
1319
|
-
t.statusKeyboardNavigation = new tinymce.ui.KeyboardNavigation({
|
1320
|
-
root: ed.id + "_path_row",
|
1321
|
-
items: DOM.select('a', p),
|
1322
|
-
excludeFromTabOrder: true,
|
1323
|
-
onCancel: function() {
|
1324
|
-
ed.focus();
|
1325
|
-
}
|
1326
|
-
}, DOM);
|
1327
|
-
}
|
1328
|
-
}
|
1329
|
-
},
|
1330
|
-
|
1331
|
-
// Commands gets called by execCommand
|
1332
|
-
|
1333
|
-
_sel : function(v) {
|
1334
|
-
this.editor.execCommand('mceSelectNodeDepth', false, v);
|
1335
|
-
},
|
1336
|
-
|
1337
|
-
_mceInsertAnchor : function(ui, v) {
|
1338
|
-
var ed = this.editor;
|
1339
|
-
|
1340
|
-
ed.windowManager.open({
|
1341
|
-
url : this.url + '/anchor.htm',
|
1342
|
-
width : 320 + parseInt(ed.getLang('advanced.anchor_delta_width', 0)),
|
1343
|
-
height : 90 + parseInt(ed.getLang('advanced.anchor_delta_height', 0)),
|
1344
|
-
inline : true
|
1345
|
-
}, {
|
1346
|
-
theme_url : this.url
|
1347
|
-
});
|
1348
|
-
},
|
1349
|
-
|
1350
|
-
_mceCharMap : function() {
|
1351
|
-
var ed = this.editor;
|
1352
|
-
|
1353
|
-
ed.windowManager.open({
|
1354
|
-
url : this.url + '/charmap.htm',
|
1355
|
-
width : 550 + parseInt(ed.getLang('advanced.charmap_delta_width', 0)),
|
1356
|
-
height : 265 + parseInt(ed.getLang('advanced.charmap_delta_height', 0)),
|
1357
|
-
inline : true
|
1358
|
-
}, {
|
1359
|
-
theme_url : this.url
|
1360
|
-
});
|
1361
|
-
},
|
1362
|
-
|
1363
|
-
_mceHelp : function() {
|
1364
|
-
var ed = this.editor;
|
1365
|
-
|
1366
|
-
ed.windowManager.open({
|
1367
|
-
url : this.url + '/about.htm',
|
1368
|
-
width : 480,
|
1369
|
-
height : 380,
|
1370
|
-
inline : true
|
1371
|
-
}, {
|
1372
|
-
theme_url : this.url
|
1373
|
-
});
|
1374
|
-
},
|
1375
|
-
|
1376
|
-
_mceShortcuts : function() {
|
1377
|
-
var ed = this.editor;
|
1378
|
-
ed.windowManager.open({
|
1379
|
-
url: this.url + '/shortcuts.htm',
|
1380
|
-
width: 480,
|
1381
|
-
height: 380,
|
1382
|
-
inline: true
|
1383
|
-
}, {
|
1384
|
-
theme_url: this.url
|
1385
|
-
});
|
1386
|
-
},
|
1387
|
-
|
1388
|
-
_mceColorPicker : function(u, v) {
|
1389
|
-
var ed = this.editor;
|
1390
|
-
|
1391
|
-
v = v || {};
|
1392
|
-
|
1393
|
-
ed.windowManager.open({
|
1394
|
-
url : this.url + '/color_picker.htm',
|
1395
|
-
width : 375 + parseInt(ed.getLang('advanced.colorpicker_delta_width', 0)),
|
1396
|
-
height : 250 + parseInt(ed.getLang('advanced.colorpicker_delta_height', 0)),
|
1397
|
-
close_previous : false,
|
1398
|
-
inline : true
|
1399
|
-
}, {
|
1400
|
-
input_color : v.color,
|
1401
|
-
func : v.func,
|
1402
|
-
theme_url : this.url
|
1403
|
-
});
|
1404
|
-
},
|
1405
|
-
|
1406
|
-
_mceCodeEditor : function(ui, val) {
|
1407
|
-
var ed = this.editor;
|
1408
|
-
|
1409
|
-
ed.windowManager.open({
|
1410
|
-
url : this.url + '/source_editor.htm',
|
1411
|
-
width : parseInt(ed.getParam("theme_advanced_source_editor_width", 720)),
|
1412
|
-
height : parseInt(ed.getParam("theme_advanced_source_editor_height", 580)),
|
1413
|
-
inline : true,
|
1414
|
-
resizable : true,
|
1415
|
-
maximizable : true
|
1416
|
-
}, {
|
1417
|
-
theme_url : this.url
|
1418
|
-
});
|
1419
|
-
},
|
1420
|
-
|
1421
|
-
_mceImage : function(ui, val) {
|
1422
|
-
var ed = this.editor;
|
1423
|
-
|
1424
|
-
// Internal image object like a flash placeholder
|
1425
|
-
if (ed.dom.getAttrib(ed.selection.getNode(), 'class', '').indexOf('mceItem') != -1)
|
1426
|
-
return;
|
1427
|
-
|
1428
|
-
ed.windowManager.open({
|
1429
|
-
url : this.url + '/image.htm',
|
1430
|
-
width : 355 + parseInt(ed.getLang('advanced.image_delta_width', 0)),
|
1431
|
-
height : 275 + parseInt(ed.getLang('advanced.image_delta_height', 0)),
|
1432
|
-
inline : true
|
1433
|
-
}, {
|
1434
|
-
theme_url : this.url
|
1435
|
-
});
|
1436
|
-
},
|
1437
|
-
|
1438
|
-
_mceLink : function(ui, val) {
|
1439
|
-
var ed = this.editor;
|
1440
|
-
|
1441
|
-
ed.windowManager.open({
|
1442
|
-
url : this.url + '/link.htm',
|
1443
|
-
width : 310 + parseInt(ed.getLang('advanced.link_delta_width', 0)),
|
1444
|
-
height : 200 + parseInt(ed.getLang('advanced.link_delta_height', 0)),
|
1445
|
-
inline : true
|
1446
|
-
}, {
|
1447
|
-
theme_url : this.url
|
1448
|
-
});
|
1449
|
-
},
|
1450
|
-
|
1451
|
-
_mceNewDocument : function() {
|
1452
|
-
var ed = this.editor;
|
1453
|
-
|
1454
|
-
ed.windowManager.confirm('advanced.newdocument', function(s) {
|
1455
|
-
if (s)
|
1456
|
-
ed.execCommand('mceSetContent', false, '');
|
1457
|
-
});
|
1458
|
-
},
|
1459
|
-
|
1460
|
-
_mceForeColor : function() {
|
1461
|
-
var t = this;
|
1462
|
-
|
1463
|
-
this._mceColorPicker(0, {
|
1464
|
-
color: t.fgColor,
|
1465
|
-
func : function(co) {
|
1466
|
-
t.fgColor = co;
|
1467
|
-
t.editor.execCommand('ForeColor', false, co);
|
1468
|
-
}
|
1469
|
-
});
|
1470
|
-
},
|
1471
|
-
|
1472
|
-
_mceBackColor : function() {
|
1473
|
-
var t = this;
|
1474
|
-
|
1475
|
-
this._mceColorPicker(0, {
|
1476
|
-
color: t.bgColor,
|
1477
|
-
func : function(co) {
|
1478
|
-
t.bgColor = co;
|
1479
|
-
t.editor.execCommand('HiliteColor', false, co);
|
1480
|
-
}
|
1481
|
-
});
|
1482
|
-
},
|
1483
|
-
|
1484
|
-
_ufirst : function(s) {
|
1485
|
-
return s.substring(0, 1).toUpperCase() + s.substring(1);
|
1486
|
-
}
|
1487
|
-
});
|
1488
|
-
|
1489
|
-
tinymce.ThemeManager.add('advanced', tinymce.themes.AdvancedTheme);
|
1490
|
-
}(tinymce));
|