Open Musettodotcom opened 3 months ago
For now, you could use const selectedBlocks = useSelectedBlocks(editor);
and check if selectedBlocks
matches the block (props.block). Does this help?
Curious to hear what you're building!
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.
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.