A collection of useful ShowdownJS extensions for enhanced markdown rendering.
Install the package via npm:
npm install showdown-extensions
- YouTube: Embed YouTube videos
- CodePen: Embed CodePen snippets
- Twitter: Embed Twitter posts
- Gist: Embed GitHub Gists
- Instagram: Embed Instagram posts
- Vimeo: Embed Vimeo videos
- SoundCloud: Embed SoundCloud tracks
- Spotify: Embed Spotify tracks
- Figma: Embed Figma designs
- Slides: Embed Google Slides presentations
- Docs: Embed Google Docs
- Sheets: Embed Google Sheets
- Maps: Embed Google Maps
- Pinterest: Embed Pinterest pins
- Twitch: Embed Twitch streams
- Tiktok: Embed Tiktok videos
- LinkedIn: Embed LinkedIn posts
- Facebook: Embed Facebook posts
- Medium: Embed Medium stories
- Notion: Embed Notion pages
- showdown-toc: Generate a table of contents for your markdown.
- showdown-highlight: Highlight code blocks in your markdown.
- showdown-emoji: Render emojis in your markdown.
- showdown-footnotes: Add footnotes to your markdown.
- showdown-mark: Highlight text in your markdown.
- showdown-task-list: Add task lists to your markdown.
- showdown-mermaid: Render diagrams and flowcharts in your markdown.
- showdown-katex: Render math equations in your markdown.
- showdown-plantuml: Render PlantUML diagrams in your markdown.
- showdown-uml: Render UML diagrams in your markdown.
- showdown-video: Embed videos in your markdown.
- showdown-audio: Embed audio files in your markdown.
- showdown-iframe: Embed iframes in your markdown.
- showdown-accordion: Add accordions to your markdown.
- showdown-tabs: Add tabs to your markdown.
- showdown-details: Add details to your markdown.
Embed YouTube videos in your markdown.
import showdown from "showdown";
import { youtubeExtension } from "showdown-extensions/youtube";
const converter = new showdown.Converter();
converter.addExtension(youtubeExtension, "youtube");
const markdownString = "{% youtube https://youtu.be/0d6tf4te4lw %}";
const html = converter.makeHtml(markdownString);
console.log(html);
Embed CodePen snippets in your markdown.
import showdown from "showdown";
import { codepenExtension } from "showdown-extensions/codepen";
const converter = new showdown.Converter();
converter.addExtension(codepenExtension, "codepen");
const markdownString = "{% codepen https://codepen.io/pen/wefewfw %}";
const html = converter.makeHtml(markdownString);
console.log(html);
Embed Twitter posts in your markdown.
import showdown from "showdown";
import { twitterExtension } from "showdown-extensions/twitter";
const converter = new showdown.Converter();
converter.addExtension(twitterExtension, "twitter");
const markdownString =
"{% twitter https://twitter.com/username/status/1234567890123456789 %}";
const html = converter.makeHtml(markdownString);
console.log(html);
Embed GitHub Gists in your markdown.
import showdown from "showdown";
import { gistExtension } from "showdown-extensions/gist";
const converter = new showdown.Converter();
converter.addExtension(gistExtension, "gist");
const markdownString =
"{% gist https://gist.github.com/username/1234567890123456789 %}";
const html = converter.makeHtml(markdownString);
console.log(html);
Embed Instagram posts in your markdown.
import showdown from "showdown";
import { instagramExtension } from "showdown-extensions/instagram";
const converter = new showdown.Converter();
converter.addExtension(instagramExtension, "instagram");
const markdownString =
"{% instagram https://www.instagram.com/p/1234567890123456789 %}";
const html = converter.makeHtml(markdownString);
console.log(html);
Embed Vimeo videos in your markdown.
import showdown from "showdown";
import { vimeoExtension } from "showdown-extensions/vimeo";
const converter = new showdown.Converter();
converter.addExtension(vimeoExtension, "vimeo");
const markdownString = "{% vimeo https://vimeo.com/123456789 %}";
const html = converter.makeHtml(markdownString);
console.log(html);
Embed SoundCloud tracks in your markdown.
import showdown from "showdown";
import { soundcloudExtension } from "showdown-extensions/soundcloud";
const converter = new showdown.Converter();
converter.addExtension(soundcloudExtension, "soundcloud");
const markdownString = "{% soundcloud https://soundcloud.com/username/track %}";
const html = converter.makeHtml(markdownString);
console.log(html);
Embed Spotify tracks in your markdown.
import showdown from "showdown";
import { spotifyExtension } from "showdown-extensions/spotify";
const converter = new showdown.Converter();
converter.addExtension(spotifyExtension, "spotify");
const markdownString = "{% spotify https://open.spotify.com/track/trackid %}";
const html = converter.makeHtml(markdownString);
console.log(html);
Embed Figma designs in your markdown.
import showdown from "showdown";
import { figmaExtension } from "showdown-extensions/figma";
const converter = new showdown.Converter();
converter.addExtension(figmaExtension, "figma");
const markdownString = "{% figma https://www.figma.com/file/fileid %}";
const html = converter.makeHtml(markdownString);
console.log(html);
Embed Google Slides presentations in your markdown.
import showdown from "showdown";
import { slidesExtension } from "showdown-extensions/slides";
const converter = new showdown.Converter();
converter.addExtension(slidesExtension, "slides");
const markdownString =
"{% slides https://docs.google.com/presentation/d/presentationid %}";
const html = converter.makeHtml(markdownString);
console.log(html);
Embed Google Docs in your markdown.
import showdown from "showdown";
import { docsExtension } from "showdown-extensions/docs";
const converter = new showdown.Converter();
converter.addExtension(docsExtension, "docs");
const markdownString =
"{% docs https://docs.google.com/document/d/documentid %}";
const html = converter.makeHtml(markdownString);
console.log(html);
Embed Google Sheets in your markdown.
import showdown from "showdown";
import { sheetsExtension } from "showdown-extensions/sheets";
const converter = new showdown.Converter();
converter.addExtension(sheetsExtension, "sheets");
const markdownString =
"{% sheets https://docs.google.com/spreadsheets/d/spreadsheetid %}";
const html = converter.makeHtml(markdownString);
console.log(html);
Embed Google Maps in your markdown.
import showdown from "showdown";
import { mapsExtension } from "showdown-extensions/maps";
const converter = new showdown.Converter();
converter.addExtension(mapsExtension, "maps");
const markdownString =
"{% maps https://www.google.com/maps?q=latitude,longitude %}";
const html = converter.makeHtml(markdownString);
console.log(html);
Embed Pinterest pins in your markdown.
import showdown from "showdown";
import { pinterestExtension } from "showdown-extensions/pinterest";
const converter = new showdown.Converter();
converter.addExtension(pinterestExtension, "pinterest");
const markdownString = "{% pinterest https://www.pinterest.com/pin/pinid %}";
const html = converter.makeHtml(markdownString);
console.log(html);
Embed Twitch streams in your markdown.
import showdown from "showdown";
import { twitchExtension } from "showdown-extensions/twitch";
const converter = new showdown.Converter();
converter.addExtension(twitchExtension, "twitch");
const markdownString = "{% twitch https://www.twitch.tv/username %}";
const html = converter.makeHtml(markdownString);
console.log(html);
Embed Tiktok videos in your markdown.
import showdown from "showdown";
import { tiktokExtension } from "showdown-extensions/tiktok";
const converter = new showdown.Converter();
converter.addExtension(tiktokExtension, "tiktok");
const markdownString =
"{% tiktok https://www.tiktok.com/@username/video/videoid %}";
const html = converter.makeHtml(markdownString);
console.log(html);
Embed LinkedIn posts in your markdown.
import showdown from "showdown";
import { linkedinExtension } from "showdown-extensions/linkedin";
const converter = new showdown.Converter();
converter.addExtension(linkedinExtension, "linkedin");
const markdownString =
"{% linkedin https://www.linkedin.com/posts/username/postid %}";
const html = converter.makeHtml(markdownString);
console.log(html);
Embed Facebook posts in your markdown.
import showdown from "showdown";
import { facebookExtension } from "showdown-extensions/facebook";
const converter = new showdown.Converter();
converter.addExtension(facebookExtension, "facebook");
const markdownString =
"{% facebook https://www.facebook.com/username/posts/postid %}";
const html = converter.makeHtml(markdownString);
console.log(html);
Embed Medium stories in your markdown.
import showdown from "showdown";
import { mediumExtension } from "showdown-extensions/medium";
const converter = new showdown.Converter();
converter.addExtension(mediumExtension, "medium");
const markdownString = "{% medium https://medium.com/@username/storyid %}";
const html = converter.makeHtml(markdownString);
console.log(html);
Embed Notion pages in your markdown.
import showdown from "showdown";
import { notionExtension } from "showdown-extensions/notion";
const converter = new showdown.Converter();
converter.addExtension(notionExtension, "notion");
const markdownString = "{% notion https://www.notion.so/username/pageid %}";
const html = converter.makeHtml(markdownString);
console.log(html);
import showdown from "showdown";
import { tocExtension } from "showdown-extensions/showdown-toc";
const converter = new showdown.Converter();
converter.addExtension(tocExtension, "toc");
const markdownString = `
# Heading 1
## Heading 2
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6
`;
const html = converter.makeHtml(markdownString);
console.log(html);
import showdown from "showdown";
import { highlightExtension } from "showdown-extensions/showdown-highlight";
const converter = new showdown.Converter();
converter.addExtension(highlightExtension, "highlight");
const markdownString = `
\`\`\`javascript
console.log("Hello, World!");
\`\`\`
`;
const html = converter.makeHtml(markdownString);
console.log(html);
import showdown from "showdown";
import { emojiExtension } from "showdown-extensions/showdown-emoji";
const converter = new showdown.Converter();
converter.addExtension(emojiExtension, "emoji");
const markdownString = `
:smile: :+1: :heart:
`;
const html = converter.makeHtml(markdownString);
console.log(html);
import showdown from "showdown";
import { footnotesExtension } from "showdown-extensions/showdown-footnotes";
const converter = new showdown.Converter();
converter.addExtension(footnotesExtension, "footnotes");
const markdownString = `
This is a footnote[^1].
[^1]: This is the footnote content.
`;
const html = converter.makeHtml(markdownString);
console.log(html);
import showdown from "showdown";
import { markExtension } from "showdown-extensions/showdown-mark";
const converter = new showdown.Converter();
converter.addExtension(markExtension, "mark");
const markdownString = `
==Highlighted text==
`;
const html = converter.makeHtml(markdownString);
console.log(html);
import showdown from "showdown";
import { taskListExtension } from "showdown-extensions/showdown-task-list";
const converter = new showdown.Converter();
converter.addExtension(taskListExtension, "taskList");
const markdownString = `
- [x] Task 1
- [ ] Task 2
`;
const html = converter.makeHtml(markdownString);
console.log(html);
import showdown from "showdown";
import { mermaidExtension } from "showdown-extensions/showdown-mermaid";
const converter = new showdown.Converter();
converter.addExtension(mermaidExtension, "mermaid");
const markdownString = `
\`\`\`mermaid
graph TD;
A-->B;
A-->C;
B-->D;
C-->D;
\`\`\`
`;
const html = converter.makeHtml(markdownString);
console.log(html);
import showdown from "showdown";
import { katexExtension } from "showdown-extensions/showdown-katex";
const converter = new showdown.Converter();
converter.addExtension(katexExtension, "katex");
const markdownString = `
$$
\\frac{1}{2}
$$
`;
const html = converter.makeHtml(markdownString);
console.log(html);
import showdown from "showdown";
import { plantumlExtension } from "showdown-extensions/showdown-plantuml";
const converter = new showdown.Converter();
converter.addExtension(plantumlExtension, "plantuml");
const markdownString = `
\`\`\`plantuml
@startuml
Alice -> Bob: Hello
Bob -> Alice: Hi!
@enduml
\`\`\`
`;
const html = converter.makeHtml(markdownString);
console.log(html);
import showdown from "showdown";
import { umlExtension } from "showdown-extensions/showdown-uml";
const converter = new showdown.Converter();
converter.addExtension(umlExtension, "uml");
const markdownString = `
\`\`\`uml
@startuml
Alice -> Bob: Hello
Bob -> Alice: Hi!
@enduml
\`\`\`
`;
const html = converter.makeHtml(markdownString);
console.log(html);
import showdown from "showdown";
import { videoExtension } from "showdown-extensions/showdown-video";
const converter = new showdown.Converter();
converter.addExtension(videoExtension, "video");
const markdownString = `
{% video https://www.youtube.com/watch?v=0d6tf4te4lw %}
`;
const html = converter.makeHtml(markdownString);
console.log(html);
import showdown from "showdown";
import { audioExtension } from "showdown-extensions/showdown-audio";
const converter = new showdown.Converter();
converter.addExtension(audioExtension, "audio");
const markdownString = `
{% audio https://www.soundcloud.com/username/track %}
`;
const html = converter.makeHtml(markdownString);
console.log(html);
import showdown from "showdown";
import { iframeExtension } from "showdown-extensions/showdown-iframe";
const converter = new showdown.Converter();
converter.addExtension(iframeExtension, "iframe");
const markdownString = `
{% iframe https://www.example.com %}
`;
const html = converter.makeHtml(markdownString);
console.log(html);
import showdown from "showdown";
import { accordionExtension } from "showdown-extensions/showdown-accordion";
const converter = new showdown.Converter();
converter.addExtension(accordionExtension, "accordion");
const markdownString = `
<details>
<summary>Click to expand</summary>
This is the content.
</details>
`;
const html = converter.makeHtml(markdownString);
console.log(html);
import showdown from "showdown";
import { tabsExtension } from "showdown-extensions/showdown-tabs";
const converter = new showdown.Converter();
converter.addExtension(tabsExtension, "tabs");
const markdownString = `
<div class="tabs">
<input type="radio" id="tab1" name="tab-group" checked>
<label for="tab1">Tab 1</label>
<div class="tab">
This is the content for Tab 1.
</div>
<input type="radio" id="tab2" name="tab-group">
<label for="tab2">Tab 2</label>
<div class="tab">
This is the content for Tab 2.
</div>
</div>
`;
const html = converter.makeHtml(markdownString);
console.log(html);
{% youtube https://youtu.be/0d
6tf4te4lw %}
{% codepen https://codepen.io/pen/wefewfw %}
{% twitter https://twitter.com/username/status/1234567890123456789 %}
{% gist https://gist.github.com/username/1234567890123456789 %}
{% instagram https://www.instagram.com/p/1234567890123456789 %}
{% vimeo https://vimeo.com/123456789 %}
{% soundcloud https://soundcloud.com/username/track %}
{% spotify https://open.spotify.com/track/trackid %}
{% figma https://www.figma.com/file/fileid %}
{% slides https://docs.google.com/presentation/d/presentationid %}
{% docs https://docs.google.com/document/d/documentid %}
{% sheets https://docs.google.com/spreadsheets/d/spreadsheetid %}
{% maps https://www.google.com/maps?q=latitude,longitude %}
{% pinterest https://www.pinterest.com/pin/pinid %}
{% twitch https://www.twitch.tv/username %}
{% tiktok https://www.tiktok.com/@username/video/videoid %}
{% linkedin https://www.linkedin.com/posts/username/postid %}
{% facebook https://www.facebook.com/username/posts/postid %}
{% medium https://medium.com/@username/storyid %}
{% notion https://www.notion.so/username/pageid %}
Check out the Demo to see the extensions in action.
To contribute to the project, clone the repository and install the dependencies:
git clone
cd showdown-extensions
npm install
Run the tests:
npm test
We welcome contributions to add more extensions and improve existing ones. Please read our Contributing Guide for details on how to get started.
Feel free to add more extensions and improve the existing ones. Check out our Contributing Guide for details on how to contribute.
Happy Markdown Rendering!
This project is licensed under the MIT License. See the LICENSE file for more details.
- ShowdownJS - A JavaScript Markdown to HTML converter.
For any inquiries or support, please open an issue on the GitHub repository or contact the maintainer.
Happy Markdown Rendering!