mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-21 12:06:35 +08:00
feat: bump blocksuite (#5286)
Co-authored-by: donteatfriedrice <huisheng.chen7788@outlook.com>
This commit is contained in:
@@ -12,7 +12,7 @@ export const PresentButton = () => {
|
||||
|
||||
const handlePresent = useCallback(() => {
|
||||
// TODO: use editor Atom
|
||||
const editorRoot = document.querySelector('block-suite-root');
|
||||
const editorRoot = document.querySelector('editor-host');
|
||||
if (!editorRoot || isPresent) return;
|
||||
|
||||
// TODO: use surfaceService subAtom
|
||||
@@ -28,7 +28,7 @@ export const PresentButton = () => {
|
||||
if (!isPresent) return;
|
||||
|
||||
// TODO: use editor Atom
|
||||
const editorRoot = document.querySelector('block-suite-root');
|
||||
const editorRoot = document.querySelector('editor-host');
|
||||
if (!editorRoot) return;
|
||||
|
||||
// TODO: use surfaceService subAtom
|
||||
|
||||
@@ -2,7 +2,7 @@ import './page-detail-editor.css';
|
||||
|
||||
import { PageNotFoundError } from '@affine/env/constant';
|
||||
import { assertExists, DisposableGroup } from '@blocksuite/global/utils';
|
||||
import type { EditorContainer } from '@blocksuite/presets';
|
||||
import type { AffineEditorContainer } from '@blocksuite/presets';
|
||||
import type { Page, Workspace } from '@blocksuite/store';
|
||||
import { useBlockSuitePageMeta } from '@toeverything/hooks/use-block-suite-page-meta';
|
||||
import { useBlockSuiteWorkspacePage } from '@toeverything/hooks/use-block-suite-workspace-page';
|
||||
@@ -23,10 +23,13 @@ import * as styles from './page-detail-editor.css';
|
||||
|
||||
declare global {
|
||||
// eslint-disable-next-line no-var
|
||||
var currentEditor: EditorContainer | undefined;
|
||||
var currentEditor: AffineEditorContainer | undefined;
|
||||
}
|
||||
|
||||
export type OnLoadEditor = (page: Page, editor: EditorContainer) => () => void;
|
||||
export type OnLoadEditor = (
|
||||
page: Page,
|
||||
editor: AffineEditorContainer
|
||||
) => () => void;
|
||||
|
||||
export interface PageDetailEditorProps {
|
||||
isPublic?: boolean;
|
||||
@@ -93,11 +96,11 @@ const PageDetailEditorMain = memo(function PageDetailEditorMain({
|
||||
[isPublic, switchToEdgelessMode, pageId, switchToPageMode]
|
||||
);
|
||||
|
||||
const [, setEditor] = useState<EditorContainer>();
|
||||
const [, setEditor] = useState<AffineEditorContainer>();
|
||||
const blockId = useRouterHash();
|
||||
|
||||
const onLoadEditor = useCallback(
|
||||
(editor: EditorContainer) => {
|
||||
(editor: AffineEditorContainer) => {
|
||||
// debug current detail editor
|
||||
globalThis.currentEditor = editor;
|
||||
setEditor(editor);
|
||||
|
||||
Reference in New Issue
Block a user