mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
@@ -28,7 +28,8 @@ type KnownFlavour =
|
||||
| 'affine:image'
|
||||
| 'affine:attachment'
|
||||
| 'affine:transcription'
|
||||
| 'affine:callout';
|
||||
| 'affine:callout'
|
||||
| 'affine:table';
|
||||
|
||||
export function parseWorkspaceDoc(doc: Doc): WorkspaceDocContent | null {
|
||||
// not a workspace doc
|
||||
@@ -118,6 +119,21 @@ export function parsePageDoc(
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'affine:table': {
|
||||
// only extract text in full content mode
|
||||
if (summaryLenNeeded === -1) {
|
||||
const contents: string[] = [...block.keys()]
|
||||
.map(key => {
|
||||
if (key.startsWith('prop:cells.') && key.endsWith('.text')) {
|
||||
return block.get(key)?.toString() ?? '';
|
||||
}
|
||||
return '';
|
||||
})
|
||||
.filter(Boolean);
|
||||
content.summary += contents.join('|');
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'affine:paragraph':
|
||||
case 'affine:list':
|
||||
case 'affine:code': {
|
||||
|
||||
Reference in New Issue
Block a user