Using Markdown is different than using a WYSIWYG editor. In an application like Microsoft Word, you click buttons to format words and phrases, and the changes are visible immediately. Markdown isn't like that. When you create a Markdown-formatted file, you add Markdown syntax to the text to indicate which words and phrases should look different
Markdown has a few implementations. Buttondown starts from Python-Markdown, and we add a handful of extensions & tools to make your editing experience even better.
Markdown syntax
All HTML is valid Markdown, so if you ever want to use something more complex than what the Markdown syntax offers you can just use HTML!
Heading
Buttondown Playground
Loading playground...Bold
Buttondown Playground
Loading playground...Italic
Buttondown Playground
Loading playground...Ordered List
Buttondown Playground
Loading playground...Unordered List
Buttondown Playground
Loading playground...Code
Buttondown Playground
Loading playground...Horizontal Rule
Buttondown Playground
Loading playground...Link
Buttondown Playground
Loading playground...Image
Buttondown Playground
Loading playground...If you write in Markdown, you can drag and drop your image into the editor.
Once the image is uploaded, you can update the alt text by changing the contents of the text in the square brackets. This will look something like:
Image
Loading playground...If you'd like to turn the image into a link you can with Markdown! To do this, you'll wrap all the image code inside a Markdown link, like so:
Image link
Loading playground...LaTeX block
Markdown also supports LaTeX blocks. To add a LaTeX block in the editor, wrap your LaTeX expression inside a <div> tag with the class buttondown-block-math. For example, [ a^2 + b^2 = c^2 ] would be written as:
LaTeX block
Loading playground...You can also switch between Markdown and Fancy Mode without losing your LaTeX block.
(Note that as of now, LaTeX is only renderable as a "block", and not inline with text.)
Extensions
In addition, Buttondown uses a handful of extensions:
- smarty, to convert ASCII characters into HTML entities
- tables, to allow basic tables
- footnotes, to allow basic footnotes. (These are rendered in your online archives using littlefoot.js)
- fenced_code, to allow a more common approach for embedding code snippets
- pymdownx.tilde, for allowing of deletions and subscripts
- CodeHilite, for syntax highlighting of code snippets
Embeds
In addition to all of those, Buttondown uses some proprietary extensions for embedding things like tweets, YouTube videos, and gifs — but none of these should affect your general rendering experience.
Embeds can be invoked by putting the URL of the resource (Tweet, post, image, etc.) on its own line. Only the URL should be on the line. Any additional whitespace or characters will intercept the magic of embeds.
Embeds support URLs from the following sources:
Play around with it!
Escaping
Embeds only trigger on their own self-contained lines. If you're looking for an escape hatch out of these embeds, you can simply wrap the link in an HTML tag, like so:
Buttondown Playground
Loading playground...Tables of contents
If you're interested in creating a table of contents in your Buttondown newsletter, be sure to use names (such as <a name='heading'>) rather than ids (such as <a id='heading'>)! Gmail and many other email clients strip id tags from emails, which will break internal links.