mirror of
https://github.com/louislam/dockge.git
synced 2025-02-26 13:35:57 +00:00
Merge adda2e15c1
into a65a9f5549
This commit is contained in:
commit
02b373cdcb
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