Node View keeps getting recreated on content change. #4975
Unanswered
abecirovic3
asked this question in
Questions & Help
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, I'm working with angular and I'm using ngx-tiptap for rendering my custom node views. 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 would appreciate any help on this, if you need more information please let me know. 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.
Beta Was this translation helpful? Give feedback.
All reactions