feat(editor): improve block meta updated event handler (#10815)

This commit is contained in:
Saul-Mirone
2025-03-13 06:34:03 +00:00
parent 8ac687628c
commit 5148e67891
2 changed files with 33 additions and 12 deletions
@@ -5,6 +5,8 @@ import {
type Text,
} from '@blocksuite/store';
import type { BlockMeta } from '../../utils/types';
export type ParagraphType =
| 'text'
| 'quote'
@@ -19,7 +21,7 @@ export type ParagraphProps = {
type: ParagraphType;
text: Text;
collapsed: boolean;
};
} & BlockMeta;
export const ParagraphBlockSchema = defineBlockSchema({
flavour: 'affine:paragraph',
@@ -27,6 +29,10 @@ export const ParagraphBlockSchema = defineBlockSchema({
type: 'text',
text: internal.Text(),
collapsed: false,
'meta:createdAt': undefined,
'meta:createdBy': undefined,
'meta:updatedAt': undefined,
'meta:updatedBy': undefined,
}),
metadata: {
version: 1,