refactor(code): use dedicated method for setting text

This commit is contained in:
Elian Doran
2025-05-10 19:22:57 +03:00
parent 0c9be9291b
commit ef312c9550
2 changed files with 11 additions and 7 deletions

View File

@@ -11,4 +11,14 @@ export default class CodeMirror extends EditorView {
]
});
}
setText(content: string) {
this.dispatch({
changes: {
from: 0,
to: this.state.doc.length,
insert: content || "",
}
})
}
}