mirror of
https://github.com/makeplane/plane.git
synced 2025-12-22 22:59:33 +01:00
42 lines
1010 B
TypeScript
42 lines
1010 B
TypeScript
|
|
import { useCallback } from "react";
|
||
|
|
// plane editor
|
||
|
|
import { TMentionSection } from "@plane/editor";
|
||
|
|
// plane types
|
||
|
|
import { TSearchEntities, TSearchResponse } from "@plane/types";
|
||
|
|
|
||
|
|
export type TAdditionalEditorMentionHandlerArgs = {
|
||
|
|
response: TSearchResponse;
|
||
|
|
sections: TMentionSection[];
|
||
|
|
};
|
||
|
|
|
||
|
|
export type TAdditionalParseEditorContentArgs = {
|
||
|
|
id: string;
|
||
|
|
entityType: TSearchEntities;
|
||
|
|
};
|
||
|
|
|
||
|
|
export type TAdditionalParseEditorContentReturnType =
|
||
|
|
| {
|
||
|
|
redirectionPath: string;
|
||
|
|
textContent: string;
|
||
|
|
}
|
||
|
|
| undefined;
|
||
|
|
|
||
|
|
export const useAdditionalEditorMention = () => {
|
||
|
|
const updateAdditionalSections = useCallback((args: TAdditionalEditorMentionHandlerArgs) => {
|
||
|
|
const {} = args;
|
||
|
|
}, []);
|
||
|
|
|
||
|
|
const parseAdditionalEditorContent = useCallback(
|
||
|
|
(args: TAdditionalParseEditorContentArgs): TAdditionalParseEditorContentReturnType => {
|
||
|
|
const {} = args;
|
||
|
|
return undefined;
|
||
|
|
},
|
||
|
|
[]
|
||
|
|
);
|
||
|
|
|
||
|
|
return {
|
||
|
|
updateAdditionalSections,
|
||
|
|
parseAdditionalEditorContent,
|
||
|
|
};
|
||
|
|
};
|