mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-23 20:18:42 +08:00
feat(editor): add editor store (#9584)
This commit is contained in:
@@ -5,7 +5,7 @@ import {
|
||||
type DndEventState,
|
||||
} from '@blocksuite/block-std';
|
||||
import { Point } from '@blocksuite/global/utils';
|
||||
import type { BlockViewType, Query } from '@blocksuite/store';
|
||||
import { type BlockViewType, type Query, Store } from '@blocksuite/store';
|
||||
|
||||
import { DragPreview } from '../components/drag-preview.js';
|
||||
import type { AffineDragHandleWidget } from '../drag-handle.js';
|
||||
@@ -82,8 +82,9 @@ export class PreviewHelper {
|
||||
const doc = this.widget.doc.doc.getBlocks({ query });
|
||||
|
||||
const previewSpec = SpecProvider.getInstance().getSpec('page:preview');
|
||||
const store = new Store({ blocks: doc });
|
||||
const previewStd = new BlockStdScope({
|
||||
doc,
|
||||
store,
|
||||
extensions: previewSpec.value,
|
||||
});
|
||||
const previewTemplate = previewStd.render();
|
||||
|
||||
Reference in New Issue
Block a user