assente snix
2006-Jun-08 22:18 UTC
[Rails] Is possible to mantain a co0l blog without broke XHTML?
I started to write content in textarea in HTML then I migrated to BBCode, then I came back HTML thanks to TinyMCE, now I see with interest textile and markaby, but will they be "THE solution"? As "internal" language anybody is free to use the language he/she prefers but about the future? Probably you won''t be able to reuse it in another platform/cms Anybody wants an easy way to add texts, code, photos, videos,.. into the website, but there are 2 completly different ways to do it: WYSIWYM wiki, markaby, textile,.. You "should" never get invalid code using these tecniques and you could use some kind of helper to get common code, but you have to write imaging the output and sometimes you have to remember to escape something WYSIWYG You get easly what you want, but sometime the code could be dirty and useless. But you use HTML inside so you''ll be sure that every cms could import it. What about an hybrid? You write a simple HTML code via WYSIWYG editor and then re-parse it again with Rails-aCMS-orAnythingElse. Probably the best solution for the code highlightning is Coderay (http://coderay.rubychan.de/); you write a code like: <code lang="ruby"> Class Test end </code> and you get: <code lang="ruby"> <span class="keyword">Class</span> Test <span class="keyword">end</span> </code> The same concept could be used also for other kind of objects I mean: <img alt="An wonderful image" src="image.jpg" /> Could became after reparsed: <div> <img alt="A wonderful image" src="image.jpg" /> <div class="cap">A wonderful image</div> </div> What do you think about it? Do you have better ideas about how to mantain a clean and indipendent internal code? A problem could be that parse alwais is heavy but with caching this isn''t a problem anymore. -- a random XHTML blog with XHTML broken http://blog.innerewut.de/articles/page/3 -- Posted via http://www.ruby-forum.com/.