# Insert Text After the Cursor in Obsidian With API
## Metadata
**Status**:: #x
**Zettel**:: #zettel/fleeting
**Created**:: [[2022-09-20]]
**Parent**:: [[Obsidian API for Plugins]]
**Friend**:: [[Insert Text Before the Cursor in Obsidian With API]]
## Notes
First [[Get the Active Editor Instance in Obsidian With API]].
The API `Editor.replaceRange()` will leave the cursor unchanged when cursor is before the range.
```javascript
editor.replaceRange(text, editor.getCursor());
```