Hi,
I build in a textarea where I can write markdown code according to
this article http://www.railsdiary.com/diary/ajax_markdown_preview.
It works fine in Safari but for some reason it doesn''t work in
Firefox...
This is my code:
View
--------
<%= text_area "post", :content -%>
<%= link_to_remote "preview",
{:url => { :action => "preview", :controller =>
"posts" },
:update => "preview",
:with => "''content='' +
escape(getElementById(''post_content'').value)"},
{ :class => "preview" } %>
Controller (posts)
--------------
def preview
@content = params[:content]
render :partial => ''preview''
end
Any suggestions would be superb!!
Thnx...!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---