So… currently, the form submission looks like this:

suggested_text is empty.
but I use jquery to set the textarea when the form is done loading.
So… even if the rich text editor didn’t work at all, shouldn’t it still be submitting that value that I set it to?
Note:
on the actual form, I can see the suggested text’s default text.
Le Proof of default text loading in form:

Code:
<% form_remote_tag :url => {:action => :ajax_update, :controller => :changes},
:html => {:id => "modify_form"} do %>
<%= hidden_field_tag :id, @change[:id] %>
<div class="suggested_text_container">
<%= text_area_tag :suggested_text, :class=>"rl_text_form", :label=>false, :resizable => false, :style => "display: none"%>
</div>
<div class="submit_container">
<%= link_to_remote "Modify Request",
:url => { :action => :ajax_update,
:controller => :changes },
:submit => "modify_form",
:before => "set_content_to_textarea();",
:html => {:id => "comment_submit",
:class => "redline_submit"} %>
</div>
<script type="text/javascript">
$j(function(){
$j("#suggested_text").html("<%= @change.suggested_text %>");
rl_editors = $j('.rl_text_form').rte();
});
function set_content_to_textarea(){
$j('#modify_form #suggested_text').html(
$j("#modify_form iframe").contents().find(".proposal").html());
}
</script>
<% end %>
I’m using Rails 2.3.8
Set the value through val() instead of html() It should change It’s value and markup.