oatmail icon indicating copy to clipboard operation
oatmail copied to clipboard

Support Markdown Email Authoring

Open bnb opened this issue 11 years ago • 4 comments

It would be amazing if we could write our emails in Markdown. Plain Markdown or Tent Flavored Markdown (originally created for Markdown Essays, but could be used for this; it's not 100% complete yet, but we would welcome any pull requests to finish it off) would be great.

To switch between Markdown rendering and HTML, maybe just have a checkbox or tabs that show each independently.

bnb avatar Jan 08 '14 18:01 bnb

My opinion:

  • We need WYSIWYG editing with some kind of toolbar for users that don't know/care about markdown (which is most users - Oatmail should target real users, not just the early adopters)
  • There's no reason we can't support markdown without a preview/live view

So, should we have a preview tab/split screen or not?

  • I would say no if we already have a WYSIWYG editor, as it will confuse users who don't understand the concept of markdown.

Can we do this without a markdown preview/split screen?

  • We could automatically parse the markdown content as the user types (is that a good idea? or even possible? or will it just annoy users?)
  • Should we just translate into markdown on hitting send? This could produce unwanted results for users that aren't aware of markdown

That's basically why I haven't put markdown on the roadmap yet...

pauljohncleary avatar Jan 08 '14 20:01 pauljohncleary

Personally I don't like the split-screen approach, as you're spending twice the screen real estate to display the exact same content. But, I understand that it is what a lot of people like, and are even used to. Here are a few options I've found on GitHub:

jQuery.Markbar - adds a WYSIWYG style toolbar at the top of a textarea that allows the user to highlight text and edit or simply click to add: https://github.com/reinink/jQuery.Markbar

Markdown-editor - a splitscreen-style editor, not half bad. The buttons could be put in a toolbar at the top of the editor instead of on the side: http://calebegg.github.io/markdown-editor/

jQuery.markdownLiveEditor - seems like the standard WYSIWYG editor, of which I can't find any others, but the demo is broken, so I don't know if it will work or not: https://github.com/suruja/jquery.markdownliveeditor

Block Editors - these allow you to create content in blocks, one by one, instead of typing it all in one text area:

demarcate.js - minor features, but gets the job done: https://github.com/will-hart/demarcate.js

Sir Trevor - a very nicely featured and extensible editor in the block-style, I think this would be the best option, though it would be best if we could figure out a way to fall back to a simple textarea: https://github.com/madebymany/sir-trevor-js

bnb avatar Jan 09 '14 18:01 bnb

Sir Trevor is amazing, with some tweaks I think it could be awesome.

Although it's not just markdown, it's stored as JSON- which we'd have to parse into markdown/HTML for sending the email, which may or may not be trivial. As an editor I think it's really great.

pauljohncleary avatar Jan 10 '14 13:01 pauljohncleary

Yes, I think it's really nice, too. I'm planning on creating a tent-powered writing app with version control with SIr Trevor, so it'll be nice to learn a bit more about it here (if we implement it).

bnb avatar Jan 10 '14 23:01 bnb