I'm trying to get the current HTML from an element using Froala 2.4
My main reason is to be able to compare the original HTML from the new HTML to see if the user has changed anything, and if that case trigger a save-event.
Here's my current code
console.log($(this).froalaEditor('html.get'))
console.log($(this).data('froala.editor')._original_html);
And here's the output
<p spellcheck="false">TestString<b>Edited</b></p>
TestString<b>Original</b>
The problem is that I want to only retrieve this from the first outout:
TestString<b>Edited</b>
(I don't want the Paragraph-tag to be included, in this example)
I could make a short function to take care of that for me, but it seems like I'm missing something really obvious regarding the way I get the string from Froala.
Help really appreciated!
<p>
tags. – Valetudinarian