mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-15 05:37:32 +00:00
feat(editor): update footnote node style and config (#10392)
[BS-2581](https://linear.app/affine-design/issue/BS-2581/优化-footnote-node-正文样式)
This commit is contained in:
@@ -8,6 +8,7 @@ import { WorkspaceService } from '@affine/core/modules/workspace';
|
||||
import {
|
||||
createSignalFromObservable,
|
||||
DocModeProvider,
|
||||
FootNoteNodeConfigExtension,
|
||||
RefNodeSlotsProvider,
|
||||
} from '@blocksuite/affine/blocks';
|
||||
import { useFramework } from '@toeverything/infra';
|
||||
@@ -20,6 +21,11 @@ export interface SidebarTabProps {
|
||||
onLoad?: ((component: HTMLElement) => void) | null;
|
||||
}
|
||||
|
||||
// Disable hover effect for footnote node in chat panel
|
||||
const FOOTNOTE_CONFIG = FootNoteNodeConfigExtension({
|
||||
disableHoverEffect: true,
|
||||
});
|
||||
|
||||
// A wrapper for CopilotPanel
|
||||
export const EditorChatPanel = forwardRef(function EditorChatPanel(
|
||||
{ editor, onLoad }: SidebarTabProps,
|
||||
@@ -84,8 +90,9 @@ export const EditorChatPanel = forwardRef(function EditorChatPanel(
|
||||
);
|
||||
},
|
||||
};
|
||||
chatPanelRef.current.previewSpecBuilder =
|
||||
createPageModePreviewSpecs(framework);
|
||||
const previewSpecBuilder = createPageModePreviewSpecs(framework);
|
||||
previewSpecBuilder.extend([FOOTNOTE_CONFIG]);
|
||||
chatPanelRef.current.previewSpecBuilder = previewSpecBuilder;
|
||||
} else {
|
||||
chatPanelRef.current.host = editor.host;
|
||||
chatPanelRef.current.doc = editor.doc;
|
||||
|
||||
Reference in New Issue
Block a user