Home

Markdown Editing in Jetpack Compose

17/09/2025

For my Catenary project, I would like to be able to create and edit Markdown text files with some level of WYSIWYG text formatting. In my web editor, I use the vditor library - it is a pretty comprehensive Markdown editor from a Chinese developer, that supports WYSIWYG and split-view editing and is quite configurable. It was the best I found at the time (for free, anyway), though hasn't been updated in several years, which is always a concern.

I have been looking for a Jetpack Compose Multiplatform library that can fulfil a similar function on Desktop and Android, and unfortunately the pickings are slim.

But first, I need to consider my actual needs:

Options appraisal

I will be trialling compose-rich-editor and multiplatform-markdown-renderer . I haven't managed to get Markdown editing working with MohamedRejeb's component yet, and it's lack of support of triple-backtick code blocks is a significant limitation. MikePenz's renderer may be the best option for the Android application. I may even combine both of these - Rejeb for editing, Penz for rendering.

Further notes

compose-rich-editor:

multiplatform-markdown-renderer:

The issues with compose-rich-editor are turning me against it as a solution. For now, I will probably just present a simple BasicTextField to contain and edit the raw Markdown text, and try the multiplatform-markdown-renderer to render the text correctly.

I may be able to add a few buttons (bold, italic, etc) and manipulate the content of that with TextFieldState.edit. Very basic editing, enough for the phone app at least.

Prev: Cantilevers on the desktop - Introducing Catenary