Repository navigation
v54.0.0-beta.4 (2026-11-24)
Pre-release@platejs/cli
Published @platejs/cli@54.0.0-beta.4.
@platejs/test
Published @platejs/test@54.0.0-beta.4.
platejs
Patch Changes
-
- Fix
BlockPlaceholderPlugindrawing its placeholder on top of the editorplaceholderwhen the editor holds only an empty list item. Only the editor placeholder shows there now, and an editor without aplaceholderstill shows the block placeholder on that item.
- Fix
-
- Add
exportPicture({ format, kit })touseBoardActions()inplatejs/board/react. It draws the board, or the selected shapes and frames, as a PNG or an SVG with the static plugins inkit, which may be a promise such as a dynamic import. It resolvesnullwhen there is nothing to draw, and rejects when the board is not on the page. - Add the
BoardPicture,BoardPictureOptionsandBoardPictureWarningtypes. A picture's warnings name each image it could not read and each shape it could not draw, and say when a font could not be embedded or a large PNG was scaled down.
- Add
-
- Fix a comment thread whose text was deleted still reading as attached over nothing. Its range now reads
status: 'unavailable'until its text comes back, such as through undo, andidsAtno longer answers it at the spot where its text was. - Refuse to create, send or publish a thread over a range that covers no letter and no embedded item, as for a draft whose selected text was deleted before it was sent. Starting a draft over such a range between two blocks takes the first block.
- Load a saved thread whose range covers nothing as unavailable.
- Notify attachment listeners when a thread's text is deleted or comes back, even when its range keeps the same points, and answer
pendingRange()withnullonce the pending draft's text is deleted.
- Fix a comment thread whose text was deleted still reading as attached over nothing. Its range now reads
-
a752fdaby @zbeyens – Report alossy-contentdiagnostic with the table's path when a review DOCX export includes a table that holds a pending row, column or table format change, also when the export returns the retained source file unchanged. Word's revisions cannot carry that change, so the defaultlossPolicy: 'reject'refuses the export. PasslossPolicy: 'allow'to export the file with the warning. -
7428002by @zbeyens – FixEditorRoot'sreadOnlyletting a write through anEditorContentin the render that sets it. A write from a removed control's cleanup in that render now throws, also when the render removes, hides or suspends theEditorContent. AnEditorContentwithreadOnly={false}stays writable. -
- Accept
at: { id }in node reads and transforms, including those that select by plugin, such aseditor.read.nodes.block({ at: { id }, type: BaseParagraphPlugin }), and in theinsertof date, mention, inline equation, field and footnote. - Remove
ElementIdPlugin'sread.entry(id)and theElementIdEntrytype.
Migration: Use
editor.read.nodes.byId(id). It returns{ key, node, path, root? }, ornullinstead ofundefinedwhen no element holds the id. - Accept
-
- Add
read.submission(role)to the field plugin. It returns aFieldSubmission,{ role, values }, with thevalueof each of that role's fields keyed byfieldId. A field with novalueis left out. - Add
applyFieldValues(template, submissions, options?)toplatejs/field. It checks each role's submission against an empty template, in the order the roles submitted, and returns aFieldApplyResult: the filled document, the roles that still have to submit aspending, or the refusals asFieldRefusalobjects. A required checkbox counts as answered only when it is ticked. Pass a renamed field type asoptions.type.
- Add
-
- Fix Markdown export writing document text that a CommonMark or GFM reader runs as HTML or reads as a script link, such as a tag in a details summary, in an equation's TeX or at the start of a footnote. Plate reads the exported file back as the same document.
- Fix copying part of a code block writing its raw text into
text/markdown. The copied code is now escaped Markdown text.
-
- Add
RawHtmlPlugintoplatejs/markdown. Installed besideMarkdownPlugin, it keeps a Markdown file's raw HTML, such as a README's centered header, and HTML comments on lines of their own. Export writes that HTML back when it passes a check of tags, attributes and URLs, and otherwise writes it escaped with amarkdown-unsafe-contentwarning. - Keep raw HTML as plain text when
MarkdownPlugin'splainMarks, or aserializecall's, namesrawHtml. - Drop a 53.x document's saved
rawHtmlinmigrateV54where no plugin declares it, asmigrateV54dropsai. - Refuse a 53.x document in
migrateV54when a pending suggestion changesaiand no plugin declaresai, instead of opening a suggestion that loses the mark when accepted.
- Add
-
- Add follow-up paste rules. A
defineInputRulerule withtarget: 'insertData',resolveandfollowUprunsfollowUpafter a local paste that history saved, as its own undo step on the view that pasted. - Add
keyto an input rule'seditor, which returns a node's stable key, aseditor.keydoes. - Add
MediaEmbedRules.autoEmbed({ variant: 'paste' })toplatejs/media. A YouTube, Vimeo, Dailymotion, Youku, Coub or X link pasted alone on an empty paragraph becomes a media embed above that paragraph, and one undo gives the link back.
- Add follow-up paste rules. A
-
- Run a
useEditorSelectorselector again when its editor shows a different review preview, so hooks built on it, such asuseFieldRead, show what the preview shows. - Fix
renderStaticHtmlwith adocumentoption throwing while the editor shows a review preview.
- Run a
-
efacbf4by @zbeyens – Give each column its own width while a suggested column insertion or deletion waits.api.table.columnWidthsandread.table.cellshow a struck column at its old width and an inserted one at its new width. Column edges do not resize until the suggestion is decided, andapi.table.createResizethrows aRangeErrorfor one; row edges still resize.
plitejs
Patch Changes
-
c5f9275by @felixfeng33 – Fix accepting a line typed right after another author's pending join, which returnedblockeduntil that join was decided. The accept now applies. The line stays where it is stored, and accepting the join later still places it after the joined line, as deciding both at once does. -
7428002by @zbeyens – FixEditorRoot'sreadOnlyletting a write through in the render that sets it, such as from a removed control's cleanup or a custom element'sconnectedCallback. That write now throws through anEditable,PagedEditableorVirtualizedEditable, also when the render mounts, removes, hides or suspends it. AnEditorReadOnlyProviderthat sets noreadOnlyno longer makes those editables writable. -
708a247by @felixfeng33 – Fix accepting a join, or rejecting a split, that merges a line another author inserted or struck, which returnedblockeduntil that author's change was decided. The merge now applies, and the other author's change stays pending on its text. Accepting the deletion of a line while another author's join onto it is pending keeps the line empty until the join is decided, as Google Docs does. Decisions of different authors can still give different results in different orders. -
a8d490eby @zbeyens – Addnodes.byId(id)to reads and transactions, and accept{ id }as a node targeteditor.read.nodes.byId(id), ortx.nodes.byId(id)inside an update, returns the element that holds the storedidas{ key, node, path, root? }, ornullwhen no element holds it.- Node reads and node transforms accept
at: { id }, such aseditor.update.nodes.move({ at: { id }, to }), and a write reaches the element in its own root. An id that no element holds changes nothing. - Add
WithNodeTarget<Options>andPlacedTarget<T>to type a plugin method whoseattakes every node target. - Both need a schema that declares
idas a generated, unique string on every element type, as Plate'sElementIdPlugindoes. With any other schema they throw.
Migration: In an editor whose elements store ids,
unique.holder('id', value)throws. Usenodes.byId(value). -
- Fix pasting a copy that ends in a quote, such as text copied from a paragraph into the quote after it or across two quotes, into the middle of a paragraph, which changed nothing. The first copied line now joins the text before the caret, and the last lands in a quote with the text after the caret.
- Fix pasting two titles into the middle of a block, which changed nothing. Each pasted block now takes the type its place allows. In a title, the second title becomes a paragraph, as it does when you press Return in a title.
-
- Fix the text after the caret taking the last pasted block's properties, such as
checked, and losing the destination block's, such asalign, when you paste a copy of quoted paragraphs into the middle of a quoted paragraph. It now keeps the destination block's properties, as Return splits them. - Fix pasting blocks that equal the destination block into its middle keeping a
split: 'drop'property and the destination's unique value on the text after the caret. That text now gets the properties Return gives it.
- Fix the text after the caret taking the last pasted block's properties, such as
-
- Add
editor.read.ranges.isEmpty(range), which answers whether a range covers no letter and no whole void element, such as a mention. - Add the
hideEmptyoption tocreateAnnotationStore. An annotation whose range covers nothing then resolves withrange: null, leavesgetAnnotationsAt, and its listeners hear when its text is deleted or comes back, or when a plugin reconfigure changes what counts as content. - Fix a view without a preview reading the preview its editor shows. It now reads the stored document.
- Add
-
- Keep a view that sets its own authored mode showing that mode while the editor it comes from shows a review preview. The view
EditorRootmounts copies the editor's mode when it mounts, so callsetViewon that mounted view to change what it shows. - Fix a document view read throwing while the editor it comes from shows a review preview.
- Keep a view that sets its own authored mode showing that mode while the editor it comes from shows a review preview. The view
-
- Fix
nodes.byId,unique.holderandat: { id }targets in a transaction over a view of another document. They find the element that held the value in the view's document, where a copy the transaction inserted before that element used to take the value. This holds in the main root and in named roots, and inside acollaboration-tagged update of the source editor. - Refuse a spec that a transaction over a view of another document built when the source editor applies it, with
Cannot apply a transaction spec outside its base state.
- Fix
Full changelog: v54.0.0-beta.3...v54.0.0-beta.4