diff --git a/src/components/BlinkoEditor/index.tsx b/src/components/BlinkoEditor/index.tsx index 71dc184..26cf8ff 100644 --- a/src/components/BlinkoEditor/index.tsx +++ b/src/components/BlinkoEditor/index.tsx @@ -28,7 +28,6 @@ export const BlinkoEditor = observer(({ mode, onSended, onHeightChange }: IProps originFiles={!isCreateMode ? blinko.curSelectedNote?.attachments : []} content={isCreateMode ? blinko.noteContent! : blinko.curSelectedNote?.content!} onChange={v => { - onHeightChange?.(editorRef.current?.clientHeight ?? 75) isCreateMode ? (blinko.noteContent = v) : (blinko.curSelectedNote!.content = v) }} onHeightChange={() => { @@ -39,7 +38,6 @@ export const BlinkoEditor = observer(({ mode, onSended, onHeightChange }: IProps isCreateMode ?
Drop to upload files
:
{dayjs(blinko.curSelectedNote!.createdAt).format("YYYY-MM-DD hh:mm:ss")}
} - onSend={async ({ files }) => { if (isCreateMode) { //@ts-ignore diff --git a/src/components/Common/Editor/index.tsx b/src/components/Common/Editor/index.tsx index 8d17271..6072760 100644 --- a/src/components/Common/Editor/index.tsx +++ b/src/components/Common/Editor/index.tsx @@ -323,6 +323,7 @@ const Editor = observer(({ content, onChange, onSend, isSendLoading, bottomSlot, useEffect(() => { store.updateSendStatus() setIsWriting(ai.isWriting) + onHeightChange?.() }, [blinko.noteTypeDefault, content, ai.isWriting, store.files?.length]) useEffect(() => {