2024-12-20 13:41:25 +05:30
|
|
|
import { useCallback } from "react";
|
|
|
|
|
// plane editor
|
2025-08-15 13:10:26 +05:30
|
|
|
import type { TMentionSection } from "@plane/editor";
|
2024-12-20 13:41:25 +05:30
|
|
|
// plane types
|
2025-08-15 13:10:26 +05:30
|
|
|
import type { TSearchEntities, TSearchResponse } from "@plane/types";
|
2024-12-20 13:41:25 +05:30
|
|
|
|
|
|
|
|
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,
|
|
|
|
|
};
|
|
|
|
|
};
|