mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-18 02:26:21 +08:00
fix(editor): notion html adapter for embed link block (#9279)
[BS-1745](https://linear.app/affine-design/issue/BS-1745/[bug]-导入的notion-youtube-embed-错误)
This commit is contained in:
@@ -2,10 +2,12 @@ import type { ExtensionType } from '@blocksuite/block-std';
|
||||
|
||||
import { EmbedGithubBlockHtmlAdapterExtension } from './html.js';
|
||||
import { EmbedGithubMarkdownAdapterExtension } from './markdown.js';
|
||||
import { EmbedGithubNotionHtmlAdapterExtension } from './notion-html.js';
|
||||
import { EmbedGithubBlockPlainTextAdapterExtension } from './plain-text.js';
|
||||
|
||||
export const EmbedGithubBlockAdapterExtensions: ExtensionType[] = [
|
||||
EmbedGithubBlockHtmlAdapterExtension,
|
||||
EmbedGithubMarkdownAdapterExtension,
|
||||
EmbedGithubBlockPlainTextAdapterExtension,
|
||||
EmbedGithubNotionHtmlAdapterExtension,
|
||||
];
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
export * from './html.js';
|
||||
export * from './markdown.js';
|
||||
export * from './notion-html.js';
|
||||
export * from './plain-text.js';
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
import { EmbedGithubBlockSchema } from '@blocksuite/affine-model';
|
||||
import { BlockNotionHtmlAdapterExtension } from '@blocksuite/affine-shared/adapters';
|
||||
|
||||
import { createEmbedBlockNotionHtmlAdapterMatcher } from '../../common/adapters/notion-html.js';
|
||||
import { githubUrlRegex } from '../embed-github-model.js';
|
||||
|
||||
export const embedGithubBlockNotionHtmlAdapterMatcher =
|
||||
createEmbedBlockNotionHtmlAdapterMatcher(
|
||||
EmbedGithubBlockSchema.model.flavour,
|
||||
githubUrlRegex
|
||||
);
|
||||
|
||||
export const EmbedGithubNotionHtmlAdapterExtension =
|
||||
BlockNotionHtmlAdapterExtension(embedGithubBlockNotionHtmlAdapterMatcher);
|
||||
Reference in New Issue
Block a user