mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-20 01:01:37 +08:00
15 lines
463 B
TypeScript
15 lines
463 B
TypeScript
import { ElementToPlainTextAdapterExtension } from '@blocksuite/affine-block-surface';
|
|
|
|
import { getGroupTitle } from '../text';
|
|
|
|
export const groupToPlainTextAdapterMatcher =
|
|
ElementToPlainTextAdapterExtension({
|
|
name: 'group',
|
|
match: elementModel => elementModel.type === 'group',
|
|
toAST: elementModel => {
|
|
const title = getGroupTitle(elementModel);
|
|
const content = `Group, with title "${title}"`;
|
|
return { content };
|
|
},
|
|
});
|