diff --git a/src/lib/components/lemmy/comment/Comment.svelte b/src/lib/components/lemmy/comment/Comment.svelte
index 85d8dfcc..bcb1d3d1 100644
--- a/src/lib/components/lemmy/comment/Comment.svelte
+++ b/src/lib/components/lemmy/comment/Comment.svelte
@@ -71,6 +71,7 @@
postId={node.comment_view.comment.id}
bind:value={newComment}
actions={false}
+ preview={true}
/>
{/if}
@@ -142,7 +143,7 @@
class="flex flex-col whitespace-pre-wrap
max-w-full gap-1"
>
-
+
{#if actions}
diff --git a/src/lib/components/lemmy/comment/CommentForm.svelte b/src/lib/components/lemmy/comment/CommentForm.svelte
index 9c682c0a..4c034af7 100644
--- a/src/lib/components/lemmy/comment/CommentForm.svelte
+++ b/src/lib/components/lemmy/comment/CommentForm.svelte
@@ -6,6 +6,8 @@
import { createEventDispatcher } from 'svelte'
import { ToastType, addToast } from '$lib/components/ui/toasts/toasts.js'
import TextArea from '$lib/components/input/TextArea.svelte'
+ import MultiSelect from '$lib/components/input/MultiSelect.svelte'
+ import Markdown from '$lib/components/markdown/Markdown.svelte'
export let postId: number
export let parentId: number | undefined = undefined
@@ -16,7 +18,11 @@
export let value = ''
export let actions = true
+ let previewAction = true
+ export { previewAction as preview }
+
let loading = false
+ let preview = false
async function submit() {
if (!$user || !$authData || value == '') return
@@ -52,26 +58,44 @@
-
- {#if actions}
-
-
+ {#if preview}
+
+
+
+ {:else}
+
+ {/if}
+ {#if actions || previewAction}
+
+ {#if previewAction}
+
+ {/if}
+ {#if actions}
+
+ {/if}
{/if}
diff --git a/src/lib/components/markdown/Markdown.svelte b/src/lib/components/markdown/Markdown.svelte
index b0d49680..e7b0293d 100644
--- a/src/lib/components/markdown/Markdown.svelte
+++ b/src/lib/components/markdown/Markdown.svelte
@@ -4,7 +4,7 @@
export let source: string = ''
-
+
{@html md.render(source)}
@@ -44,19 +44,19 @@
}
.markdown :global(ul > *) {
- @apply leading-[22px];
+ @apply leading-[20px];
}
.markdown :global(ol > *) {
- @apply leading-[22px];
+ @apply leading-[20px];
}
.markdown :global(li) {
- @apply m-0 leading-[22px] !important;
+ @apply m-0 leading-[1.4] !important;
}
.markdown :global(li > *) {
- @apply m-0 leading-[22px] !important;
+ @apply m-0 leading-[1.4] !important;
}
.markdown :global(blockquote) {
@@ -64,6 +64,6 @@
}
.markdown :global(p) {
- @apply leading-[22px];
+ @apply leading-[1.4];
}