fixed copy & paste commands

This commit is contained in:
Jan Prochazka
2024-05-09 13:03:05 +02:00
parent 792be82acd
commit 5c24774170
3 changed files with 10 additions and 10 deletions

View File

@@ -1,6 +1,6 @@
<script lang="ts" context="module">
import registerCommand from "../commands/registerCommand";
import {copyTextToClipboard} from "../utility/clipboard";
import registerCommand from '../commands/registerCommand';
import { copyTextToClipboard } from '../utility/clipboard';
const getCurrentEditor = () => getActiveComponent('QueryTab');
@@ -40,7 +40,7 @@
toggleComment: true,
findReplace: true,
executeAdditionalCondition: () => getCurrentEditor()?.hasConnection(),
copyPaste: true
copyPaste: true,
});
registerCommand({
id: 'query.executeCurrent',
@@ -83,7 +83,7 @@
import ToolStripExportButton, { createQuickExportHandlerRef } from '../buttons/ToolStripExportButton.svelte';
import ToolStripSaveButton from '../buttons/ToolStripSaveButton.svelte';
import ToolStripCommandSplitButton from '../buttons/ToolStripCommandSplitButton.svelte';
import {getClipboardText} from "../utility/clipboard";
import { getClipboardText } from '../utility/clipboard';
export let tabid;
export let conid;
@@ -250,7 +250,7 @@
}
export function paste() {
getClipboardText().then((text) => {
getClipboardText().then(text => {
domEditor.getEditor().execCommand('paste', text);
});
}