##view

<div id="comments_area">
<h3 id="comments_count"><%= pluralize(@article.comments_count, 'comment') %></h3>
<% cache do %>
<div id="comments">
<%= render :partial => @comments %>
</div>
<div id="live-preview" style="display: none;" class="markdown">
</div>
<div id="new_comment">
<div id="comment_form">

<% remote_form_for :comment, :url => comment_article_path(@article), :html => {:id => "comment-form"} do |f| %>
<%= render :partial => 'comment_form', :locals => {:f => f, :bt_name => 'comment'} %>
<% end %>
</div>
<%= render :partial => 'articles/comment_info' %>
</div>
<%= observe_form "comment-form",
:frequency => 1,
:update => "live-preview",
:complete => "Element.show('live-preview')",
:url => { :action => "preview" } %>
<% end %>
</div>

##controller

def preview
render :layout => false

respond_to |format| do
format.js
end
end