HTML Markup
I’d say one of the most common aims of an application is making it self-sustainable and self-maintainable. When we deliver the last version of an app, we usually dream of forgetting completely about it. We want to have nothing else to do with that client (unless of course she wants an upgrade, another product, or she refers us to another potential client). Nonetheless, this hardly ever happens just like this. At least not to me (why is that?). A finished project usually means infinite calls and all kind of unexpected sorts of stressing problems.
Most frequently the reason is someone not reading your thoughtfully written documentation, or maybe someone regretting the way some particular functionality works (usually one explicitly detailed and requested by herself in the past) or [and that's my point today], someone simply “forgetting” how to add or format content in their web.
You want to give them the possibility to add content easily and format it so it looks fancy and gives them a sense of self-satisfaction. And here comes why to use some good markup tool. You need to let your users create HTML (from a text input, textarea, etc.) but, indeed, without actually writing it. You don’t want users writing code that will break your layout! Or having them write a special character, malicious coding, like a missed “” or anything likely to catch you with your pants down and expose any security leak.
The decision to make is thus whether to use the fanciest WYSIWYG (What You See is What You Get) editor with a full set of MSWord-like buttons and labels, or else just a markup language that will magically convert content from plain to html on submitting. After many years of improvements and fights between markup languages and WYSIWYG editors in my opinion only the following remained standing:
Markup languages, editors and gems (and its links):
| Markup Language | My favourite WYSIWYG editor | Ruby Gem |
| Textile | CKEditor (former FCKeditor) | RedCloth |
| Markdown | wmd | BlueCloth |
| BBCode | Markitup (generates Textile, Markdown and HTML) | BBRuby |
| Generated HTML | TinyMCE | TinyMCE Hammer |
After having used many of them, my personal preferences are TinyMCE for users that need to make a great deal of formatting to content (last time I implemented it was for a school web interface). It gives them a full set of tools and buttons that allow virtually anything to be done. Besides, it is awesomely simple to use, and even more simple with Rails. Of course, you are always bonded on having users with good taste. For a more professional or technical environment, for instance, a project management tool, I think Markdown language works just neat. The best WYSIWYG editor for markdown I believe is wmd, which I happily discovered not long ago and have been using in my last projects. It’s sleek and unobtrusive, and it lets coexist PRO people, that enjoy writing straight markup (or down, in this case), and those who simply prefer selecting lines and pressing buttons (and leave alone their mental caches). I never understood those people that hates helper bars for markup as a dogma, why shouldn’t people be allowed to press buttons instead of memorize codes? wmd is a one-fits-all!
Tags: bbcodeblueclothckeditorhammerhtml editormarkdownmarkup languageredclothruby on railstextiletinymcewmdwysiwyg
2 Comments »





