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