Replies: 1 comment
-
Your code is a bit wrong. var editor = monaco.editor.create(document.getElementById('container'), {
value: '{\n\t"dependencies": {\n\t\t\n\t}\n}\n',
language: 'json'
});
monaco.languages.registerLinkProvider('json', {
provideLinks: function(model, token) {
return {
links: [
{range: {startLineNumber: 2, startColumn: 4, endLineNumber: 2, endColumn: 15},
url: model.uri, tooltip: "Hello"}
]
};
}
}); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Reproducible in vscode.dev or in VS Code Desktop?
Reproducible in the monaco editor playground?
Monaco Editor Playground Code
Reproduction Steps
Actual (Problematic) Behavior
no link provided for line 2
Expected Behavior
link is provided for line 2
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions