I have a webpack application and I'm having two, possibly related, issues with the editor. I used the lattest version of the aurelia-cli to create the application.
The first is that this code in the webpack.config.js causes an error:
new ProvidePlugin({ FroalaEditor: 'froala_editor.pkgd.min.js', 'Promise': 'bluebird', Popper: ['popper.js', 'default'] // Bootstrap 4 Dependency. }),
The error is ReferenceError: ProvidePlugin is not defined.
I can remove this code and get the editor to work.
<froala-editor value.two-way="test.test"></froala-editor>
until I update this.test.test programmatically. Then this line:
_this.instance.html(newValue);
inside:
this.subscriptions = [observerLocator.getObserver(this, 'value').subscribe(function (newValue, oldValue) { if (_this.instance && _this.instance.html.get() != newValue) { _this.instance.html(newValue); } })];
gives the following error:
Uncaught TypeError: _this.instance.html is not a function at eval (froala-editor.js?ccce:85) at BehaviorPropertyObserver.callSubscribers (aurelia-binding.js?5f98:330) at BehaviorPropertyObserver.call (aurelia-templating.js?8628:3857) at BehaviorPropertyObserver.setValue (aurelia-templating.js?8628:3834) at Binding.updateTarget (aurelia-binding.js?5f98:4952) at Binding.call (aurelia-binding.js?5f98:4967) at SetterObserver.callSubscribers (aurelia-binding.js?5f98:328) at SetterObserver.call (aurelia-binding.js?5f98:3773) at TaskQueue._flushQueue (aurelia-task-queue.js?2bf4:89) at TaskQueue.flushMicroTaskQueue (aurelia-task-queue.js?2bf4:140) at MutationObserver.eval (aurelia-task-queue.js?2bf4:65)
The odd thing is if I examine _this.instance before this line executes, it appears to have the html() function.
Any help would be appreciated.
Ross
I have a webpack application and I'm having two, possibly related, issues with the editor. I used the lattest version of the aurelia-cli to create the application.
The first is that this code in the webpack.config.js causes an error:
new ProvidePlugin({ FroalaEditor: 'froala_editor.pkgd.min.js', 'Promise': 'bluebird', Popper: ['popper.js', 'default'] // Bootstrap 4 Dependency. }),The error is ReferenceError: ProvidePlugin is not defined.
I can remove this code and get the editor to work.
<froala-editor value.two-way="test.test"></froala-editor>until I update this.test.test programmatically. Then this line:
_this.instance.html(newValue);inside:
this.subscriptions = [observerLocator.getObserver(this, 'value').subscribe(function (newValue, oldValue) { if (_this.instance && _this.instance.html.get() != newValue) { _this.instance.html(newValue); } })];gives the following error:
Uncaught TypeError: _this.instance.html is not a function at eval (froala-editor.js?ccce:85) at BehaviorPropertyObserver.callSubscribers (aurelia-binding.js?5f98:330) at BehaviorPropertyObserver.call (aurelia-templating.js?8628:3857) at BehaviorPropertyObserver.setValue (aurelia-templating.js?8628:3834) at Binding.updateTarget (aurelia-binding.js?5f98:4952) at Binding.call (aurelia-binding.js?5f98:4967) at SetterObserver.callSubscribers (aurelia-binding.js?5f98:328) at SetterObserver.call (aurelia-binding.js?5f98:3773) at TaskQueue._flushQueue (aurelia-task-queue.js?2bf4:89) at TaskQueue.flushMicroTaskQueue (aurelia-task-queue.js?2bf4:140) at MutationObserver.eval (aurelia-task-queue.js?2bf4:65)The odd thing is if I examine _this.instance before this line executes, it appears to have the html() function.
Any help would be appreciated.
Ross