Trix using rails actiontext add pure html

妖精的绣舞 提交于 2021-02-10 22:17:18

问题


I would like to use the rich text editor trix in rails6. How can I add a button to trix which adds html content?


回答1:


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?



来源:https://stackoverflow.com/questions/62858681/trix-using-rails-actiontext-add-pure-html

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!