markdown-here README

The project's README from github.com/adam-p/markdown-here. As one markdown file: README.md.

Markdown Here logo Markdown Here

Visit the website.
Get it for Chrome.
Get it for Firefox.
Get it for Thunderbird.
Get it for Opera.
Discuss it and ask questions in GitHub Discussions.

Markdown Here is a Google Chrome, Firefox, Opera, and Thunderbird extension that lets you write email† in Markdown‡ and render them before sending. It also supports syntax highlighting (just specify the language in a fenced code block).

Writing email with code in it is pretty tedious. Writing Markdown with code in it is easy. I found myself writing email in Markdown in the GitHub in-browser editor, then copying the preview into email. This is a pretty absurd workflow, so I decided to create a tool to write and render Markdown right in the email.

To discover what can be done with Markdown in Markdown Here, check out the Markdown Here Cheatsheet and the other wiki pages.

†: And Google Groups posts, and Blogger posts, and Evernote notes, and Wordpress posts! See more.
‡: And TeX mathematical formulae!

screenshot of conversion

Table of Contents

Installation Instructions
Usage Instructions
Troubleshooting
Compatibility
Notes and Miscellaneous
Building the Extension Bundles
Next Steps, Credits, Feedback, License

Installation Instructions

Chrome

Chrome Web Store

Go to the Chrome Web Store page for Markdown Here and install normally.

After installing, make sure to reload your webmail or restart Chrome!

Manual/Development

  1. Clone this repo.
  2. In Chrome, open the Extensions settings. (Wrench button, Tools, Extensions.)
  3. On the Extensions settings page, click the "Developer Mode" checkbox.
  4. Click the now-visible "Load unpacked extension…" button. Navigate to the directory where you cloned the repo, then the src directory under that.
  5. The Markdown Here extension should now be visible in your extensions list.
  6. Reload your webmail page (and maybe application) before trying to convert an email.

Firefox and Thunderbird

Mozilla Add-ons site

Go to the Firefox Add-ons page for Markdown Here and install normally.

Or go to the "Tools > Add-ons" menu and then search for "Markdown Here".

After installing, make sure to restart Firefox/Thunderbird!

Note: It takes up to a month for Mozilla to approve changes to the Firefox/Thunderbird extension, so updates (features, fixes) will lag behind what is shown here. You can manually choose to install the newest version before it's reviewed from the list of versions: https://addons.mozilla.org/en-US/firefox/addon/markdown-here/versions/

Manual/Development

  1. Clone this repo.
  2. Follow the instructions in the MDN "Your first WebExtension" article.

Opera

Note that Markdown Here only works with Opera versions 16 and higher (i.e., the ones that are based on Chromium).

Go to the Opera Add-ons store page for Markdown Here and install normally.

After installing, make sure to reload your webmail or restart Chrome!

Usage Instructions

Install it, and then…

  1. In Chrome/Opera, make sure you reload your web mail page before trying to use Markdown Here.

  2. In Chrome/Firefox/Opera, log into your Gmail, Hotmail, or Yahoo account and start a new email. In Thunderbird, start a new message.

  3. Make sure you're using the rich editor.

    • In Gmail, click the "Rich formatting" link, if it's visible.
    • In Thunderbird, make sure "Compose messages in HTML format" is enabled in your "Account Settings", "Composition & Addressing" pane.
  4. Compose an email in Markdown. For example:

    **Hello** `world`.
    
    ```javascript
    alert('Hello syntax highlighting.');
    ```
    
  5. Right-click in the compose box and choose the "Markdown Toggle" item from the context menu. Or click the button that appears on your toolbar. Or use the hotkey (SHIFT+ALT+M by default).

  6. You should see your email rendered correctly from Markdown into rich HTML.

  7. Send your awesome email to everyone you know. It will appear to them the same way it looks to you.

Revert to Markdown

After rendering your Markdown to pretty HTML, you can still get back to your original Markdown. Just right-click anywhere in the newly rendered Markdown and click "Markdown Toggle" -- your email compose body will change back to the Markdown you had written.

Note that any changes you make to the pretty HTML will be lost when you revert to Markdown.

In Gmail, you can also use the browser's Undo command (CTRL+Z / CMD+Z, or from the Edit menu). Be warned that you might also lose the last few characters you entered.

Replies

In Gmail, Thunderbird, and Google Groups, you can use "Markdown Toggle" normally: just write your reply (top, bottom, inline, wherever) and then convert. The original email that you're replying to will be left alone. (Technically: Existing blockquote blocks will be left intact.)

