diff --git a/packages/editor/core/src/ui/index.tsx b/packages/editor/core/src/ui/index.tsx deleted file mode 100644 index 6b0a22555..000000000 --- a/packages/editor/core/src/ui/index.tsx +++ /dev/null @@ -1,105 +0,0 @@ -"use client"; -import * as React from "react"; -import { Extension } from "@tiptap/react"; -import { getEditorClassNames } from "../lib/utils"; -import { EditorProps } from "@tiptap/pm/view"; -import { useEditor } from "./hooks/use-editor"; -import { EditorContainer } from "../ui/components/editor-container"; -import { EditorContentWrapper } from "../ui/components/editor-content"; -import { - UploadImage, - DeleteImage, - IMentionSuggestion, -} from "@plane/editor-types"; - -interface ICoreEditor { - value: string; - uploadFile: UploadImage; - deleteFile: DeleteImage; - noBorder?: boolean; - borderOnFocus?: boolean; - customClassName?: string; - editorContentCustomClassNames?: string; - onChange?: (json: any, html: string) => void; - setIsSubmitting?: ( - isSubmitting: "submitting" | "submitted" | "saved", - ) => void; - setShouldShowAlert?: (showAlert: boolean) => void; - editable?: boolean; - forwardedRef?: any; - debouncedUpdatesEnabled?: boolean; - accessValue: string; - onAccessChange: (accessKey: string) => void; - commentAccess: { - icon: string; - key: string; - label: "Private" | "Public"; - }[]; - mentionHighlights?: string[]; - mentionSuggestions?: IMentionSuggestion[]; - extensions?: Extension[]; - editorProps?: EditorProps; -} - -interface EditorCoreProps extends ICoreEditor { - forwardedRef?: React.Ref; -} - -interface EditorHandle { - clearEditor: () => void; - setEditorValue: (content: string) => void; -} - -const CoreEditor = ({ - onChange, - debouncedUpdatesEnabled, - editable, - setIsSubmitting, - setShouldShowAlert, - editorContentCustomClassNames, - value, - uploadFile, - deleteFile, - noBorder, - borderOnFocus, - customClassName, - forwardedRef, -}: EditorCoreProps) => { - const editor = useEditor({ - onChange, - debouncedUpdatesEnabled, - setIsSubmitting, - setShouldShowAlert, - value, - uploadFile, - deleteFile, - forwardedRef, - }); - - const editorClassNames = getEditorClassNames({ - noBorder, - borderOnFocus, - customClassName, - }); - - if (!editor) return null; - - return ( - -
- -
-
- ); -}; - -const CoreEditorWithRef = React.forwardRef( - (props, ref) => , -); - -CoreEditorWithRef.displayName = "CoreEditorWithRef"; - -export { CoreEditor, CoreEditorWithRef }; diff --git a/web/components/issues/description-form.tsx b/web/components/issues/description-form.tsx index 663a58d79..94c82c934 100644 --- a/web/components/issues/description-form.tsx +++ b/web/components/issues/description-form.tsx @@ -66,7 +66,7 @@ export const IssueDescriptionForm: FC = (props) => { setLocalIssueDescription({ id: issue.id, description_html: issue.description_html }); setLocalTitleValue(issue.name); } - }, [issue.id, issue.name, issue.description_html]); + }, [issue.id]); const handleDescriptionFormSubmit = useCallback( async (formData: Partial) => {