DRAFTJS to RICH_CONTENT for #richContentViewer

I’m having trouble with

Displaying DRAFTJS-formatted objects from WIX Groups and WIX Comments in a RichContentViewer element.

Working in

Wix Studio Editor

What I’m trying to do

Display content from the Comments Collection and WIX Groups Collection on my site in a custom repeater.

What I’ve tried so far

const test = await getItem(); // returns the Comment or WIX Group Item
const parsedContent = JSON.parse(test.entity.body.content);
$w(“#richContentViewer1”).content = parsedContent;

Error I receive when assigning it to the richContentViewer element : “TypeError: Cannot read properties of undefined (reading ‘filter’)”

I’ve started to go down the rabbit hole of NPM packages, where I would convert them manually. However, I was hoping there would be a more obvious/easier solution.

Open to suggestions if there is an element I can use that would just take a DRAFTJS-formatted object, or if there is an easy (low-maintenance) WIX-native solution!

Nudge to top of list