Skip to content

Prototype Mermaid embeds in markdown previews#1

Open
dankarization wants to merge 3 commits into
masterfrom
prototype/markdown-mermaid-embed-android
Open

Prototype Mermaid embeds in markdown previews#1
dankarization wants to merge 3 commits into
masterfrom
prototype/markdown-mermaid-embed-android

Conversation

@dankarization

@dankarization dankarization commented May 22, 2026

Copy link
Copy Markdown
Owner

What

  • detect fenced code blocks with language mermaid inside markdown file previews
  • convert them into TL_pageBlockEmbed blocks
  • render them inline via the existing ArticleViewer embed WebView path
  • add a GitHub Actions workflow that builds a standalone debug APK for quick testing

Validation

  • built and installed the Android test APK from this branch
  • opened markdown documents with Mermaid blocks from Saved Messages
  • verified inline preview inside the article sheet and full article viewer rendering on-device
  • verified a longer markdown file with multiple Mermaid blocks and plain text preserved before, between, and after diagrams

Screenshots

Saved Messages preview
Article viewer rendering
Detailed markdown preview 1
Detailed markdown preview 2

Notes

  • prototype only
  • currently loads Mermaid from CDN inside the embed HTML
  • height is reported back through TelegramWebviewProxy.postEvent("resize_frame", ...)
  • intended to validate the UX path before discussing vendoring and offline policy

@dankarization dankarization marked this pull request as ready for review May 23, 2026 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant