Does anybody use and prefer Redcloth (or bluecloth, which appears to be alpha)? Does it affect performance much? Is there a way to get it to automatically process templates without having to call textilize? Thanks, Joe -- Posted via ruby-forum.com.
Joe - I use redcloth all the time for my projects. It gives my users and easy way to mark up my documents / comments (my site, AreYouHiring areyouhiring.com) without having to worry about HTML. In fact, it seems safer - I can filter out pure html from the content by using "h", and then render what''s left via RedCloth. I don''t see performance issues yet, but I plan to implement caching to cover that. I simple do something like this in a helper: RedCloth.new(body).to_html to render my text. Hope this helps somewhat. On 3/6/06, Joe <joe@yahoo.com> wrote:> Does anybody use and prefer Redcloth (or bluecloth, which appears to be > alpha)? Does it affect performance much? Is there a way to get it to > automatically process templates without having to call textilize? > > Thanks, > Joe > > -- > Posted via ruby-forum.com. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > lists.rubyonrails.org/mailman/listinfo/rails >
Joe wrote:> Does anybody use and prefer Redcloth (or bluecloth, which appears to be > alpha)? Does it affect performance much? Is there a way to get it to > automatically process templates without having to call textilize? >I use RedCloth--which is more flexible. Overhead is negligible. As to auto formatting, not really--unless you want to store the processed version of your text in the database.
I like Bluecloth myself simply because I prefer the Markdown syntax. I have been using it as part of Typo and it works well, I have not encountered any issues thus far. On 3/6/06, Berin Loritsch <bloritsch@d-haven.org> wrote:> > Joe wrote: > > Does anybody use and prefer Redcloth (or bluecloth, which appears to be > > alpha)? Does it affect performance much? Is there a way to get it to > > automatically process templates without having to call textilize? > > > > I use RedCloth--which is more flexible. Overhead is negligible. As to > auto formatting, not really--unless you want to store the processed > version of your text in the database. > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > lists.rubyonrails.org/mailman/listinfo/rails >-------------- next part -------------- An HTML attachment was scrubbed... URL: wrath.rubyonrails.org/pipermail/rails/attachments/20060307/3252243c/attachment.html
Tangent to this topic -- has anyone found a good pattern to using truncate and textilize together? Perhaps have written a smart_truncate_and_textilize helper? Calling truncate after the textilize leaves the possibility of unclosed or interrupted HTML tags, running truncate prior to textilize can result in textile markup being rendered. Thanks! On 3/7/06, Jeff Barczewski <jeff.barczewski@gmail.com> wrote:> > I like Bluecloth myself simply because I prefer the Markdown syntax. I > have been using it as part of Typo and it works well, I have not encountered > any issues thus far. > > > On 3/6/06, Berin Loritsch <bloritsch@d-haven.org> wrote: > > > > Joe wrote: > > > Does anybody use and prefer Redcloth (or bluecloth, which appears to > > be > > > alpha)? Does it affect performance much? Is there a way to get it to > > > automatically process templates without having to call textilize? > > > > > > > I use RedCloth--which is more flexible. Overhead is negligible. As to > > auto formatting, not really--unless you want to store the processed > > version of your text in the database. > > > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > lists.rubyonrails.org/mailman/listinfo/rails > > > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > lists.rubyonrails.org/mailman/listinfo/rails > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: wrath.rubyonrails.org/pipermail/rails/attachments/20060307/095d9d77/attachment.html
Is there a way to use RedCloth in a controller? I can get it to work fine in views. Something like: def view RedCloth.new(response).to_html end Joe -- Posted via ruby-forum.com.
On 3/7/06, D. Taylor Singletary <taylorsingletary@gmail.com> wrote:> Tangent to this topic -- has anyone found a good pattern to using truncate > and textilize together? Perhaps have written a smart_truncate_and_textilize > helper? Calling truncate after the textilize leaves the possibility of > unclosed or interrupted HTML tags, running truncate prior to textilize can > result in textile markup being rendered. > > Thanks!I use close_open_html(truncate(markdown(the_text), 200)) with the close_open_html routine found here: <blog.ideoplex.com/2005/03/17.html>. I renamed "sanitize" to "close_open_html" because I thought that it was more descriptive. Sincerely, Tom Lieber AllTom.com GadgetLife.org