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

add plain text type to fix copy as html #148205

Merged
merged 2 commits into from
Apr 26, 2022
Merged

Conversation

meganrogge
Copy link
Contributor

This PR fixes #146427

@meganrogge meganrogge self-assigned this Apr 26, 2022
@meganrogge meganrogge added this to the April 2022 milestone Apr 26, 2022
@meganrogge meganrogge merged commit 7d9b1c3 into main Apr 26, 2022
@meganrogge meganrogge deleted the merogge/fix-copy-as-html branch April 26, 2022 20:01
@@ -1153,6 +1153,9 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
if (asHtml) {
const textAsHtml = await xterm.getSelectionAsHtml(command);
function listener(e: any) {
if (!e.clipboardData.types.includes('text/plain')) {
e.clipboardData.setData('text/plain', command?.getOutput());
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

command?.getOutput() ?? ''

@github-actions github-actions bot locked and limited conversation to collaborators Jun 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Copy Output as HTML command action
1 participant