Saving rich text to the database

I’ve started trying to use the wysihat rich text editor from 37-
signals and everything is going well except that I get an error when
trying to save the text from the enhanced field to the database. This
is from my log:

Processing InstructionsController#new (for at 2009-02-25
06:04:57) [POST]
Session ID:
Parameters: {“commit”=>“Create”, “instruction”=>
“action”=>“new”, “controller”=>“instructions”}
[4;36;1mUser Columns (0.004000) [0m [0;1mSHOW FIELDS FROM
users [0m
[4;35;1mUser Load (0.000000) [0m [0mSELECT * FROM users WHERE
( = 4) [0m
[4;36;1mInstruction Columns (0.003000) [0m [0;1mSHOW FIELDS FROM
instructions [0m
[4;35;1mSQL (0.000000) [0m [0mBEGIN [0m
[4;36;1mInstruction Create (0.000000) [0m [0;1mINSERT INTO
instructions (start_day, title, description, appointment_id,
frequency) VALUES(NULL, NULL, ‘first\nsecond\nthird’, NULL, NULL)
[4;35;1mSQL (0.063000) [0m [0mCOMMIT [0m

NoMethodError (You have a nil object when you didn’t expect it!
The error occurred while evaluating

How do I go about saving text from this field to the database? Does
it save it as html markup?

Couple of questions: first, what happens if you copy and paste the
insert SQL into your database and run it (i.e., are you sure the SQL
works on your db)? Second, what is in your log after the NoMethodError

I’ve been trying to figure this out and I don’t think its an issue
with the database. When the form is submitted, its contents are blank
everytime, so it is not submitting correctly. I have made a pastie
with my console output, ignore the template error, I am just trying to
get it to submit the contents of the text area:

Has anyone been able to use the wysihat library and successfully save
to the database?

Okay I figured it out. I emailed Josh, the author of the library and
this was his response:

If you using the 0.1 release it should automatically sync the
description textarea and the rich text area.

In on the latest version, I disabled this feature by default because
it was slowing alot of browsers down. So you can manually flush the
content out with “;”. So you could do
onclick=“;” or something like that.

So I also had to make editor a global variable and then I included in :before with