Node View keeps getting recreated on content change. #66
Unanswered
abecirovic3
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone,
First of all ngx-tiptap, and all tiptap-related packages are up to date.
I have a custom node view which is essentially an image wrapper, and I have noticed that it gets recreated each time I add a new line above it.
In the screen recording below you can see that I have a console log in the ngOnInit and ngOnDestory methods of the component.
Screen.Recording.2024-03-13.at.13.31.26.mov
I'm not sure on what information could be of any help here, but in short, each block is a custom node view that wraps around other nodes. I do have a custom handler for the Enter key which in this case essentially just uses the insertContentAt method to insert content like this:
where of course the endPosition is the end position of the current node, and the 'rootNode' is the custom node that wraps around all the other nodes.
I'm aware that this might not be related to ngx-tiptap, but since I did not find any help on the tiptap repository I figured to ask here as well. Any help or a push in the right direction would be appreciated.
I know that the provided information is vague but the project is relatively big and I'm not sure what could be important for this particular situation, so if you need any more information please let me know.
Beta Was this translation helpful? Give feedback.
All reactions