question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Improve documentation about custom buttons.

See original GitHub issue

Now it is not clear from documentation how to add custom buttons to implement some behavior with state manipulations. For example: how can we implement undo, redo buttons?

Now I’m using this code(not an expert in angular)

 @ViewChild('ngx', {static: false})
    ngx: NgxWigComponent;
    @Input()
    content = 'sss';
    inputStates: string[] = [];
    undoStats = 0;
    ngAfterViewInit(): void {
      this.ngx.toolbarButtons.push({
          label: 'Undo',
          title: 'Undo',
          command: (ctx: NgxWigComponent) => {
            this.undo();
          },
          styleClass: 'nw-button',
          icon: 'icon-custom'
        });
      this.ngx.toolbarButtons.push({
          label: 'Redo',
          title: 'Redo',
          command: (ctx: NgxWigComponent) => {
            this.redo();
          },
          styleClass: 'nw-button',
          icon: 'icon-custom'
        });
  }

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
MPapini91commented, Jun 2, 2022

Ah, for the command you can pass a function or a command from this list

1reaction
MPapini91commented, May 26, 2022

Not just something to undo-redo editing? I tryed in https://stackblitz.com/edit/ngx-wig-sample-plugins?file=src/app.ts adding this after edithtml undo: { label: 'Undo', title: 'Undo', command: 'undo', styleClass: 'nw-button', }, redo: { label: 'Redo', title: 'Redo', command: 'redo', styleClass: 'nw-button' }

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Create Custom Buttons | ICANotes Customer Hub
Learn how to create your own custom buttons in ICANotes which will help improve your documentation and ... All over ICANotes Custom Buttons...
Read more >
Adding and Removing Custom Buttons - Plesk Obsidian
Go to documentation for the latest version, Plesk Obsidian. ... To add a custom button, go to Tools & Settings > Custom Buttons...
Read more >
Custom Button Bars: /Documentation - LabKey Support
The standard button bars for any query or table can be customized through XML or the JavaScript client API. You can add, replace,...
Read more >
Custom Buttons Overview - DocuSign Support
With the DocuSign for Salesforce managed package, you can create custom buttons to help better manage your common tasks.
Read more >
Google Toolbar API - Guide to Making Custom Buttons
A custom button is a push button that you can add to the Google Toolbar that can have custom navigation, search, send and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found