I want to disable the tinymce editor by using javascript. In fact, I have two radio buttons: 1) When the user selects the How can I get it? edited: - (As it is not working in IE8) This code is used to disable: You still need to find a way to block the tinnimus UI. You loaded using a line for every one of them may have been each control Edit: You can change the contents of your rights iframe body's property. Downside will be that you have to disable the tinense UI (button) separately on & amp; 2)
Off .
Off radio button, then my tinnitus editor is
readable / disabled & amp; should be there ; When the user selects the radio button on
, then my tinnitus editor should be
enabled .
tinyMCE.init ({force_p_newlines: false, force_br_newlines: false, forced_root_block: false , convert_newlines_to_brs: false, // br not add elements "560" height: "15", Thym_adytnit button 1: "Fontselekt, Fontaijhakshn, separator, bold, italic, underline, separator, Forclor, Baklcolr, Justifylft, Justifycenter, Justifyright, Justifyfull "Theme_advanced_buttons2:" ", Thym_awarvnt_bitenns 3:" ", Thym_ Adwnsd_tolbar_ location" TOP ", Thym_ Adwnsd_tolbar_a Ain: "left", expand_valid_elements: "a [name | href | target | Click on the title | X], IMG [class | Source | border = 0 | alt | Title | hspace | Vikhands | Width | Height | align | Prwahhaus | Caring | name], baht [square | width | shape | notched], font [face | siz e | color | style], duration [class | align | style] "});
function tinymce_state (id, disable) {var state = (inactive == true)? 'Off': 'at' tinymce.get (id) .getDoc (). DesignMode = state; Tinymce.get (id) .controlManager.get ('fontselect') setDisabled (Disable). Tinymce.get (id) .controlManager.get ('fontsizeselect') setDisabled (Disable). Tinymce.get (id) .controlManager.get ('bold') setDisabled (disable). Tinymce.get (id) .controlManager.get ('italic') setDisabled (disable). Tinymce.get (id) .controlManager.get ('underline') setDisabled (disable). Tinymce.get (id) .controlManager.get ('ForeColor') setDisabled (Disable) Tinymce.get (id) .controlManager.get ('backcolor') setDisabled (disable). Tinymce.get (id) .controlManager.get ('justifyleft') setDisabled (Disable). Tinymce.get (id) .controlManager.get ('justifycenter') setDisabled (Disable). Tinymce.get (id) .controlManager.get ('justifyright') setDisabled (disable). Tinymce.get (id) .controlManager.get ('justifyfull') setDisabled (Disable). } You can use the following to block the input in the editor:
// Blocker input tinymce.get ('editor_id'). GetDoc () DesignMode = 'off'; // Edit Editable is off / change it to tinymce.get again ('editor_id'). GetDoc () DesignMode = 'on'; // editable switch
// example control bold tinymce.get ( 'editor_id') controlManager.get ( ' Bold ') setDisabled (correct). // Change it to tinymce.get again ('editor_id') controlManager.get ('bold'). Setred (wrong);
// disable disable shortcut ('edit_id'). GetBody () SetAttribute ('contenteditable', 'false'); // Enabled TinySiteTet ('Editor_ID'). GetBody () SetAttribute ('contenteditable', 'true');
Comments
Post a Comment