I'm using the Gutenberg editor as a replacement for a whiteboard in a classroom. I'm able to make the classroom more interactive by having students work directly inside the Gutenberg editor. As a long-term user of Wordpress it's truly wonderful to see this happen, with non-tech-savy users able to interact with the editor so easily.
To provide some missing functionality I'd like to run a custom script inside the editor. It's a simple script which adds some styles if certain conditions are fulfilled. I currently run this script on the front-end using wp_register_script
and wp_enqueue_script
which is loaded onto the wp_enqueue_scripts
action hook.
Is it possible to load this script inside the Gutenberg editor, so that while my students are editing the post we can also have the script working?