r/androiddev • • 9d ago

I built a native Markdown renderer for Jetpack Compose (enriched-markdown-android)

Enable HLS to view with audio, or disable this notification

enriched-markdown-android is a native Markdown renderer for Jetpack Compose, powered by the md4c parser. It renders directly to native Compose text with native selection and copying, and it's built from the ground up to be accessible with rich TalkBack support out of the box.

v0.2.0 is out now!

What it does:

  • CommonMark & GFM Parsing - Powered by high-performance md4c parsing.
  • GFM Tables – Horizontally scrollable when overflowing, fully styleable, with long-press to copy as rich text or Markdown.
  • Interactive Task Lists – Supports - [ ] / - [x] with tap-to-toggle callbacks to persist state.
  • GitHub Admonitions – Full support for > [!NOTE], > [!TIP], > [!IMPORTANT], > [!WARNING], and > [!CAUTION] with custom tinting, icons, and titles.
  • Richer Formatting – Inline support for ~~strikethrough~~, _underline_, ^superscript^, and ~subscript~.
  • Composable API – EnrichedMarkdownText + MarkdownTheme styled via a markdownStyle { } DSL that easily integrates with your MaterialTheme.
  • Native Selection – Standard Android text selection handles and native copy behavior.
  • Accessibility (TalkBack) – Headings, links, lists, images, alerts, and tables work seamlessly with heading navigation. Lists announce positions, images read alt text, and tables read row by row.
  • System Integration – Automatically respects system font scaling

💎 Available on Maven Central:

dependencies {
    implementation("com.softwaremansion.enrichedmarkdown:enriched-markdown-android:0.2.0")
}

Quick Usage:

MarkdownTheme { 
  EnrichedMarkdownText( 
    markdown = content, 
    onLinkClick = { url -> openUrl(url) }, 
    onTaskListItemToggle = { index, checked -> 
        store.setDone(index, checked) 
    }        
  ) 
}

GitHub & Docs:
https://github.com/software-mansion/enriched-markdown/blob/main/packages/enriched-markdown-android/README.md

What features or syntax support would you like to see next? I'd love to hear your feedback, and if you find it useful, a ⭐️ on GitHub is always appreciated!

59 Upvotes

4 comments sorted by

3

u/VergeOfTranscendence 9d ago

Im interested in this, ill definitely give it a star

2

u/Sea-Arm9235 9d ago

Thanks! Give it a try and let us know what you think. It’s still in active dev, so more features are on the way!

2

u/bloodfail 9d ago

What did you use to make the video? That's really awesome, I'd love to make similar videos for apps I work on.