I'm looking for a way to pass post meta data to each of the blocks in the editor for the purpose of styling the content. My actual use case is hard to explain briefly, but for the sake of example, pretend it's the ability to display the post either in dark or light mode depending on a post meta value that the user sets.
The most obvious way to do this, for me, would be to add a class to the <div class="block-editor">
element like <div class="block-editor dark-editor-mode">
. But I don't see an obvious way to do that. Everything I find via search is about modifying the individual blocks, but I want to modify the editor. Is there a hook for this? Either in JS or PHP?