angularangular9froala

Froala 3.1.1 + Angular 9 Plugins not Loading


According to the documentation found at (https://github.com/froala/angular-froala-wysiwyg) the installation process is straight forward and the basic editor works well.

Unfortunately none of the plugins are loaded or working.

From what I can see the following import needs to be added to app.module.ts and should import all available plugins.

// Import all Froala Editor plugins.
import 'froala-editor/js/plugins.pkgd.min.js';

I can also see the default toolbarButtons option is honoured when changing it, however none of the "moreRich" options show up in the editor.

toolbarButtons: {
        'moreText': {
          'buttons': ['bold', 'italic', 'underline', 'strikeThrough', 'subscript', 'superscript', 'fontFamily', 'fontSize', 'textColor', 'backgroundColor', 'inlineClass', 'inlineStyle', 'clearFormatting']
        },
        'moreParagraph': {
          'buttons': ['alignLeft', 'alignCenter', 'formatOLSimple', 'alignRight', 'alignJustify', 'formatOL', 'formatUL', 'paragraphFormat', 'paragraphStyle', 'lineHeight', 'outdent', 'indent', 'quote']
        },
        'moreRich': {
          'buttons': ['insertLink', 'insertImage', 'insertVideo', 'insertTable', 'emoticons', 'fontAwesome', 'specialCharacters', 'embedly', 'insertFile', 'insertHR']
        },
        'moreMisc': {
          'buttons': ['undo', 'redo', 'fullscreen', 'print', 'getPDF', 'spellChecker', 'selectAll', 'html', 'help'],
          'align': 'right',
          'buttonsVisible': 2
        }

If you have Froala 3.1.1 + Angular 9 working with plugins (e.g. table, insertImage) please do share your insights.

Thank you.


Solution

  • Using the ^3.1.0 versions resolved the issue:

    "angular-froala-wysiwyg": "^3.1.0",
    "froala-editor": "^3.1.0"
    

    https://github.com/froala/angular-froala-wysiwyg/issues/399#issuecomment-641843910