You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wrote my own spoiler extension, it works like a charm, but when I set my editor to non-editable, my spoiler doesn't work, button which update "show" attribute doesn't work.
I set editor to non-editable mode like this:
this.editor.setEditable(false);
My spoiler works very easy, I just update "show" attribute when click by the button.
Is it possible to update attributes and react to DOM events in non-editable mode?
The text was updated successfully, but these errors were encountered:
I add a github repo for this problem, i solved this by replacing show attribute, i just duplicate show in my component and toogle this data property, but i also dispatch this property to tiptap. https://github.com/Winexcel/tiptap-spoiler
I think this approach might be bad, therefore i need some feedback from core team about this problem.
And another problem which i have with this approach - i can't nest one spoiler to another, i don't know why it doesn't work, but if i set content with nested spoilers - it works! Magic!)
Why i can't add spoiler into another from commands?
I wrote my own spoiler extension, it works like a charm, but when I set my editor to non-editable, my spoiler doesn't work, button which update "show" attribute doesn't work.
I set editor to non-editable mode like this:
this.editor.setEditable(false);
My spoiler works very easy, I just update "show" attribute when click by the button.
Is it possible to update attributes and react to DOM events in non-editable mode?
The text was updated successfully, but these errors were encountered: