Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue updating bound value #65

Open
rosshigh opened this issue Jul 9, 2020 · 0 comments
Open

Issue updating bound value #65

rosshigh opened this issue Jul 9, 2020 · 0 comments

Comments

@rosshigh
Copy link

rosshigh commented Jul 9, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant