Skip to content

How to edit a Range programmatically in Monaco Editor? #4155

Answered by j4k0xb
vExcess asked this question in Q&A
Discussion options

You must be logged in to vote

https://microsoft.github.io/monaco-editor/typedoc/interfaces/editor.ICodeEditor.html#executeEdits
example:

editor.executeEdits('number-scrubber', [
  {
    range: new monaco.Range(1, 1, 1, 1),
    text: code,
  },
]);

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by vExcess
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants