Quantcast
Channel: User Jack - Stack Overflow
Viewing all articles
Browse latest Browse all 40

How do I insert a link in the editor?

$
0
0

I'd like to add a hyperlink in a editor, like vscode does:

enter image description here

I'd like to add this formatted document and when you click into it, some operation happens, open a file dialog, for example.

I have no code to show yet because I didn't find anything like that yet, only for regular text that goes like this:

const line = editor.getPosition();if(!line) {  throw new Error('line is null');}const range = new monaco.Range(line.lineNumber, 1,                                line.lineNumber, 1);const text = "empty tab";const op: monaco.editor.IIdentifiedSingleEditOperation = {    range: range,     text: text,     forceMoveMarkers: true};editor.executeEdits('my-source', [op]);

but I didn't see how add a format it.


Viewing all articles
Browse latest Browse all 40

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>