Hey, so I’m importing the default value from a file like this:
$.get('resources/config', (data) => {
let editor = CodeMirror(document.getElementById('editor'), {
mode: 'yaml',
styleActiveLine: true,
lineNumbers: true,
foldGutter: true,
gutters: [
"CodeMirror-linenumbers", "CodeMirror-foldgutter"
],
theme: 'material',
value: data
});
};
and now I wanna save the changes a user did to the config (basically overwrite using fs).
I tried editor.getValue();
, but thats just the default value loaded from the file and not the updated one.
What do I use instead?