`editor.setLine`を使うのが一番楽。
```json
const LINE = 5
const editor = app.workspace.activeLeaf.view.editor;
editor.setLine(LINE, text);
```
`editor.replaceRange`を使ってもできる。
```js
// 置換したい行番号
const LINE = 5
const editor = app.workspace.activeLeaf.view.editor;
editor.replaceRange(
text,
{ line: LINE, ch: 0 },
{ line: LINE }
);
```