Access plugins in custom block preview

Hello,

I have a custom block, with a custom preview which uses the k-writer component.
I have the kirby-extended-writer plugin installed (GitHub - coralic/kirby-extended-writer: ✏️ Extended Writer supercharges Kirby's built-in Writer field with useful marks, nodes and features you wish were built-in), which works on the site when I use a writer field (it also loads when editing my custom block in the pop-up block editor on the left). However, the extended writer plugin is not loading when using the k-writer component within my custom block preview.

Any ideas on how I can get this to work? P.s The plugin uses the List input | Kirby CMS ui component.

My custom block preview code:

panel.plugin("my/audioblock", {
  blocks: {
    audio: {
      template: `
          <div class="writerBox">
            <div data-level="h2" class="k-block-type-heading-input">
              <k-writer
                :inline="true"
                :nodes="false"
                :marks="[]"
                :value="content.heading"
                class="k-block-type-text-input"
                @input="update({ heading: $event })"
                />
            </div>
            <k-writer
              ref="input"
              type="writer"
              :inline="content.text.inline"
              :nodes="['h1','paragraph','smallerParagraph']"
              :marks="['italic','link']"
              :placeholder="content.text.placeholder"
              :value="content.text"
              class="k-block-type-text-input"
              @input="update({ text: $event })"
              />
          </div>
          `
       }
    }
})

That’s probably a problem with the order in which the plugins are loaded. I’d try and rename the plugin folder so that it’s last or at least after the other plugin in the site/plugins folder and if that resolves the issue.

Thanks for the tip. I’ve just tried that, but it doesn’t seem to have worked.