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

vscode.env.clipboard with MIME-type #163240

Closed
AlLevykin opened this issue Oct 11, 2022 · 5 comments
Closed

vscode.env.clipboard with MIME-type #163240

AlLevykin opened this issue Oct 11, 2022 · 5 comments
Assignees
Labels
editor-clipboard Editor clipboard issues feature-request Request for new features or functionality notebook-clipboard *out-of-scope Posted issue is not in scope of VS Code
Milestone

Comments

@AlLevykin
Copy link

AlLevykin commented Oct 11, 2022

Hi!
I'm using vscode.env.clipboard in my extension, but it works with plain text only. If I need to copy HTML with mime-type "text/html" it doesn't work.
I think the best way is adding write method to vscode.env.clipboard which can use ClipboardItem like navigator.clipboard.write.

var data = [new ClipboardItem({ "text/html": new Blob(["<p>Text</p>"], { type: "text/html" }) })];
navigator.clipboard.write(data).then(function() {
   console.log("Copied to clipboard successfully!");
}, function() {
   console.error("Unable to write to clipboard. :-(");
});

Thanks a lot!

@jrieken jrieken added the feature-request Request for new features or functionality label Oct 12, 2022
@vscodenpa vscodenpa added this to the Backlog Candidates milestone Oct 12, 2022
@vscodenpa
Copy link

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

@vscodenpa
Copy link

🙂 This feature request received a sufficient number of community upvotes and we moved it to our backlog. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

@vscodenpa vscodenpa modified the milestones: Backlog Candidates, Backlog Oct 15, 2022
@jrieken
Copy link
Member

jrieken commented Dec 5, 2022

There is still no good support across browsers for this: https://developer.mozilla.org/en-US/docs/Web/API/Clipboard#browser_compatibility

@jrieken jrieken added editor-clipboard Editor clipboard issues *out-of-scope Posted issue is not in scope of VS Code notebook-clipboard labels Dec 5, 2022
@vscodenpa
Copy link

We closed this issue because we don't plan to address it in the foreseeable future. If you disagree and feel that this issue is crucial: we are happy to listen and to reconsider.

If you wonder what we are up to, please see our roadmap and issue reporting guidelines.

Thanks for your understanding, and happy coding!

@vscodenpa vscodenpa closed this as not planned Won't fix, can't repro, duplicate, stale Dec 5, 2022
@jrieken
Copy link
Member

jrieken commented Dec 7, 2022

also duplicate of #77790

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editor-clipboard Editor clipboard issues feature-request Request for new features or functionality notebook-clipboard *out-of-scope Posted issue is not in scope of VS Code
Projects
None yet
Development

No branches or pull requests

4 participants