# Insert Text After 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()); ```