Skip to content
Discussion options

You must be logged in to vote

Hi @gee4vee,

yes this is possible. GLSP is DI-based so you can simply rebind the ToolPalette UIExtension to a custom implementation and add your button there.

Something like this should work:

@injectable()
export class MyToolPalette extends ToolPalette {
    protected override createHeaderTools(): HTMLElement {
        const headerTools = super.createHeaderTools();
        headerTools.appendChild(this.createLayoutButton());
        return headerTools;
    }

    protected createLayoutButton(): HTMLElement {
        const layoutButton = createIcon('editor-layout'); 
        layoutButton.title = 'Layout Diagram';
        layoutButton.onclick = () => {
            this.actionDispatcher.dispatch

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@gee4vee
Comment options

@tortmayr
Comment options

Answer selected by gee4vee
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants