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
1.17k stars 77 forks source link

How to hook into text changes #429

Open Wavesonics opened 1 week ago

Wavesonics commented 1 week ago

BasicTextField has onValueChange, what would be a good way to go about exposing a hook for users to do something when a change happens.

It could be another parameter on BasicRichTextEditor, or it could be maybe a flow on RichTextState maybe?

I was wondering if you had any thoughts on which way to go with it?

I submitted two options: https://github.com/MohamedRejeb/compose-rich-editor/pull/432 https://github.com/MohamedRejeb/compose-rich-editor/pull/431