Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails wiki-style editing - textile or markdown?

I'm looking to give our users some wiki-style editing capabilities (much like I'm using now) on our Rails web application. Does anyone have any opinions on whether I should use Markdown/BlueCloth or Textile/RedCloth (or something else entirely)?

Also, related to this question, is BlueCloth secure from a XSS perspective?

Thanks.

like image 816
Martin Dow Avatar asked Feb 19 '09 21:02

Martin Dow


2 Answers

I find that Markdown tends to be easier for people to learn (since it looks like how people usually "style" plaintext) and less closely tied to the underlying HTML. Textile has tons of ways of specifying headers and HTML classes and so on — useful for a one-man blog, not so much for a general-purpose templating engine.

For Ruby Markdown support, I'd consider RDiscount. But neither Markdown nor Textile does anything to protect you from XSS as far as I know.

like image 157
Chuck Avatar answered Sep 22 '22 23:09

Chuck


I personally prefer Textile, both in syntax and ease of use. I've had quite a few problems even getting Markdown working, but Textile was a snap.

I've been using Textile with custom code, plus this Javascript textarea editor for the client-side editor and it's performed well.

Textile also converts a lot of shorthands to their proper typographical/grammatical equivalents (ie. -- to an em dash) which is nice for publishing or print websites, or again just as a personal preference.

like image 39
Luke Avatar answered Sep 26 '22 23:09

Luke