chore: 일정 폼 tinymce 적용

This commit is contained in:
2025-05-28 11:07:29 +09:00
parent c5db9d1def
commit a8e3ea321b
@@ -1,5 +1,6 @@
import dayjs from "dayjs";
import { useState } from "react";
import dynamic from "next/dynamic";
import { type Path, type PathValue, type UseFormReturn } from "react-hook-form";
import {
Checkbox,
@@ -13,7 +14,6 @@ import {
TableCell,
TableHead,
TableRow,
Textarea,
} from "@common/components";
import { GeneralFileUploader } from "@/widgets/post/ui/general-file-uploader";
import { FormWrapper } from "@/widgets/form-wrapper";
@@ -25,6 +25,11 @@ import {
} from "../model/schedule-interface";
import { DateTimePicker } from "./date-time-picker";
const Editor = dynamic(
() => import("@/entities/editor").then((module) => module.Editor),
{ ssr: false },
);
type ScheduleFormProps<T extends ScheduleFormData | ScheduleUpdateFormData> = {
form: UseFormReturn<T>;
scheduleId?: string;
@@ -267,11 +272,9 @@ function ScheduleForm<T extends ScheduleFormData | ScheduleUpdateFormData>({
render={({ field }) => (
<FormItem>
<FormControl>
<Textarea
{...field}
<Editor
value={(field.value as string) ?? ""}
className="min-h-32 !text-[1.3rem]"
placeholder="일정 내용을 입력하십시오."
onEditorChange={field.onChange}
/>
</FormControl>
</FormItem>