Custom writer mark, open custom link dialog

Is it possible to launch a new dialog from a custom mark. I have created a custom mark plugin, that launches the link existing dialog, but I need a dialog where you can only pick from one page. I can’t find any example or docs for this, but think it might be possible with V4?

This is what I have so far:

window.panel.plugin("oc/terms", {
  writerMarks: {
    terms: {
      get button() {
        return {
          icon: "book",
       
        };
      },

      commands() {
        return () => {
            
          this.editor.emit("link", this.editor);
          this.toggle();
        };
      },

      get name() {
        return "terms";
      },

      get schema() {
        return {
          parseDOM: [{ tag: "u" }],
          toDOM: () => ["u", { class: "highlight" }, 0], 
        };
      },
    },
  },
});

1 Like

I’m also interested in doing something similar, does anyone know if it’s possible to create custom dialogs?