Question About CodeMirror

Is it possible to get the value of a codemirror value in an external JS file that I can use <script src="jsfile.js"></script> with? Because when I try to get the value it says getValue() is not a function.

If the editor displays content, then you can get the value of the content.

For example …

// start the editor instance  
const editor = CodeMirror.fromTextArea(textarea, options);

// get the entire editor text from CodeMirror editor  
let text = editor.getValue();

Since you included the /next tag, maybe you’re using the wrong interface? @codemirror/next is documented at