Can we allow `isTrusted` configuration for MarkdownString?
See original GitHub issueIn VSCode MarkdownString
can have a property isTrusted
set to true
in order to:
Indicates that this markdown string is from a trusted source. Only trusted markdown supports links that execute commands, e.g. Run it.
Currently, it seems that we don’t have an option to configure it. Source
Would it be possible to add a way to configure isTrusted
property?
My use case would be to allow people to click on a type definition inside a tooltip and see the documentation of that types in a documentation panel. This is already something we are doing from inside that documentation panel.
Demo
Use case
The user could click on string
to see that type documentation.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:8 (5 by maintainers)
Top Results From Across the Web
In Visual Studio code version 1.64, MarkdownString with 4 ...
I think the preferred way is to use this: const markdownString = new vscode.MarkdownString(); const codeBlock = `const a = 12; if (a)...
Read more >October 2022 - Visual Studio Code
For MarkdownString , the isTrusted property now takes an allowlist of commands that can be executed (all other commands will be blocked): const...
Read more >Event API: isTrusted | Can I use... Support tables for ... - CanIUse
1 Starting with Chrome 53 and Opera 40, untrusted events do not invoke the default action. 2 In Internet Explorer, all events are...
Read more >How to use the vscode.MarkdownString function in vscode
Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues...
Read more >vscode TreeItem TypeScript Examples - ProgramCreek.com
You can vote up the ones you like or vote down the ones you don't like, ... getTreeItem(element: MenuItem): TreeItem { let iconPath:...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I would also like to see this be possible. Is there any update on this issue? I don’t mind submitting the PR if need be.
Here is what I did to address this:
markdown: { isTrused: boolean }
.I decided to not add this as a concept to LSP since this is very VS Code specific.