I want to get number of characters entered in CKEditor. Here is my function which is being called within CKEditor events.
function EditorTextCount(editor)
{
//var data = editor.document.getBody().getText();
var data = editor.getData();
}
In the above function "editor" is the CKEditor object. When I use var data = editor.document.getBody().getText()
I get the text inside editor without newline/enter characters. When I use var data = editor.getData()
I get some extra special characters.
You can try use property innerText, if it will work for you.
var data = editor.document.getBody().$.innerText