Js Events on markdown HTML elements

Hi there people :smiley:

From the past few days I’ve tried to add javascript events to HTML Buttons in my notes. (hover, click, etc)
I’ve tried inlining (<button onclick=“Go to last meetinggg” >Last meeting</button>)
attaching events through the console or dataviewjs blocks… but no luck.

I know there’s a plugin for buttons but being able to just call a JS function and manage my button as an HTML elem is way more versatile for my use case. Plus I don’t have to depend/learn one thing more.

From the Obsidian API ref I havent found anything, but maybe I’m missing something. Is there a way to register event’s to specific elements ?

Please send help XD

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.