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

support vscode naive-ui doc copy #5250

Open
Simon-He95 opened this issue Sep 18, 2023 · 0 comments
Open

support vscode naive-ui doc copy #5250

Simon-He95 opened this issue Sep 18, 2023 · 0 comments
Labels
feature request New feature or request pr welcome

Comments

@Simon-He95
Copy link
Contributor

This function solves the problem (这个功能解决的问题)

I want to open doc in vscode webview,it will be more helpful to solve the problem of frequent switching between browsers and vscode

Expected API (期望的 API)

document.addEventListener('keydown', e => {
if ((e.metaKey || e.ctrlKey) && e.key === 'c') {
const selection = document.getSelection();
if (!selection || !selection.toString()) return;
const text = selection.toString();
window.parent.postMessage({ eventType: 'copy', text }, '*');
}
});
@github-actions github-actions bot added the feature request New feature or request label Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request pr welcome
Projects
None yet
Development

No branches or pull requests

2 participants