feat: custom CSS editor with CodeMirror, live preview, and /docs/css reference
Some checks failed
lint / lint (push) Failing after 7m36s
test / unit (push) Successful in 17m12s
test / integration (push) Failing after 18m34s

This commit is contained in:
2026-05-24 03:26:34 +02:00
parent 379f31e27d
commit 3f26456d77
7 changed files with 493 additions and 5 deletions

View File

@@ -21,6 +21,7 @@ import {
import { Input } from "@/components/ui/input";
import { Textarea } from "@/components/ui/textarea";
import { UserAvatar } from "@/components/user-avatar";
import { CssEditor } from "@/components/css-editor";
import { Camera, ImagePlus, Loader2 } from "lucide-react";
interface EditProfileFormProps {
@@ -199,12 +200,11 @@ export function EditProfileForm({ currentUser, token }: EditProfileFormProps) {
control={form.control}
render={({ field }) => (
<FormItem>
<FormLabel>Custom CSS</FormLabel>
<FormControl>
<Textarea
placeholder="body { font-family: 'Comic Sans MS'; }"
rows={5}
{...field}
<CssEditor
value={field.value ?? ""}
onChange={field.onChange}
username={currentUser.username}
/>
</FormControl>
<FormMessage />