由于 Plate UI 不是一个组件库,因此在此维护更新日志。
使用 CLI 安装组件的最新版本。
2026年4月 #30
4月15日 #30.4
- 文档:更新了使用
inputRules的套件文档,使其与当前显式 API 对齐,包括 block fence 必填的on、feature-owned markdown rule 注册方式,以及新的plugin-input-rules指南。
2026年1月 #28
1月17日 #28.1
- DOCX 导入/导出:全新
@platejs/docx-io包,支持 Word 文档处理import-toolbar-button:通过importDocx导入 DOCX 文件export-toolbar-button:通过exportToDocx导出为 DOCXdocx-export-kit:支持 DOCX 的组件,可使用DocxExportPlugin.configure({ override: { components } })覆盖
- DOCX 静态组件:在已有静态文件中增加
*Docx命名的静态组件:callout-node-static:CalloutElementDocxcode-block-node-static:CodeBlockElementDocx、CodeLineElementDocx、CodeSyntaxLeafDocxcolumn-node-static:ColumnElementDocx、ColumnGroupElementDocxequation-node-static:EquationElementDocx、InlineEquationElementDocxtoc-node-static:TocElementDocx
2025年12月 #27
12月23日 #27.2
- AI 提示系统重构:完全重构 AI 命令提示,提升可维护性
- 将单文件
prompts.ts拆分为多个独立模块:getEditPrompt、getGeneratePrompt、getCommentPrompt、getEditTablePrompt、getChooseToolPrompt - 增加新的
common.ts,提供共享提示工具函数 - 针对表格单元格编辑新增专用提示
- 将单文件
- AI 表格单元格处理:优化对单元格表格的编辑支持
use-chat:增强了解析器选项,提升 AI 内容处理能力cursor-overlay:修复覆盖层定位与行为- 针对复杂表格 markdown 生成增加测试
- API 路由:AI 命令和 copilot 路由更新,改进提示选择逻辑
12月16日 #27.1
table-node:修复表格行拖拽,之前行只能拖动不能放下,且未正确显示拖拽线。已补充元素引用的nodeRef。
11月30日 #26.10
inline-combobox:添加 Yjs 协作支持——组合框弹窗仅对当前操作用户可见,协作编辑时不会影响其他用户
10月21日 #26.9
suggestion-kit:移除BlockSuggestion,使用SuggestionLineBreak以修复样式use-chat:修复 AI 评论结束时隐藏的问题
10月17日 #26.8
- 静态组件:全部静态组件路径统一为新的
platejs/static*-node-static组件:导入路径由@platejs/core/react改为platejs/staticeditor-static:PlateStatic导入路径更新export-toolbar-button:静态工具路径调整import-toolbar-button:静态工具路径调整slate-to-html/page:静态渲染导入路径更新comment-kit、suggestion-kit:静态类型导入路径更新
10月6日 #26.7
api/ai/command/route.ts:修复 blockSelecting 时 AI 生成内容质量差问题
10月5日 #26.6
ai-kit:移除useHooks里未使用的api参数block-selection-kit:为已选中块时增加快捷键(mod+j)唤起 AI 菜单
10月4日 #26.5
api/ai/command/route.ts:修复 #4669
2025年9月 #26
9月28日 #26.5
transforms:修复斜杠命令重复插入块,避免在空块中选择同类型块造成重复
9月20日 #26.4
- AI 建议:AI 建议系统重大优化,内容处理与界面体验全面升级
ai-menu:- 新增动画进度条组件
AILoadingBar,含加载动画与停止功能 - 评论接收界面增加接收/拒绝按钮
- 依据选择和操作模式,菜单状态可自动适配
- 键盘操作优化,ESC 可停止运行
- 新增动画进度条组件
ai-toolbar-button:实现简化api/ai/command/route.ts:- 新增多工具(生成、编辑、评论)自动意图识别处理
- 默认使用 Google Gemini(
gemini-2.5-flash)模型 - 提示模板支持占位符
- 新增 MDX 标签保留
markdown-joiner-transform:新增智能缓存,支持流式 markdown 渲染更流畅use-chat:实现简化并增强错误处理ai-kit:增加 markdown 插件markdown-kit:增加 AI 插件集成link-node:支持 AI 专用点击事件block-context-menu:去除冗余的 AI 选项(现已由 ai-menu 统一处理)block-discussion:样式微调fixed-toolbar-buttons:AI 按钮实现简化
9月7日 #26.3
block-context-menu:修复多处触发时菜单位置会卡住的问题
9月5日 #26.2
block-draggable:修复右键事件下块选择功能
9月4日 #26.1
- AI 评论:新增 AI 智能评论功能,支持文档审阅与反馈
use-chat:增强支持 AI 评论及流式响应能力ai-menu:菜单增加评论生成与界面优化ai-toolbar-button:支持 AI 评论相关动作block-context-menu:集成 AI 评论至块右键菜单fixed-toolbar-buttons:工具栏添加 AI 评论按钮ai-kit:移除所有提示模板,直接在api/ai/command/route.ts使用api/ai/command/route.ts:新增评论支持
2025年8月 #25
8月17日 #25.2
block-discussion:移除用于弹出讨论弹窗的useFocusedLast检查
8月1日 #25.1
- 浮动工具栏优化:多个组件现使用新的
useFocusedLasthook,仅在当前编辑器聚焦时显示浮动工具栏,解决多编辑器场景下工具栏冲突ai-menublock-discussioncolumn-nodemedia-toolbartable-node
block-draggable:- 点击拖拽柄时可选择列表子项
- 点击拖拽柄时会聚焦到已选区块
2025年7月 #24
7月29日 #24.11
block-draggable:修复表格拖拽时拖拽预览部分错位,支持横向滚动情况下可正确展示内容block-draggable:新增isAboutToDrag状态,优化拖拽预览清理
7月27日 #24.10
ai-kit:支持自定义节点类型indent-kit:IndentPlugin支持KEYS.imglist-kit:ListPlugin支持KEYS.imgmarkdown-joiner-transform.ts:新增markdownJoinerTransform,自动将 [,bold,] 转化为 [bold],以便 markdown 反序列化api/ai/command/route.ts:采用markdownJoinerTransform
7月26日 #24.9
list-classic-kit:新增ListPlugin,恢复列表功能(支持 Tab/Shift+Tab 缩进,回车新建列表项等)
7月25日 #24.8
block-draggable:拖动列表项时自动选择所有缩进更深的子项
7月23日 #24.7
block-draggable:使用新的 BlockSelectionPlugin 的addOnContextMenuAPI 优化右键菜单代码
7月18日 #24.6
block-context-menu:修复右键点击块边距区域无法弹出菜单block-draggable:外部包裹 div 增加右键菜单处理,保证边距点击时可选中块
7月14日 #24.5
block-draggable:支持通过编辑器原生选择区拖动多个块(之前只能用块选择功能)
7月3日 #24.4
slate-to-html:新增EditorViewDemo组件,采用createStaticEditor支持静态编辑器渲染
7月4日 #24.3
list-classic-node:修复影响TaskListElement的样式,强制重置列表样式为 none
7月3日 #24.2
- 经典列表支持待办清单:为 list-classic 插件添加带复选框的待办任务列表功能
list-classic-kit:新增TaskListPlugin及TaskListElementlist-classic-node:新增TaskListElement与TaskListItemElement,包含复选框transforms-classic:新增经典列表转换逻辑insert-toolbar-classic-button:新增插入经典列表类型组件(无序、有序、待办)turn-into-toolbar-classic-button:新增转换为经典列表类型组件floating-toolbar-classic-buttons:新增经典列表浮动工具栏按钮组件floating-toolbar-classic-kit:新增包含上述按钮的插件集
7月2日 #24.1
editor:新增EditorView,基于@platejs/core/react的新PlateView,支持静态渲染及复制
2025年6月 #23
6月29日 #23.9
link-node:移除useLinklink-node-static:补充缺失的getLinkAttributesmedia-image-node:attributes.alt类型转换补充
6月26日 #23.7
inline-combobox:修复点击编辑器外无法关闭组合框弹窗
6月24日 #23.6
transform.ts:setBlockMap新增toggleCodeBlock,修复turn-into-toolbar-button.tsx创建 code_block 的结构错误
6月20日 #23.5
- 拖拽优化
block-draggable:修复多块拖动及边缘区域定位不准等问题block-selection-kit:现可选择整张表格(table);仅当选区框在表格内部时才选 tr 行table-node:表格增加块选择样式
6月18日 #23.4
table-node:修复与光标位置有关的 bug,提升性能
6月16日 #23.3
block-draggable:由getContainerTypes改为getPluginByType
6月13日 #23.2
editor:修复占位符定位问题**:data-slate-placeholder:!top-1/2 **:data-slate-placeholder:-translate-y-1/2block-placeholder-kit:占位符颜色调整为text-muted-foreground/80,保持与编辑器一致
6月9日 #23.1
Plate 49
合并文件、统一更规范的命名方式、移除不再使用的 export。
组件:
- 基础节点有默认的 HTML 元素后,插件组件可移除
withProps(..., { as: '...' }) - 为提升解耦,插件不再只为 key 导入,统一使用
@udecode/plate的KEYSParagraphPlugin.key->KEYS.pINDENT_LIST_KEYS.listStyleType->KEYS.listTypeListStyleType.Decimal->KEYS.olListStyleType.Disc->KEYS.ullist(classic) ->KEYS.listClassicol(classic) ->KEYS.olClassicul(classic) ->KEYS.ulClassicli(classic) ->KEYS.liClassicaction_item(classic) ->KEYS.listTodoClassic
- 所有
*-element、*-leaf文件重命名为*-node(及静态文件) - 移除
ai-anchor-element,合并到ai-node - 移除
ai-loading-bar,合并到ai-menu - 移除
ai-menu-items,合并到ai-menu align-dropdown-menu重命名为align-toolbar-button,AlignDropdownMenu重命名为AlignToolbarButtonapi-ai重命名为ai-apiapi-uploadthing重命名为media-uploadthing-apiBlockSelection:修复表格块选择- 移除
code-block-combobox,合并到code-block-node - 移除
code-line-element,合并到code-block-node(及静态) - 移除
code-syntax-leaf,合并到code-block-node(及静态) color-toolbar-button重命名为font-color-toolbar-button,ColorDropdownMenu重命名为FontColorToolbarButton- 移除所有
color-*文件,合并到font-color-toolbar-buttoncolor-dropdown-menu重命名为font-color-toolbar-button
- 移除
column-group-element,合并到column-node(及静态) - 移除
comment-create-form,合并到comment draggable重命名为block-draggable,DraggableAboveNodes重命名为BlockDraggableemoji-input-element重命名为emoji-node- 除
emoji-input-node外,移除所有emoji-*文件,合并到emoji-toolbar-buttonEmojiToolbarDropdown重命名为EmojiPopover,EmojiDropdownMenu重命名为EmojiToolbarButtonEmojiPickericons参数现在可选,默认使用emojiCategoryIcons与emojiSearchIcons
image-preview重命名为media-preview-dialog,ImagePreview重命名为MediaPreviewDialogimage-element重命名为media-image-nodeMediaFileElement重命名为FileElement(及静态)MediaAudioElement重命名为AudioElement(及静态)MediaVideoElement重命名为VideoElement(及静态)
indent-list-toolbar-button重命名为list-toolbar-buttonBulletedIndentListToolbarButton重命名为BulletedListToolbarButtonNumberedIndentListToolbarButton重命名为NumberedListToolbarButton
indent-todo-marker重命名为block-list- 移除
indent-fire-marker - 移除
indent-todo-toolbar-button,合并到list-toolbar-button IndentTodoToolbarButton重命名为TodoListToolbarButton- 移除
inline-equation-element与equation-popover,合并到equation-node(及静态) - 移除
inline-equation-toolbar-button,合并到equation-toolbar-button insert-dropdown-menu重命名为insert-toolbar-button,InsertDropdownMenu重命名为InsertToolbarButtonline-height-dropdown-menu重命名为line-height-toolbar-button,LineHeightDropdownMenu重命名为LineHeightToolbarButtonlink-floating-toolbar重命名为link-toolbar- 移除
list-indent-toolbar-button,合并到list-classic-toolbar-button ListIndentToolbarButton重命名为IndentToolbarButtonlist-node重命名为list-classic-nodemedia-popover重命名为media-toolbar,MediaPopover重命名为MediaToolbarmode-dropdown-menu重命名为mode-toolbar-button,ModeDropdownMenu重命名为ModeToolbarButtonmore-dropdown-menu重命名为more-toolbar-button,MoreDropdownMenu重命名为MoreToolbarButton- 移除
outdent-toolbar-button,合并到indent-toolbar-button table-icons:Border*重命名为Border*Iconslash-input-element重命名为slash-input-nodeSuggestionBelowNodes重命名为SuggestionLineBreak- 移除
table-cell-element,合并到table-node(及静态) - 移除
table-row-element,合并到table-node(及静态) table-dropdown-menu重命名为table-toolbar-button,TableDropdownMenu重命名为TableToolbarButton- 移除
todo-list-node,合并到list-classic-node turn-into-dropdown-menu重命名为turn-into-toolbar-button,TurnIntoDropdownMenu重命名为TurnIntoToolbarButtonexport-toolbar-button、indent-list-plugins:listStyleTypes移除 fireuseCommentEditor:改为用usePlateEditor取代useCreateEditor- 移除
placeholder、withPlaceholder,替换为block-placeholder-kit、BlockPlaceholderPlugin line-height-toolbar-button:移除useLineHeightDropdownMenuhookfont-color-toolbar-button:移除useColorInputhook
插件:
-
所有
*-plugin、*-plugins文件重命名为-kit,*Plugin、*Plugins重命名为*Kit,**插件集(plugin kit)**为一组已配置组件插件editor-plugins重命名为editor-kitequation-plugins重命名为math-kit,equationPlugins重命名为MathKitindent-list-plugins重命名为list-kit,indentListPlugins重命名为ListKitblock-list增加BlockList组件,用于list-kit- 移除
use-create-editor,全部迁移为usePlateEditor
-
ai-kit:添加show快捷键,移除ai-menu的useHotkeys('mod+j') -
comment-kit:添加setDraft转换与快捷键 -
basic-marks-kit、basic-blocks-kit:添加快捷键 -
transforms、block-draggable:移除STRUCTURE_TYPES,现以plugin.node.isContainer自动推断,使用editor.meta.containerTypes -
所有
useSelectionFragmentProp移除structuralTypes参数
2025年5月 #22
5月26日 #22.7
- 修复组合框关闭问题
inline-combobox:修复关闭弹窗时insertPoint未能及时更新的问题
5月15日 #22.6
- 修复内联数学键盘行为和样式
equation-popover:关闭弹窗后聚焦回编辑器inline-equation-element:选中时支持高亮显示
5月11-12日 #22.5
- 模板迁移至 Plate 48
- 迁移至 shadcn v4:
- Plate 之前 fork 了 shadcn/ui 原始库,有兼容问题。现在完全依赖官方 shadcn/ui,方便与现有组件集成
- 所有组件升至 Tailwind v4
- 详见更新的 安装指南
- 升级至 React 19。如果仍用 React 18,部分场景需手动用
React.forwardRef - 迁移到 shadcn CLI:
- 从
components.json移除registries - 使用
npx shadcn替代npx shadcx
- 从
- MCP 支持
- 移除所有组件的
withRef - 保持与 shadcn/ui 一致,
cn统一从@/lib/utils导入,而非@udecode/cn - 所有元素类和叶子组件移除未用到的
className、style属性 draggable:- 修复 Firefox 下拖拽兼容
media-placeholder-element:重构为使用use-upload-filehook,取代uploadthing- 迁移命令:
npx shadcn@latest add @plate/api-uploadthing
- 迁移命令:
5月6日 #22.3
ai-chat-editor:支持非标准 markdown 节点slash-input-element:新增 callout 支持block-selection-plugins.tsx:修复快选块失效问题
5月4日 #22.2
ai/command:fork 版 smoothStream 默认延迟 30ms(仅代码块和表格为 100ms)
v48 迁移:
PlateElement、PlateLeaf和PlateText属性由顶层 props 挪入attributes- 移除
nodeProps,统一用attributes - 迁移组件列表:
block-discussioncomment-leafdate-elementdraggableexcalidraw-elementhr-element+-staticimage-element+-staticlink-elementmedia-audio-elementmedia-file-elementmedia-placeholder-elementmedia-video-elementmention-elementplaceholdersuggestion-leaftable-cell-element+-statictable-elementtag-element
5月2日 #22.1
use-chat:添加_abortFakeStreamai-menu:修复菜单项显示错误ai-loading-bar:esc 快捷键处理逻辑移至ai-menuai/command:分块延迟 100ms(临时性能兼容)
2025年4月 #21
4月30日 #21.3
autoformat-plugin:支持从非1开头的数字新建缩进列表
4月29日 #21.2
ai-leaf:新增aiIndicatorVariants,显示加载状态cursor-overlay:AI 内容流式时隐藏光标覆盖层api/ai/command:修复分块问题
新增 discussion-plugin:
editor-plugins增加discussionPlugin,并移除suggestionPlugin的 configure- 重构
block-suggestion、comment使用discussionPlugin - 修复
comment-create-form自动创建讨论 suggestion-leaf样式调整link-floating-toolbar支持内部链接,建议/评论活跃时顶部定位
4月19日 #21.1
ai-anchor-element:新增组件,流式插入前插入节点,流式结束后移除,用于 ai-menu 定位ai-loading-bar:新增组件,显示插入模式流式加载进度条ai-menu:升级到最新版ai包ai-menu-items:新增generateMarkdownSampleai-plugins:移除 prompt 单段落限制editor:新增PlateContainer组件
4月2日 #21.1
export-toolbar-button:修复html2canvas-pro导出 PDF 问题import-toolbar-button:修复文件选择异常
2025年3月 #20
3月12日 #20.4
ai-toolbar-button:补全@udecode/plate-ai依赖comment-toolbar-button:补全comments-plugin依赖font-size-toolbar-button:补全popover依赖tooltip:补全button依赖
3月10日 #20.3
block-context-menu:只读模式下禁止弹出右键菜单
3月2日 #20.2
block-suggestion:修正样式suggestion-leaf-static:新增静态版本
3月1日 #20.1
Plate 46 - 新代码块
- 语法高亮从 Prism.js 迁移到 lowlight
code-block-element-static、code-block-element、code-block-combobox:改为使用 lowlight 的 class,默认 github 主题code-syntax-leaf-static、code-syntax-leaf:改为使用 lowlight 的 token class- 移除
prismjs依赖和相关样式 - 插件选项由
prism改为lowlight code-block-combobox:增加Auto语言选项,语言值与 lowlight 对齐
autoformat-plugin:禁止在代码块中自动格式化
import { all, createLowlight } from 'lowlight';
const lowlight = createLowlight(all);
CodeBlockPlugin.configure({
options: {
lowlight,
},
});import { all, createLowlight } from 'lowlight';
const lowlight = createLowlight(all);
CodeBlockPlugin.configure({
options: {
lowlight,
},
});2月21日 #19.3
image-preview:阻止 image preview 遮罩层弹出 block 菜单media-popover:image preview 打开时隐藏媒体弹窗
2月18日 #19.2
Plate 45 - 新评论和建议 UI
- 新增
block-discussion,作为主要容器,在plate-element使用 - 新增
comment,用于单条评论显示 - 新增
comment-create-form,内嵌精简版 Plate 编辑器方便输入 - 移除旧组件:
comments-popovercomment-avatarcomment-reply-itemscomment-valuecomment-resolve-button
- 新增
block-suggestion - 新增
suggestion-leaf - 新增
suggestion-line-break - 移除
plate-element,改为从@udecode/plate/react引入PlateElement。并在block-selection-plugins中增加如下:
render: {
belowRootNodes: (props) => {
if (!props.className?.includes('slate-selectable')) return null;
return <BlockSelection />;
},
},render: {
belowRootNodes: (props) => {
if (!props.className?.includes('slate-selectable')) return null;
return <BlockSelection />;
},
},2月3日 #19.1
- React 19
- TailwindCSS 4
- Plate 45
- Jotai 2
- Zustand 6
comment-more-dropdown:移除useCommentEditButtonState、useCommentDeleteButtonStateimage-element、media-embed-element、media-video-element、mode-dropdown-menu- 使用
const width = useResizableValue('width')
- 使用
image-preview:移除useScaleInputState、useImagePreviewStatefloating-toolbar:- 使用
useEventEditorValue替换useEventEditorSelectors
- 使用
media-popover:- 使用
FloatingMediaStore.set替换floatingMediaActions - 使用
useFloatingMediaValue替换useFloatingMediaSelectors
- 使用
2025年1月 #18
1月23日 #18.8
table-element:修复样式,折叠时显示表格边框控件table-row-element:重构table-cell-element:选中时使用品牌色背景
1月21日 #18.7
table-element、table-row-element:支持行拖拽和选择plate-element:增加blockSelectionClassName属性editor:选区区域 z-50draggable:- 替换
editor.api.blockSelection.replaceSelectedIds为editor.api.blockSelection.clear - 拖拽把手使用
TooltipButton - 拖拽把手点击时阻止块选择
- 表格单元格内隐藏拖拽把手
- 替换
column-element、table-cell-element:增加isSelectionAreaVisible检查block-selection:拖拽时隐藏- 替换
editor.api.blockSelection.addSelectedRow为editor.api.blockSelection.set,涉及:ai-menuequation-popover
align-dropdown-menu:弃用
1月18日 #18.6
inline-equation-element和equation-popover:修复选择行内公式时不应弹出浮窗,否则导致选区丢失
1月17日 #18.5
emoji-picker-search-bar:增加autoFocus
1月16日 #18.4
import-toolbar-button和export-toolbar-button:增加markdown支持
1月14日 #18.3
fixed-toolbar-buttons:增加import-toolbar-buttonindent-fire-marker.tsx:增加data-plate-prevent-deserialization防止火标反序列化,将标签由span改为liindent-todo-marker.tsx:将标签由span改为liimage-element-static.tsx和hr-element-static.tsx:修复nodeProps未传递给SlateElementai-chat-editor:
const aiEditor = usePlateEditor({ plugins });
useAIChatEditor(aiEditor, content);const aiEditor = usePlateEditor({ plugins });
useAIChatEditor(aiEditor, content);1月12日 #18.2
ai-plugins:移除createAIEditor,现在于ai-chat-editor创建ai-chat-editor:仅需使用useAIChatEditor(v42.1)ai-menu:避免冲突,移除aiEditorRefcommand:增加focus-visible:outline-noneeditor-static:调整aiChat内边距transforms:修复 slash 命令用到的insertBlock:插入的新块与当前类型一致时新建一块block-selection-plugins:升级BlockSelectionPlugin
BlockSelectionPlugin.configure(({ editor }) => ({
options: {
enableContextMenu: true,
isSelectable: (element, path) => {
return (
!['code_line', 'column', 'td'].includes(element.type) &&
!editor.api.block({ above: true, at: path, match: { type: 'tr' } })
);
},
},
}))BlockSelectionPlugin.configure(({ editor }) => ({
options: {
enableContextMenu: true,
isSelectable: (element, path) => {
return (
!['code_line', 'column', 'td'].includes(element.type) &&
!editor.api.block({ above: true, at: path, match: { type: 'tr' } })
);
},
},
}))1月8日 #18.1
- 升级至 v42
table-element、table-element-static- 图标移至
table-icons - 移除
colgroup,列宽现由table-cell-element控制
- 图标移至
table-row-element:移除hideBorder属性table-cell-element、table-cell-element-static:- 列悬停/调整宽度以 Tailwind 实现而非 JS
- 重大性能提升:单个单元格变化不再导致所有表格单元格重渲染
- 使用 React.memo
table-dropdown-menu:- 动态插入表格
- 合并/拆分单元格
- 在前插入行/列
tooltip:新增TooltipButtonindent-list-toolbar-button:移除IndentListToolbarButton,使用NumberedIndentListToolbarButton和BulletedIndentListToolbarButtontable-dropdown-menu:全新插入表格界面column-group-element:修复ColumnFloatingToolbar的 onColumnChange
2024年12月 #17
12月28日 #17.8
export-toolbar-button:新增katex支持plate-element:移除relativeclassName- 所有使用
PlateElement的组件均已移除冗余relativeclassName
12月27日 #17.7
fixed-toolbar-buttons:增加font-size-toolbar-buttonfloating-toolbar:增加inline-equation-toolbar-buttonturn-into-dropdown-menu:修复转换后应自动聚焦到编辑器insert-dropdown-menu:新增inline equation和equation,修复聚焦问题slash-input-element:新增equation和inline equation
12月23日 #17.5
table-element:修复选区- before:
isSelectingCell && '[&_*::selection]:bg-none' - after:
isSelectingCell && '[&_*::selection]:!bg-transparent'
12月21日 #17.4
升级 tailwind.config.cjs,优化 HTML 导出字体配置:
fontFamily: {
heading: [
'var(--font-heading)',
'ui-sans-serif',
'-apple-system',
'BlinkMacSystemFont',
'Segoe UI Variable Display',
'Segoe UI',
'Helvetica',
'Apple Color Emoji',
'Arial',
'sans-serif',
'Segoe UI Emoji',
'Segoe UI Symbol',
'Noto Color Emoji',
],
mono: ['var(--font-mono)', ...fontFamily.mono],
sans: [
'var(--font-sans)',
'ui-sans-serif',
'-apple-system',
'BlinkMacSystemFont',
'Segoe UI Variable Display',
'Segoe UI',
'Helvetica',
'Apple Color Emoji',
'Arial',
'sans-serif',
'Segoe UI Emoji',
'Segoe UI Symbol',
'Noto Color Emoji',
],fontFamily: {
heading: [
'var(--font-heading)',
'ui-sans-serif',
'-apple-system',
'BlinkMacSystemFont',
'Segoe UI Variable Display',
'Segoe UI',
'Helvetica',
'Apple Color Emoji',
'Arial',
'sans-serif',
'Segoe UI Emoji',
'Segoe UI Symbol',
'Noto Color Emoji',
],
mono: ['var(--font-mono)', ...fontFamily.mono],
sans: [
'var(--font-sans)',
'ui-sans-serif',
'-apple-system',
'BlinkMacSystemFont',
'Segoe UI Variable Display',
'Segoe UI',
'Helvetica',
'Apple Color Emoji',
'Arial',
'sans-serif',
'Segoe UI Emoji',
'Segoe UI Symbol',
'Noto Color Emoji',
],12月20日 #17.3
insertColumnGroup、toggleColumnGroup:使用columns选项代替layout。- 移除
with-draggables。将DraggableAboveNodes添加到draggable。在DndPlugin配置中加入:
DndPlugin.configure({ render: { aboveNodes: DraggableAboveNodes } }),DndPlugin.configure({ render: { aboveNodes: DraggableAboveNodes } }),column-element、image-element、media-video-element:移除useDraggableState,改用const { isDragging, previewRef, handleRef } = useDraggablecolumn-group-element:移除useColumnState,改用如下方式:
const columnGroupElement = useElement<TColumnGroupElement>(ColumnPlugin.key);
const onColumnChange = (widths: string[]) => {
setColumns(editor, {
at: findNodePath(editor, columnGroupElement),
widths,
});
};const columnGroupElement = useElement<TColumnGroupElement>(ColumnPlugin.key);
const onColumnChange = (widths: string[]) => {
setColumns(editor, {
at: findNodePath(editor, columnGroupElement),
widths,
});
};export-toolbar-button:新增exportToHtml
12月19日 #17.2
Plate 41
- 新增 RSC 组件,适用于元素与叶子组件,文件名以
-static.tsx结尾。现在这些组件会与默认客户端组件一起添加。 editor:在editorVariants中新增select-textdate-element:只读时移除弹窗indent-todo-marker:使用SlateRenderElementProps类型代替PlateRenderElementPropshr-element、media-audio-element、media-embed-element、mention-element:优化光标样式media-file-element:使用<a>替换原有的div+onClick- 所有元素和叶子组件:
classNameprop 目前均放在 inline prop 之前
12月16日 #17.1
-
column-element:- 增加对列的拖拽支持
- 新增拖拽把手与提示
- 修复列间距与内边距
-
column-group-element:- 移除列间隙
- 移除上边距
-
draggable:- 移除
DraggableProviderHOC - 移除
DropLine的 children 属性
- 移除
2024年11月 #16
11月26日 #16.9
https://github.com/udecode/plate/pull/3809/files
- 新增
select-editor、tag-element、label、form - 将
cmdk依赖替换为@udecode/cmdk。该版本可控。 command:新增 variantseditor:新增selectvariantpopover:新增animatevariant
https://github.com/udecode/plate/pull/3807/files
toc-element:为修复 html2canvas 问题,移除<nav>标签,改用<div>editor:移除role="button",以修正 html2canvas 问题
11月21日 #16.8
Shadcn 同步:
input:新增text-base md:text-smtextarea:新增text-base md:text-smeditor(ai、aiChatvariants):新增text-base md:text-sm
11月14日 #16.7
toolbar:新增ToolbarSplitButton、ToolbarSplitButtonPrimary、ToolbarSplitButtonSecondarymedia-toolbar-button:采用ToolbarSplitButton
11月13日 #16.6
resizable:只读状态下隐藏ResizeHandle
11月8日 #16.5
- 请在您的 tailwind 配置中添加以下内容:
// plugins
require("tailwind-scrollbar-hide")
// theme.extend.screens
screens: {
/**
* 匹配主指针设备可方便悬浮的设备。用法:main-hover:group-hover:bg-red-500
* 参考:https://developer.mozilla.org/en-US/docs/Web/CSS/@media/hover
*
* 在 iOS 设备中,包含 `group-hover:` CSS 规则的 .group 内按钮需点击两次。为规避此问题,无法方便悬浮的设备使用 `main-hover:` 禁用这些规则。
*/
'main-hover': {
raw: '(hover: hover)',
},
},// plugins
require("tailwind-scrollbar-hide")
// theme.extend.screens
screens: {
/**
* 匹配主指针设备可方便悬浮的设备。用法:main-hover:group-hover:bg-red-500
* 参考:https://developer.mozilla.org/en-US/docs/Web/CSS/@media/hover
*
* 在 iOS 设备中,包含 `group-hover:` CSS 规则的 .group 内按钮需点击两次。为规避此问题,无法方便悬浮的设备使用 `main-hover:` 禁用这些规则。
*/
'main-hover': {
raw: '(hover: hover)',
},
},editor:EditorContainer:移除ref,改用useEditorContainerRef- 增加
caret-primary selection:bg-brand/25 - 为
EditorContainer增加id={editor.uid},以便移除scroll_container或你自定义的 id
draggable:- 修复了一个严重的移动端体验问题:因 group hover 样式,编辑器需点击两次才能聚焦。已用
main-hover:group-hover:opacity-100解决。 - 在超小屏(xs)下,仅选中时才显示
- 修复了一个严重的移动端体验问题:因 group hover 样式,编辑器需点击两次才能聚焦。已用
table-element:修复宽度问题table-row-element、table-cell-element:支持行选择date-element、mention-element:新增draggableproplink-toolbar-button、link-floating-toolbar、ai-menu输入框:新增data-plate-focus属性cursor-overlay:- 支持折叠选区
- 移除
DragOverCursorPlugin、SelectionOverlayPlugin,请使用@udecode/plate-selection
ghost-text:超小屏下隐藏,新增pointer-events-nonefloating-toolbar:新增overflow-x-auto scrollbar-hide,支持移动端横向滚动fixed-toolbar:新增scrollbar-hideemoji-picker-content:新增 emoji 字体column-element:默认添加w-full- 新增钩子:
use-is-touch-device block-context-menu:触屏设备上禁用ai-toolbar-button:新增onMouseDownai-menu-items:增加未定义检查block-selection-plugins:添加
inject: {
excludeBelowPlugins: ['tr'],
excludePlugins: ['table', 'code_line', 'column_group', 'column'],
},inject: {
excludeBelowPlugins: ['tr'],
excludePlugins: ['table', 'code_line', 'column_group', 'column'],
},- 新增
floating-toolbar-plugin、fixed-toolbar-plugin - 其它:
hr-element、plate-element、transforms
11月7日 #16.4
block-context-menu:点击菜单时阻止失焦block-selection:在 onCloseAutoFocus 中添加editor.getApi(BlockSelectionPlugin).blockSelection.focus()
11月6日 #16.3
editor:新增overflow-x-hidden样式,防止横向滚动table-element:新增overflow-x-auto,支持横向滚动
11月5日 #16.2
- 修复 color-picker 清除按钮的样式
- 切换 toggle-element 按钮为 CSS 动画效果
11月1日 #16.1
editor:样式和新增<EditorContainer />
2024年10月 #15
10月31日 #15.6
- 新增
lib/transforms.ts,包含常用操作的实用转换函数。 - 移除对
Icons文件的依赖,所有图标现均从lucide-react导入。 - 修复并调整了 emoji 与颜色选择器的一些样式。
- 分组样式调整:
dropdown-menucontext-menuinline-combobox
slash-input-element支持分组与分项目展示- 间距和尺寸更新:
ai-menu-itemsalign-dropdown-menublock-context-menubuttoncode-block-comboboxcolor-dropdown-menu-itemscolor-pickercolumn-group-elementcommandcomment-more-dropdowncontext-menudropdown-menuemoji-dropdown-menuemoji-input-elementimage-previewinline-comboboxinputinsert-dropdown-menuline-height-dropdown-menulink-floating-toolbarmedia-popovermention-input-elementmode-dropdown-menumore-dropdown-menupopoverslash-input-elementtable-dropdown-menutable-elementtoggle-elementtoggle-toolbar-button
10月26日 #15.5
- 将
indent-todo-marker-component重命名为indent-todo-marker。
10月25日 #15.4
slash-input-element:增加 AI 命令并新增focusEditor选项
10月24日 #15.3
- 新增
ai-menu、ai-menu-items、ai-toolbar-button、ai-chat-editor、block-context-menu、context-menu、ghost-text、toc-element command:增加InputCommandtoolbar新样式editor演示版本heading-element:移除isFirstBlock属性- 其他:
fixed-toolbar、fixed-toolbar-buttons、floating-toolbar、floating-toolbar-buttons、mode-dropdown-menu、turn-into-dropdown-menu、button、cursor-overlay、excalidraw-element、inline-combobox、slash-input-element
10月14日 #15.3
- 新增 cli 工具:
shadcx。参见 CLI 和 components.json。
10月10日 #15.3
dropdown-menu(DropdownMenuContent):阻止onCloseAutoFocus的默认行为floating-toolbar(FloatingToolbar):移除 portal,点击外部或浮动链接打开时自动隐藏turn-into-dropdown-menu(TurnIntoDropdownMenu):新增缩进列表项table-dropdown-menu(TableDropdownMenu):在insertTable时支持选择
10月4日 #15.2
- 新增
emoji-picker:调整 ui,优化表情选择器外观
10月1日 #15.1
- 新增
block-selection组件,用于可视化块选反馈 - 新增
plate-element组件,可配合BlockSelection渲染 plate 元素 - 更新
paragraph-element及所有块级组件以统一使用plate-element draggable:- 重构为使用新 hooks:
useDraggableGutter与useDropLine - 移除
classNames属性,统一改为className - 新增
DraggableProvider容器 - 拆分出单独的
Gutter和DropLine组件
- 重构为使用新 hooks:
with-draggables:- 更新为新的
className格式
- 更新为新的
- 修复
mention-element:解决 MacOS 下输入法输入过程被中断的问题
以下组件使用 --highlight 颜色:
comment-leafhighlight-leaf
以下组件使用 --highlight 颜色:
comment-leafhighlight-leaf
以下组件使用 --brand 颜色:
block-selectiondraggable
2024年9月 #14
9月29日 #14.3
- 修复
heading-element:如果标题是首个区块,则不应有顶部间距
9月13日 #14.2
- 修复
code-block-combobox:支持按 label 或 value 过滤
9月10日 #14.1
- 修复
floating-toolbar:当只读时也显示工具栏
2024年8月 #13
8月27日 #13.3
- 迁移到 Plate 37
8月26日 #13.2
- 新增
emoji-picker:适配 shadcn 主题与样式
8月12日 #13.1
- 为 Excalidraw 改进提前支持 mermaid 语言
2024年7月 #12
7月14日 #12.2
- 修复
cursor:当光标数据未定义时也显示选区矩形/光标
7月12日 #12.1
fixed-toolbar:top-0
2024年6月 #11
6月23日 #11.3
- 重大变更:将 prismjs 支持的语言列表移动到
code-block-combobox
6月13日 #11.2
- 修复
caption:当元素caption属性变化时自动更新 UI
6月6日 #11.1
- 用
inline-combobox替换原有combobox - 移除
mention-combobox、emoji-combobox和slash-combobox - 新增
emoji-input-element - 更新
mention-input-element和slash-input-element,使用新 combobox - 新特性
draggable:增加 data-key 属性,便于拖拽操作完成后添加选区 - 重大变更:通过
CaptionButton或将媒体元素 ID 传递给captionActions.showCaptionId打开标题 floating-toolbar增加portalElement属性
2024年5月 #10
5月30日 #10.2
- 修复
draggable:加入 portal 以解决裁剪问题,按钮阻止表单提交 - 修复
editor:增加 x 轴内边距,提高拖拽把手可见性
5月24日 #10.1
- 修复
site-header:zIndex 调整为 60 - 修复
fixed-toolbar:zIndex 调整为 60
2024年4月 #9
4月30日 #9.3
- 修复
indent-todo-marker-component:点击勾选框会丢失焦点
4月17日 #9.2
- 新增
column-element、column-group-element
4月6日 #9.1
- 修复
combobox:撤销操作导致编辑器崩溃
2024年2月 #8
2月6日 #8.2
- 修复
list-element:variant 样式缺失
2月5日 #8.1
- 修复
mention-element:点击 mention 下拉菜单的滚动条后,Mention 输入会被移除 (#2919)
2024年1月 #7
1月31日 #7.5
- 新增
toggle-element - 新增
toggle-toolbar-button
1月11日 #7.4
components.json支持自定义 ui 目录- 新增
plate-components.json,避免与 shadcn 的components.json冲突
1月9日 #7.3
toolbarToolbar:将items-stretch替换为items-center- 使用
toolbarButtonVariants代替toggleVariants - 修复
valueprop 类型错误 - 新增
withTooltip,需将[data-state=on]替换为aria-checked以避免冲突
toggle:作为未使用内容已移除tooltip:新增withTooltip,ToolbarButton已在使用
1月8日 #7.2
table-element:需在 TableElement 上层渲染 TableProvider
// 变更前
export const TableElement = withRef<typeof PlateElement>(
({ className, children, ...props }, ref) => {
// ...
}
);
// 变更后
export const TableElement = withHOC(
TableProvider,
withRef<typeof PlateElement>(({ className, children, ...props }, ref) => {
// ...
})
);// 变更前
export const TableElement = withRef<typeof PlateElement>(
({ className, children, ...props }, ref) => {
// ...
}
);
// 变更后
export const TableElement = withHOC(
TableProvider,
withRef<typeof PlateElement>(({ className, children, ...props }, ref) => {
// ...
})
);1月2日 #7.1
dropdown-menu:修复DropdownMenuContent不应排除className
2023年12月 #6
12月27日 #6.3
-
移除
clsx依赖,class-variance-utility已经导出cx -
新增依赖:
@udecode/cn -
用
@udecode/cn替换@/lib/utils.ts,所有从@/lib/utils的导入需替换为@udecode/cn -
withProps现从@udecode/cn导入,不再从@udecode/plate导入 -
所有使用
forwardRef的组件现在使用withRef。同时引入withProps、withCn、withVariants以减少样板代码 -
在 ESLint
settings.tailwindcss.callees和 IDEclassAttributes配置中添加withCn
// 变更前
const Avatar = React.forwardRef<
React.ElementRef<typeof AvatarPrimitive.Root>,
React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>
>(({ className, ...props }, ref) => (
<AvatarPrimitive.Root
ref={ref}
className={cn(
'relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full',
className
)}
{...props}
/>
));
Avatar.displayName = AvatarPrimitive.Root.displayName;
export { Avatar };
// 变更后
export const Avatar = withCn(
AvatarPrimitive.Root,
'relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full'
);// 变更前
const Avatar = React.forwardRef<
React.ElementRef<typeof AvatarPrimitive.Root>,
React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root>
>(({ className, ...props }, ref) => (
<AvatarPrimitive.Root
ref={ref}
className={cn(
'relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full',
className
)}
{...props}
/>
));
Avatar.displayName = AvatarPrimitive.Root.displayName;
export { Avatar };
// 变更后
export const Avatar = withCn(
AvatarPrimitive.Root,
'relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full'
);12月25日 #6.2
- dialog
- Plate 28,包含部分优化:详细更改
comboboxinsert-dropdown-menumedia-popovermode-dropdown-menumore-dropdown-menutable-dropdown-menutable-elementturn-into-dropdown-menu
12月10日 #6.1
image-element:用withHOC(ResizableProvide, ...)包裹组件media-embed-element:同样用withHOC(ResizableProvide, ...)包裹组件
2023年11月 #5
11月28日 #5.1
table-element- 新特性:支持单元格合并(plate 26)
table-cell-element- 新特性:支持单元格合并(plate 26)
comments-popovertoolbar- 修复:按下状态支持
2023年9月 #4
9月18日 #4.4
editor:新组件 🎉 详见 Editorfixed-toolbar-buttons、floating-toolbar-buttons、mode-dropdown-menu:- plate 24:
usePlateReadOnly重命名为useEditorReadOnly
- plate 24:
code-block-element:code-block-element.css有调整
9月15日 #4.3
table-element- 修复:表格内输入时浮动工具栏应保持显示
floating-toolbar:- 修复:import 问题
comment-leaf、link-element- 新特性:使用主色
- 区块选中:
- 为
body添加如下类:'[&_.slate-selected]:!bg-primary/20 [&_.slate-selection-area]:border [&_.slate-selection-area]:border-primary [&_.slate-selection-area]:bg-primary/10'
- 为
9月12日 #4.2
button:增加whitespace-nowrappopover:打印时隐藏caption:打印时隐藏占位内容highlight-leaf:高亮颜色现在基于主色
9月2日 #4.1
2023年8月 #3
8月19日 #3.4
floating-toolbar- 详细更改:- 新特性:支持
ref - 重构:使用
useFloatingToolbarState,控制floatingOptions默认值 - 修复:加入
fallbackPlacements避免浮动溢出视口 - 破坏性变更:移除以下 props:
portalElement、floatingOptions、ignoreReadOnly、hideToolbar - 新特性:新增
state属性
- 新特性:支持
link-floating-toolbar- 详细更改:- 重构:控制
floatingOptions默认值 - 修复:新加
fallbackPlacements,防止浮动溢出
- 重构:控制
8月9日 #3.3
mention-element- 新特性:支持加粗、斜体、下划线
8月3日 #3.2
table-cell-element- 新特性:支持表格单元格背景样式
8月2日 #3.1
image-element:重构:使用mediaResizeHandleVariantsmedia-embed-element:重构:使用mediaResizeHandleVariantsresizable- 详细更改:- 重构
- 新特性:
mediaResizeHandleVariants
table-cell-element:
2023年7月 #2
7月27日 #2.2
caption— 新组件image-element:- 重构:状态
- 新增依赖:
caption、resizable
media-embed-element现在是完全 headless:- 新增依赖:
react-lite-youtube-embed、react-tweet,减小包体积 - 新增依赖:
caption、resizable
- 新增依赖:
media-popover— 修复:弹窗关闭异常resizable— 新组件table-element— 修复:弹窗关闭异常
7月17日 #2.1
comments-popover— 修复:新评论时弹窗无法打开comment-toolbar-button— 新特性:myUserId为空时不显示excalidraw-element— 修复:拼写错误
发布 #1
Plate headless 组件现已发布:
On This Page
2026年4月 #304月15日 #30.42026年1月 #281月17日 #28.12025年12月 #2712月23日 #27.212月16日 #27.111月30日 #26.1010月21日 #26.910月17日 #26.810月6日 #26.710月5日 #26.610月4日 #26.52025年9月 #269月28日 #26.59月20日 #26.49月7日 #26.39月5日 #26.29月4日 #26.12025年8月 #258月17日 #25.28月1日 #25.12025年7月 #247月29日 #24.117月27日 #24.107月26日 #24.97月25日 #24.87月23日 #24.77月18日 #24.67月14日 #24.57月3日 #24.47月4日 #24.37月3日 #24.27月2日 #24.12025年6月 #236月29日 #23.96月26日 #23.76月24日 #23.66月20日 #23.56月18日 #23.46月16日 #23.36月13日 #23.26月9日 #23.12025年5月 #225月26日 #22.75月15日 #22.65月11-12日 #22.55月6日 #22.35月4日 #22.25月2日 #22.12025年4月 #214月30日 #21.34月29日 #21.24月19日 #21.14月2日 #21.12025年3月 #203月12日 #20.43月10日 #20.33月2日 #20.23月1日 #20.12月21日 #19.32月18日 #19.22月3日 #19.12025年1月 #181月23日 #18.81月21日 #18.71月18日 #18.61月17日 #18.51月16日 #18.41月14日 #18.31月12日 #18.21月8日 #18.12024年12月 #1712月28日 #17.812月27日 #17.712月23日 #17.512月21日 #17.412月20日 #17.312月19日 #17.212月16日 #17.12024年11月 #1611月26日 #16.911月21日 #16.811月14日 #16.711月13日 #16.611月8日 #16.511月7日 #16.411月6日 #16.311月5日 #16.211月1日 #16.12024年10月 #1510月31日 #15.610月26日 #15.510月25日 #15.410月24日 #15.310月14日 #15.310月10日 #15.310月4日 #15.210月1日 #15.12024年9月 #149月29日 #14.39月13日 #14.29月10日 #14.12024年8月 #138月27日 #13.38月26日 #13.28月12日 #13.12024年7月 #127月14日 #12.27月12日 #12.12024年6月 #116月23日 #11.36月13日 #11.26月6日 #11.12024年5月 #105月30日 #10.25月24日 #10.12024年4月 #94月30日 #9.34月17日 #9.24月6日 #9.12024年2月 #82月6日 #8.22月5日 #8.12024年1月 #71月31日 #7.51月11日 #7.41月9日 #7.31月8日 #7.21月2日 #7.12023年12月 #612月27日 #6.312月25日 #6.212月10日 #6.12023年11月 #511月28日 #5.12023年9月 #49月18日 #4.49月15日 #4.39月12日 #4.29月2日 #4.12023年8月 #38月19日 #3.48月9日 #3.38月3日 #3.28月2日 #3.12023年7月 #27月27日 #2.27月17日 #2.1发布 #1