In Hotmail and Yahoo (which don't put the original in a blockquote), and optionally in Gmail, Thunderbird, and Google Groups, you can ensure that only the part of the reply that you wrote gets converted by selecting what you want to convert and then clicking "Markdown Toggle" -- see the next section.

Selection/Piecemeal Conversion

Sometimes you don't want to convert the entire email; sometimes your email isn't entirely Markdown. To convert only part of the email, select the text (with your mouse or keyboard), right-click on it, and click the "Markdown Toggle" menu item. Your selection is magically rendered into pretty HTML.

To revert back to Markdown, just put your cursor anywhere in the block of converted text, right-click, and click the "Markdown Toggle" menu item again. Now it's magically back to the original Markdown.

screenshot of selection conversion

Things to know about converting/reverting a selection

Options

The Markdown Here Options page can be accessed via the Chrome, Firefox, or Thunderbird extensions list. The available options include:

For Chrome and Firefox, any changes made in the Markdown Here Options are automatically synchronized between your other installations of that browser (if you have the sync feature enabled in the browser).

screenshot of options

Troubleshooting

See the Troubleshooting wiki page.

Compatibility

See the Compatibility wiki page.

Notes and Miscellaneous

Building the Extension Bundles

cd utils
node build.js

Chrome, Opera, and Firefox (WebExtension) extension

Create a file with a .zip extension containing these files and directories:

manifest.json
common/
chrome/
_locales

Next Steps

See the issues list and the Notes Wiki. All ideas, bugs, plans, complaints, and dreams will end up in one of those two places.

Feel free to create a feature request issue if what you want isn't already there. If you'd prefer a less formal approach to floating an idea, post to our GitHub Discussions.

It also takes a fair bit of work to stay up-to-date with the latest changes in all the applications and web sites where Markdown Here works.

Credits

Markdown Here was coded on the shoulders of giants.

Feedback

All bugs, feature requests, pull requests, feedback, etc., are welcome. Create an issue. Or post to out GitHub Discussions.

License

Code

MIT License: https://adampritchard.mit-license.org/ or see the LICENSE file.

Copyright 2015, Austin Anderson. Licensed to Markdown Here under the MDH contributor license agreement.

Other images

Creative Commons Attribution 3.0 Unported (CC BY 3.0) License


Dos Equis man says

markdown-here (adam-p/markdown-here)

Searching Database…

What is this?Markdown Here is a browser extension for Chrome, Firefox, Opera, and Thunderbird that lets you write an email in Markdown and then render it into styled HTML right in the compose box before sending.
Does it work on any email client, or just specific ones?It works inside webmail (Gmail, Hotmail, Yahoo) and in Google Groups, Blogger, Evernote, and WordPress through Chrome/Firefox/Opera, plus natively in the Thunderbird compose window.
How do I install and use it?Install from the Chrome Web Store, Firefox/Thunderbird Add-ons site, or Opera Add-ons store (or load it unpacked for development), reload your webmail/restart the browser, then write your email in Markdown and hit the 'Markdown Toggle' button, right-click menu item, or the SHIFT+ALT+M hotkey to render it.
Do I need the rich text editor enabled for it to work?Yes — in Gmail you need 'Rich formatting' turned on, and in Thunderbird you need 'Compose messages in HTML format' enabled, otherwise Markdown Toggle won't render properly.
Any catches with reverting or partial conversion?Reverting rendered HTML back to Markdown discards any edits made to the HTML, and converting only a selected block wraps it in a paragraph element that can break up the original line; GitHub-specific special links are also not supported.
Who is this most useful for?Developers and technical writers who want to send code snippets or formatted text in email without hand-coding HTML, since it supports syntax highlighting and TeX math formulae too.
Which browsers/clients are actually supported?Chrome, Firefox, Opera (version 16+, Chromium-based), and Thunderbird.
What Markdown flavor does it use?It uses GitHub Flavored Markdown (via the marked library), with the exception that GitHub-specific special links are not supported since it isn't tied to GitHub.
Can I convert just part of an email instead of the whole thing?Yes, select the text you want to convert, right-click, and choose 'Markdown Toggle'; only the selected portion gets rendered, and you can revert it the same way.
Does it mess up my email signature?No, email signatures are automatically excluded from conversion — anything after a line starting with '-- ' (with trailing space) is left alone, though Hotmail and Yahoo users need to add that marker themselves.
What libraries power the rendering?Markdown-to-HTML conversion uses marked, syntax highlighting uses highlight.js, and HTML-to-text conversion uses jsHtmlToText.
Creator
adam-p
Size
17.6 MB
Stars
60.3K
Age
14y
Commits · 90 Days