0

I am trying to use Froala Editor, however I have a problem when trying to display something I have saved before (https://www.froala.com/wysiwyg-editor/docs#frontend)

The problem is that, having #{article.body} with the value<p>aaaa</p>:

  • if I put in my facelets page <div class="fr-view">#{article.body}</div> I see on screen the text <p>aaaa</p> (which is incorrect)
  • however if I put in my facelets page <div class="fr-view"><p>aaaa</p></div> I see aaaa (which is the correct text)

Any idea of why is this happening?

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Aliuk
  • 1,249
  • 2
  • 17
  • 32

1 Answers1

0

You need to tell JSF EL not to escape Bean's field value using <h:outputText> tag.

<div class="fr-view"><h:outputText value="#{article.body}" escape="false"/></div>
AsSiDe
  • 1,826
  • 2
  • 15
  • 24