Rails 4 WYSIWYG Bootsy Does Not Display Formatting

I just followed the installation instructions on the gb bootty page and it all looks good until I save and view the contents of the message.

Here is the result in the view:

<h2>Header</h2><h3>Sub head:</h3><br><img alt="Thumb 1320236280147" src="/uploads/bootsy/image/1/1320236280147.jpg"> 

None of the html formatting seems to be displayed as it eludes the quo-signs or something like that - has anyone else had this problem? I have not seen any problems on the github page or on SO to point me in the right direction.

I haven’t done anything yet but follow the instructions for installing gem, but maybe I missed something or just make a silly mistake.

If you need to know anything else, just ask.

Greetings

+5
source share
4 answers

You should have something like this, escape html:

<%= f.bootsy_area(:body, class: 'bg-code').html_safe %>

+5
source

Sergio is right, but at the weekend, but not at .html_safe, but at the entrance.

For example, in the post index:

 <%= post.body.html_safe %> 

Hope this helps.

+4
source

Perhaps raw is used?

 <%= raw(post.body) %> 
0
source

You can also add to bootsy.rb

 config.editor_options = { html: true ..... } 

so you can switch html in bootsy editor.

0
source

Source: https://habr.com/ru/post/1205635/


All Articles