This is a simple wrapper around Codemirror using their new architecture in v6.
This library was heavily inspired by a similar React library @uiw/react-codemirror
In version 6 CodeMirror only exports modules as described here: CodeMirror v6 Guide
For all the v6 documentation go here: CodeMirror v6 Documentation
<script>
import CodeMirror from 'codemirror-svelte-modules';
</script>
<CodeMirror basicSetup />
More details on props and their types coming soon
Extensions[]
string
string
string
string
string
string
boolean
boolean
boolean
Extension
boolean
string
<script>
import CodeMirror from 'codemirror-svelte-modules';
import { syntaxHighlighting, defaultHighlightStyle } from '@codemirror/language';
import { javascript } from '@codemirror/lang-javascript';
</script>
<CodeMirror extensions={[javascript(), syntaxHighlighting(defaultHighlightStyle)]} />