Adding a writer mark that opens a dialog for input

You can take a look at the core email mark. You will see it needs a few different commands, not just one default, to differentiate the actions (e.g. opening dialog vs. inserting your markup after submitting the dialog.

The core email mark emits this to open the dialog: kirby/panel/src/components/Forms/Writer/Marks/Email.js at main · getkirby/kirby · GitHub

This you cannot do for yours, but instead you can open a dialog, e.g. like

this.$panel.dialog.open({
	component: "k-form-dialog",
	props: {
		fields: {...},
		value: {...}
	},
	on: {
		cancel: () => this.editor.focus(),
		submit: (values) => {
			this.$panel.dialog.close();
			this.editor.command("yourCommandToAddMarkUpToEditor", values);
		}
	}
});