compose-richtext
compose-richtext copied to clipboard
Option to use parsed Markdown
Currently the library parses markdown internally, but there are several issues with it:
- The parsing is asynchronous without any callbacks, which causes many problems. For example, it's not possible to scroll the list with markdown items to the right position because in the initial state all items are zero height
- It's not possible to do parsing and related logic in the view model or data layer
- It's not possible to support custom nodes (this is something we want to contribute later as well)
This PR adds an overload for Markdown
composable that takes Commonmark Node
object.
One drawback is that we need to expose Commonmark as an API dependency because public API now uses it, but feel like it should be ok considering that the module is called richtext-commonmark
.