Add button to properties panel custom tab

Hi,

I have an angular 9 project with bpmn-io and camunda properties panel integrated.

I want to add a button into a custom tab for properties panel, so I can press it and load a dialog.

I already read a couple of posts that asks the same, but the answer there are not clear enough to my understanding.

Thanks in advance.

What did you not understand so far? What keeps you away from adding this button? Do you already something which did not work?

Some more details regarding that points will help us to help you more in detail.

I found this answer into the forum,

You’re right, there is no built-in functionality to add buttons to the properties panel, yet. You can either add it or simply add a button to your custom properties panel entry as it’s also done in ExtensionElements .

What I don´t understand is how this example can be used in my project.

I have a properties-panel-provider this simple, it doesn’t change anything, it’s just there for when i will need to customize the panel:

export class CustomPanelProvider implements IPropertiesProvider {

    static $inject = ['translate', 'bpmnPropertiesProvider'];

    constructor(private translate: any, private bpmnPropertiesProvider: any) {
    }

    public getTabs(element: any): any {
        return this.bpmnPropertiesProvider.getTabs(element);
    }
}

And in the same post appears that you can’t do it this way, because button is not supported by EntryFactory.

entries: [
              EntryFactory.button({
                id: 'custom',
                label: this.translate('customText'),
                modelProperty: 'customText'
              }),
            ]