[WIKI-786] refactor: bubble menu #8138
This commit is contained in:
parent
8307badae5
commit
9611cd1e73
11 changed files with 45 additions and 12 deletions
|
|
@ -19,6 +19,7 @@ export type TEditorFlaggingHookReturnType = {
|
|||
|
||||
export type TEditorFlaggingHookProps = {
|
||||
workspaceSlug: string;
|
||||
projectId?: string;
|
||||
storeType?: EPageStoreType;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -56,7 +56,8 @@ export const DocumentEditor = forwardRef(function DocumentEditor(
|
|||
});
|
||||
// editor flaggings
|
||||
const { document: documentEditorExtensions } = useEditorFlagging({
|
||||
workspaceSlug: workspaceSlug?.toString() ?? "",
|
||||
workspaceSlug,
|
||||
projectId,
|
||||
});
|
||||
// use editor mention
|
||||
const { fetchMentions } = useEditorMention({
|
||||
|
|
|
|||
|
|
@ -81,7 +81,8 @@ export const LiteTextEditor = React.forwardRef(function LiteTextEditor(
|
|||
const [editorRef, setEditorRef] = useState<EditorRefApi | null>(null);
|
||||
// editor flaggings
|
||||
const { liteText: liteTextEditorExtensions } = useEditorFlagging({
|
||||
workspaceSlug: workspaceSlug?.toString() ?? "",
|
||||
workspaceSlug,
|
||||
projectId,
|
||||
});
|
||||
// store hooks
|
||||
const { getUserDetails } = useMember();
|
||||
|
|
|
|||
|
|
@ -50,7 +50,8 @@ export const RichTextEditor = forwardRef(function RichTextEditor(
|
|||
const { getUserDetails } = useMember();
|
||||
// editor flaggings
|
||||
const { richText: richTextEditorExtensions } = useEditorFlagging({
|
||||
workspaceSlug: workspaceSlug?.toString() ?? "",
|
||||
workspaceSlug,
|
||||
projectId,
|
||||
});
|
||||
// use editor mention
|
||||
const { fetchMentions } = useEditorMention({
|
||||
|
|
|
|||
|
|
@ -59,7 +59,8 @@ export const StickyEditor = React.forwardRef(function StickyEditor(
|
|||
const [isFocused, setIsFocused] = useState(showToolbarInitially);
|
||||
// editor flaggings
|
||||
const { liteText: liteTextEditorExtensions } = useEditorFlagging({
|
||||
workspaceSlug: workspaceSlug?.toString() ?? "",
|
||||
workspaceSlug,
|
||||
projectId,
|
||||
});
|
||||
// parse content
|
||||
const { getEditorMetaData } = useParseEditorContent({
|
||||
|
|
|
|||
|
|
@ -101,6 +101,7 @@ export const PageEditorBody = observer(function PageEditorBody(props: Props) {
|
|||
// editor flaggings
|
||||
const { document: documentEditorExtensions } = useEditorFlagging({
|
||||
workspaceSlug,
|
||||
projectId,
|
||||
storeType,
|
||||
});
|
||||
// parse content
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue