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 76 forks source link

Allow ignoring/skipping img tags in `RichText` #389

Open mr3y-the-programmer opened 1 month ago

mr3y-the-programmer commented 1 month ago

I have a list of items, and for each of which I'm using RichText to display a summary of the item's HTML description. the HTML of course can contain some img tags but I'm only interested in displaying a text description.

Currently, with the release of 1.0-rc06 that added support to image loading I'm not able to use RichText composable anymore as it breaks my item layout, and I can't find a way to tell it to ignore any img tags it encounters and just renders text the same as before, So, I'm suggesting to add a new parameter or a flag to RichTextState or the RichText composable that would allow the caller to explicitly ignore/skip images if he wants to.

MohamedRejeb commented 1 month ago

Totally makes sense, I'll work on it.