0
在顯示頁面上,我將字符串轉換成散列,TinyMCE的鋼軌3.1
form.html.erb
<%= f.text_area :content, :rows => 20, :cols => 120 %>
<script type="text/javascript">
$(function() {
$('textarea').tinymce({
theme: 'advanced'
});
});
</script>
show.html.erb
<p>
<%= @page.content %>
</p>
<p>
<%= link_to "Edit", editcontent_path(@page), :class => "abutton" %> |
<%= link_to "Destroy", destroycontent_path(@page), :confirm => 'Are you sure?', :method => :delete %> |
<%= link_to "View All", admins_view_content_path %>
</p>
但以下我的網頁,代碼不轉換
yupz,這工作,但我在顯示頁面的問題不是編輯器。 – 2012-07-11 08:26:18
將@ page.content從<%= tinymce%>移至text_area_tag檢查我的答案,當您傳遞<%= tinymce%>時,會出現此錯誤,這是一個字符串參數,它需要一個哈希值的配置選項。 – PriteshJ 2012-07-11 08:32:49
檢查我的問題,我編輯我的問題 – 2012-07-11 09:04:39