icarus-android icon indicating copy to clipboard operation
icarus-android copied to clipboard

HELP: disable/enable editing

Open aresares opened this issue 8 years ago • 1 comments

Hi how to enable or disable contentEditing of DIV ? I tried this but nothing , it dont work document.getElementsByClassName("simditor-body").contentEditable=flase; this.body.contentEditable=false;

How to create a function like this Simditor.prototype.enableEditing= function(enable) { // Enable disable content editing };

Please help me, is very important for me

aresares avatar Apr 19 '17 18:04 aresares

1.getElementByClassName returns an array 2.contenteditable is an attribute of DOM, not member of object.

document.getElementsByClassName("simditor-body")[0].setAttribute('contenteditable', false);

mr5 avatar Nov 29 '17 07:11 mr5