ckeditor / ckeditor4-angular

Official CKEditor 4 Angular component.
Other
55 stars 32 forks source link

How to customize existing button or add a new button in Angular #99

Closed codertushar closed 4 years ago

codertushar commented 4 years ago
editor.addCommand(this.command, {
      exec: (evt: any) => {
        this.click.emit(evt);
      },
    });
    editor.ui.addButton(this.name, {
      label: this.label,
      command: this.command,
      toolbar: this.toolbar,
      icon: this.icon,
    });

For example: I have made ckbutton directive which takes input and set it above.

<div ckbutton 
    [name]="'Hyperlink'" 
    [command]="'hyperlinkCmd'" 
    (click)="openHyperLinkDialog($event)" 
    [icon]="'Link'"
        [label]="'Hyper link (URL)'" 
    [toolbar]="'link'"></div>

Here, I want to edit existing Link button to customize click functionality. The problem is it doesn't add to the editor.

Dumluregn commented 4 years ago

Please note that our GitHub issue tracker serves for reporting bugs and new features only. Unfortunately, your request is neither of them, therefore please leave your question on Stack Overflow where our team and the community assist other users in solving their issues. Also, since CKEditor is an Open Source software, we believe it’s crucial to share proposed solutions and make others benefit from them.

If you have CKEditor license, please contact our support team. You also can ask your implementation questions at Stack Overflow.