fix: added workspaceslug in renderChildren of project settings (#5951)

* fix: added workspaceslug in renderChildren of project settings

* fix: updated apis

* fix: types

* fix: added editor

* fix: handled avatar for intake
This commit is contained in:
Akshita Goyal 2024-11-05 16:07:27 +05:30 committed by GitHub
parent 9309d1b574
commit eed2ca77ef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 90 additions and 16 deletions

View file

@ -0,0 +1,41 @@
import React, { forwardRef } from "react";
// editor
import { EditorRefApi, IMentionHighlight, IRichTextEditor, RichTextEditorWithRef } from "@plane/editor";
// types
// helpers
import { cn } from "@/helpers/common.helper";
import { getEditorFileHandlers } from "@/helpers/editor.helper";
interface RichTextEditorWrapperProps extends Omit<IRichTextEditor, "fileHandler" | "mentionHandler"> {
uploadFile: (file: File) => Promise<string>;
}
export const RichTextEditor = forwardRef<EditorRefApi, RichTextEditorWrapperProps>((props, ref) => {
const { containerClassName, uploadFile, ...rest } = props;
// store hooks
// use-mention
// file size
return (
<RichTextEditorWithRef
mentionHandler={{
highlights: function (): Promise<IMentionHighlight[]> {
throw new Error("Function not implemented.");
},
suggestions: undefined,
}}
ref={ref}
fileHandler={getEditorFileHandlers({
uploadFile,
workspaceId: "",
anchor: "",
})}
{...rest}
containerClassName={cn("relative pl-3 pb-3", containerClassName)}
/>
);
});
RichTextEditor.displayName = "RichTextEditor";