Improve documentation about custom buttons.
See original GitHub issueNow 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:
- Created a year ago
- Comments:5 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ah, for the
command
you can pass a function or a command from this listNot 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' }