Writer Field Panel Plugin

Hi,

Iā€™m trying to transfer the ā€žEnhanced Toolbar Link Dialogā€œ Plugin for Textarea-Fields to the Writer-Field. My index.js of the panel plugin looks like this right now:

import EnhancedToolbarLinkDialog from "./components/EnhancedToolbarLinkDialog.vue";

panel.plugin("selftitled/enhanced-writer-link-dialog", {
  components: {
    'k-writer-link-dialog': {
      extends: EnhancedToolbarLinkDialog
    }
  }
});

I checked the components name, but its not getting replaced. If I use ā€œk-form-dialogā€ instead of ā€˜k-writer-link-dialogā€™ as the component to replace, it works. But then i.e. the Add Page Dialog gets replaced as well. What am I doing wrong?

As far as I can see, the writer field uses the k-link-dialog component (and inside that the k-form-dialog) I somehow doubt that you can simply extend the EnhancedToolbarLinkDialog

Thanks for the quick reply and the hint with the component name. Unfortunately its also not working with k-link-dialog. I already altered the EnhancedToolbarLinkDialog Plugin so that it works as replacement for k-form-dialog. This works, but other dialogs then get replaced as well.

Ok, I found a way to replace the component by replacing it as subcomponent of k-writer. My index.js looks like this now:

import EnhancedToolbarLinkDialog from "./components/EnhancedToolbarLinkDialog.vue";

panel.plugin("selftitled/enhanced-writer-link-dialog", {
  components: {
    'k-writer': {
      extends: 'k-writer',
      components: {
        'k-writer-link-dialog': EnhancedToolbarLinkDialog
      }
    }
  }
});

Hi, just checkingā€¦ Did you get this to work? :slight_smile:

Hi. Yes, see my last reply. The replacing component needed some work too. Mainly in retrieving and emitting values. Works for me, but Iā€™m not sure if its the right way. I can share this as soon as Iā€™ll have time for it.

1 Like

Please share :slight_smile:

Hello there! Its been a whileā€¦ :sweat_smile:

Iā€™m the author of the Enhanced Toolbar Link Dialog plugin and I just wanted to let you know, that Iā€™m currently working on a ā€œBlocksā€ integration. There is an open issue related to that topic: Compatibility with Kirby blocks Ā· Issue #59 Ā· gearsdigital/enhanced-toolbar-link-dialog Ā· GitHub

Iā€™ve got a working prototype right now but it will surely take another couple of days [more likely weeks :see_no_evil:]) to finalize the new Version. The reason is that I want to try another integration approach and simplify the overall user experience.