execute query

This commit is contained in:
Jan Prochazka
2021-03-07 20:25:04 +01:00
parent f4fe5b9b53
commit 97a27381f2
4 changed files with 38 additions and 3 deletions

View File

@@ -6,7 +6,7 @@
</script>
<div bind:clientWidth bind:clientHeight class="ace-container">
<AceEditorCore {...$$props} width={clientWidth} height={clientHeight} on:input/>
<AceEditorCore {...$$props} width={clientWidth} height={clientHeight} on:input on:focus on:blur />
</div>
<style>

View File

@@ -9,6 +9,7 @@
<script lang="ts">
import AceEditor from './AceEditor.svelte';
export let engine;
let domEditor;
let mode;
@@ -16,6 +17,10 @@
const match = (engine || '').match(/^([^@]*)@/);
mode = engineToMode[match ? match[1] : engine] || 'sql';
}
export function getSelectedText() {
return domEditor.getSelectedText()
}
</script>
<AceEditor {mode} {...$$props} on:input />
<AceEditor {mode} {...$$props} on:input on:focus on:blur bind:this={domEditor}/>