Commit Graph

2 Commits

Author SHA1 Message Date
Palanikannan1437
ae9c729fc7 renamed wrapper to just RichTextEditor 2024-01-11 15:41:54 +05:30
Palanikannan1437
7c0711dc90 feat: Add RichTextEditorWrapper component for easier global rich text editor changes
This commit adds the `RichTextEditorWrapper` component to the project. The component is responsible for rendering a rich text editor with additional functionalities.

The `RichTextEditorWrapper` component imports the necessary dependencies from `"react"` and `"@plane/rich-text-editor"`. It also utilizes the `useMention` hook from `"hooks/store"`.

The component interfaces include `EditorHandle`, which defines methods like `clearEditor` and `setEditorValue`, and `RichTextEditorWrapperProps`, which extends the `IRichTextEditor` interface with additional properties.

An instance of the `FileService` is created to handle file-related operations.

The `RichTextEditorWrapper` component is exported using `React.forwardRef` to allow access to the underlying editor's ref. It takes the `workspaceSlug` prop and other relevant props, renders the `RichTextEditorWithRef` component, and passes the necessary props like `uploadFile`, `deleteFile`, `restoreFile`, `mentionSuggestions`, and `mentionHighlights`.

The `RichTextEditorWrapper` component's display name is set to "RichTextEditorWrapper".
2024-01-11 12:58:52 +05:30