Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/tutosrive/mcbfc/llms.txt

Use this file to discover all available pages before exploring further.

Markwon Copy Button for Fenced Code (MCBFC) is an Android reference implementation that shows how to extend the Markwon library with a fully custom layout for fenced code blocks — complete with a copy-to-clipboard button and horizontal scrolling for long lines. Everything runs inside a RecyclerView, making it far faster than a single TextView for documents with many code blocks.

Introduction

Learn what MCBFC does and when to use it as a reference for your own project.

Quickstart

Set up dependencies, clone the repo, and run the demo app in minutes.

Core Concepts

Understand how Markwon, RecyclerView, and custom entries work together.

Reference

Full API reference for the markdown class, BlockCodeEntry, and XML layouts.

What You Get

1

High-performance markdown rendering

Markwon is rendered node-by-node into a RecyclerView via MarkwonAdapter, so only visible items are bound — no frame drops on long documents.
2

Custom fenced code block layout

Each fenced code block gets its own ViewHolder backed by fenced_code_view.xml: a HorizontalScrollView keeps long lines readable and an ImageButton sits elevated in the top-right corner.
3

One-tap clipboard copy

Tapping the copy icon writes the block’s text to the system ClipboardManager and shows a Toast confirming the action — no third-party clipboard library required.
4

Minimal dependency footprint

Only two Markwon artifacts are needed — io.noties.markwon:core and io.noties.markwon:recycler — both at version 4.6.2.
MCBFC is a reference implementation, not a published library. Copy the source files into your project and adapt the layout and logic to match your design system.

Build docs developers (and LLMs) love