English 中文(简体)
Markdown vs. HTML in a CMS
原标题:

I m working on a fairly large CMS-like app that includes a forum, wiki pages, etc. What whould you chose between Markdown and HTML? I m concerned about usability and the fact non-techie people will use this.

  • Markdown has a very simple syntax but few users know it
  • with HTML you can use a WYSIWYG editor but they are often terrible
最佳回答

If usability is an issue, and the target audience is non-geeks, WYSIWYG wins over Markdown. People are used to the toolbars with formatting buttons, but Markdown is a completely unknown markup language to most people (even "markup language" is completely unknown!).

I ve had to explain a Markdown-lookalike wiki syntax to non-geeks at work, and they don t love it. When you want to write something, you want to write something, not look up weird ASCII syntax. Try not to interrupt the users flow.

I would find a good WYSIWYG editor, like the one in WordPress (TinyMCE). It works ok.

问题回答

I vote for Markdown.

  1. I picked up Markdown in maybe 5 minutes in writing my first response here. Later I learned more than what I picked up here, but I d think this to be rather standard.

  2. Markdown is much simpler to get good markup out of, and if you re worried about speed just cache the resulting output.

  3. Markdown is often better, and more easily understood, in plain text than HTML is in a WYSIWYG editor. Also, no-script friendly.

And if you ve got a user who wants an embeded object, just drop the HTML code from that Youtube video in and it ll get carried over.

If you wanted to use Markdown and a WYSIWYG editor you can use something like WMD Editor which (I am 99% sure) is what is used here at StackOverflow.

The benefit of using something like this is that your non-tech users get their WYSIWYG editor, your techie users get their Markdown love and you get clean markup. Another added side effect is it may actually teach end users Markdown from using it (or at least in an ideal world...)

WMD Editor also has an instant preview (which you can see when writing posts on StackOverflow), which will show users how changing the Markdown changes the look of their text.

We store XHTML in the database, validated against a restricted XHTML schema. The front-end is either a WYSIWYG editor (for the staff who know how to deal with its quirks) or a plain-text box (for the users, with automatic link detection etc.). We can convert the content back and forth, although the plain-text box loses formatting, so we do not depend on a specific UI. If we needed more than this, I would add another converter from XHTML to markdown.

I prefer Markdown with flat-file CMS, like Grav or other.

It s simpler to change styles, but not any html content. And you will take one killer feature: use git for web-site content. You even can create branches with "holiday" content.

Actually Markdown is simpler for non-tech people.





相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签