返回 presentation-ai
media-base-kit.tsx
根目录 / src / components / plate / plugins / media-base-kit.tsx
1 import { BaseCaptionPlugin } from "@platejs/caption";
2 import {
3 BaseAudioPlugin,
4 BaseFilePlugin,
5 BaseImagePlugin,
6 BaseMediaEmbedPlugin,
7 BasePlaceholderPlugin,
8 BaseVideoPlugin,
9 } from "@platejs/media";
10 import { KEYS } from "platejs";
11
12 import { AudioElementStatic } from "@/components/plate/ui/media-audio-node-static";
13 import { FileElementStatic } from "@/components/plate/ui/media-file-node-static";
14 import { ImageElementStatic } from "@/components/plate/ui/media-image-node-static";
15 import { VideoElementStatic } from "@/components/plate/ui/media-video-node-static";
16
17 export const BaseMediaKit = [
18 BaseImagePlugin.withComponent(ImageElementStatic),
19 BaseVideoPlugin.withComponent(VideoElementStatic),
20 BaseAudioPlugin.withComponent(AudioElementStatic),
21 BaseFilePlugin.withComponent(FileElementStatic),
22 BaseCaptionPlugin.configure({
23 options: {
24 query: {
25 allow: [KEYS.img, KEYS.video, KEYS.audio, KEYS.file, KEYS.mediaEmbed],
26 },
27 },
28 }),
29 BaseMediaEmbedPlugin,
30 BasePlaceholderPlugin,
31 ];
32
32 lines Plain Text