Trix 使用 rails actiontext 添加纯 html [英] Trix using rails actiontext add pure html
本文介绍了Trix 使用 rails actiontext 添加纯 html的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在 rails6 中使用富文本编辑器 trix.如何向 trix 添加按钮以添加 html 内容?
I would like to use the rich text editor trix in rails6. How can I add a button to trix which adds html content?
推荐答案
要允许 ActionText 显示原始 HTML,试试这个.
To allow ActionText showing raw HTML, try this.
<%= raw your_action_text_object.to_plain_text %>
顺便说一句,我不知道你为什么要添加一个按钮,你能详细解释一下吗?
btw, I don't know why you want to add a button, could you explain in detail?
这篇关于Trix 使用 rails actiontext 添加纯 html的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文