I'm able to get the text of the editor with
window.editor.getValue()
And I'm able to get the currently selected text-positions with
window.editor.getSelection()
鈥婤ut how do I get the text-value of the currently selected text ?
Like when I have multiple sql statements, select one statement, and press F5 to execute it - I need the actual text ;)
Try:
window.editor.getModel().getValueInRange(window.editor.getSelection())
Works like a charm.
Thanks !
@kristianoye Thanks It's saved my time
Most helpful comment
Try:
window.editor.getModel().getValueInRange(window.editor.getSelection())