angular-froala-wysiwyg
angular-froala-wysiwyg copied to clipboard
Extend functionality not working - no custom button
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 I'm trying to do something similar, but can't get the icon to show. Did you ever get a solution to this?