mr5/icarus-android

HELP: disable/enable editing

Opened this issue · 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

mr5 commented

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

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