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:
parent
9309d1b574
commit
eed2ca77ef
9 changed files with 90 additions and 16 deletions
41
space/core/components/editor/rich-text-editor.tsx
Normal file
41
space/core/components/editor/rich-text-editor.tsx
Normal 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";
|
||||
Loading…
Add table
Add a link
Reference in a new issue