mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-23 04:51:49 +08:00
28 lines
638 B
TypeScript
28 lines
638 B
TypeScript
import { createEmbedBlockSchema } from '../../../utils/index.js';
|
|
import {
|
|
type EmbedYoutubeBlockProps,
|
|
EmbedYoutubeModel,
|
|
EmbedYoutubeStyles,
|
|
} from './youtube-model.js';
|
|
|
|
const defaultEmbedYoutubeProps: EmbedYoutubeBlockProps = {
|
|
style: EmbedYoutubeStyles[0],
|
|
url: '',
|
|
caption: null,
|
|
|
|
image: null,
|
|
title: null,
|
|
description: null,
|
|
creator: null,
|
|
creatorUrl: null,
|
|
creatorImage: null,
|
|
videoId: null,
|
|
};
|
|
|
|
export const EmbedYoutubeBlockSchema = createEmbedBlockSchema({
|
|
name: 'youtube',
|
|
version: 1,
|
|
toModel: () => new EmbedYoutubeModel(),
|
|
props: (): EmbedYoutubeBlockProps => defaultEmbedYoutubeProps,
|
|
});
|