Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Trix using rails actiontext add pure 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?

like image 619
Chris Avatar asked Nov 03 '25 02:11

Chris


1 Answers

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?

like image 110
Ash Avatar answered Nov 04 '25 20:11

Ash



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!