Export
Export a Plate document to a file.
components/demo.tsx
'use client';
import React from 'react';
import { Plate } from '@udecode/plate-common/react';
import { editorPlugins } from '@/components/editor/plugins/editor-plugins';
import { useCreateEditor } from '@/components/editor/use-create-editor';
import { Editor, EditorContainer } from '@/components/plate-ui/editor';
import { DEMO_VALUES } from './values/demo-values';
export default function Demo({ id }: { id: string }) {
const editor = useCreateEditor({
plugins: [...editorPlugins],
value: DEMO_VALUES[id],
});
return (
<Plate editor={editor}>
<EditorContainer variant="demo">
<Editor />
</EditorContainer>
</Plate>
);
}
用法
安装 Export Toolbar Button 组件。
Examples
Plate UI
Refer to the preview above.
Plate Plus
- 服务器端 PDF 导出:
- 高质量 PDF 生成
- 自定义字体和样式
- 页眉和页脚
- 页码
- 可选择字体
- 高级导出选项:
- 纸张大小选择
- 边距控制
- 方向设置
- 压缩级别
尝试使用我们的服务器端 PDF 导出功能: