Yeah, the reason I could add Go quickly is because I already did the hard work of figuring out how to execute Go code when I built https://tools.arslexis.io/goplayground/
Executing JavaScript safely is actually hard. You don't want to just execute code in browser context because then an attacker could trick you to execute his JavaScript code and e.g. grab all your notes.
So you need to sandbox it via e.g. iframe or by running using wasm-compiled quickjs
Which is something I might do.
Additionally I'm thinking about allowing to run a javascript function over content of a block so e.g. you could base64-encode a text block etc.