Added basic editor for custom formatting

This commit is contained in:
Mawoka
2022-11-21 19:36:00 +01:00
parent 38790232c2
commit a11f61864c
7 changed files with 543 additions and 23 deletions
+15 -9
View File
@@ -68,15 +68,21 @@
</div>
<div class="flex flex-col">
<div class="flex justify-center pt-10 w-full">
<input
type="text"
bind:value={data.questions[selected_question].question}
placeholder="No title..."
class="p-3 rounded-lg border-gray-500 border text-center w-2/3 text-lg font-semibold placeholder:italic placeholder:font-normal dark:bg-gray-500"
class:bg-yellow-500={!reach(dataSchema, 'questions[].question').isValidSync(
data.questions[selected_question].question
)}
/>
{#await import('$lib/inline-editor.svelte')}
<Spinner my_20={false} />
{:then c}
<div
class="rounded-lg placeholder:italic placeholder:font-normal dark:bg-gray-500"
class:bg-yellow-500={!reach(dataSchema, 'questions[].question').isValidSync(
data.questions[selected_question].question
)}
>
<svelte:component
this={c.default}
bind:text={data.questions[selected_question].question}
/>
</div>
{/await}
</div>
{#if data.questions[selected_question].image != undefined && data.questions[selected_question].image !== ''}
<div class="flex justify-center pt-10 w-full max-h-72 w-full">