MohamedRejeb / compose-rich-editor

A Rich text editor library for both Jetpack Compose and Compose Multiplatform, fully customizable, supports HTML and Markdown.
https://mohamedrejeb.github.io/compose-rich-editor/
Apache License 2.0
977 stars 60 forks source link

StringIndexOutOfBoundsException #327

Closed Onder7994 closed 4 weeks ago

Onder7994 commented 1 month ago

Hello. I'm catching a strange bug on my physical device Model: Xiaomi redmi note 11 PRO. HyperOS OS, Android 13 TKQ1.221114.001.

In my app I am using your text library, sometimes when I try to move to a new line this error occurs. I couldn't catch it on emulator in android studio. photo_2024-08-16_23-08-55

I use state like in README

val richTextState = rememberRichTextState()

Most often I catch this bug after loading data from the database and opening the edit screen. Before save formatted text I use richTextState.toMarkdown() (or toHtml, it doesn't matter) After that I use richTextState.setMarkdown(htmlText)

MohamedRejeb commented 4 weeks ago

Thanks for reporting this issue, I'm checking it.