Hi, I’m building my editor (using Tiptap) and I have some questions regarding handling events like onHover
or onClick
. There are extensions that I want to build:
Mention
- thetoDOM()
will return ana
tag with appropriatehref
. However, I’d like to add to it extra feature which will show user details card on hover (from database).Spoiler
- a block with initially hidden content (hidden
class) which became visible on click (hidden
class removed)
I have a button in my editor which shows modal with a preview
, i.e. the HTML which will be the very final results. I’d like to add to this preview HTML code these event handlers too (i.e the one which display hover card and the one which removes hidden
class). The same HTML will be saved to database and used on appropriate site so I’d like to simply use this HTML and have all event listeners already linked. How can I do that?