Free webeditor

I have an website with a lot of textareas, and in those textarea you can
write html code. Like making an table, centre text, bold, etc. Then the
content will be shown as html on the website. Just like hotmail has an
editor when you write an email.

Does anyone has something like htmlarea of Drupal, but it is in php, and I want
something like javascript, that I can use with my RoR website. An
advantage is that you can switch between the user friendly interface,
and the basic html code.

FCKEditor Plugin for Rails