Hello,
how can i disable the complete component of htmleditor?
Using the normal jQuery methods for disabling the editor showed no effect.
hey,
Since the HTML Editor uses contenteditable="true", you can completely disable editing in the following way:
$("#htmlEditor").find("iframe").contents().find("body").attr("contenteditable", "false")
where "htmlEditor" is the ID of your element.
Let me know if this helps. Thanks,
Angel
Yes, it works. Thanks for this.
But i also would like to disable all toolbar buttons.
Hi
you can get a reference to the list of all toolbars in the following way
$("#htmlEditor").igHtmlEditor()._toolbars, then you can iterate or disable individual toolbar items one by one, in the following way:
var copyPasteToolbar = this._toolbars.copyPasteToolbar;
copyPasteToolbar.igToolbar('disableItem', 'cut', true);
copyPasteToolbar.igToolbar('disableItem', 'copy', true);
copyPasteToolbar.igToolbar('disableItem', 'paste', true);
The names of all toolbar items along with additional metadata can be retrieved in the following way:
$("#htmlEditor").igHtmlEditor()._allToolbars
Thanks,
hey Adrian,
Let me know if you need additional help on this. Thanks,
Sorry Adrian, I meant $("#htmlEditor").data("igHtmlEditor")._toolbars, etc.
It doesn't know "_allToolbars" or "_toolbars"