This is a simple web-based IDE that uses PyScript to run Python code. It's not meant for production, but it's a nice example of how simple it is to create your own browser-based code editor with PyScript and CodeMirror.
A simple online editor using PyScript