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
Hi there,
Another question more than an issue:
Is there any built-in way to handle events with the formatters? For example, if I wanted to click a chord in the output to change it in the model and update, my current thinking is I'd have to code my own formatter and attach events to the DOM myself rather than use one of the inbuilt formatters (HtmlDivFormatter/HtmlTableFormatter)?
The text was updated successfully, but these errors were encountered:
I would say it depends on how you're planning to attach the event handlers.
If you use some library that binds events based on data- attributes, you should probably create a custom formatter based on an inbuilt formatter. If you bind events based on selectors, I'd think that should be possible using the built-in formatters. For example:
functionchordClicked(event){// Do something}Array.from(document.querySelectorAll('.chord-sheet .chord')).addEventListener('click',chordClicked);
Hi there,
Another question more than an issue:
Is there any built-in way to handle events with the formatters? For example, if I wanted to click a chord in the output to change it in the model and update, my current thinking is I'd have to code my own formatter and attach events to the DOM myself rather than use one of the inbuilt formatters (HtmlDivFormatter/HtmlTableFormatter)?
The text was updated successfully, but these errors were encountered: