Commit Graph

5 Commits

Author SHA1 Message Date
Palanikannan1437
aa09724ec4 🚜 refactor: added lite text editor and rich text editor for space as well 2024-01-11 20:01:29 +05:30
Palanikannan1437
4c38117316 🚜 refactor: added a common place for rich text and lite text read only editors 2024-01-11 18:51:38 +05:30
Palanikannan1437
ce987833b7 🚜 refactor: added a common place for all LiteTextEditor and it's read only instances 2024-01-11 17:42:15 +05:30
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