6
So che si utilizzaCome aggiungere testo in CodeMirror
editor.setValue("");
per impostare un valore ma come si fa aggiungo in CodeMirror?
IE:
editor.appendText();?
So che si utilizzaCome aggiungere testo in CodeMirror
editor.setValue("");
per impostare un valore ma come si fa aggiungo in CodeMirror?
IE:
editor.appendText();?
Usa replaceRange
. Ad esempio editor.replaceRange(myString, CodeMirror.Pos(editor.lastLine())
. Reimpostare l'intero editor è inutilmente costoso.
Qualcosa come 'editor.setValue (editor.getValue() +" testo aggiunto ")'? –