feat: use markdown editor in post body
This commit is contained in:
1 parent
270855edf1
commit
2eb491f310
2 files changed
+8
-1
No files matched your search
@@ -10,6 +10,7 @@
|
|||||||
import SearchInput from '$lib/components/input/SearchInput.svelte'
|
import SearchInput from '$lib/components/input/SearchInput.svelte'
|
||||||
import { Check, Icon } from 'svelte-hero-icons'
|
import { Check, Icon } from 'svelte-hero-icons'
|
||||||
import { profile } from '$lib/auth.js'
|
import { profile } from '$lib/auth.js'
|
||||||
|
import MarkdownEditor from '$lib/components/markdown/MarkdownEditor.svelte'
|
||||||
|
|
||||||
export let edit = false
|
export let edit = false
|
||||||
|
|
||||||
@@ -186,7 +187,7 @@
|
|||||||
bind:value={data.url}
|
bind:value={data.url}
|
||||||
placeholder="https://notascam.com"
|
placeholder="https://notascam.com"
|
||||||
/>
|
/>
|
||||||
<TextArea
|
<MarkdownEditor
|
||||||
rows={6}
|
rows={6}
|
||||||
label="Body"
|
label="Body"
|
||||||
bind:value={data.body}
|
bind:value={data.body}
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
export let images: boolean = true
|
export let images: boolean = true
|
||||||
export let value: string = ''
|
export let value: string = ''
|
||||||
|
export let label: string | undefined = undefined
|
||||||
|
|
||||||
let textArea: HTMLTextAreaElement
|
let textArea: HTMLTextAreaElement
|
||||||
|
|
||||||
@@ -90,6 +91,10 @@
|
|||||||
</Modal>
|
</Modal>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
<div>
|
||||||
|
{#if label}
|
||||||
|
<div class="block my-1 font-bold text-sm">{label}</div>
|
||||||
|
{/if}
|
||||||
<div
|
<div
|
||||||
class="flex flex-col border border-slate-200 dark:border-zinc-800 rounded-md
|
class="flex flex-col border border-slate-200 dark:border-zinc-800 rounded-md
|
||||||
overflow-hidden"
|
overflow-hidden"
|
||||||
@@ -197,3 +202,4 @@ overflow-hidden"
|
|||||||
{...$$restProps}
|
{...$$restProps}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
Reference in new issue
Block a user