plane/apps/web/ce/hooks/use-editor-flagging.ts
Aaryan Khandelwal e110ef55b8
[WIKI-569] chore: migrate to tiptap v3 (#7526)
* chore: upgrade to tiptap v3

* chore: update starter kit

* chore: tippy to floating-ui migration for mentions

* chore: update remaining floating menus

* chore: update setEditorValue function

* fix: potential bugs

* chore: extract out common floating ui positioning logic

* fix: storage api

* fix: bubble menu

* fix: type errors

* fix: type errors

* chore: upgrade tiptap-markdown package

* fix: mentions close callback

* chore: update bubbling sequence

* chore: update package.json

* chore: update tiptap catalogs

* fix: add error handling

* fix: file plugin types

* chore: update live package.json

* fix: broken lock file

---------

Co-authored-by: Palanikannan M <akashmalinimurugu@gmail.com>
Co-authored-by: sriramveeraghanta <veeraghanta.sriram@gmail.com>
2025-09-30 19:56:12 +05:30

42 lines
915 B
TypeScript

// editor
import type { TExtensions } from "@plane/editor";
import { EPageStoreType } from "@/plane-web/hooks/store";
export type TEditorFlaggingHookReturnType = {
document: {
disabled: TExtensions[];
flagged: TExtensions[];
};
liteText: {
disabled: TExtensions[];
flagged: TExtensions[];
};
richText: {
disabled: TExtensions[];
flagged: TExtensions[];
};
};
export type TEditorFlaggingHookProps = {
workspaceSlug: string;
storeType?: EPageStoreType;
};
/**
* @description extensions disabled in various editors
*/
export const useEditorFlagging = (_props: TEditorFlaggingHookProps): TEditorFlaggingHookReturnType => ({
document: {
disabled: ["ai", "collaboration-cursor"],
flagged: [],
},
liteText: {
disabled: ["ai", "collaboration-cursor"],
flagged: [],
},
richText: {
disabled: ["ai", "collaboration-cursor"],
flagged: [],
},
});