Custom popup entry

Hi everyone,

im currently trying to customize a popup-menu. More precisely i am trying to add an entry to the color picker module, to give users the ability to define and use a custom color.

What i’ve got so far:

  1. Embedded the color picker module
  2. Register a popup menu provider for the color-picker module (see code below)
class CustomPopupMenuProvider {

    static $inject: string[] = ['popupMenu'];

    constructor(popupMenu) {
        popupMenu.registerProvider('color-picker', this);
    }

    getPopupMenuEntries() {
        // return some custom entry here
    }
}

export default {
    __init__: ["customPopupMenuProvider"],
    customPopupMenuProvider: ["type", CustomPopupMenuProvider],
}

Where i’m stuck:

The entry should have textfields to define custom colors (e.g. fill color and text color). The following picture gives an idea of what it should look like inside the custom popup:

Bildschirm­foto 2023-09-15 um 10.29.31

So the question is what would be the best approach to realize this kind of functionality. Is there a way to just add html to a custom entry?

Thanks in advance,
Luka :slight_smile: