Open fongfuse opened 3 years ago
Hi @fongfuse,
sorry, but there's no such thing as max length in RichTextEditor. But you can quite easily implement this yourself by adding a HtmlChangedListener
:
editor.addHtmlChangedListener(new HtmlChangedListener() {
@Override
public void htmlChangedAsync(@NotNull String html) {
if (html.length() > MAX_LENGTH) {
editor.setHtml(html.substring(0, MAX_LENGTH));
}
}
});
Does this help you any further?
How to set Max length in RichTextEditor