How to pass a javascript variable to ruby variable

Hi,

I am trying to integrate a javascript text editor in a ROR app and I
have the following dificulty.

The text typed into the JS editor can be saved in variable E in html
format. I need to pass this to a ruby variable to (say x) in the
controller.

Any ideas on a clean way this may be done ?

A though I had was creating a non visible textbox (using say a ROR
helper) and assigning the text variable and then submitting. i was
wondering if there is a cleaner way of doing this.

TIA,
Tuka