How FluidMarkdown Delivers Real‑Time, Customizable Markdown Rendering on Mobile

FluidMarkdown is an open‑source native mobile Markdown engine that supports full CommonMark syntax, streaming and full‑document rendering, extensive style customization, HTML tag mixing, and runtime callbacks, enabling AI‑driven applications to display content smoothly on iOS and Android.

Alipay Experience Technology
Alipay Experience Technology
Alipay Experience Technology
How FluidMarkdown Delivers Real‑Time, Customizable Markdown Rendering on Mobile

In the era of large‑model‑driven AI applications, the scale and complexity of AI‑generated content keep rising, and Markdown has become a crucial bridge between AI and user interfaces, making information clearer and more structured.

However, achieving efficient, smooth real‑time Markdown rendering on native mobile platforms while supporting streaming incremental output and flexible styling remains a technical challenge.

To address this, Ant Group's terminal technology team has released and open‑sourced FluidMarkdown – a native mobile Markdown rendering engine designed for intelligent business scenarios. It handles token‑by‑token output from large models and offers highly customizable interaction and visual presentation.

GitHub: https://github.com/antgroup/FluidMarkdown

License: Apache‑2.0

Supported platforms: iOS / Android (HarmonyOS in development)

支付宝技术
支付宝技术

Why Choose FluidMarkdown?

Most mainstream Markdown parsers focus on the web (e.g., marked.js, remark) and have clear shortcomings in native mobile environments:

Limited syntax coverage – many libraries only support basic syntax and lack support for complex nesting or HTML extensions.

No streaming rendering – unable to adapt to the token‑by‑token output of large models.

Insufficient customization – weak support for style extensions and interactive events (clicks, exposure, state callbacks).

FluidMarkdown fills this gap by rendering Markdown text returned by large models in low‑latency, high‑fidelity, interactive native components, supporting dynamic content appending and highly flexible visual customization.

It is already running stably in multiple high‑traffic AI scenarios within Ant Group, with compatibility, stability, and extensibility validated at scale.

支付宝技术
支付宝技术

✨ Core Features Overview

Full Markdown Syntax Support

Implemented based on the CommonMark specification, covering most common syntax:

Headings, paragraphs, blockquotes, horizontal rules

Ordered and unordered lists

Tables, code blocks (with language identifiers)

Mathematical formulas (LaTeX), inline code

Links, images, footnotes, etc.

Mixed HTML Tag Support

In addition to standard Markdown, FluidMarkdown renders a set of HTML tags for rich‑text extensions:

<s>, <sup>, <sub>, <mark>, <a>, <span>, <cite>, <del>, <font>, <u>, <img>

Dual Rendering Modes: Streaming + Full‑Document

Streaming rendering – render as tokens arrive, perfectly matching large‑model token streams.

Full‑document rendering – render the entire content at once for traditional scenarios.

Highly Customizable Style System

Through a structured model exposing render nodes, developers can freely control:

List prefix symbols (numbers, letters, custom icons)

Font, color, spacing, and other style attributes

Custom tag handlers (see extension capabilities below)

Rich Runtime Callbacks

Clickable element events (links, images)

Content exposure monitoring (useful for analytics)

Print state change notifications (start, in‑progress, end)

Extended Tag Support (AMHTMLTransformer)

The AMHTMLTransformer enables custom tags and style extensions, such as:

<icon>
<iconlink>

Enhanced styling for some standard HTML tags

See the AMHTMLTransformer class for more details

支付宝技术
支付宝技术

🤝 Welcome to Use and Contribute to FluidMarkdown

FluidMarkdown aims to provide a smooth, flexible native mobile Markdown rendering experience for the AI era. Its open‑source vision is “co‑create AI infrastructure, contribute incremental improvements.”

We believe great foundational tools arise from community collaboration.

Whether you are a mobile developer, a Markdown enthusiast, or an enterprise team, you are invited to participate:

Mobile developers – integrate FluidMarkdown into projects and share feedback.

Markdown enthusiasts – contribute feature extensions, style optimizations, or code.

Enterprise teams – adopt it in real projects and suggest improvements.

Your involvement drives FluidMarkdown’s continuous growth.

🌟 If you find it valuable, star the GitHub repo.

💬 For questions or suggestions, open an Issue or contact the maintainer.

✨ Feel free to fork and submit PRs.

Let’s work together to build a smoother, more powerful content presentation for the next generation of intelligent applications!

支付宝技术
支付宝技术

🙏 Acknowledgements

FluidMarkdown’s creation owes much to numerous open‑source projects and engineers; we especially thank:

Markwon https://github.com/noties/Markwon

CocoaMarkdown https://github.com/indragiek/CocoaMarkdown

CommonMark Spec https://github.com/commonmark/commonmark-spec

iosMath https://github.com/max-lfeng/iosMath/

Ono https://github.com/mattt/Ono/

We also appreciate all engineers who have contributed to Ant Group’s internal Markdown components.

GitHub: https://github.com/antgroup/FluidMarkdown

iOSAndroidreal-time renderingmobile markdown
Alipay Experience Technology
Written by

Alipay Experience Technology

Exploring ultimate user experience and best engineering practices

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.