-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dev: editor extensions feature flagging
- Loading branch information
Showing
10 changed files
with
51 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,22 @@ | ||
import { Extensions } from "@tiptap/core"; | ||
import { SlashCommand } from "@/extensions"; | ||
// hooks | ||
import { TFileHandler } from "@/hooks/use-editor"; | ||
// plane editor types | ||
import { TIssueEmbedConfig } from "@/plane-editor/types"; | ||
// types | ||
import { TExtensions } from "@/types"; | ||
|
||
type Props = { | ||
disabledExtensions?: TExtensions[]; | ||
fileHandler: TFileHandler; | ||
issueEmbedConfig: TIssueEmbedConfig | undefined; | ||
}; | ||
|
||
export const DocumentEditorAdditionalExtensions = (props: Props) => { | ||
const { fileHandler } = props; | ||
|
||
const extensions = [SlashCommand(fileHandler.upload)]; | ||
const extensions: Extensions = [SlashCommand(fileHandler.upload)]; | ||
|
||
return extensions; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export type TExtensions = "issue-embed"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// editor | ||
import { TExtensions } from "@plane/editor"; | ||
|
||
/** | ||
* @description extensions disabled in various editors | ||
* @returns | ||
* ```ts | ||
* { | ||
* documentEditor: TExtensions[] | ||
* richTextEditor: TExtensions[] | ||
* } | ||
* ``` | ||
*/ | ||
export const useEditorFlagging = (): { | ||
documentEditor: TExtensions[]; | ||
richTextEditor: TExtensions[]; | ||
} => ({ | ||
documentEditor: [], | ||
richTextEditor: [], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters