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…!