htmlruby-on-railsrubywysiwygtrix

how can I eliminate the html tags generated along with the content in the view page, written using the Action text(trix Editor)?


I installed Action text (Trix Editor) in my Rails Application.

After writing the content,the content is generated along with the html tags. e.g.

 "div class="trix-content"> div> This is the content part. br>br> /div>

Solution

  • There is a built in function for this:

    content.to_plain_text