How to create a Computed Attribute that updates based on the content? #936
Unanswered
jonathanmach
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 all, I hope you're all safe!
I'm trying to implement a custom Node, that extends
tiptap.Heading
, and adds anid
attribute:The reason for that is because I want to automatically generate heading anchors, based on the text.
However, I haven't figured out how to update
attrs.id
every time the heading content changes. I tried to use ProseMirrorcompute
attribute instead ofdefault
but it didn't do anything.Any suggestions on how to approach this scenario?
Thank you in advance!
Beta Was this translation helpful? Give feedback.
All reactions