DHTMLEDITOR - limiting the number of characters

Hi



Using dhtmlxeditor, is it possible to limit the number of characters the user can enter?



Thanks.

There is no build in solution, but you can check a possible workaround here
dhtmlx.com/docs/products/dhtmlxG … 0669513000


Thanks for the link.  I’ve got this but am clearly missing something as this.length.value is null or not an object.



dhtmlxEvent(editor.edDoc, “keypress”, function(e){



if (this.value.length>=10) {


alert (“You have reached the maximum number of characters”);


return false;



}



})



Any ideas?


In case of dhtmlxEditor you can get its html content. Just for example:


dhtmlxEvent(editor.edDoc, “keypress”, function(e){



var html_content = editor.getContent();



if (html_content.length >= MAX_LENGTH) {


alert (“You have reached the maximum number of characters”);


return false;

}

})