Markdown ❺

Embed markdown content, including tables and more.

Usage Notes

Use the <markdown> element inside of any HTML Embed.

  • Works in standalone Embeds or as an embed within a rich text block

  • Works with static rich text blocks, or CMS-bound RTBs

  • Supports any Markdown that Showdown supports, plus table extensions

Here's an example of an H1 followed by a table;

<markdown>
# This is Markdown  
  
| Day | Ponsonby Doctors | Viaduct Doctors |  
| :--- | :--- | :--- |
| Mon 15th | 1pm - 5pm | 8am - 12pm |
| Tue 16th | closed | closed |
| Wed 17th | 9am- 5pm | 9am - 5pm |
| Thurs 18th | 1pm - 5pm | 8am - 12pm |
| Fri 19th | 1pm - 5pm | 8am - 12pm | 
| Sat 20th | closed | 9pm - 1pm |
| Sun 21st | closed | closed |
</markdown>

Markdown "elements"

You can convert a standalone HTML Embed element into a markdown element without needing the <markdown> tag, using a custom attriute;

[wfu-markdown]

Getting Started ( NOCODE )

STEP 1 - Add the Library

First, add the library as detailed in Quick Start.

STEP 2 - Apply the custom attributes as desired

See above for details.

Technical Notes & Credits

Uses Showdown.js for the Markdown conversion

In your live site, the markdown elements are initially hidden until they are processed. Users may see an empty space briefly before the markdown conversion happens.

For very large tables ( which this is not suited for ) that may result in a content layout shift.

Last updated