compose-rich-editor
compose-rich-editor copied to clipboard
How to listen for value changes?
Is there something similar to the onValueChanged of the BasicTextField?
For now there are no callbacks, you can use LaunchedEffect:
LaunchedEffect(richTextState.annotatedString) {
println("Text changed: ${richTextState.annotatedString.text}")
}
@MohamedRejeb How to listen for editor value update while copy-paste paragraph? It's getting crash if a long text being pasted :
Please follow these steps (Android):
Copy long text --> Open RTF editor --> Type some text manually--> Long tap and "Select All" and paste --> Getting crashed
java.lang.StringIndexOutOfBoundsException: begin 1598, end 1602, length 1600 at java.lang.String.checkBoundsBeginEnd(String.java:4500) at java.lang.String.substring(String.java:2527)