Closed piszczu4 closed 3 months ago
any updates?
Still an issue.
addAttributes cannot always have the editor instance, because in order to make the editor instance, it needs the attributes to create the schema to create the editor instance.
In your case, you should not be using the editor.isEditable prop anyway, because changing the schema just because an option was provided is not advised, if you want to do that you can use an option via a configure or addOptions method.
Or you can juse use CSS since all this is doing is a conditional classname.
Which packages did you experience the bug in?
core
What Tiptap version are you using?
2.0.3
What’s the bug you are facing?
editor
inaddAttributes()
method is alwaysundefined
. I have an extension and insideaddAttributes()
I defined the following logic:Unfortunately
editor
is undefined and hence I can't useisEditable
prop. I think that the solution would be to updategetAttributesFromExtensions()
method and passeditor
there.What browser are you using?
Chrome
Code example
No response
What did you expect to happen?
editor
not being undefinedAnything to add? (optional)
No response
Did you update your dependencies?
Are you sponsoring us?