diff --git a/package-lock.json b/package-lock.json index 46ab61f0..d28930b0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { - "name": "Unidiscuss", + "name": "unidiscuss", "version": "0.0.1", "lockfileVersion": 1, "requires": true, @@ -1146,6 +1146,12 @@ "picomatch": "^2.2.2" } }, + "@tailwindcss/typography": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@tailwindcss/typography/-/typography-0.3.1.tgz", + "integrity": "sha512-HyZ+3Eay8SGaPq7kcFoANZLr4EjeXQ19yjjb9fp6B0PHHpvZoe00jdsnpnooMEbx9J5rQ93nxPUG3MQmXVxGMQ==", + "dev": true + }, "@types/estree": { "version": "0.0.39", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", diff --git a/package.json b/package.json index 4b1cf8e0..ab045f25 100644 --- a/package.json +++ b/package.json @@ -24,6 +24,7 @@ "@rollup/plugin-commonjs": "^14.0.0", "@rollup/plugin-node-resolve": "^8.0.0", "@rollup/plugin-replace": "^2.2.0", + "@tailwindcss/typography": "^0.3.1", "carbon-icons-svelte": "^10.21.0", "postcss": "^8.0.9", "postcss-load-config": "^2.1.0", diff --git a/src/components/Hoverable.svelte b/src/components/Hoverable.svelte new file mode 100644 index 00000000..34238356 --- /dev/null +++ b/src/components/Hoverable.svelte @@ -0,0 +1,15 @@ + + +
+ +
\ No newline at end of file diff --git a/src/components/TextEditor.svelte b/src/components/TextEditor.svelte new file mode 100644 index 00000000..e1b23690 --- /dev/null +++ b/src/components/TextEditor.svelte @@ -0,0 +1,86 @@ + + + + +
+
+ + +
+ +
+ {#if isWriteMode} + + {:else} +
+ {@html marked(value)} +
+ {/if} +
+ {#if !isWriteMode} +
+ {/if} +
+
+ + Styling with Markdown is supported +
+ + +
+
\ No newline at end of file diff --git a/src/routes/discussion/[id].svelte b/src/routes/discussion/[id].svelte index 3c51bb50..9274639e 100644 --- a/src/routes/discussion/[id].svelte +++ b/src/routes/discussion/[id].svelte @@ -1,7 +1,9 @@