textile, markdown suggestions

1 view
Skip to first unread message

eggie5

unread,
Sep 14, 2007, 1:45:02 PM9/14/07
to Ruby on Rails: Talk
I have a text area in one of my scaffolds that is inserted into a div
element on one of my rails pages.

Right now I can white HTML in the text area and have it show with the
respective formatting when I view my page. However, I don't want to
use HTML, I want to use some markup language. Some that I've heard of
are texitle and markdown.

Does anybody have any suggestions on which one to use?

Then, how do I serialize the markup language to HTML when the page
renders?

It would be cool if the text area had sometime of menu bar for
formatting that inserted the appropriate markup language for the user.

I just want a quick implementation of this and I don't want to use a
full CMS.

Any ideas?

Bryan Noll

unread,
Sep 14, 2007, 2:07:25 PM9/14/07
to rubyonra...@googlegroups.com
This is pretty much the same thing I was trying to get at with the
thread I started (which currently has no responses) with the subject:

embedding a wiki/wiki functionality

eggie5

unread,
Sep 14, 2007, 2:16:37 PM9/14/07
to Ruby on Rails: Talk
Well,

So far, in my scaffold, If I just write my page with the textile
syntax and save it, it will be rendered to HTML if I just run the
following command in my view:

<%= RedCloth.new(@press_release.body).to_html %>

So, that's pretty cool, now I just need a WYSIWYG type control to
write the textile for me.

Alex

Bryan Noll

unread,
Sep 14, 2007, 2:16:41 PM9/14/07
to rubyonra...@googlegroups.com
I've looked around a bit more and found these:

Ruby version of Markdown
http://www.deveiate.org/projects/BlueCloth
http://maruku.rubyforge.org/

Ruby version of Textile
http://whytheluckystiff.net/ruby/redcloth/

Anyone have any experience (positive or negative) with any of these?

Bryan Noll

unread,
Sep 14, 2007, 2:17:21 PM9/14/07
to rubyonra...@googlegroups.com

Mohit Sindhwani

unread,
Sep 14, 2007, 2:24:58 PM9/14/07
to rubyonra...@googlegroups.com
I use Textile quite a bit and it works great - it's the RedCloth
implementation. I believe that's the one also used in Radiant (though
I'm not 100% sure).

Also, there's Textile Editor Helper and acts_as_textiled and they can
play together:
http://notepad.onghu.com/2007/3/28/using-textile-editor-plugin-and-acts_as_textiled

Cheers,
Mohit.
9/15/2007 | 2:24 AM.

eggie5

unread,
Sep 14, 2007, 2:48:08 PM9/14/07
to Ruby on Rails: Talk
Yeah, I just did this, I like it.

On Sep 14, 11:24 am, Mohit Sindhwani <mo_m...@onghu.com> wrote:
> I use Textile quite a bit and it works great - it's the RedCloth
> implementation. I believe that's the one also used in Radiant (though
> I'm not 100% sure).
>
> Also, there's Textile Editor Helper and acts_as_textiled and they can

> play together:http://notepad.onghu.com/2007/3/28/using-textile-editor-plugin-and-ac...

Jeff Barczewski

unread,
Sep 14, 2007, 3:23:33 PM9/14/07
to rubyonra...@googlegroups.com

On 9/14/07, eggie5 <egg...@gmail.com> wrote:

Right now I can white HTML in the text area and have it show with the
respective formatting when I view my page. However, I don't want to
use HTML, I want to use some markup language. Some that I've heard of
are texitle and markdown.

Does anybody have any suggestions on which one to use?




I prefer Markdown since the markup doesn't interfere much with the readability as text.

Others use Textile to get more control over the styling.

However Maruku is a fairly new implementation of Markdown for Ruby and it also implements Markdown+extra and Markdown+meta which gives you the benefits of markdown syntax with the ability to specify additional styling and attributes where necessary. To me, this is the best of both worlds (readability + plus additional style where needed). So I'd suggest taking a look at Maruku.

http://maruku.rubyforge.org/

Jeff



--
Jeff Barczewski, MasterView core team
Inspired Horizons Ruby on Rails Training and Consultancy
http://inspiredhorizons.com/

Bryan Noll

unread,
Sep 14, 2007, 4:35:44 PM9/14/07
to rubyonra...@googlegroups.com

Fernando Perez

unread,
Jan 24, 2009, 11:46:20 AM1/24/09
to rubyonra...@googlegroups.com

> I prefer Markdown since the markup doesn't interfere much with the
> readability as text.

Is it possible with Markdown to create something like: <h2 id='team'>Our
Team</h2>

I couldn't find any info about that. I use rdiscount to parse the plain
text to html.
--
Posted via http://www.ruby-forum.com/.

Galen King

unread,
Feb 9, 2009, 3:57:27 PM2/9/09
to Ruby on Rails: Talk
I've put up a little survey to see what people prefer. Check it out
and let us know your thoughts: http://luciddesign.co.nz/2009/2/9/textile-vs-markdown-vs-tinymce-etc

On Jan 25, 5:46 am, Fernando Perez <rails-mailing-l...@andreas-s.net>
wrote:
Reply all
Reply to author
Forward
0 new messages