froala / angular-froala

Angular.js bindings for Froala WYSIWYG HTML Rich Text Editor.
https://froala.com/wysiwyg-editor
MIT License
306 stars 123 forks source link

Cannot read property 'POPUP_TEMPLATES' of undefined #148

Closed albertosubero closed 7 years ago

albertosubero commented 7 years ago

image.min.js:7 Uncaught TypeError: Cannot read property 'POPUP_TEMPLATES' of undefined at image.min.js:7 at image.min.js:7 at image.min.js:7

stefanneculai commented 7 years ago

@albertosubero please make sure you include the editor main JS file before the image plugin.

Heila-Almogren commented 9 months ago

just in case anyone goes through this, I was using it in angular and faced this issue. First second, you need to add the plugin js in the "plugins" folder in froala-editor node modules folder (froala-editor/js/plugins/<plugin_name>.min.js). previously i putted it in other place.

second, I removed the js reference I added previously in "scripts" tag in angular.json for image.min.js and only imported directly it in the app module: import 'froala-editor/js/plugins/image.min.js'; this way the error disappeared.