-
-
Notifications
You must be signed in to change notification settings - Fork 121
Open
Description
I've stumbled upon an issue while creating a similar library on my own and was wondering how you solved it.
It turned out, you didn't 😄
In the examples and frequent use cases the RichTextEditor composable has its height wrapping the content and in that scenario the custom spans are rendered correctly. But whenever you set the max size on the RichTextEditor (without a line limit), you can scroll the content of the TextField itself but the custom spans are still rendered as if they weren't offsetted.
Example (straight up from the sample project in the repo with the additional height Modifier):
OutlinedRichTextEditor(
modifier = Modifier.fillMaxWidth().height(200.dp),
state = outlinedRichTextState,
textStyle = LocalTextStyle.current.copy(fontFamily = FontFamily.Monospace),
)
Screen_recording_20250611_171104.mp4
FYI, the only implementation of the BasicTextField that allows you to manipulate the scroll offset, does not use the AnnotatedText 🙃
Metadata
Metadata
Assignees
Labels
No labels