For the moment I’m using legacy mode, because it has all the styles and lint that I need. I use CodeMirror for some very basic tasks.
import { StreamLanguage } from '@codemirror/language';
import { xml as x } from '@codemirror/legacy-modes/mode/xml';
import { EditorState } from '@codemirror/state';
import { EditorView } from '@codemirror/view';
import { basicSetup } from 'codemirror';
const state = EditorState.create({
doc: content || '',
extensions: [
StreamLanguage.define(x),
basicSetup
]
})
this.myCodeMirror = new EditorView({
parent: document.getElementById('codemirror'),
state
});
I will greatly appreciate any kind of guide and help.
Hi! Thanks for your answer! The problem i had with lang-xml is that i could not made work the “lint” for a, for example, broke nodes and it is in the legacy mode. do i have some way to do that lint with lang-xml?
About the schema-driven completions, do you have some example code? i search it but i could not find anything
In the first screenshot, with legacy mode, you can see how the error appears in red. In the second screenshot using lang-xml, everything remains the same despite the same error. Can I have the same behavior in lang-xml as in legacy?
Again, I will greatly appreciate any kind of guide and help.