Skip to content

Commit

Permalink
Merge pull request #3794 from udecode/docs/media
Browse files Browse the repository at this point in the history
Upload
  • Loading branch information
zbeyens authored Nov 20, 2024
2 parents 9fe1481 + 454ce84 commit 74d5db8
Show file tree
Hide file tree
Showing 217 changed files with 2,696 additions and 2,672 deletions.
40 changes: 25 additions & 15 deletions apps/www/content/docs/caption.mdx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: Caption
docs:
- route: /docs/components/draggable
title: Draggable
- route: /docs/components/caption
title: Caption
---

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

```tsx
import { CaptionPlugin } from '@udecode/plate-caption/react';
import { ImagePlugin, MediaEmbedPlugin } from '@udecode/plate-media/react';
import {
AudioPlugin,
FilePlugin,
ImagePlugin,
MediaEmbedPlugin,
VideoPlugin,
} from '@udecode/plate-media/react';
```

```tsx
const plugins = [
// ...otherPlugins,
CaptionPlugin,
ImagePlugin,
VideoPlugin,
AudioPlugin,
FilePlugin,
MediaEmbedPlugin,
];

const editor = createPlateEditor({
plugins,
override: {
plugins: {
[CaptionPlugin.key]: {
plugins: [ImagePlugin.key, MediaEmbedPlugin.key],
},
CaptionPlugin.configure({
options: {
plugins: [
ImagePlugin,
VideoPlugin,
AudioPlugin,
FilePlugin,
MediaEmbedPlugin,
],
},
},
});
}),
];
```

## Plugins
Expand Down
269 changes: 0 additions & 269 deletions apps/www/content/docs/media-placeholder.mdx

This file was deleted.

Loading

0 comments on commit 74d5db8

Please sign in to comment.