froala / Craft-3-Froala-WYSIWYG

Craft 3 CMS plugin for Froala WYSIWYG HTML Rich Text Editor.
MIT License
17 stars 12 forks source link

Retrieving HTML within a Craft API attempts to render HTML, which breaks some things. #13

Open ryanpcmcquen opened 5 years ago

ryanpcmcquen commented 5 years ago

One example is an embedded video, its HTML gets turned into:

<span class=\"fr-video fr-dvb fr-draggable\">Your browser does not support HTML5 video.</span>

Rather than a video tag with a link to the video. Is there a way within the Craft backend to retrieve non-rendered HTML?

bertoost commented 5 years ago

I have to investigate that. Will come back to you a.s.a.p.

bertoost commented 5 years ago

FYI; very busy here. Will investigate tomorrow evening (finally)

bertoost commented 5 years ago

@ryanpcmcquen It's because the HTML Purifier that is applied on save. See Craft's Redactor README for more details (It's copied to Froala) and I will notify this in this repository as well. You should be able to parse or skip elements to stay in the content, or completely disable the purify setting if you like. https://github.com/craftcms/redactor#html-purifier-configs

ryanpcmcquen commented 5 years ago

@bertoost, it was happening even with the purifier disabled.

bertoost commented 5 years ago

That's strange. I have tested it with the purifier-code commented out. I will re-test a.s.a.p. using the disable feature from the CP.