Skip to main content

CodeMirror 6 support

Yuri Sulyma

Yuri Sulyma

Mathematician & web developer

rp-codemirror 2.0 has been released, bringing support for CodeMirror 6. This has much better accessibility and touchscreen support compared to CodeMirror 5. Here's a demo; you can experiment with the code yourself in the Playground tab:

This was much easier to write than the original rp-codemirror, so kudos to marijn for a really beautiful API. For CodeMirror 5, you should continue to use rp-codemirror 1.x. I haven't written documentation for the new version yet, but you can download the source for this demo from https://github.com/ysulyma/cm6-demo.

The replay (but not recording) functionality is compatible with the @remotion/player alpha:

Finally, here it is as a "real" video, created with the new rp-master render command:

This is of course a bit silly, since one goal of this library is to make mp4/webm obsolete for this type of content. But until YouTube catches up, having a static version that you can share on social media is useful for discoverability.