fix: create linked-doc block when content can't be drop as gfx block (#10250)

This commit is contained in:
doouding
2025-02-18 08:40:57 +00:00
parent 3f4b7ec51e
commit 88095a87a8
2 changed files with 63 additions and 20 deletions

View File

@@ -32,6 +32,7 @@ export class DNDAPIExtension extends Extension {
docId: string;
flavour?: string;
blockId?: string;
props?: Record<string, unknown>;
}): SliceSnapshot | null {
const { docId, flavour = 'affine:embed-linked-doc', blockId } = options;
@@ -43,6 +44,7 @@ export class DNDAPIExtension extends Extension {
return null;
}
const props = {
...options.props,
...(blockId ? { blockId } : {}),
pageId: docId,
};