mirror of
https://github.com/louislam/dockge.git
synced 2025-02-26 05:25:56 +00:00
Compare commits
2 commits
963a39c840
...
02b373cdcb
Author | SHA1 | Date | |
---|---|---|---|
|
02b373cdcb | ||
|
adda2e15c1 |
1 changed files with 9 additions and 0 deletions
|
@ -129,6 +129,15 @@ export default {
|
||||||
}
|
}
|
||||||
// Fit the terminal width to the div container size after terminal is created.
|
// Fit the terminal width to the div container size after terminal is created.
|
||||||
this.updateTerminalSize();
|
this.updateTerminalSize();
|
||||||
|
|
||||||
|
// Add paste event listener
|
||||||
|
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);
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
unmounted() {
|
unmounted() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue