Replies: 1 comment 1 reply
-
hi. @danielw92 Thank you. Sounds good. Let me know if you needed any help. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
first of all, thank you for creating this helpful package for integrating Tiptap with Angular.
I'm currently implementing some custom extensions for Tiptap and found myself in the following situation:
I created a custom node using the AngularNodeViewRenderer and some editor commands that are triggered via buttons in a toolbar above the editor. These commands either insert my custom node or change attributes on it.
However, I found that changes to node properties (or any of the other inputs of AngularNodeViewComponent) currently do not trigger the respective ngOnChanges lifecycle hook in my custom node view components.
The easiest fix I found was a small change in the AngularRenderer in the updateProps function:
Instead of
this.instance[key as keyof C] = value as C[keyof C];
I do
this.componentRef.setInput(key, value)
and then the change detection works as expected.
I'm curious what you think of this change and whether it could be added to the library. If so, I could create a PR.
Thanks!
Best,
Daniel
Beta Was this translation helpful? Give feedback.
All reactions