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
so I'm trying to make my own heading node, which adds IDs to the headings, which I in return use to create jump marks in my editor environment. I can make it work as far as it correctly writes the HTML-tag and adds the ID. Also if the editor is loaded, already existing ID don't get overwritten but parsed correctly. Only problem is, that I somehow can't make it work, that the "isActive" state is computed within the button I use, which means that I can't toggle the heading on and off.
Here is the code, where I used the existing heading component as a basis and tried to add the capability for IDs:
I am a 100% sure that I am missing some clue as how the active state is created and I tried to follow the steps in the library, but I can't make out what I'm missing.
Maybe someone can take a look at my code and guide me to the solution.
The text was updated successfully, but these errors were encountered:
Hey guys,
so I'm trying to make my own heading node, which adds IDs to the headings, which I in return use to create jump marks in my editor environment. I can make it work as far as it correctly writes the HTML-tag and adds the ID. Also if the editor is loaded, already existing ID don't get overwritten but parsed correctly. Only problem is, that I somehow can't make it work, that the "isActive" state is computed within the button I use, which means that I can't toggle the heading on and off.
Here is the code, where I used the existing heading component as a basis and tried to add the capability for IDs:
I am a 100% sure that I am missing some clue as how the active state is created and I tried to follow the steps in the library, but I can't make out what I'm missing.
Maybe someone can take a look at my code and guide me to the solution.
The text was updated successfully, but these errors were encountered: