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

cant bind web components attributes to angular functions #22

Open
oskarerikssoncab opened this issue Oct 12, 2021 · 4 comments
Open

cant bind web components attributes to angular functions #22

oskarerikssoncab opened this issue Oct 12, 2021 · 4 comments
Labels

Comments

@oskarerikssoncab
Copy link

I am using the Tinymce web component in my Angular 11 project and can't bind the event attributes to functions in my controller.

The attributes for styling the editor works.

If I use [attr.on-change]="someMethod()" the method gets invoked in some kind of forever loop and runs all the time even if the event are not suppose to be triggered. (see image below)
image

If I use [attr.on-change]="someMethod" (without invoking the function) i get this error (see image below)
image

And if i remove the on as the error message says, nothing happens. How do i use this web component in angular?
Thx

@exalate-issue-sync
Copy link

Ref: INT-2672

@tiny-james
Copy link
Contributor

In case you were unaware there is a TinyMCE integration for Angular:
https://github.com/tinymce/tinymce-angular

@oskarerikssoncab
Copy link
Author

@tiny-james , I have seen and tried the angular integration. Sadly, it do not work since i am creating a web component with a shadowDOM. And for some reason the angular version do not work when i have shadowDOM activated. But as soon as I inactivated it , it works.....

Might I be missing something?

@tiny-james
Copy link
Contributor

If you have a usecase for the angular integration that doesn't work then I'd suggest opening an issue on that repository with a replication case and we can take a look at it. We likely have not tried to use it with shadow-dom as it's not a common request.

As for the webcomponent - it was designed for working in a pure HTML situation so we haven't tested with any frameworks. I note that the error is not coming from our component so I don't know how we'd go about fixing it.

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

No branches or pull requests

2 participants