A Markdown engine
1.Overview
Markdown is a great tool for easily making formatted text files that display across a variety of platforms. It’s popular with technical writers and bloggers for its ease of use and relatively short learning curve.
Simple, Easy learning and Powerful.
The MD2Html engine which I wrapped with ? B4x is based on the commonMark, Two features are extended, one is Emoji Shortcode support, another is tables simple implementation.
2.Features
. Emoji Shortcode
Emoji shortcodes are which begin and end with a colon and include the name of an emoji.
You can find all of them from Github.
. Tables
To add a table, use three or more hyphens (---) to create each column’s header, and use pipes (|) to separate each column.
| Syntax | Description |
| ----| --- |
| Header | Title |
| Paragraph | Text |
It is rendered as below:
Note: Alignment feature doesn't be supported
3.How to use it
It is absolutely simple to use it in B4J server.
I have attached the md2html library and an example which adapted from Erel's BBCodeDesigner.
A tip: You can declare variables with {{}} in markdown text.
Hope you enjoy it!
21/2/2023 Updated md2html.0.11.zip: fixed some bugs
Added example and libaray for B4A, Go there
1.Overview
Markdown is a great tool for easily making formatted text files that display across a variety of platforms. It’s popular with technical writers and bloggers for its ease of use and relatively short learning curve.
Simple, Easy learning and Powerful.
The MD2Html engine which I wrapped with ? B4x is based on the commonMark, Two features are extended, one is Emoji Shortcode support, another is tables simple implementation.
2.Features
. Emoji Shortcode
Emoji shortcodes are which begin and end with a colon and include the name of an emoji.
Short Code | Emoji |
`:heart`: | ? |
`:sunny`: |
You can find all of them from Github.
. Tables
To add a table, use three or more hyphens (---) to create each column’s header, and use pipes (|) to separate each column.
| Syntax | Description |
| ----| --- |
| Header | Title |
| Paragraph | Text |
It is rendered as below:
Syntax | Description |
Header | Title |
Paragraph | Text |
Note: Alignment feature doesn't be supported
3.How to use it
It is absolutely simple to use it in B4J server.
I have attached the md2html library and an example which adapted from Erel's BBCodeDesigner.
A tip: You can declare variables with {{}} in markdown text.
Hope you enjoy it!
21/2/2023 Updated md2html.0.11.zip: fixed some bugs
Added example and libaray for B4A, Go there
Attachments
Last edited: