[英]how to remove html tags while doing inline edit via 'Best in place' editing
Am doing an inline edit using 'best in place' gem. 我正在使用“最佳位置”宝石进行内联编辑。 Everything works fine but while edit with rich text document(when styles are applied) it is shows the same tags on the view page. 一切正常,但在使用富文本文档进行编辑时(应用样式时),它在视图页面上显示相同的标记。
I tried with :display_with => lambda { |v| v.html_safe }
我尝试过:display_with => lambda { |v| v.html_safe }
:display_with => lambda { |v| v.html_safe }
Almost works fine but edit area is not shows properly.Only a slight area will be shown because of the rich textbox usage.so any alternate instead of the above or any solution to existing.Thanks in advance :display_with => lambda { |v| v.html_safe }
几乎正常工作,但编辑区域没有正确显示。由于富文本框的使用,只显示一个小区域。所以任何替代,而不是上述或现有的任何解决方案。提前谢谢
<td class= "index_view ipad_index_view">
<%= best_in_place_if can?(:edit_goals),goal,:description,url: admin_goal_path(goal,:page => "inline"),:display_with => lambda { |v| v.html_safe } %>
</td>
Editing area is the entire area where the text with the alignment and styles given. 编辑区域是给定对齐和样式的文本的整个区域。 Currently if normal edit done w/o using rich textfield everything works fine but while done with rich text box only at the beginning the edit area appears. 目前,如果使用富文本字段进行正常编辑,则一切正常,但仅在开始时使用富文本框完成编辑区域。 The result is correct but the view is wrong 结果是正确的,但视图是错误的
try using raw
tag. 尝试使用raw
标签。 something like <%= raw @post.body %>
in your block. 您的块中的<%= raw @post.body %>
类的东西。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.