pauljohncleary / oatmail

A webmail app that sits on the tent protocol
https://oatmail.io
19 stars 2 forks source link

Support Markdown Email Authoring #2

Open bnb opened 10 years ago

bnb commented 10 years ago

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.

pauljohncleary commented 10 years ago

My opinion:

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

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

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

bnb commented 10 years ago

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

pauljohncleary commented 10 years ago

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.

bnb commented 10 years ago

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).