Closed Artem-Schander closed 1 week ago
I don't think I can help with an issue that I cannot reproduce. Try to clear your package lock (and make sure no packages are stuck on 0.x versions), and simplify your script until you figure out what the issue is.
Ok. I'll try. But what is with the codesandbox? why does it not run? maybe there would be a reproduction possible
EDIT:
<template>
<div ref="container">
<div class="codemirror-editor" ref="editor"></div>
</div>
</template>
<script>
import { EditorView, basicSetup } from 'codemirror';
// import { EditorView } from "@codemirror/view";
import { html } from "@codemirror/lang-html";
export default {
name: 'CodeMirror',
mounted() {
const element = document.querySelector("#app");
const view = new EditorView({
doc: '<p>Hello, World!</p>',
parent: this.$refs.editor,
extensions: [
basicSetup,
html(),
],
});
}
}
</script>
package versions:
"@codemirror/lang-html": "^6.4.9",
"codemirror": "^6.0.1",
result:
I've deleted the lock file and the node_modules folder, reinstalled everything. now it works. thanks for the hint
Describe the issue
I'm using codemirror for
Javascript
,CSS
andHTML
. JS/CSS working fine, HTML not.I've tried to create a sandbox, but there is an error :(
Here is how it looks
Autocompletion works. Only highlighting seems to be missing.
The CodeMirror sandbox works fine, so the issue must be on my end Please help
Browser and platform
No response
Reproduction link
https://codemirror.net/try/?c=aW1wb3J0IHtiYXNpY1NldHVwLCBFZGl0b3JWaWV3fSBmcm9tICJjb2RlbWlycm9yIgppbXBvcnQge2h0bWx9IGZyb20gIkBjb2RlbWlycm9yL2xhbmctaHRtbCIKCm5ldyBFZGl0b3JWaWV3KHsKICBkb2M6ICI8ZGl2PnNvbWUgaHRtbDwvZGl2PiIsCiAgZXh0ZW5zaW9uczogW2Jhc2ljU2V0dXAsIGh0bWwoKV0sCiAgcGFyZW50OiBkb2N1bWVudC5ib2R5Cn0pCg==