First of all I’m not sure I’m doing this the right way, so please tell me if there is some different, better method.
I’m using a WYSIWYG editor to store some data into a collection, something like this:
someData: "<p>This </p> <span>is a</span> <p>test</p>"
Then in my template I have this:
<div class="test"> {{formatHTML someData}} </div>
And in my JS file i have this function:
UI.registerHelper("formatHTML", function(data) {
return $(".test").html(data);
});
But what i got returned instead of <p>This </p> <span>is a</span> <p>test</p>
is [object Object].
I’ve tried substring() to remove the “” but that can’t remove them.
Thx in advance!