This is a short example of how to use CodeMirror as a custom component in Elm. Mostly taken from: https://www.youtube.com/watch?v=tyFe9Pw6TVE
npm install
elm make src/Main.elm --output main.js --debug
# stack install wai-app-static # To get the warp server
warp # Or serve it in your preferred way
- Created
code-mirror
tag using javascript - Fires events when the editor content changes
- Creates editor from Elm
- Fake saves every 5 seconds