Explore how to improve the integration of the Rich Text Editor #85
Labels
A-Rich-Text-Editor
T-Enhancement
New features, changes in functionality, performance boosts, user-facing improvements
Your use case
What would you like to do?
Improve the way the RTE is integrated in the EAX project as the main message composer.
Why would you like to do it?
The current implementation uses an
EditText
based implementation wrapped in a composable component using anAndroidView
. This is not ideal and has been a source of issues in the past.How would you like to achieve it?
That's the difficult part. The RTE for Android is composed by 2 libraries:
This Android library contains a user input interceptor, the actual UI component, an index mapping system between Android and the RTE, an HTML to spans parser, and some other utilities. Long story short, if we do a Compose version of the library, we need to re-implement all of those, because all of those components are built around
EditText
andSpans
, which aren't used by Compose at all.So we would have to:
LocalTextInputService.current
, but it might not be that easy as we also probably need to wrap the default one to handle compositions correctly. At least that was the case with EditText, but it might work out of the box in Compose.Basically, we would be re-writing the Android library almost from scratch, so we need to decide if it's really worth it.
Have you considered any alternatives?
Keep using the
EditText
approach and try to fix the corner cases when using it inside Compose.Additional context
No response
Are you willing to provide a PR?
Yes
The text was updated successfully, but these errors were encountered: