richeditor-android
richeditor-android copied to clipboard
TextState saying whether it is bold, italic, normal, subscript and superscript.
How do we know whether text state is bold or not when cursor move to particular position.
Try this
mEditor.setOnDecorationChangeListener((text, types) -> {
Timber.d("onStateChangeListener() called with: text = [" + text + "], types = [" + types + "]");
for (RichEditor.Type type : types) {
switch (type) {
case BOLD:
case UNDERLINE:
case ITALIC:
break;
}
}
});
its not getting callback when style changes if we delete text.