this is what I have in my view:
<% form_remote_tag :url => { :controller => 'comments', :action => "create", :post_id => "#{@post.id}"}, :html => {:id => 'comment_form' },
:before => "tinyMCE.triggerSave(true,true);" do %>
<%= label_tag 'Comment' %><br/>
<%= text_area_tag :comment_body, nil,:rows => 10, :cols => 100 %><br/>
<p style="margin-top: 10px;">
<%= submit_tag 'Add',:id => 'btnCommentSave' %>
</p>
<% end %>
Tinymce editor is displayed properly.
In my controller: how to get the contents of the text area? I am expecting the contents in params[:comment_body] and I am not seeing it?
I tried doing this also,
$('#btnCommentSave').click( function(){
tinyMCE.triggerSave(true,true);
$('#comment_form').submit();
});
What am I missing? Thanks