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
{{ message }}
Repository navigation
Add a classname to the active block so a custom style can be applied #1046
Is your feature request related to a problem? Please describe.
It would be nice to be able change the style of the active block (e.g., set a different background color).
Describe the solution you'd like
Add a class like active-block when the block becomes active and remove it when it becomes inactive.
Working on a way for drum and piano teachers to create more complex lessons with video, text, lists, images, and some custom controls we are building for playing back musical patterns and songs, as well as interactive MIDI feedback.
The plan is for BlockNote to serve as the basis for the editor and then write custom components for the interactive music parts.
Activity
YousefED commentedon Sep 5, 2024
For now, you could use
const selectedBlocks = useSelectedBlocks(editor);and check ifselectedBlocksmatches the block (props.block). Does this help?Curious to hear what you're building!
Musettodotcom commentedon Sep 7, 2024
Working on a way for drum and piano teachers to create more complex lessons with video, text, lists, images, and some custom controls we are building for playing back musical patterns and songs, as well as interactive MIDI feedback.
The plan is for BlockNote to serve as the basis for the editor and then write custom components for the interactive music parts.