Skip to content

Commit 74d5db8

Browse files
authored
Merge pull request #3794 from udecode/docs/media
Upload
2 parents 9fe1481 + 454ce84 commit 74d5db8

File tree

217 files changed

+2696
-2672
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

217 files changed

+2696
-2672
lines changed

apps/www/content/docs/caption.mdx

+25-15
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
title: Caption
33
docs:
4-
- route: /docs/components/draggable
5-
title: Draggable
4+
- route: /docs/components/caption
5+
title: Caption
66
---
77

88
<ComponentPreview name="media-demo" />
@@ -25,25 +25,35 @@ npm install @udecode/plate-caption
2525

2626
```tsx
2727
import { CaptionPlugin } from '@udecode/plate-caption/react';
28-
import { ImagePlugin, MediaEmbedPlugin } from '@udecode/plate-media/react';
28+
import {
29+
AudioPlugin,
30+
FilePlugin,
31+
ImagePlugin,
32+
MediaEmbedPlugin,
33+
VideoPlugin,
34+
} from '@udecode/plate-media/react';
35+
```
2936

37+
```tsx
3038
const plugins = [
3139
// ...otherPlugins,
32-
CaptionPlugin,
3340
ImagePlugin,
41+
VideoPlugin,
42+
AudioPlugin,
43+
FilePlugin,
3444
MediaEmbedPlugin,
35-
];
36-
37-
const editor = createPlateEditor({
38-
plugins,
39-
override: {
40-
plugins: {
41-
[CaptionPlugin.key]: {
42-
plugins: [ImagePlugin.key, MediaEmbedPlugin.key],
43-
},
45+
CaptionPlugin.configure({
46+
options: {
47+
plugins: [
48+
ImagePlugin,
49+
VideoPlugin,
50+
AudioPlugin,
51+
FilePlugin,
52+
MediaEmbedPlugin,
53+
],
4454
},
45-
},
46-
});
55+
}),
56+
];
4757
```
4858

4959
## Plugins

apps/www/content/docs/media-placeholder.mdx

-269
This file was deleted.

0 commit comments

Comments
 (0)