From abea37b0aa4ce1331712e5ceda9ebf57883f5f1a Mon Sep 17 00:00:00 2001 From: Sam Date: Tue, 2 Apr 2024 14:45:19 +0300 Subject: [PATCH] Fix html editor --- src/components/editor/tiptap.tsx | 2 -- src/components/posts/editor/FullEditor.tsx | 2 -- src/components/posts/editor/HtmlEditor.tsx | 1 - 3 files changed, 5 deletions(-) diff --git a/src/components/editor/tiptap.tsx b/src/components/editor/tiptap.tsx index 66daa1e27..d633dffac 100644 --- a/src/components/editor/tiptap.tsx +++ b/src/components/editor/tiptap.tsx @@ -74,8 +74,6 @@ export const useCreateEditor = ( content: htmlContent || content, onUpdate: ({ editor }) => { debouncedSaveDraft(editor.getHTML()) - }, - onBlur: ({ editor }) => { onUpdate(editor.getHTML()) }, autofocus: true, diff --git a/src/components/posts/editor/FullEditor.tsx b/src/components/posts/editor/FullEditor.tsx index 84bfe1aaf..e8c834e17 100644 --- a/src/components/posts/editor/FullEditor.tsx +++ b/src/components/posts/editor/FullEditor.tsx @@ -57,7 +57,6 @@ const EditorCard = ({ markdownMode, onChange, saveBodyDraft, - form, }: EditorCardProps) => { const [fixedToolbar, setFixedToolbar] = useState(false) const { isMobile } = useResponsiveSize() @@ -69,7 +68,6 @@ const EditorCard = ({ } const onChangeHtmlEditor = (text: string) => { - console.log('iudjfhgsuiydfgiuy', text) const mdText = htmlToMd(text) || '' onChange(mdText) } diff --git a/src/components/posts/editor/HtmlEditor.tsx b/src/components/posts/editor/HtmlEditor.tsx index 5b85fa2b9..35b169a6d 100644 --- a/src/components/posts/editor/HtmlEditor.tsx +++ b/src/components/posts/editor/HtmlEditor.tsx @@ -17,7 +17,6 @@ export default function HtmlEditor({ saveBodyDraft, className, showToolbar, - autoFocus, }: HTMLEditorProps) { const editor = useCreateEditor(onChange, value, saveBodyDraft)