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 1 reply

Comment options

You must be logged in to vote
1 reply
@NomithaReddyMelmai
Comment options

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
3 participants