Here is what the code looks like, why it’s not like the demo shows? All the code align in the center and the cursor is in the center too.
The package is vue-codemirror version 6.1.1,
<Codemirror
v-model=“value”
:style=“{ height: ‘780px’ }”
:autofocus=“true”
:indent-with-tab=“true”
:extensions=“extensions”
:indentWithTab=“false”
@ready=“handleReady”
>
export default defineComponent({
components: {
Codemirror
},
setup() {
const value = new EditorView({ doc: "abc", extensions: [ // keymap.of([{key: "Alt-l", run: moveToLine}]), basicSetup, ], parent: document.body })
const extensions = [javascript(), oneDark]
return { value, extensions}
}
})