Arun VK
Arun VK

Reputation: 11

Trix and Summer Note issues while content saving in database

I am building a rails blog and I needed to integrate a WYSIWYG editor so I tried with Summernote (v 0.8.1.1), everything is fine except when I create a new post , content is being saved into the database along with html tags instead of only the formatted text content. Latter I tried with Trix (v 0.10.1) and the same thing is happening.I followed everything correctly from the github docs but this only one issue persists. Thank you in advance.

This is the screen shot of the issue:screenshot

Upvotes: 0

Views: 360

Answers (2)

puneet18
puneet18

Reputation: 4427

When you display data on page use raw like:

raw(@data)

which will convert yout html tags to proper html on page.

Upvotes: 4

lakhvir kumar
lakhvir kumar

Reputation: 265

hey you should render output using raw function of ruby on rails

raw @post

or use <%=== %>

Upvotes: 0

Related Questions