-
Notifications
You must be signed in to change notification settings - Fork 29.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for custom link handler in Markdown Cell and Webviews #98100
Comments
@DonJayamanne what is the use case for this. How would another notebook tool handle these notebook files? |
This wouldn't work across another notebook tool. E.g. we add a cell with markdown (containing) instructions for user with links in the cell (clicking that triggers extension code). |
Is this solved by supporting |
And changing the URLs to that type of link is a vscode-specific solution, is that a problem? |
Yes that would work.
No, that would work. Today we handle all link click handlers and if the link starts with |
Ok, in markdown cells it will work in tomorrow's build. I'll have to think about it for output. |
Moving this to June and we still need to discuss what's the right solution for this problem. Command links work well in VS Code but they are not platform agnostic. |
@DonJayamanne we discussed this offline and
We can continue discussion if we find the solution not feasible. |
These don't actually work in outputs currently though, I need to hook that up. |
I tested |
1. Add support to handle Notebook output link clicks in extension code
2. Add support to handle Notebook Markdown cell link clicks in extension code.
vscode
is handled by our code in webview and then passed onto the extension.With the new VS Code notebooks, we'll need to do the same to handle links displayed in the output. I can see two solutions (for outputs):
href=javascript:acquireVsCodeAPI().postMessage(....)
.However, we won't be able to handle click events in markdown
Had a chat with @rebornix and it was suggested that VSCode could provide a custom API that works in Markdown + Output rendered in WebViews as well as Notebooks
The text was updated successfully, but these errors were encountered: