angular-froala-wysiwyg icon indicating copy to clipboard operation
angular-froala-wysiwyg copied to clipboard

Extend functionality not working - no custom button

Open DioNNiS opened this issue 4 years ago • 1 comments

I did everything according to documentation: https://github.com/froala/angular-froala-wysiwyg#extend-functionality but only:

// Import Froala Editor.
import FroalaEditor from 'froala-editor';

error TS7016: Could not find a declaration file for module 'froala-editor'.

I'm using an instance from window.FroalaEditor object.

All plugins and all configuration working correctly. But I can not add a custom button. It does not appear...

....
froalaOptions = {
....
    toolbarButtons: ['alert', 'bold', 'italic', 'underline', 'paragraphFormat'],
...
}
...

ngOnInit(): void {
    FroalaEditor.DefineIcon('alert', {NAME: 'info'});
    FroalaEditor.RegisterCommand('alert', {
      title: 'Hello',
      focus: false,
      undo: false,
      refreshAfterCallback: false,

      callback: () => {
        alert('Hello!');
      }
    });
}

Froala 3.1.1 + Angular 9

DioNNiS avatar Jun 16 '20 19:06 DioNNiS

@DioNNiS I'm trying to do something similar, but can't get the icon to show. Did you ever get a solution to this?

AshMcConnell avatar Oct 14 '21 10:10 AshMcConnell