Commit 0decb92386548307b8842a7b147446430ca39b4c
1 parent
5e3863ac
Exists in
staging
and in
42 other branches
ActionItem1006: only enable paste plugin in IE
Showing
1 changed file
with
6 additions
and
1 deletions
Show diff stats
app/views/shared/tiny_mce.rhtml
| 1 | <%= javascript_include_tag 'tinymce/jscripts/tiny_mce/tiny_mce.js' %> | 1 | <%= javascript_include_tag 'tinymce/jscripts/tiny_mce/tiny_mce.js' %> |
| 2 | <script type="text/javascript"> | 2 | <script type="text/javascript"> |
| 3 | + var myplugins = "searchreplace,print,media"; | ||
| 4 | + if (tinymce.isIE) { | ||
| 5 | + // the paste plugin is only useful in Internet Explorer | ||
| 6 | + myplugins = "paste," + myplugins; | ||
| 7 | + } | ||
| 3 | tinyMCE.init({ | 8 | tinyMCE.init({ |
| 4 | mode : "textareas", | 9 | mode : "textareas", |
| 5 | theme : "advanced", | 10 | theme : "advanced", |
| 6 | - plugins: "paste,searchreplace,print,media", | 11 | + plugins: myplugins, |
| 7 | theme_advanced_toolbar_location : "top", | 12 | theme_advanced_toolbar_location : "top", |
| 8 | theme_advanced_layout_manager: 'SimpleLayout', | 13 | theme_advanced_layout_manager: 'SimpleLayout', |
| 9 | theme_advanced_buttons1 : "print,separator,copy,paste,separator,undo,redo,separator,search,replace,separator,fontsizeselect,formatselect", | 14 | theme_advanced_buttons1 : "print,separator,copy,paste,separator,undo,redo,separator,search,replace,separator,fontsizeselect,formatselect", |