I’m working on a small side project, testing out the capabilities of the new JSON RTE field type in ContentStack by integrating it with a frontend UI like ChakraUI. I’ve been able to get the basic formatting of default things like paragraphs, tables, lists and such, but I’m having a hard time figuring out how to get the data for an embedded entry. This is using Next.Js, so I’m using the ContentStack node.js package
To give a small example, I have an entry type called Call To Action, which is just a model that holds a link, maybe an image, and gives a few other options for what the link can do. I can choose to embed it into the JSON RTE, but I’m having a hard time figuring out how to get the data for it. I’m already getting the data for the rich text with the .includeReferences() method, but I can’t figure out the fields that I need to get all of the data for those other entries.
I’ve attempted to use ‘rich_text.json_rte’, as those are the field names, but I’m not sure what the other field or options are to get the rest of the data. I do get the UID and other data, but I don’t want to have to resort to a custom hook in React to get that information and render the component. I’d rather attempt to keep everything in SSG and bring in the data all at once.
Is this even possible with the current build of ContentStack?