0
我使用的是水銀軌寶石,在那裏你可以找到它here。除了params [:value]之外,一切都很好。我在文本末尾不斷收到「br標籤」,我想更新。所以,我的參數看起來像這樣水銀軌寶石問題與價值
Parameters: {"content"=>{"post_title"=>{"type"=>"full", "value"=>"yeah<br>"}
任何人都可能有一個想法,爲什麼出現這種情況?順便說一句,這裏是我的代碼:
<script>
$(window).on('mercury:ready', function() {
var link = $('#mercury_iframe').contents().find('#edit_link');
Mercury.saveUrl = "<%= mercury_update_admin_post_path(@post) %>";
link.hide();
});
</script>
<div id="container">
<div><p id="notice"><%= notice %></p></div>
<div>
<h2><span id="post_title" class="mercury-region" data-type="editable" data-mercury="full"><%= @post.title %></span></h2>
</div>
<div>
<p>
<%= @post.date.strftime("%B %d, %Y")%>
</p>
</div>
<div class="post-body">
<div id="post_body" class="mercury-region" data-type="editable" data-mercury="full">
<%= raw simple_format(@post.body) %>
</div>
</div>
<div>
<%= link_to 'Edit', "/editor" + request.path, :class => "btn", :id => "edit_link" %>
<%= link_to 'Back', admin_posts_path, :class => "btn" %>
</div>
</div>
謝謝。如果有人能幫忙,我會很高興。