mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 23:06:00 +00:00
fixed copy & paste commands
This commit is contained in:
@@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user