title |
---|
Overview |
Markwon is a markdown library for Android. It parses markdown following
with the help of amazing library and renders result as _Android-native_ Spannables. **No HTML** is involved as an intermediate step. **No WebView** is required. It's extremely fast, feature-rich and extensible.It gives ability to display markdown in all TextView widgets (TextView, Button, Switch, CheckBox, etc), Toasts and all other places that accept Spanned content. Library provides reasonable defaults to display style of a markdown content but also gives all the means to tweak the appearance if desired. All markdown features listed in are supported (including support for inlined/block HTML code, markdown tables, images and syntax highlight).
- Emphasis (
*
,_
) - Strong emphasis (
**
,__
) - Strike-through (
~~
) - Headers (
#{1,6}
) - Links (
[]()
&&[][]
) - Images
- Thematic break (
---
,***
,___
) - Quotes & nested quotes (
>{1,}
) - Ordered & non-ordered lists & nested ones
- Inline code
- Code blocks
- Tables (with limitations)
- Syntax highlight
- HTML
- Emphasis (
<i>
,<em>
,<cite>
,<dfn>
) - Strong emphasis (
<b>
,<strong>
) - SuperScript (
<sup>
) - SubScript (
<sub>
) - Underline (
<u>
,ins
) - Strike-through (
<s>
,<strike>
,<del>
) - Link (
a
) - Lists (
ul
,ol
) - Images (
img
will require configured image loader) - Blockquote (
blockquote
) - Heading (
h1
,h2
,h3
,h4
,h5
,h6
) - there is support to render any HTML tag, but it will require to create a special
TagHandler
, more information can be found in HTML section
- Emphasis (
- Task lists:
- Not done
- Done with
X
-
andor smallx
- Done with
By default configuration uses TextView textColor for styling, so changing textColor changes style
:::tip Sample application
Screenshots are taken from sample application. It is a generic markdown viewer
with support to display markdown content via http
, https
& file
schemes
and 2 themes included: Light & Dark. It can be downloaded from releases
:::