-
-
Notifications
You must be signed in to change notification settings - Fork 450
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Added support for pasting text into the terminal #623
base: master
Are you sure you want to change the base?
Conversation
Hi @louislam, one of the GitHub Actions jobs for my pull request hasn't started. Let me know if I need to take any action. |
👀 |
giving this a bump, @louislam I know you're busy but perhaps adding someone to the project for approving these more basic feature and bug fixes would really help out. |
this.terminal.textarea.addEventListener("paste", (event) => { | ||
const textToPaste = event.clipboardData.getData("text").replace(/\n+$/, ""); | ||
this.cursorPosition += textToPaste.length; | ||
this.terminalInputBuffer += textToPaste; | ||
console.debug("Paste text: " + textToPaste); | ||
this.terminal.write(textToPaste); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would probably be better to use the xterm addon to this
https://github.com/xtermjs/xterm.js/tree/master/addons/addon-clipboard
I would so love to have this. so frustrating not to be able to paste. |
https://github.com/louislam/dockge/blob/master/CONTRIBUTING.md
Tick the checkbox if you understand [x]:
Description
Fixes #613
This pull request adds support for pasting text into the terminal using the mouse right-click context menu and the keyboard shortcut
CTRL + SHIFT + V
.Type of change
Please delete any options that are not relevant.
Checklist
(including JSDoc for methods)
Screenshots (if any)
Please do not use any external image service. Instead, just paste in or drag and drop the image here, and it will be uploaded automatically.