mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-18 06:47:02 +08:00
21 lines
546 B
TypeScript
21 lines
546 B
TypeScript
import {
|
|
BlockHtmlAdapterExtension,
|
|
type BlockHtmlAdapterMatcher,
|
|
} from '@blocksuite/affine-shared/adapters';
|
|
|
|
export const surfaceBlockHtmlAdapterMatcher: BlockHtmlAdapterMatcher = {
|
|
flavour: 'affine:surface',
|
|
toMatch: () => false,
|
|
fromMatch: o => o.node.flavour === 'affine:surface',
|
|
toBlockSnapshot: {},
|
|
fromBlockSnapshot: {
|
|
enter: (_, context) => {
|
|
context.walkerContext.skipAllChildren();
|
|
},
|
|
},
|
|
};
|
|
|
|
export const SurfaceBlockHtmlAdapterExtension = BlockHtmlAdapterExtension(
|
|
surfaceBlockHtmlAdapterMatcher
|
|
);
|