diff --git a/apps/app/components/issues/form.tsx b/apps/app/components/issues/form.tsx index 7c19b5b79..257a6a4e1 100644 --- a/apps/app/components/issues/form.tsx +++ b/apps/app/components/issues/form.tsx @@ -46,7 +46,7 @@ const RemirrorRichTextEditor = dynamic(() => import("components/rich-text-editor const defaultValues: Partial = { project: "", name: "", - description: "", + description: { type: "doc", content: [] }, description_html: "

", estimate_point: null, state: "", @@ -137,7 +137,7 @@ export const IssueForm: FC = ({ setValue("description_html", `${watch("description_html")}

${response}

`); }; - const handelAutoGenerateDescription = async () => { + const handleAutoGenerateDescription = async () => { if (!workspaceSlug || !projectId) return; setIAmFeelingLucky(true); @@ -301,7 +301,7 @@ export const IssueForm: FC = ({ className={`flex items-center gap-1 rounded px-1.5 py-1 text-xs hover:bg-gray-100 ${ iAmFeelingLucky ? "cursor-wait" : "" }`} - onClick={handelAutoGenerateDescription} + onClick={handleAutoGenerateDescription} disabled={iAmFeelingLucky} > {iAmFeelingLucky ? ( diff --git a/apps/app/components/pages/create-update-block-inline.tsx b/apps/app/components/pages/create-update-block-inline.tsx index c90e2e9db..615010700 100644 --- a/apps/app/components/pages/create-update-block-inline.tsx +++ b/apps/app/components/pages/create-update-block-inline.tsx @@ -32,7 +32,8 @@ type Props = { const defaultValues = { name: "", - description: "

", + description: { type: "doc", content: [] }, + description_html: "

", }; const RemirrorRichTextEditor = dynamic(() => import("components/rich-text-editor"), { diff --git a/apps/app/components/rich-text-editor/index.tsx b/apps/app/components/rich-text-editor/index.tsx index 4c44650b9..32b4931f1 100644 --- a/apps/app/components/rich-text-editor/index.tsx +++ b/apps/app/components/rich-text-editor/index.tsx @@ -199,9 +199,11 @@ const RemirrorRichTextEditor: FC = (props) => { onBlur(jsonValue, htmlValue); }} > - {(!value || value === "" || value?.content?.[0]?.content === undefined) && placeholder && ( -

{placeholder}

- )} + {(!value || value === "" || value?.content?.[0]?.content === undefined) && + !(typeof value === "string" && value.includes("<")) && + placeholder && ( +

{placeholder}

+ )} {imageLoader && (