diff --git a/apps/app/components/pages/create-update-block-inline.tsx b/apps/app/components/pages/create-update-block-inline.tsx index d62486388..163c97792 100644 --- a/apps/app/components/pages/create-update-block-inline.tsx +++ b/apps/app/components/pages/create-update-block-inline.tsx @@ -146,7 +146,7 @@ export const CreateUpdateBlockInline: React.FC = ({ }) .then((res) => { mutate(PAGE_BLOCKS_LIST(pageId as string)); - editorRef.current?.setEditorValue(res.description); + editorRef.current?.setEditorValue(res.description_html); if (data.issue && data.sync) issuesService .patchIssue(workspaceSlug as string, projectId as string, data.issue, { @@ -184,6 +184,7 @@ export const CreateUpdateBlockInline: React.FC = ({ else { setValue("description", {}); setValue("description_html", `${watch("description_html") ?? ""}

${res.response}

`); + editorRef.current?.setEditorValue(watch("description_html") ?? ""); } }) .catch((err) => { @@ -276,7 +277,10 @@ export const CreateUpdateBlockInline: React.FC = ({ if (!data) return ( setValue("description", jsonValue)} onHTMLChange={(htmlValue) => setValue("description_html", htmlValue)} placeholder="Write something..." @@ -292,7 +296,7 @@ export const CreateUpdateBlockInline: React.FC = ({ ); return ( - 0 ? value @@ -306,6 +310,7 @@ export const CreateUpdateBlockInline: React.FC = ({ customClassName="text-sm" noBorder borderOnFocus={false} + ref={editorRef} /> ); }}