Skip to content
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

Make highlighted types selectable and copyable #29

Open
yoavbls opened this issue Apr 19, 2023 · 5 comments
Open

Make highlighted types selectable and copyable #29

yoavbls opened this issue Apr 19, 2023 · 5 comments
Labels
vscode feature required New feature or request

Comments

@yoavbls
Copy link
Owner

yoavbls commented Apr 19, 2023

We need a change in VSCode to allow that. I opened a PR and Issue there:
microsoft/vscode#180496
any other ideas will be welcomed

@yoavbls yoavbls added the vscode feature required New feature or request label Apr 19, 2023
@costamatheus97
Copy link
Contributor

We would need to replace the codicon with some other solution, any ideas?

@jonlepage
Copy link

a btn to copytoclipboard ?

navigator.clipboard.writeText(text);
      console.log('Content copied to clipboard');
navigator.permissions.query({ name: "write-on-clipboard" }).then((result) => {
  if (result.state == "granted" || result.state == "prompt") {
    alert("Write access granted!");
  }
});

@yoavbls
Copy link
Owner Author

yoavbls commented Apr 22, 2023

@costamatheus97 VSCode HTML sanitization is very strict. I don't see any other options that they'll make it less strict. I opened an issue and PR for that:
microsoft/vscode#180496

@djmisterjon If they'll reject the PR it's a good option. Does it work with the VSCode command link?

@jonlepage
Copy link

@costamatheus97 VSCode HTML sanitization is very strict. I don't see any other options that they'll make it less strict. I opened an issue and PR for that: microsoft/vscode#180496

@djmisterjon If they'll reject the PR it's a good option. Does it work with the VSCode command link?

idk sry, it work on my nwjs app, never tested with electron (used by vscode)

@yoavbls yoavbls changed the title Make highlighted types copyable Make highlighted types selectable and copyable May 1, 2023
@yoavbls
Copy link
Owner Author

yoavbls commented Jul 31, 2024

Until things will be changed you can use the hack here:
https://github.com/yoavbls/pretty-ts-errors/blob/main/docs/hide-original-errors.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
vscode feature required New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants