mirror of
https://github.com/zadam/trilium.git
synced 2025-11-03 11:56:01 +01:00
refactor(code): use dedicated method for setting text
This commit is contained in:
@@ -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 || "",
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user