Getting the character limit of the editor
adelumban-sp opened this issue · 1 comments
adelumban-sp commented
Is there there's to get the editor's text limit? The document doesn't have it.. is there a way to do this. I log the text thru listener and the text in the listener is giving the html equivalent of what is being rendered.
adelumban-sp commented
I think I solved my problem for now what i did was removed all the tags and replace some characters.
this.richtext.registerContentChangeListener((str) => {
const regex = /(<([^>]+)>)/ig;
const result = str.replace(regex, '')
.replace(' ', " ")
.replace('<', "<")
.replace('>', ">")
.replace('&', '&');
return result.length;
});
```