editor styling
This commit is contained in:
parent
062d8323f4
commit
11ce48e1ff
|
@ -9,12 +9,16 @@
|
||||||
<p
|
<p
|
||||||
class:noPadding
|
class:noPadding
|
||||||
class="spectrum-Body spectrum-Body--size{size}"
|
class="spectrum-Body spectrum-Body--size{size}"
|
||||||
class:spectrum-Body--serif={serif}
|
class:spectrum-Body--serif={serif}>
|
||||||
>
|
|
||||||
<slot />
|
<slot />
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
p {
|
||||||
|
margin-top: 0.75em;
|
||||||
|
margin-bottom: 0.75em;
|
||||||
|
}
|
||||||
|
|
||||||
.noPadding {
|
.noPadding {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|
|
@ -117,7 +117,7 @@
|
||||||
readOnly,
|
readOnly,
|
||||||
autoCloseBrackets: true,
|
autoCloseBrackets: true,
|
||||||
autoCloseTags: true,
|
autoCloseTags: true,
|
||||||
theme: $themeStore.darkMode ? THEMES.DARK : THEMES.LIGHT,
|
theme: THEMES.DARK,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!tab)
|
if (!tab)
|
||||||
|
@ -132,7 +132,7 @@
|
||||||
|
|
||||||
if (destroyed) return
|
if (destroyed) return
|
||||||
|
|
||||||
CodeMirror.commands.autocomplete = function (cm) {
|
CodeMirror.commands.autocomplete = function(cm) {
|
||||||
CodeMirror.showHint(cm, CodeMirror.hint.javascript)
|
CodeMirror.showHint(cm, CodeMirror.hint.javascript)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -89,7 +89,7 @@
|
||||||
<MenuItem icon="LogOut" on:click={auth.logout}>Log out</MenuItem>
|
<MenuItem icon="LogOut" on:click={auth.logout}>Log out</MenuItem>
|
||||||
</ActionMenu>
|
</ActionMenu>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div class="content">
|
||||||
<slot />
|
<slot />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -156,4 +156,9 @@
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
height: 100vh;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
Select,
|
Select,
|
||||||
} from "@budibase/bbui"
|
} from "@budibase/bbui"
|
||||||
import { onMount } from "svelte"
|
import { onMount } from "svelte"
|
||||||
|
import Editor from "components/integration/QueryEditor.svelte"
|
||||||
import api from "builderStore/api"
|
import api from "builderStore/api"
|
||||||
|
|
||||||
const ConfigTypes = {
|
const ConfigTypes = {
|
||||||
|
@ -156,7 +157,14 @@
|
||||||
<Button cta on:click={saveTemplate}>Save</Button>
|
<Button cta on:click={saveTemplate}>Save</Button>
|
||||||
</div>
|
</div>
|
||||||
{#if selectedTemplate}
|
{#if selectedTemplate}
|
||||||
<TextArea bind:value={selectedTemplate.contents} />
|
{#key templateIdx}
|
||||||
|
<Editor
|
||||||
|
mode="handlebars"
|
||||||
|
on:change={e => {
|
||||||
|
selectedTemplate.contents = e.detail.value
|
||||||
|
}}
|
||||||
|
value={selectedTemplate.contents} />
|
||||||
|
{/key}
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
Loading…
Reference in New Issue