feat(editor): embed extension (#11848)

Closes: BS-3195
This commit is contained in:
Saul-Mirone
2025-04-21 09:22:12 +00:00
parent 15a5264352
commit 92ac8e3cad
20 changed files with 188 additions and 2 deletions
@@ -28,3 +28,16 @@ export const EmbedGithubBlockSpec: ExtensionType[] = [
createBuiltinToolbarConfigExtension(flavour, EmbedGithubBlockComponent),
SlashMenuConfigExtension(flavour, embedGithubSlashMenuConfig),
].flat();
export const EmbedGithubViewExtensions: ExtensionType[] = [
FlavourExtension(flavour),
EmbedGithubBlockService,
BlockViewExtension(flavour, model => {
return model.parent?.flavour === 'affine:surface'
? literal`affine-embed-edgeless-github-block`
: literal`affine-embed-github-block`;
}),
EmbedGithubBlockOptionConfig,
createBuiltinToolbarConfigExtension(flavour, EmbedGithubBlockComponent),
SlashMenuConfigExtension(flavour, embedGithubSlashMenuConfig),
].flat();