# Custom marks with pop-up

**URL:** <https://forum.getkirby.com/t/custom-marks-with-pop-up/30199>\
**Category:** Plugins\
**Created:** [December 4, 2023, 4:38pm UTC](https://forum.getkirby.com/t/custom-marks-with-pop-up/30199 "2023-12-04T16:38:34Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![lukasbestle](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/lukasbestle/32/11437_2.png) [@lukasbestle](https://forum.getkirby.com/u/lukasbestle)\
**Post date:** [September 14, 2024, 4:18pm UTC](https://forum.getkirby.com/t/custom-marks-with-pop-up/30199/3 "2024-09-14T16:18:31Z")

</div>

The `link` mark [emits the `link` event from the command](https://github.com/getkirby/kirby/blob/d14bc478632c3f1eec9b06ff2a5679ef1db2992e/panel/src/components/Forms/Writer/Marks/Link.js#L18). This event is then picked up by a [global event handler in the `Writer` component](https://github.com/getkirby/kirby/blob/d14bc478632c3f1eec9b06ff2a5679ef1db2992e/panel/src/components/Forms/Writer/Writer.vue#L153-L167). This event handler opens the dialog and triggers another ProseMirror command to update the mark with the result of the dialog.

Since you need a custom dialog, you cannot use the `link` event. Instead, you can copy the `this.$panel.dialog.open()` code to your mark implementation directly and adapt it to your needs.

If your marks only differ by the class name, you could alternatively also adapt your `parseDOM` rules so each mark only grabs the instances it should. The [link mark](https://github.com/getkirby/kirby/blob/d14bc478632c3f1eec9b06ff2a5679ef1db2992e/panel/src/components/Forms/Writer/Marks/Link.js#L106) is a good example for such custom selectors.

---

_[View the full topic](https://forum.getkirby.com/t/custom-marks-with-pop-up/30199)._
