smashingboxes / cardboard-admin-archive

Rails 4 CMS
http://smashingboxes.com
Other
65 stars 13 forks source link

Replacing WYSIWYG with Markdown editor #116

Open iandonovan opened 9 years ago

iandonovan commented 9 years ago

What are our thoughts on replacing WYSIWYG with a Markdown (text) editor? We already use the Redcarpet gem on the SB website for rendering Markdown, so I see no reason why it can't be used here.

I'm in the process now of changing our rich_text input to display a sort of toggle between WYSIWYG and Markdown, modifying the same model attribute, but it's getting hairy. The WYSIWYG input needs to have a certain input name, for instance, and I find myself writing JS to modify form parameters on submittal to choose between which of the two text boxes will be sent to the model. Modifying cardboard itself requires a certain level of modularity and complication, and since we're (at the moment) the only folks who use Cardboard, I figured I'd ask to see what folks' opinions are on using Markdown instead. The only alternative I see is requiring the user to make two model attributes, call 'em rich_text_wysiwyg and rich_text_markdown, only one of which will get use at a given time. Ugh.

A brief (~1 minute) discussion during standup today seemed to point towards replacing WYSIWYG with straight MD, as long as the MD tutorial is linked in the label. It is.

A full replacement (rather than this toggle situation I've got now) would be easier to implement and maintain, and (imo) anyone who can use a WYSIWYG can write Markdown. What do we think?

For some context, this all started with #92.

joshvc commented 9 years ago

I'm fully in support. I've shipped CMS with markdown only for clients who had used a wysiwig CMS before, and they loved it. It's easy to learn (easier than html for your basic bold, italics, bullets usage) and much easier to deal with from our end.

I think Cardboard will be a better product if it's Markdown-only.