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,17 +0,0 @@
|
|
1
|
-
#id, #name, #hspace, #vspace, #class_name, #align { width: 100px }
|
2
|
-
#hspace, #vspace { width: 50px }
|
3
|
-
#flash_quality, #flash_align, #flash_scale, #flash_salign, #flash_wmode { width: 100px }
|
4
|
-
#flash_base, #flash_flashvars, #html5_altsource1, #html5_altsource2, #html5_poster { width: 240px }
|
5
|
-
#width, #height { width: 40px }
|
6
|
-
#src, #media_type { width: 250px }
|
7
|
-
#class { width: 120px }
|
8
|
-
#prev { margin: 0; border: 1px solid black; width: 380px; height: 260px; overflow: auto }
|
9
|
-
.panel_wrapper div.current { height: 420px; overflow: auto }
|
10
|
-
#flash_options, #shockwave_options, #qt_options, #wmp_options, #rmp_options { display: none }
|
11
|
-
.mceAddSelectValue { background-color: #DDDDDD }
|
12
|
-
#qt_starttime, #qt_endtime, #qt_fov, #qt_href, #qt_moveid, #qt_moviename, #qt_node, #qt_pan, #qt_qtsrc, #qt_qtsrcchokespeed, #qt_target, #qt_tilt, #qt_urlsubstituten, #qt_volume { width: 70px }
|
13
|
-
#wmp_balance, #wmp_baseurl, #wmp_captioningid, #wmp_currentmarker, #wmp_currentposition, #wmp_defaultframe, #wmp_playcount, #wmp_rate, #wmp_uimode, #wmp_volume { width: 70px }
|
14
|
-
#rmp_console, #rmp_numloop, #rmp_controls, #rmp_scriptcallbacks { width: 70px }
|
15
|
-
#shockwave_swvolume, #shockwave_swframe, #shockwave_swurl, #shockwave_swstretchvalign, #shockwave_swstretchhalign, #shockwave_swstretchstyle { width: 90px }
|
16
|
-
#qt_qtsrc { width: 200px }
|
17
|
-
iframe {border: 1px solid gray}
|
@@ -1 +0,0 @@
|
|
1
|
-
(function(){var b=tinymce.explode("id,name,width,height,style,align,class,hspace,vspace,bgcolor,type"),a=tinymce.makeMap(b.join(",")),f=tinymce.html.Node,d,i,h=tinymce.util.JSON,g;d=[["Flash","d27cdb6e-ae6d-11cf-96b8-444553540000","application/x-shockwave-flash","http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"],["ShockWave","166b1bca-3f9c-11cf-8075-444553540000","application/x-director","http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0"],["WindowsMedia","6bf52a52-394a-11d3-b153-00c04f79faa6,22d6f312-b0f6-11d0-94ab-0080c74c7e95,05589fa1-c356-11ce-bf01-00aa0055595a","application/x-mplayer2","http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"],["QuickTime","02bf25d5-8c17-4b23-bc80-d3488abddc6b","video/quicktime","http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0"],["RealMedia","cfcdaa03-8be4-11cf-b84b-0020afbbccfa","audio/x-pn-realaudio-plugin","http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"],["Java","8ad9c840-044e-11d1-b3e9-00805f499d93","application/x-java-applet","http://java.sun.com/products/plugin/autodl/jinstall-1_5_0-windows-i586.cab#Version=1,5,0,0"],["Silverlight","dfeaf541-f3e1-4c24-acac-99c30715084a","application/x-silverlight-2"],["Iframe"],["Video"],["EmbeddedAudio"],["Audio"]];function e(j){return typeof(j)=="string"?j.replace(/[^0-9%]/g,""):j}function c(m){var l,j,k;if(m&&!m.splice){j=[];for(k=0;true;k++){if(m[k]){j[k]=m[k]}else{break}}return j}return m}tinymce.create("tinymce.plugins.MediaPlugin",{init:function(n,j){var r=this,l={},m,p,q,k;function o(s){return s&&s.nodeName==="IMG"&&n.dom.hasClass(s,"mceItemMedia")}r.editor=n;r.url=j;i="";for(m=0;m<d.length;m++){k=d[m][0];q={name:k,clsids:tinymce.explode(d[m][1]||""),mimes:tinymce.explode(d[m][2]||""),codebase:d[m][3]};for(p=0;p<q.clsids.length;p++){l["clsid:"+q.clsids[p]]=q}for(p=0;p<q.mimes.length;p++){l[q.mimes[p]]=q}l["mceItem"+k]=q;l[k.toLowerCase()]=q;i+=(i?"|":"")+k}tinymce.each(n.getParam("media_types","video=mp4,m4v,ogv,webm;silverlight=xap;flash=swf,flv;shockwave=dcr;quicktime=mov,qt,mpg,mpeg;shockwave=dcr;windowsmedia=avi,wmv,wm,asf,asx,wmx,wvx;realmedia=rm,ra,ram;java=jar;audio=mp3,ogg").split(";"),function(v){var s,u,t;v=v.split(/=/);u=tinymce.explode(v[1].toLowerCase());for(s=0;s<u.length;s++){t=l[v[0].toLowerCase()];if(t){l[u[s]]=t}}});i=new RegExp("write("+i+")\\(([^)]+)\\)");r.lookup=l;n.onPreInit.add(function(){n.schema.addValidElements("object[id|style|width|height|classid|codebase|*],param[name|value],embed[id|style|width|height|type|src|*],video[*],audio[*],source[*]");n.parser.addNodeFilter("object,embed,video,audio,script,iframe",function(s){var t=s.length;while(t--){r.objectToImg(s[t])}});n.serializer.addNodeFilter("img",function(s,u,t){var v=s.length,w;while(v--){w=s[v];if((w.attr("class")||"").indexOf("mceItemMedia")!==-1){r.imgToObject(w,t)}}})});n.onInit.add(function(){if(n.theme&&n.theme.onResolveName){n.theme.onResolveName.add(function(s,t){if(t.name==="img"&&n.dom.hasClass(t.node,"mceItemMedia")){t.name="media"}})}if(n&&n.plugins.contextmenu){n.plugins.contextmenu.onContextMenu.add(function(t,u,s){if(s.nodeName==="IMG"&&s.className.indexOf("mceItemMedia")!==-1){u.add({title:"media.edit",icon:"media",cmd:"mceMedia"})}})}});n.addCommand("mceMedia",function(){var t,s;s=n.selection.getNode();if(o(s)){t=n.dom.getAttrib(s,"data-mce-json");if(t){t=h.parse(t);tinymce.each(b,function(u){var v=n.dom.getAttrib(s,u);if(v){t[u]=v}});t.type=r.getType(s.className).name.toLowerCase()}}if(!t){t={type:"flash",video:{sources:[]},params:{}}}n.windowManager.open({file:j+"/media.htm",width:430+parseInt(n.getLang("media.delta_width",0)),height:500+parseInt(n.getLang("media.delta_height",0)),inline:1},{plugin_url:j,data:t})});n.addButton("media",{title:"media.desc",cmd:"mceMedia"});n.onNodeChange.add(function(t,s,u){s.setActive("media",o(u))})},convertUrl:function(l,o){var k=this,n=k.editor,m=n.settings,p=m.url_converter,j=m.url_converter_scope||k;if(!l){return l}if(o){return n.documentBaseURI.toAbsolute(l)}return p.call(j,l,"src","object")},getInfo:function(){return{longname:"Media",author:"Moxiecode Systems AB",authorurl:"http://tinymce.moxiecode.com",infourl:"http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/media",version:tinymce.majorVersion+"."+tinymce.minorVersion}},dataToImg:function(m,k){var r=this,o=r.editor,p=o.documentBaseURI,j,q,n,l;m.params.src=r.convertUrl(m.params.src,k);q=m.video.attrs;if(q){q.src=r.convertUrl(q.src,k)}if(q){q.poster=r.convertUrl(q.poster,k)}j=c(m.video.sources);if(j){for(l=0;l<j.length;l++){j[l].src=r.convertUrl(j[l].src,k)}}n=r.editor.dom.create("img",{id:m.id,style:m.style,align:m.align,hspace:m.hspace,vspace:m.vspace,src:r.editor.theme.url+"/img/trans.gif","class":"mceItemMedia mceItem"+r.getType(m.type).name,"data-mce-json":h.serialize(m,"'")});n.width=m.width=e(m.width||(m.type=="audio"?"300":"320"));n.height=m.height=e(m.height||(m.type=="audio"?"32":"240"));return n},dataToHtml:function(j,k){return this.editor.serializer.serialize(this.dataToImg(j,k),{forced_root_block:"",force_absolute:k})},htmlToData:function(l){var k,j,m;m={type:"flash",video:{sources:[]},params:{}};k=this.editor.parser.parse(l);j=k.getAll("img")[0];if(j){m=h.parse(j.attr("data-mce-json"));m.type=this.getType(j.attr("class")).name.toLowerCase();tinymce.each(b,function(n){var o=j.attr(n);if(o){m[n]=o}})}return m},getType:function(m){var k,j,l;j=tinymce.explode(m," ");for(k=0;k<j.length;k++){l=this.lookup[j[k]];if(l){return l}}},imgToObject:function(z,o){var u=this,p=u.editor,C,H,j,t,I,y,G,w,k,E,s,q,A,D,m,x,l,B,F;function r(n,J){var N,M,O,L,K;K=p.getParam("flash_video_player_url",u.convertUrl(u.url+"/moxieplayer.swf"));if(K){N=p.documentBaseURI;G.params.src=K;if(p.getParam("flash_video_player_absvideourl",true)){n=N.toAbsolute(n||"",true);J=N.toAbsolute(J||"",true)}O="";M=p.getParam("flash_video_player_flashvars",{url:"$url",poster:"$poster"});tinymce.each(M,function(Q,P){Q=Q.replace(/\$url/,n||"");Q=Q.replace(/\$poster/,J||"");if(Q.length>0){O+=(O?"&":"")+P+"="+escape(Q)}});if(O.length){G.params.flashvars=O}L=p.getParam("flash_video_player_params",{allowfullscreen:true,allowscriptaccess:true});tinymce.each(L,function(Q,P){G.params[P]=""+Q})}}G=z.attr("data-mce-json");if(!G){return}G=h.parse(G);q=this.getType(z.attr("class"));B=z.attr("data-mce-style");if(!B){B=z.attr("style");if(B){B=p.dom.serializeStyle(p.dom.parseStyle(B,"img"))}}G.width=z.attr("width")||G.width;G.height=z.attr("height")||G.height;if(q.name==="Iframe"){x=new f("iframe",1);tinymce.each(b,function(n){var J=z.attr(n);if(n=="class"&&J){J=J.replace(/mceItem.+ ?/g,"")}if(J&&J.length>0){x.attr(n,J)}});for(I in G.params){x.attr(I,G.params[I])}x.attr({style:B,src:G.params.src});z.replace(x);return}if(this.editor.settings.media_use_script){x=new f("script",1).attr("type","text/javascript");y=new f("#text",3);y.value="write"+q.name+"("+h.serialize(tinymce.extend(G.params,{width:z.attr("width"),height:z.attr("height")}))+");";x.append(y);z.replace(x);return}if(q.name==="Video"&&G.video.sources[0]){C=new f("video",1).attr(tinymce.extend({id:z.attr("id"),width:e(z.attr("width")),height:e(z.attr("height")),style:B},G.video.attrs));if(G.video.attrs){l=G.video.attrs.poster}k=G.video.sources=c(G.video.sources);for(A=0;A<k.length;A++){if(/\.mp4$/.test(k[A].src)){m=k[A].src}}if(!k[0].type){C.attr("src",k[0].src);k.splice(0,1)}for(A=0;A<k.length;A++){w=new f("source",1).attr(k[A]);w.shortEnded=true;C.append(w)}if(m){r(m,l);q=u.getType("flash")}else{G.params.src=""}}if(q.name==="Audio"&&G.video.sources[0]){F=new f("audio",1).attr(tinymce.extend({id:z.attr("id"),width:e(z.attr("width")),height:e(z.attr("height")),style:B},G.video.attrs));if(G.video.attrs){l=G.video.attrs.poster}k=G.video.sources=c(G.video.sources);if(!k[0].type){F.attr("src",k[0].src);k.splice(0,1)}for(A=0;A<k.length;A++){w=new f("source",1).attr(k[A]);w.shortEnded=true;F.append(w)}G.params.src=""}if(q.name==="EmbeddedAudio"){j=new f("embed",1);j.shortEnded=true;j.attr({id:z.attr("id"),width:e(z.attr("width")),height:e(z.attr("height")),style:B,type:z.attr("type")});for(I in G.params){j.attr(I,G.params[I])}tinymce.each(b,function(n){if(G[n]&&n!="type"){j.attr(n,G[n])}});G.params.src=""}if(G.params.src){if(/\.flv$/i.test(G.params.src)){r(G.params.src,"")}if(o&&o.force_absolute){G.params.src=p.documentBaseURI.toAbsolute(G.params.src)}H=new f("object",1).attr({id:z.attr("id"),width:e(z.attr("width")),height:e(z.attr("height")),style:B});tinymce.each(b,function(n){var J=G[n];if(n=="class"&&J){J=J.replace(/mceItem.+ ?/g,"")}if(J&&n!="type"){H.attr(n,J)}});for(I in G.params){s=new f("param",1);s.shortEnded=true;y=G.params[I];if(I==="src"&&q.name==="WindowsMedia"){I="url"}s.attr({name:I,value:y});H.append(s)}if(this.editor.getParam("media_strict",true)){H.attr({data:G.params.src,type:q.mimes[0]})}else{H.attr({classid:"clsid:"+q.clsids[0],codebase:q.codebase});j=new f("embed",1);j.shortEnded=true;j.attr({id:z.attr("id"),width:e(z.attr("width")),height:e(z.attr("height")),style:B,type:q.mimes[0]});for(I in G.params){j.attr(I,G.params[I])}tinymce.each(b,function(n){if(G[n]&&n!="type"){j.attr(n,G[n])}});H.append(j)}if(G.object_html){y=new f("#text",3);y.raw=true;y.value=G.object_html;H.append(y)}if(C){C.append(H)}}if(C){if(G.video_html){y=new f("#text",3);y.raw=true;y.value=G.video_html;C.append(y)}}if(F){if(G.video_html){y=new f("#text",3);y.raw=true;y.value=G.video_html;F.append(y)}}var v=C||F||H||j;if(v){z.replace(v)}else{z.remove()}},objectToImg:function(C){var L,k,F,s,M,N,y,A,x,G,E,t,q,I,B,l,K,o,H=this.lookup,m,z,v=this.editor.settings.url_converter,n=this.editor.settings.url_converter_scope,w,r,D,j;function u(O){return new tinymce.html.Serializer({inner:true,validate:false}).serialize(O)}function J(P,O){return H[(P.attr(O)||"").toLowerCase()]}function p(P){var O=P.replace(/^.*\.([^.]+)$/,"$1");return H[O.toLowerCase()||""]}if(!C.parent){return}if(C.name==="script"){if(C.firstChild){m=i.exec(C.firstChild.value)}if(!m){return}o=m[1];K={video:{},params:h.parse(m[2])};A=K.params.width;x=K.params.height}K=K||{video:{},params:{}};M=new f("img",1);M.attr({src:this.editor.theme.url+"/img/trans.gif"});N=C.name;if(N==="video"||N=="audio"){F=C;L=C.getAll("object")[0];k=C.getAll("embed")[0];A=F.attr("width");x=F.attr("height");y=F.attr("id");K.video={attrs:{},sources:[]};z=K.video.attrs;for(N in F.attributes.map){z[N]=F.attributes.map[N]}B=C.attr("src");if(B){K.video.sources.push({src:v.call(n,B,"src",C.name)})}l=F.getAll("source");for(E=0;E<l.length;E++){B=l[E].remove();K.video.sources.push({src:v.call(n,B.attr("src"),"src","source"),type:B.attr("type"),media:B.attr("media")})}if(z.poster){z.poster=v.call(n,z.poster,"poster",C.name)}}if(C.name==="object"){L=C;k=C.getAll("embed")[0]}if(C.name==="embed"){k=C}if(C.name==="iframe"){s=C;o="Iframe"}if(L){A=A||L.attr("width");x=x||L.attr("height");G=G||L.attr("style");y=y||L.attr("id");w=w||L.attr("hspace");r=r||L.attr("vspace");D=D||L.attr("align");j=j||L.attr("bgcolor");K.name=L.attr("name");I=L.getAll("param");for(E=0;E<I.length;E++){q=I[E];N=q.remove().attr("name");if(!a[N]){K.params[N]=q.attr("value")}}K.params.src=K.params.src||L.attr("data")}if(k){A=A||k.attr("width");x=x||k.attr("height");G=G||k.attr("style");y=y||k.attr("id");w=w||k.attr("hspace");r=r||k.attr("vspace");D=D||k.attr("align");j=j||k.attr("bgcolor");for(N in k.attributes.map){if(!a[N]&&!K.params[N]){K.params[N]=k.attributes.map[N]}}}if(s){A=e(s.attr("width"));x=e(s.attr("height"));G=G||s.attr("style");y=s.attr("id");w=s.attr("hspace");r=s.attr("vspace");D=s.attr("align");j=s.attr("bgcolor");tinymce.each(b,function(O){M.attr(O,s.attr(O))});for(N in s.attributes.map){if(!a[N]&&!K.params[N]){K.params[N]=s.attributes.map[N]}}}if(K.params.movie){K.params.src=K.params.src||K.params.movie;delete K.params.movie}if(K.params.src){K.params.src=v.call(n,K.params.src,"src","object")}if(F){if(C.name==="video"){o=H.video.name}else{if(C.name==="audio"){o=H.audio.name}}}if(L&&!o){o=(J(L,"clsid")||J(L,"classid")||J(L,"type")||{}).name}if(k&&!o){o=(J(k,"type")||p(K.params.src)||{}).name}if(k&&o=="EmbeddedAudio"){K.params.type=k.attr("type")}C.replace(M);if(k){k.remove()}if(L){t=u(L.remove());if(t){K.object_html=t}}if(F){t=u(F.remove());if(t){K.video_html=t}}K.hspace=w;K.vspace=r;K.align=D;K.bgcolor=j;M.attr({id:y,"class":"mceItemMedia mceItem"+(o||"Flash"),style:G,width:A||(C.name=="audio"?"300":"320"),height:x||(C.name=="audio"?"32":"240"),hspace:w,vspace:r,align:D,bgcolor:j,"data-mce-json":h.serialize(K,"'")})}});tinymce.PluginManager.add("media",tinymce.plugins.MediaPlugin)})();
|
@@ -1,898 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* editor_plugin_src.js
|
3
|
-
*
|
4
|
-
* Copyright 2009, Moxiecode Systems AB
|
5
|
-
* Released under LGPL License.
|
6
|
-
*
|
7
|
-
* License: http://tinymce.moxiecode.com/license
|
8
|
-
* Contributing: http://tinymce.moxiecode.com/contributing
|
9
|
-
*/
|
10
|
-
|
11
|
-
(function() {
|
12
|
-
var rootAttributes = tinymce.explode('id,name,width,height,style,align,class,hspace,vspace,bgcolor,type'), excludedAttrs = tinymce.makeMap(rootAttributes.join(',')), Node = tinymce.html.Node,
|
13
|
-
mediaTypes, scriptRegExp, JSON = tinymce.util.JSON, mimeTypes;
|
14
|
-
|
15
|
-
// Media types supported by this plugin
|
16
|
-
mediaTypes = [
|
17
|
-
// Type, clsid:s, mime types, codebase
|
18
|
-
["Flash", "d27cdb6e-ae6d-11cf-96b8-444553540000", "application/x-shockwave-flash", "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"],
|
19
|
-
["ShockWave", "166b1bca-3f9c-11cf-8075-444553540000", "application/x-director", "http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,1,0"],
|
20
|
-
["WindowsMedia", "6bf52a52-394a-11d3-b153-00c04f79faa6,22d6f312-b0f6-11d0-94ab-0080c74c7e95,05589fa1-c356-11ce-bf01-00aa0055595a", "application/x-mplayer2", "http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"],
|
21
|
-
["QuickTime", "02bf25d5-8c17-4b23-bc80-d3488abddc6b", "video/quicktime", "http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0"],
|
22
|
-
["RealMedia", "cfcdaa03-8be4-11cf-b84b-0020afbbccfa", "audio/x-pn-realaudio-plugin", "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"],
|
23
|
-
["Java", "8ad9c840-044e-11d1-b3e9-00805f499d93", "application/x-java-applet", "http://java.sun.com/products/plugin/autodl/jinstall-1_5_0-windows-i586.cab#Version=1,5,0,0"],
|
24
|
-
["Silverlight", "dfeaf541-f3e1-4c24-acac-99c30715084a", "application/x-silverlight-2"],
|
25
|
-
["Iframe"],
|
26
|
-
["Video"],
|
27
|
-
["EmbeddedAudio"],
|
28
|
-
["Audio"]
|
29
|
-
];
|
30
|
-
|
31
|
-
function normalizeSize(size) {
|
32
|
-
return typeof(size) == "string" ? size.replace(/[^0-9%]/g, '') : size;
|
33
|
-
}
|
34
|
-
|
35
|
-
function toArray(obj) {
|
36
|
-
var undef, out, i;
|
37
|
-
|
38
|
-
if (obj && !obj.splice) {
|
39
|
-
out = [];
|
40
|
-
|
41
|
-
for (i = 0; true; i++) {
|
42
|
-
if (obj[i])
|
43
|
-
out[i] = obj[i];
|
44
|
-
else
|
45
|
-
break;
|
46
|
-
}
|
47
|
-
|
48
|
-
return out;
|
49
|
-
}
|
50
|
-
|
51
|
-
return obj;
|
52
|
-
};
|
53
|
-
|
54
|
-
tinymce.create('tinymce.plugins.MediaPlugin', {
|
55
|
-
init : function(ed, url) {
|
56
|
-
var self = this, lookup = {}, i, y, item, name;
|
57
|
-
|
58
|
-
function isMediaImg(node) {
|
59
|
-
return node && node.nodeName === 'IMG' && ed.dom.hasClass(node, 'mceItemMedia');
|
60
|
-
};
|
61
|
-
|
62
|
-
self.editor = ed;
|
63
|
-
self.url = url;
|
64
|
-
|
65
|
-
// Parse media types into a lookup table
|
66
|
-
scriptRegExp = '';
|
67
|
-
for (i = 0; i < mediaTypes.length; i++) {
|
68
|
-
name = mediaTypes[i][0];
|
69
|
-
|
70
|
-
item = {
|
71
|
-
name : name,
|
72
|
-
clsids : tinymce.explode(mediaTypes[i][1] || ''),
|
73
|
-
mimes : tinymce.explode(mediaTypes[i][2] || ''),
|
74
|
-
codebase : mediaTypes[i][3]
|
75
|
-
};
|
76
|
-
|
77
|
-
for (y = 0; y < item.clsids.length; y++)
|
78
|
-
lookup['clsid:' + item.clsids[y]] = item;
|
79
|
-
|
80
|
-
for (y = 0; y < item.mimes.length; y++)
|
81
|
-
lookup[item.mimes[y]] = item;
|
82
|
-
|
83
|
-
lookup['mceItem' + name] = item;
|
84
|
-
lookup[name.toLowerCase()] = item;
|
85
|
-
|
86
|
-
scriptRegExp += (scriptRegExp ? '|' : '') + name;
|
87
|
-
}
|
88
|
-
|
89
|
-
// Handle the media_types setting
|
90
|
-
tinymce.each(ed.getParam("media_types",
|
91
|
-
"video=mp4,m4v,ogv,webm;" +
|
92
|
-
"silverlight=xap;" +
|
93
|
-
"flash=swf,flv;" +
|
94
|
-
"shockwave=dcr;" +
|
95
|
-
"quicktime=mov,qt,mpg,mpeg;" +
|
96
|
-
"shockwave=dcr;" +
|
97
|
-
"windowsmedia=avi,wmv,wm,asf,asx,wmx,wvx;" +
|
98
|
-
"realmedia=rm,ra,ram;" +
|
99
|
-
"java=jar;" +
|
100
|
-
"audio=mp3,ogg"
|
101
|
-
).split(';'), function(item) {
|
102
|
-
var i, extensions, type;
|
103
|
-
|
104
|
-
item = item.split(/=/);
|
105
|
-
extensions = tinymce.explode(item[1].toLowerCase());
|
106
|
-
for (i = 0; i < extensions.length; i++) {
|
107
|
-
type = lookup[item[0].toLowerCase()];
|
108
|
-
|
109
|
-
if (type)
|
110
|
-
lookup[extensions[i]] = type;
|
111
|
-
}
|
112
|
-
});
|
113
|
-
|
114
|
-
scriptRegExp = new RegExp('write(' + scriptRegExp + ')\\(([^)]+)\\)');
|
115
|
-
self.lookup = lookup;
|
116
|
-
|
117
|
-
ed.onPreInit.add(function() {
|
118
|
-
// Allow video elements
|
119
|
-
ed.schema.addValidElements('object[id|style|width|height|classid|codebase|*],param[name|value],embed[id|style|width|height|type|src|*],video[*],audio[*],source[*]');
|
120
|
-
|
121
|
-
// Convert video elements to image placeholder
|
122
|
-
ed.parser.addNodeFilter('object,embed,video,audio,script,iframe', function(nodes) {
|
123
|
-
var i = nodes.length;
|
124
|
-
|
125
|
-
while (i--)
|
126
|
-
self.objectToImg(nodes[i]);
|
127
|
-
});
|
128
|
-
|
129
|
-
// Convert image placeholders to video elements
|
130
|
-
ed.serializer.addNodeFilter('img', function(nodes, name, args) {
|
131
|
-
var i = nodes.length, node;
|
132
|
-
|
133
|
-
while (i--) {
|
134
|
-
node = nodes[i];
|
135
|
-
if ((node.attr('class') || '').indexOf('mceItemMedia') !== -1)
|
136
|
-
self.imgToObject(node, args);
|
137
|
-
}
|
138
|
-
});
|
139
|
-
});
|
140
|
-
|
141
|
-
ed.onInit.add(function() {
|
142
|
-
// Display "media" instead of "img" in element path
|
143
|
-
if (ed.theme && ed.theme.onResolveName) {
|
144
|
-
ed.theme.onResolveName.add(function(theme, path_object) {
|
145
|
-
if (path_object.name === 'img' && ed.dom.hasClass(path_object.node, 'mceItemMedia'))
|
146
|
-
path_object.name = 'media';
|
147
|
-
});
|
148
|
-
}
|
149
|
-
|
150
|
-
// Add contect menu if it's loaded
|
151
|
-
if (ed && ed.plugins.contextmenu) {
|
152
|
-
ed.plugins.contextmenu.onContextMenu.add(function(plugin, menu, element) {
|
153
|
-
if (element.nodeName === 'IMG' && element.className.indexOf('mceItemMedia') !== -1)
|
154
|
-
menu.add({title : 'media.edit', icon : 'media', cmd : 'mceMedia'});
|
155
|
-
});
|
156
|
-
}
|
157
|
-
});
|
158
|
-
|
159
|
-
// Register commands
|
160
|
-
ed.addCommand('mceMedia', function() {
|
161
|
-
var data, img;
|
162
|
-
|
163
|
-
img = ed.selection.getNode();
|
164
|
-
if (isMediaImg(img)) {
|
165
|
-
data = ed.dom.getAttrib(img, 'data-mce-json');
|
166
|
-
if (data) {
|
167
|
-
data = JSON.parse(data);
|
168
|
-
|
169
|
-
// Add some extra properties to the data object
|
170
|
-
tinymce.each(rootAttributes, function(name) {
|
171
|
-
var value = ed.dom.getAttrib(img, name);
|
172
|
-
|
173
|
-
if (value)
|
174
|
-
data[name] = value;
|
175
|
-
});
|
176
|
-
|
177
|
-
data.type = self.getType(img.className).name.toLowerCase();
|
178
|
-
}
|
179
|
-
}
|
180
|
-
|
181
|
-
if (!data) {
|
182
|
-
data = {
|
183
|
-
type : 'flash',
|
184
|
-
video: {sources:[]},
|
185
|
-
params: {}
|
186
|
-
};
|
187
|
-
}
|
188
|
-
|
189
|
-
ed.windowManager.open({
|
190
|
-
file : url + '/media.htm',
|
191
|
-
width : 430 + parseInt(ed.getLang('media.delta_width', 0)),
|
192
|
-
height : 500 + parseInt(ed.getLang('media.delta_height', 0)),
|
193
|
-
inline : 1
|
194
|
-
}, {
|
195
|
-
plugin_url : url,
|
196
|
-
data : data
|
197
|
-
});
|
198
|
-
});
|
199
|
-
|
200
|
-
// Register buttons
|
201
|
-
ed.addButton('media', {title : 'media.desc', cmd : 'mceMedia'});
|
202
|
-
|
203
|
-
// Update media selection status
|
204
|
-
ed.onNodeChange.add(function(ed, cm, node) {
|
205
|
-
cm.setActive('media', isMediaImg(node));
|
206
|
-
});
|
207
|
-
},
|
208
|
-
|
209
|
-
convertUrl : function(url, force_absolute) {
|
210
|
-
var self = this, editor = self.editor, settings = editor.settings,
|
211
|
-
urlConverter = settings.url_converter,
|
212
|
-
urlConverterScope = settings.url_converter_scope || self;
|
213
|
-
|
214
|
-
if (!url)
|
215
|
-
return url;
|
216
|
-
|
217
|
-
if (force_absolute)
|
218
|
-
return editor.documentBaseURI.toAbsolute(url);
|
219
|
-
|
220
|
-
return urlConverter.call(urlConverterScope, url, 'src', 'object');
|
221
|
-
},
|
222
|
-
|
223
|
-
getInfo : function() {
|
224
|
-
return {
|
225
|
-
longname : 'Media',
|
226
|
-
author : 'Moxiecode Systems AB',
|
227
|
-
authorurl : 'http://tinymce.moxiecode.com',
|
228
|
-
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/media',
|
229
|
-
version : tinymce.majorVersion + "." + tinymce.minorVersion
|
230
|
-
};
|
231
|
-
},
|
232
|
-
|
233
|
-
/**
|
234
|
-
* Converts the JSON data object to an img node.
|
235
|
-
*/
|
236
|
-
dataToImg : function(data, force_absolute) {
|
237
|
-
var self = this, editor = self.editor, baseUri = editor.documentBaseURI, sources, attrs, img, i;
|
238
|
-
|
239
|
-
data.params.src = self.convertUrl(data.params.src, force_absolute);
|
240
|
-
|
241
|
-
attrs = data.video.attrs;
|
242
|
-
if (attrs)
|
243
|
-
attrs.src = self.convertUrl(attrs.src, force_absolute);
|
244
|
-
|
245
|
-
if (attrs)
|
246
|
-
attrs.poster = self.convertUrl(attrs.poster, force_absolute);
|
247
|
-
|
248
|
-
sources = toArray(data.video.sources);
|
249
|
-
if (sources) {
|
250
|
-
for (i = 0; i < sources.length; i++)
|
251
|
-
sources[i].src = self.convertUrl(sources[i].src, force_absolute);
|
252
|
-
}
|
253
|
-
|
254
|
-
img = self.editor.dom.create('img', {
|
255
|
-
id : data.id,
|
256
|
-
style : data.style,
|
257
|
-
align : data.align,
|
258
|
-
hspace : data.hspace,
|
259
|
-
vspace : data.vspace,
|
260
|
-
src : self.editor.theme.url + '/img/trans.gif',
|
261
|
-
'class' : 'mceItemMedia mceItem' + self.getType(data.type).name,
|
262
|
-
'data-mce-json' : JSON.serialize(data, "'")
|
263
|
-
});
|
264
|
-
|
265
|
-
img.width = data.width = normalizeSize(data.width || (data.type == 'audio' ? "300" : "320"));
|
266
|
-
img.height = data.height = normalizeSize(data.height || (data.type == 'audio' ? "32" : "240"));
|
267
|
-
|
268
|
-
return img;
|
269
|
-
},
|
270
|
-
|
271
|
-
/**
|
272
|
-
* Converts the JSON data object to a HTML string.
|
273
|
-
*/
|
274
|
-
dataToHtml : function(data, force_absolute) {
|
275
|
-
return this.editor.serializer.serialize(this.dataToImg(data, force_absolute), {forced_root_block : '', force_absolute : force_absolute});
|
276
|
-
},
|
277
|
-
|
278
|
-
/**
|
279
|
-
* Converts the JSON data object to a HTML string.
|
280
|
-
*/
|
281
|
-
htmlToData : function(html) {
|
282
|
-
var fragment, img, data;
|
283
|
-
|
284
|
-
data = {
|
285
|
-
type : 'flash',
|
286
|
-
video: {sources:[]},
|
287
|
-
params: {}
|
288
|
-
};
|
289
|
-
|
290
|
-
fragment = this.editor.parser.parse(html);
|
291
|
-
img = fragment.getAll('img')[0];
|
292
|
-
|
293
|
-
if (img) {
|
294
|
-
data = JSON.parse(img.attr('data-mce-json'));
|
295
|
-
data.type = this.getType(img.attr('class')).name.toLowerCase();
|
296
|
-
|
297
|
-
// Add some extra properties to the data object
|
298
|
-
tinymce.each(rootAttributes, function(name) {
|
299
|
-
var value = img.attr(name);
|
300
|
-
|
301
|
-
if (value)
|
302
|
-
data[name] = value;
|
303
|
-
});
|
304
|
-
}
|
305
|
-
|
306
|
-
return data;
|
307
|
-
},
|
308
|
-
|
309
|
-
/**
|
310
|
-
* Get type item by extension, class, clsid or mime type.
|
311
|
-
*
|
312
|
-
* @method getType
|
313
|
-
* @param {String} value Value to get type item by.
|
314
|
-
* @return {Object} Type item object or undefined.
|
315
|
-
*/
|
316
|
-
getType : function(value) {
|
317
|
-
var i, values, typeItem;
|
318
|
-
|
319
|
-
// Find type by checking the classes
|
320
|
-
values = tinymce.explode(value, ' ');
|
321
|
-
for (i = 0; i < values.length; i++) {
|
322
|
-
typeItem = this.lookup[values[i]];
|
323
|
-
|
324
|
-
if (typeItem)
|
325
|
-
return typeItem;
|
326
|
-
}
|
327
|
-
},
|
328
|
-
|
329
|
-
/**
|
330
|
-
* Converts a tinymce.html.Node image element to video/object/embed.
|
331
|
-
*/
|
332
|
-
imgToObject : function(node, args) {
|
333
|
-
var self = this, editor = self.editor, video, object, embed, iframe, name, value, data,
|
334
|
-
source, sources, params, param, typeItem, i, item, mp4Source, replacement,
|
335
|
-
posterSrc, style, audio;
|
336
|
-
|
337
|
-
// Adds the flash player
|
338
|
-
function addPlayer(video_src, poster_src) {
|
339
|
-
var baseUri, flashVars, flashVarsOutput, params, flashPlayer;
|
340
|
-
|
341
|
-
flashPlayer = editor.getParam('flash_video_player_url', self.convertUrl(self.url + '/moxieplayer.swf'));
|
342
|
-
if (flashPlayer) {
|
343
|
-
baseUri = editor.documentBaseURI;
|
344
|
-
data.params.src = flashPlayer;
|
345
|
-
|
346
|
-
// Convert the movie url to absolute urls
|
347
|
-
if (editor.getParam('flash_video_player_absvideourl', true)) {
|
348
|
-
video_src = baseUri.toAbsolute(video_src || '', true);
|
349
|
-
poster_src = baseUri.toAbsolute(poster_src || '', true);
|
350
|
-
}
|
351
|
-
|
352
|
-
// Generate flash vars
|
353
|
-
flashVarsOutput = '';
|
354
|
-
flashVars = editor.getParam('flash_video_player_flashvars', {url : '$url', poster : '$poster'});
|
355
|
-
tinymce.each(flashVars, function(value, name) {
|
356
|
-
// Replace $url and $poster variables in flashvars value
|
357
|
-
value = value.replace(/\$url/, video_src || '');
|
358
|
-
value = value.replace(/\$poster/, poster_src || '');
|
359
|
-
|
360
|
-
if (value.length > 0)
|
361
|
-
flashVarsOutput += (flashVarsOutput ? '&' : '') + name + '=' + escape(value);
|
362
|
-
});
|
363
|
-
|
364
|
-
if (flashVarsOutput.length)
|
365
|
-
data.params.flashvars = flashVarsOutput;
|
366
|
-
|
367
|
-
params = editor.getParam('flash_video_player_params', {
|
368
|
-
allowfullscreen: true,
|
369
|
-
allowscriptaccess: true
|
370
|
-
});
|
371
|
-
|
372
|
-
tinymce.each(params, function(value, name) {
|
373
|
-
data.params[name] = "" + value;
|
374
|
-
});
|
375
|
-
}
|
376
|
-
};
|
377
|
-
|
378
|
-
data = node.attr('data-mce-json');
|
379
|
-
if (!data)
|
380
|
-
return;
|
381
|
-
|
382
|
-
data = JSON.parse(data);
|
383
|
-
typeItem = this.getType(node.attr('class'));
|
384
|
-
|
385
|
-
style = node.attr('data-mce-style');
|
386
|
-
if (!style) {
|
387
|
-
style = node.attr('style');
|
388
|
-
|
389
|
-
if (style)
|
390
|
-
style = editor.dom.serializeStyle(editor.dom.parseStyle(style, 'img'));
|
391
|
-
}
|
392
|
-
|
393
|
-
// Use node width/height to override the data width/height when the placeholder is resized
|
394
|
-
data.width = node.attr('width') || data.width;
|
395
|
-
data.height = node.attr('height') || data.height;
|
396
|
-
|
397
|
-
// Handle iframe
|
398
|
-
if (typeItem.name === 'Iframe') {
|
399
|
-
replacement = new Node('iframe', 1);
|
400
|
-
|
401
|
-
tinymce.each(rootAttributes, function(name) {
|
402
|
-
var value = node.attr(name);
|
403
|
-
|
404
|
-
if (name == 'class' && value)
|
405
|
-
value = value.replace(/mceItem.+ ?/g, '');
|
406
|
-
|
407
|
-
if (value && value.length > 0)
|
408
|
-
replacement.attr(name, value);
|
409
|
-
});
|
410
|
-
|
411
|
-
for (name in data.params)
|
412
|
-
replacement.attr(name, data.params[name]);
|
413
|
-
|
414
|
-
replacement.attr({
|
415
|
-
style: style,
|
416
|
-
src: data.params.src
|
417
|
-
});
|
418
|
-
|
419
|
-
node.replace(replacement);
|
420
|
-
|
421
|
-
return;
|
422
|
-
}
|
423
|
-
|
424
|
-
// Handle scripts
|
425
|
-
if (this.editor.settings.media_use_script) {
|
426
|
-
replacement = new Node('script', 1).attr('type', 'text/javascript');
|
427
|
-
|
428
|
-
value = new Node('#text', 3);
|
429
|
-
value.value = 'write' + typeItem.name + '(' + JSON.serialize(tinymce.extend(data.params, {
|
430
|
-
width: node.attr('width'),
|
431
|
-
height: node.attr('height')
|
432
|
-
})) + ');';
|
433
|
-
|
434
|
-
replacement.append(value);
|
435
|
-
node.replace(replacement);
|
436
|
-
|
437
|
-
return;
|
438
|
-
}
|
439
|
-
|
440
|
-
// Add HTML5 video element
|
441
|
-
if (typeItem.name === 'Video' && data.video.sources[0]) {
|
442
|
-
// Create new object element
|
443
|
-
video = new Node('video', 1).attr(tinymce.extend({
|
444
|
-
id : node.attr('id'),
|
445
|
-
width: normalizeSize(node.attr('width')),
|
446
|
-
height: normalizeSize(node.attr('height')),
|
447
|
-
style : style
|
448
|
-
}, data.video.attrs));
|
449
|
-
|
450
|
-
// Get poster source and use that for flash fallback
|
451
|
-
if (data.video.attrs)
|
452
|
-
posterSrc = data.video.attrs.poster;
|
453
|
-
|
454
|
-
sources = data.video.sources = toArray(data.video.sources);
|
455
|
-
for (i = 0; i < sources.length; i++) {
|
456
|
-
if (/\.mp4$/.test(sources[i].src))
|
457
|
-
mp4Source = sources[i].src;
|
458
|
-
}
|
459
|
-
|
460
|
-
if (!sources[0].type) {
|
461
|
-
video.attr('src', sources[0].src);
|
462
|
-
sources.splice(0, 1);
|
463
|
-
}
|
464
|
-
|
465
|
-
for (i = 0; i < sources.length; i++) {
|
466
|
-
source = new Node('source', 1).attr(sources[i]);
|
467
|
-
source.shortEnded = true;
|
468
|
-
video.append(source);
|
469
|
-
}
|
470
|
-
|
471
|
-
// Create flash fallback for video if we have a mp4 source
|
472
|
-
if (mp4Source) {
|
473
|
-
addPlayer(mp4Source, posterSrc);
|
474
|
-
typeItem = self.getType('flash');
|
475
|
-
} else
|
476
|
-
data.params.src = '';
|
477
|
-
}
|
478
|
-
|
479
|
-
// Add HTML5 audio element
|
480
|
-
if (typeItem.name === 'Audio' && data.video.sources[0]) {
|
481
|
-
// Create new object element
|
482
|
-
audio = new Node('audio', 1).attr(tinymce.extend({
|
483
|
-
id : node.attr('id'),
|
484
|
-
width: normalizeSize(node.attr('width')),
|
485
|
-
height: normalizeSize(node.attr('height')),
|
486
|
-
style : style
|
487
|
-
}, data.video.attrs));
|
488
|
-
|
489
|
-
// Get poster source and use that for flash fallback
|
490
|
-
if (data.video.attrs)
|
491
|
-
posterSrc = data.video.attrs.poster;
|
492
|
-
|
493
|
-
sources = data.video.sources = toArray(data.video.sources);
|
494
|
-
if (!sources[0].type) {
|
495
|
-
audio.attr('src', sources[0].src);
|
496
|
-
sources.splice(0, 1);
|
497
|
-
}
|
498
|
-
|
499
|
-
for (i = 0; i < sources.length; i++) {
|
500
|
-
source = new Node('source', 1).attr(sources[i]);
|
501
|
-
source.shortEnded = true;
|
502
|
-
audio.append(source);
|
503
|
-
}
|
504
|
-
|
505
|
-
data.params.src = '';
|
506
|
-
}
|
507
|
-
|
508
|
-
if (typeItem.name === 'EmbeddedAudio') {
|
509
|
-
embed = new Node('embed', 1);
|
510
|
-
embed.shortEnded = true;
|
511
|
-
embed.attr({
|
512
|
-
id: node.attr('id'),
|
513
|
-
width: normalizeSize(node.attr('width')),
|
514
|
-
height: normalizeSize(node.attr('height')),
|
515
|
-
style : style,
|
516
|
-
type: node.attr('type')
|
517
|
-
});
|
518
|
-
|
519
|
-
for (name in data.params)
|
520
|
-
embed.attr(name, data.params[name]);
|
521
|
-
|
522
|
-
tinymce.each(rootAttributes, function(name) {
|
523
|
-
if (data[name] && name != 'type')
|
524
|
-
embed.attr(name, data[name]);
|
525
|
-
});
|
526
|
-
|
527
|
-
data.params.src = '';
|
528
|
-
}
|
529
|
-
|
530
|
-
// Do we have a params src then we can generate object
|
531
|
-
if (data.params.src) {
|
532
|
-
// Is flv movie add player for it
|
533
|
-
if (/\.flv$/i.test(data.params.src))
|
534
|
-
addPlayer(data.params.src, '');
|
535
|
-
|
536
|
-
if (args && args.force_absolute)
|
537
|
-
data.params.src = editor.documentBaseURI.toAbsolute(data.params.src);
|
538
|
-
|
539
|
-
// Create new object element
|
540
|
-
object = new Node('object', 1).attr({
|
541
|
-
id : node.attr('id'),
|
542
|
-
width: normalizeSize(node.attr('width')),
|
543
|
-
height: normalizeSize(node.attr('height')),
|
544
|
-
style : style
|
545
|
-
});
|
546
|
-
|
547
|
-
tinymce.each(rootAttributes, function(name) {
|
548
|
-
var value = data[name];
|
549
|
-
|
550
|
-
if (name == 'class' && value)
|
551
|
-
value = value.replace(/mceItem.+ ?/g, '');
|
552
|
-
|
553
|
-
if (value && name != 'type')
|
554
|
-
object.attr(name, value);
|
555
|
-
});
|
556
|
-
|
557
|
-
// Add params
|
558
|
-
for (name in data.params) {
|
559
|
-
param = new Node('param', 1);
|
560
|
-
param.shortEnded = true;
|
561
|
-
value = data.params[name];
|
562
|
-
|
563
|
-
// Windows media needs to use url instead of src for the media URL
|
564
|
-
if (name === 'src' && typeItem.name === 'WindowsMedia')
|
565
|
-
name = 'url';
|
566
|
-
|
567
|
-
param.attr({name: name, value: value});
|
568
|
-
object.append(param);
|
569
|
-
}
|
570
|
-
|
571
|
-
// Setup add type and classid if strict is disabled
|
572
|
-
if (this.editor.getParam('media_strict', true)) {
|
573
|
-
object.attr({
|
574
|
-
data: data.params.src,
|
575
|
-
type: typeItem.mimes[0]
|
576
|
-
});
|
577
|
-
} else {
|
578
|
-
object.attr({
|
579
|
-
classid: "clsid:" + typeItem.clsids[0],
|
580
|
-
codebase: typeItem.codebase
|
581
|
-
});
|
582
|
-
|
583
|
-
embed = new Node('embed', 1);
|
584
|
-
embed.shortEnded = true;
|
585
|
-
embed.attr({
|
586
|
-
id: node.attr('id'),
|
587
|
-
width: normalizeSize(node.attr('width')),
|
588
|
-
height: normalizeSize(node.attr('height')),
|
589
|
-
style : style,
|
590
|
-
type: typeItem.mimes[0]
|
591
|
-
});
|
592
|
-
|
593
|
-
for (name in data.params)
|
594
|
-
embed.attr(name, data.params[name]);
|
595
|
-
|
596
|
-
tinymce.each(rootAttributes, function(name) {
|
597
|
-
if (data[name] && name != 'type')
|
598
|
-
embed.attr(name, data[name]);
|
599
|
-
});
|
600
|
-
|
601
|
-
object.append(embed);
|
602
|
-
}
|
603
|
-
|
604
|
-
// Insert raw HTML
|
605
|
-
if (data.object_html) {
|
606
|
-
value = new Node('#text', 3);
|
607
|
-
value.raw = true;
|
608
|
-
value.value = data.object_html;
|
609
|
-
object.append(value);
|
610
|
-
}
|
611
|
-
|
612
|
-
// Append object to video element if it exists
|
613
|
-
if (video)
|
614
|
-
video.append(object);
|
615
|
-
}
|
616
|
-
|
617
|
-
if (video) {
|
618
|
-
// Insert raw HTML
|
619
|
-
if (data.video_html) {
|
620
|
-
value = new Node('#text', 3);
|
621
|
-
value.raw = true;
|
622
|
-
value.value = data.video_html;
|
623
|
-
video.append(value);
|
624
|
-
}
|
625
|
-
}
|
626
|
-
|
627
|
-
if (audio) {
|
628
|
-
// Insert raw HTML
|
629
|
-
if (data.video_html) {
|
630
|
-
value = new Node('#text', 3);
|
631
|
-
value.raw = true;
|
632
|
-
value.value = data.video_html;
|
633
|
-
audio.append(value);
|
634
|
-
}
|
635
|
-
}
|
636
|
-
|
637
|
-
var n = video || audio || object || embed;
|
638
|
-
if (n)
|
639
|
-
node.replace(n);
|
640
|
-
else
|
641
|
-
node.remove();
|
642
|
-
},
|
643
|
-
|
644
|
-
/**
|
645
|
-
* Converts a tinymce.html.Node video/object/embed to an img element.
|
646
|
-
*
|
647
|
-
* The video/object/embed will be converted into an image placeholder with a JSON data attribute like this:
|
648
|
-
* <img class="mceItemMedia mceItemFlash" width="100" height="100" data-mce-json="{..}" />
|
649
|
-
*
|
650
|
-
* The JSON structure will be like this:
|
651
|
-
* {'params':{'flashvars':'something','quality':'high','src':'someurl'}, 'video':{'sources':[{src: 'someurl', type: 'video/mp4'}]}}
|
652
|
-
*/
|
653
|
-
objectToImg : function(node) {
|
654
|
-
var object, embed, video, iframe, img, name, id, width, height, style, i, html,
|
655
|
-
param, params, source, sources, data, type, lookup = this.lookup,
|
656
|
-
matches, attrs, urlConverter = this.editor.settings.url_converter,
|
657
|
-
urlConverterScope = this.editor.settings.url_converter_scope,
|
658
|
-
hspace, vspace, align, bgcolor;
|
659
|
-
|
660
|
-
function getInnerHTML(node) {
|
661
|
-
return new tinymce.html.Serializer({
|
662
|
-
inner: true,
|
663
|
-
validate: false
|
664
|
-
}).serialize(node);
|
665
|
-
};
|
666
|
-
|
667
|
-
function lookupAttribute(o, attr) {
|
668
|
-
return lookup[(o.attr(attr) || '').toLowerCase()];
|
669
|
-
}
|
670
|
-
|
671
|
-
function lookupExtension(src) {
|
672
|
-
var ext = src.replace(/^.*\.([^.]+)$/, '$1');
|
673
|
-
return lookup[ext.toLowerCase() || ''];
|
674
|
-
}
|
675
|
-
|
676
|
-
// If node isn't in document
|
677
|
-
if (!node.parent)
|
678
|
-
return;
|
679
|
-
|
680
|
-
// Handle media scripts
|
681
|
-
if (node.name === 'script') {
|
682
|
-
if (node.firstChild)
|
683
|
-
matches = scriptRegExp.exec(node.firstChild.value);
|
684
|
-
|
685
|
-
if (!matches)
|
686
|
-
return;
|
687
|
-
|
688
|
-
type = matches[1];
|
689
|
-
data = {video : {}, params : JSON.parse(matches[2])};
|
690
|
-
width = data.params.width;
|
691
|
-
height = data.params.height;
|
692
|
-
}
|
693
|
-
|
694
|
-
// Setup data objects
|
695
|
-
data = data || {
|
696
|
-
video : {},
|
697
|
-
params : {}
|
698
|
-
};
|
699
|
-
|
700
|
-
// Setup new image object
|
701
|
-
img = new Node('img', 1);
|
702
|
-
img.attr({
|
703
|
-
src : this.editor.theme.url + '/img/trans.gif'
|
704
|
-
});
|
705
|
-
|
706
|
-
// Video element
|
707
|
-
name = node.name;
|
708
|
-
if (name === 'video' || name == 'audio') {
|
709
|
-
video = node;
|
710
|
-
object = node.getAll('object')[0];
|
711
|
-
embed = node.getAll('embed')[0];
|
712
|
-
width = video.attr('width');
|
713
|
-
height = video.attr('height');
|
714
|
-
id = video.attr('id');
|
715
|
-
data.video = {attrs : {}, sources : []};
|
716
|
-
|
717
|
-
// Get all video attributes
|
718
|
-
attrs = data.video.attrs;
|
719
|
-
for (name in video.attributes.map)
|
720
|
-
attrs[name] = video.attributes.map[name];
|
721
|
-
|
722
|
-
source = node.attr('src');
|
723
|
-
if (source)
|
724
|
-
data.video.sources.push({src : urlConverter.call(urlConverterScope, source, 'src', node.name)});
|
725
|
-
|
726
|
-
// Get all sources
|
727
|
-
sources = video.getAll("source");
|
728
|
-
for (i = 0; i < sources.length; i++) {
|
729
|
-
source = sources[i].remove();
|
730
|
-
|
731
|
-
data.video.sources.push({
|
732
|
-
src: urlConverter.call(urlConverterScope, source.attr('src'), 'src', 'source'),
|
733
|
-
type: source.attr('type'),
|
734
|
-
media: source.attr('media')
|
735
|
-
});
|
736
|
-
}
|
737
|
-
|
738
|
-
// Convert the poster URL
|
739
|
-
if (attrs.poster)
|
740
|
-
attrs.poster = urlConverter.call(urlConverterScope, attrs.poster, 'poster', node.name);
|
741
|
-
}
|
742
|
-
|
743
|
-
// Object element
|
744
|
-
if (node.name === 'object') {
|
745
|
-
object = node;
|
746
|
-
embed = node.getAll('embed')[0];
|
747
|
-
}
|
748
|
-
|
749
|
-
// Embed element
|
750
|
-
if (node.name === 'embed')
|
751
|
-
embed = node;
|
752
|
-
|
753
|
-
// Iframe element
|
754
|
-
if (node.name === 'iframe') {
|
755
|
-
iframe = node;
|
756
|
-
type = 'Iframe';
|
757
|
-
}
|
758
|
-
|
759
|
-
if (object) {
|
760
|
-
// Get width/height
|
761
|
-
width = width || object.attr('width');
|
762
|
-
height = height || object.attr('height');
|
763
|
-
style = style || object.attr('style');
|
764
|
-
id = id || object.attr('id');
|
765
|
-
hspace = hspace || object.attr('hspace');
|
766
|
-
vspace = vspace || object.attr('vspace');
|
767
|
-
align = align || object.attr('align');
|
768
|
-
bgcolor = bgcolor || object.attr('bgcolor');
|
769
|
-
data.name = object.attr('name');
|
770
|
-
|
771
|
-
// Get all object params
|
772
|
-
params = object.getAll("param");
|
773
|
-
for (i = 0; i < params.length; i++) {
|
774
|
-
param = params[i];
|
775
|
-
name = param.remove().attr('name');
|
776
|
-
|
777
|
-
if (!excludedAttrs[name])
|
778
|
-
data.params[name] = param.attr('value');
|
779
|
-
}
|
780
|
-
|
781
|
-
data.params.src = data.params.src || object.attr('data');
|
782
|
-
}
|
783
|
-
|
784
|
-
if (embed) {
|
785
|
-
// Get width/height
|
786
|
-
width = width || embed.attr('width');
|
787
|
-
height = height || embed.attr('height');
|
788
|
-
style = style || embed.attr('style');
|
789
|
-
id = id || embed.attr('id');
|
790
|
-
hspace = hspace || embed.attr('hspace');
|
791
|
-
vspace = vspace || embed.attr('vspace');
|
792
|
-
align = align || embed.attr('align');
|
793
|
-
bgcolor = bgcolor || embed.attr('bgcolor');
|
794
|
-
|
795
|
-
// Get all embed attributes
|
796
|
-
for (name in embed.attributes.map) {
|
797
|
-
if (!excludedAttrs[name] && !data.params[name])
|
798
|
-
data.params[name] = embed.attributes.map[name];
|
799
|
-
}
|
800
|
-
}
|
801
|
-
|
802
|
-
if (iframe) {
|
803
|
-
// Get width/height
|
804
|
-
width = normalizeSize(iframe.attr('width'));
|
805
|
-
height = normalizeSize(iframe.attr('height'));
|
806
|
-
style = style || iframe.attr('style');
|
807
|
-
id = iframe.attr('id');
|
808
|
-
hspace = iframe.attr('hspace');
|
809
|
-
vspace = iframe.attr('vspace');
|
810
|
-
align = iframe.attr('align');
|
811
|
-
bgcolor = iframe.attr('bgcolor');
|
812
|
-
|
813
|
-
tinymce.each(rootAttributes, function(name) {
|
814
|
-
img.attr(name, iframe.attr(name));
|
815
|
-
});
|
816
|
-
|
817
|
-
// Get all iframe attributes
|
818
|
-
for (name in iframe.attributes.map) {
|
819
|
-
if (!excludedAttrs[name] && !data.params[name])
|
820
|
-
data.params[name] = iframe.attributes.map[name];
|
821
|
-
}
|
822
|
-
}
|
823
|
-
|
824
|
-
// Use src not movie
|
825
|
-
if (data.params.movie) {
|
826
|
-
data.params.src = data.params.src || data.params.movie;
|
827
|
-
delete data.params.movie;
|
828
|
-
}
|
829
|
-
|
830
|
-
// Convert the URL to relative/absolute depending on configuration
|
831
|
-
if (data.params.src)
|
832
|
-
data.params.src = urlConverter.call(urlConverterScope, data.params.src, 'src', 'object');
|
833
|
-
|
834
|
-
if (video) {
|
835
|
-
if (node.name === 'video')
|
836
|
-
type = lookup.video.name;
|
837
|
-
else if (node.name === 'audio')
|
838
|
-
type = lookup.audio.name;
|
839
|
-
}
|
840
|
-
|
841
|
-
if (object && !type)
|
842
|
-
type = (lookupAttribute(object, 'clsid') || lookupAttribute(object, 'classid') || lookupAttribute(object, 'type') || {}).name;
|
843
|
-
|
844
|
-
if (embed && !type)
|
845
|
-
type = (lookupAttribute(embed, 'type') || lookupExtension(data.params.src) || {}).name;
|
846
|
-
|
847
|
-
// for embedded audio we preserve the original specified type
|
848
|
-
if (embed && type == 'EmbeddedAudio') {
|
849
|
-
data.params.type = embed.attr('type');
|
850
|
-
}
|
851
|
-
|
852
|
-
// Replace the video/object/embed element with a placeholder image containing the data
|
853
|
-
node.replace(img);
|
854
|
-
|
855
|
-
// Remove embed
|
856
|
-
if (embed)
|
857
|
-
embed.remove();
|
858
|
-
|
859
|
-
// Serialize the inner HTML of the object element
|
860
|
-
if (object) {
|
861
|
-
html = getInnerHTML(object.remove());
|
862
|
-
|
863
|
-
if (html)
|
864
|
-
data.object_html = html;
|
865
|
-
}
|
866
|
-
|
867
|
-
// Serialize the inner HTML of the video element
|
868
|
-
if (video) {
|
869
|
-
html = getInnerHTML(video.remove());
|
870
|
-
|
871
|
-
if (html)
|
872
|
-
data.video_html = html;
|
873
|
-
}
|
874
|
-
|
875
|
-
data.hspace = hspace;
|
876
|
-
data.vspace = vspace;
|
877
|
-
data.align = align;
|
878
|
-
data.bgcolor = bgcolor;
|
879
|
-
|
880
|
-
// Set width/height of placeholder
|
881
|
-
img.attr({
|
882
|
-
id : id,
|
883
|
-
'class' : 'mceItemMedia mceItem' + (type || 'Flash'),
|
884
|
-
style : style,
|
885
|
-
width : width || (node.name == 'audio' ? "300" : "320"),
|
886
|
-
height : height || (node.name == 'audio' ? "32" : "240"),
|
887
|
-
hspace : hspace,
|
888
|
-
vspace : vspace,
|
889
|
-
align : align,
|
890
|
-
bgcolor : bgcolor,
|
891
|
-
"data-mce-json" : JSON.serialize(data, "'")
|
892
|
-
});
|
893
|
-
}
|
894
|
-
});
|
895
|
-
|
896
|
-
// Register plugin
|
897
|
-
tinymce.PluginManager.add('media', tinymce.plugins.MediaPlugin);
|
898
|
-
})();
|