Mike
Mike

Reputation: 1210

Rails or Jquery WYSIWYG

I'm pretty much just looking for the code they used that is very similar this this WYSIWYG when adding a comment. I want them to be able to hit return and it automatically throws in a <br /> tag. I know very simple way to get it to work in a text area if they know the HTML tags, but almost no users will. So I just want a few buttons like bold, italic, and link and have it automatically do <br />'s on return. Nothing real fancy.

It can be either a jquery or a rails solution as I am using both. Thanks for any leads/help. I looked briefly into some like TinyMCE, but those do a lot more than I want users to be able to do.

Upvotes: 2

Views: 2450

Answers (3)

klochner
klochner

Reputation: 8125

I've used fckeditor, fairly easy to get running:

http://www.fckeditor.net/

but will consider the Yahoo rich text editor for my next app:

http://developer.yahoo.com/yui/editor/

Upvotes: 4

theIV
theIV

Reputation: 25774

I'm not sure if I completely understand your question, but you could have a look at wysihat. I haven't used it before, but it does look promising for some basic 'rich text' formatting.

Or, you could use Markdown to format the copy that the user inputted. There are a bunch of libraries that will parse Markdown, I typically use RDiscount.

Hope this helps. Cheers.

Upvotes: 0

Jarrod
Jarrod

Reputation: 2378

Try a combo of RecCloth and TEH. To have it show up under the text area as they type look into observe_field.

Upvotes: 0

Related Questions