Components in rich-text fields don't have content


I’ve got all my components setup and working, and I’m working on adding a component to manage highlighted syntax. The blok renders content fine on pages, but when it’s used in the rich-text field the component is rendered but the content is missing. It seems like ‘blok’ is undefined when used in this way.

This is the component I’m trying to render: squashfold21/HighlightedCode.vue at main · chprince/squashfold21 · GitHub

This is where the post rich-text is rendered:

I’ve also setup the richtextrenderer here:

I’ve been scouring the docs and forums for ages and I can’t seem to find a solution.

Thanks in advance

As it turned out, in my component I was referencing “blok”, I needed to reference ‘document’ when the component is loaded through a rich-text field.