Another option with some facilities for class galleries et cetera is openprocessing.org – I haven’t taught with it myself, but it might be worth checking it.
There is also a roundup of various other web hosted sketch solutions that allow embedding in this thread (that includes p5.js, processing.js and python modes:
They vary widely in terms of how old / how maintained they are, level of openness, and which modes they support. For p5.js the editor and openprocessing are two popular choices.