Hello!
I can’t find how to disabled the Editor on the documentation page, does Editor exist this Method ? anyway please show me how to disabled it. thanks a lot.
Hello
You need to get toolbar object from editor and call toolbar’s method disableItem via method forEachItem:
var eD = editor.base.toolbar;
eD.forEachItem(function(itemId){
eD.disableItem(itemId);
});
Thank for your reply!
Your code just disable the toolbar.I want to disable Both Editor’textbox and Editor’toolbar.
I try to run this code,but it dose not work.
var contentBox = editor.base.textbox;
var contentBox = editor.base.content;
var contentBox = editor.base.iframe;
or
editor.editor.disabled=ture;
editor.editor.contentEditrable=false;
Please give me smoe advice.
If you use editor as a form item, you can use form.lock() to disable the whole editor at once.
More you can use
editor.setReadonly(true);
Hello,Darya!
editor.setReadonly(true);
This methor is not exist,and the from.lock() can’t disable Editor.
Do you have other way to disable the Editor?
This is my code:
var editor = new dhtmlXEditor("editorObj");
editor.base.toolbar.forEachItem(function (itemId) {
editor.base.toolbar.disableItem(itemId);
});
editor.init();
and I use vs2012.
form.lock() exactly disables an editor with all its buttons:
Hello!
I devlop project with C#, form.lock() is not exist. Can you give me a asp.net demo witch disable the Editor.
Hi
form.lock() is on client side in javascript, not in asp
- update form/editor to latest versions
- if this will not help - please provide completed demo includong all corresponding js/css files, you also can send it to support@dhtmlx.com
Thank you two!
I can disable Editor with your help. I download the latest versions ,and call editor.setReadonly(true), Editor like an obedient sheep
You are welcome!