@platejs/cli
Minor Changes
4bf170bby @zbeyens – Updateplate codemod plite-to-platefor unified Plite and Plate naming: remove obsoleteEditorStateSelectorOptionsanduseEditorEditableElementrules, diagnose removeduseOptionalEditorReadOnlyand multi-rootuseEditorContextdifferences, support legacyPagedEditablePage*type renames, and resolve aliased*EditorContent*bindings forrootlifting, render props, spread props,<EditorRoot readOnly>override conflicts, and 3-arguseEditorSelector/useStateFieldValuedeferredchecks.
Patch Changes
d5f3a59by @zbeyens – Allow--from 0inplate migrate runto matchmigrateDocumentsource version0.
@platejs/test
Published @platejs/test@54.0.0-beta.8.
platejs
Minor Changes
a82b280by @zbeyens – RenamePagedEditablePageAttributes,PagedEditablePageView, andPagedEditableRenderPagePropsre-exports inplatejs/pagination/reacttoPagedEditorContentPageAttributes,PagedEditorContentPageView, andPagedEditorContentRenderPagePropsto matchPagedEditorContent.
Patch Changes
-
513f13dby @zbeyens – Measure the board container before revealing a shape so switching to Viewing keeps the active note in view -
- Allow
defineFormats({ html, plainText })without requiringmarkdown, and tightenDocxNodeMapping,MarkdownNodeMapping, andPlainTextNodeMappingtypes and runtime guards to match schema roles - Report
property-droppeddiagnostics on DOCX export only for rendered roots and anchored comment bodies, and admit multi-property element-property plugins - Preserve
data-lockedand emptycodeBlock.metain HTML round trips, report unclaimeddata-locked,data-meta, and board arrow/frame/stroke attributes, and remove no-opplainTextencoders on callout, code block, and column plugins so foreign overrides and contributed content roots apply - Skip absent foreign
markdown,plainText, anddocxtargets and reject mismatched schema-family targets at runtime
- Allow
-
- Open Markdown links containing images, such as linked badges, by lifting images out of links and headings with a warning instead of failing the parse.
- Preserve saved carets, comment ranges, and node selections across
migrateV54profile and AST restructures including legacy media captions, subscript/superscript text, toggles, and degraded dates or mentions.
-
8dcb3f4by @zbeyens – Reuse oneIntl.CollatorinfilterWords, and close an active combobox when its range becomes non-writable -
- Land Duplicate of a closed Details title after the Details
- Select an adjacent block void at container edges before deleting it on forward Delete or backward Backspace
-
- Refuse
BaseListPlugin.update.restart()on non-writable (locked) blocks and initializechecked: falsewhen inserting or upserting a task list item.
- Refuse
-
- Fall back from
crypto.randomUUIDinAIChatPluginso AI chat requests work on non-secure HTTP origins
- Fall back from
-
- Fix
editor.plugin(BlockquotePlugin).update.untab()and Shift+Tab lifting the wrong paragraphs when a blockquote selection spans ten or more children or crosses nested blockquotes.
- Fix
-
6e1a89eby @zbeyens – Add'image'toBoardShapeDescription['kind'](reporting child caption oralttext), announce keyboard-placed free text, mark active keyboard-resize corners withdata-board-resize-corner, coalesce held arrow-key nudges into one undo step, and keep sibling boards and portaled menus isolated onEscape.Migration: If your
BoardMessagesimplementation mapsBoardShapeDescription['kind']exhaustively, add animagelabel:const KINDS: Readonly<Record<BoardShapeDescription['kind'], string>> = { arrow: 'Arrow', frame: 'Frame', geo: 'Shape', image: 'Image', note: 'Note', shape: 'Shape', stroke: 'Line', text: 'Text', };
-
92fa100by @zbeyens – Allow moving paragraphs inside board notes when no Yjs binding is installed while keeping shape moves refused -
43825d9by @zbeyens – Render Copilot ghost text inline inside list items regardless of plugin order relative toListPlugin. -
fb134b5by @zbeyens – Remove three-way comparison andresolveComparisonfromplatejs/diff, collapseTwoWayComparisonintoComparisonwithoutkind, and move live comparison import fromproposeAuthoredComparisontoeditor.plugin(AuthoredPlugin).api.proposeComparison.comparenow hashes documentrecordsalongsidemetainbefore.envelopeFingerprint, so callers importing throughproposeComparisonshould passeditor.read.value()asbeforeinstead ofeditor.read.children().Migration:
// Before import { proposeAuthoredComparison } from 'platejs/authored'; import { compare, type TwoWayComparison } from 'platejs/diff'; const comparison: TwoWayComparison = await compare({ before, after, schema }); const result = proposeAuthoredComparison(editor, { comparison, groupIds }); // After import { AuthoredPlugin } from 'platejs/authored'; import { compare, type Comparison } from 'platejs/diff'; const comparison: Comparison = await compare({ before, after, schema }); const result = editor .plugin(AuthoredPlugin) .api.proposeComparison({ comparison, groupIds });
-
2404e28by @zbeyens – DeliverEditorRootchange and commit callbacks for commits made during editor startup, child mount layout effects, and rerenders with inlineonNodeChangeoronTextChangehandlers -
- Accept
at: { id }and other node targets in default elementinsert,set, andremoveupdates, and inlineHeight,textAlign, andtextIndentsetandclearupdates.
- Accept
-
- Ignore an unrelated expanded selection when
tx.footnote.insertreceives an explicitattarget. - Place definitions added by
tx.footnote.createDefinitionbefore trailing empty default paragraphs instead of after them.
- Ignore an unrelated expanded selection when
-
- Fix
EditorStaticdropping earlierleafAttributesclass names when multiple leaf-attribute mark plugins apply to one leaf - Decode combined
text-decoration: underline line-throughand nestedfont-style: normalortext-decoration: nonemark resets on HTML paste - Include
source.tagon AST-stagehtml-unsafe-contentelement removals and preserve element locations on dropped list HTML styles - Remove the DOM entrypoint dependency from
platejs/static
- Fix
-
c0aaa2cby @zbeyens – Keep ink strokes visible across edits, wraps, RTL, and narrow viewports, support drawing on block-level void elements (such as images and videos with[data-ink-box], scaling proportionally on resize), delete ink atomically when its block or marked paragraph is deleted (Cmd+Zrestores both), and removeInkSign,InkCopyView,InkSignPlace, theInkContentsignprop, and theink-gonerecord set.Migration: Remove
InkSign,InkCopyView, andInkSignPlaceimports and drop thesignprop from<InkContent {...props} />. If your app persists older beta document snapshots containingrecords['ink-gone'], strip that key before loading. -
a410ebbby @zbeyens – MakeInkContent'ssignprop optional for headless setups, ignore ink capture over block-level void elements instead of mis-anchoring onto neighboring paragraphs, and measure sibling blocks when rendering edited multi-block Digitize passages. -
d8be708by @zbeyens – Exposedata-ink-tool,var(--ink-cursor, crosshair), and optionalclassName/styleforwarding onInkContent's overlay layer gated on active non-read-only, non-hidden tools. -
3b41838by @zbeyens – Focus the Editable without scrolling after a Lasso drag completes inInkPluginso dragging a lasso in a scrolled document no longer snaps back to the caret mid-drag. -
- Omit
position: relativefrom inlineEditorElementwrappers so a native text caret beside an inline chip paints above the chip instead of behind it.
- Omit
-
fd8c3dcby @zbeyens – Addeditor.api.markdown.parsePlaceholders, lock-aware AI prompt helpers (hasEditableAISelection,serializeAIEditContext,serializeAISelectionMarkdown,LOCKED_BLOCK_PLACEHOLDER_TAG, and optionalAIChatRequestRefs.lockedBlocks), and alignedAIChatPlugindocument and multi-cell table editing around locked blocks and cells. -
27cab74by @zbeyens – Addplatejs/lockandplatejs/lock/reactfor per-block client-side locking with inline field fill exemptions and lock-aware feature guards. -
12b0275by @zbeyens – RemoveRawHtmlPluginfromplatejs/markdown. Unmapped raw HTML stays plain text on import and escapes on export, and HTML comments drop with a losslessmarkdown-unsupported-nodewarning.Migration:
- Remove
RawHtmlPluginfrom yourplatejs/markdownimports and plugin lists. - If your app saved beta v54 documents containing
rawHtml: trueon text leaves, strip therawHtmlproperty from text leaves before opening them under the updated schema (or increment your named schemaversionand striprawHtmlin a migration step). - Update saved
{ document, schema }fingerprints, Yjs rooms, and savedHistorysnapshots that includedRawHtmlPluginin their schema fingerprint.
- Remove
-
bbfe276by @zbeyens – Finish marquee block selection at the last held pointer position when a move arrives with the primary button already released -
621f2b6by @zbeyens – Parse inline CSS declarations inplatejs/html/serverwith!importantpriority, case-insensitive property names, comment stripping, shorthand expansion (font,background,margin,padding,list-style), andCSSStyleDeclaration.item(). -
- Contract saved comment ranges inward across degraded or removed unsafe media in
migrateV54instead of expanding over synthesized alt text or file names. - Preserve
NodeSelectionpaths acrossmigrateV54input-literal expansions, unsafe URL cleanup, and code-block flattening, and computemappedSelectionlazily when a migration step supplies its ownmapSelection.
- Contract saved comment ranges inward across degraded or removed unsafe media in
plitejs
Minor Changes
a82b280by @zbeyens – RenameEditable,EditableProps,PagedEditable,PagedEditableProps,PagedEditablePageAttributes,PagedEditableRenderPageProps,PagedEditablePageView,VirtualizedEditable, andVirtualizedEditablePropstoEditorContent,EditorContentProps,PagedEditorContent,PagedEditorContentProps,PagedEditorContentPageAttributes,PagedEditorContentRenderPageProps,PagedEditorContentPageView,VirtualizedEditorContent, andVirtualizedEditorContentProps, and thread theTRootgeneric throughPagedEditorContentandPagedEditorContentProps.
Patch Changes
-
513f13dby @zbeyens – Keep caret navigation keys in a nested content root from activating the enclosing root's parked caret -
e7a8d39by @zbeyens – Fix collapsed caret mark reads at the start of a text node to match the marks applied by typing. -
- Allow point drops to move ranges holding content-root owners without failing validation before landing
- Join open multi-depth slices into root blocks at block start and end
- Keep closed object blocks and their captions intact when pasted into a different block type
- Refuse Enter, typing, and delete over partial ranges inside read-only blocks
-
- Keep the caret inside a trailing or leading content root instead of entering hidden owner text on arrow navigation
- Extend
Shift+ArrowRightpast a two-deep nested content root that ends its host into the next outer block, and preserve projected cross-rootShift+ArrowDownselection from nested synced blocks in Firefox - Keep named-root carets and pending marks unchanged when explicit
maintext or node transforms run - Revalidate an existing content root's projected grammar when its owner changes
- Scale content-root document loading, validation, and replacement linearly in card count
- Preserve attached document records when reading, fitting, loading, replacing, or viewing documents with
undefinedfields
-
f9c9045by @zbeyens – Fix Shift+Tab leaving an external text view when it is the first block in a root -
- Fix virtualized paged viewport tracking when an ancestor transform scale changes without resizing the editor box
- Fix vertical arrow navigation across side-by-side spread pages
- Inherit ancestor text decoration on projected paged runs so links keep their underline
-
cfd5f29by @zbeyens – Preserve remote andhistory: 'skip'state field updates across local undo and redo instead of overwriting them with earlier local field values. -
000cba5by @zbeyens – Keep restored text and paragraph breaks on the right side of concurrent peer insertions during collaborative undo -
- Keep a peer's caret at the replacement point when a remote Yjs edit replaces text under it.
- Preserve document records when applying a
DocumentChangeafter an earlier change on a document with no records.
-
- Unify content-root owner-chain resolution in
content-root-navigation.ts, keeping duplicated synced-block hosts on the focused host during projected selection extension and guarding cross-root focus retries against intervening focus moves. - Use shadow-aware selection, containment, and flat-tree visibility checks in
runtime-focus-mouse-events.ts,selection-void-target.ts,caret-engine.ts, andinteraction-owner.ts. - Make
refusesReadOnlyWriteroot-aware and refuse partial writes whose range starts or ends inside a read-only inline acrossinsertText,insertBreak,deleteFragment, anddeleteText.
- Unify content-root owner-chain resolution in
-
a9842dcby @zbeyens – Preserve matching closing tags when aligning open tokens in multi-step slice replacements so table-expanding paste succeeds in documents with pending suggestions. -
- Preserve paragraph order when dragging whole paragraphs into another paragraph with the authored plugin installed.
- Drop the withdrawn split end and keep the surviving split end anchored when deleting a pending split paragraph.
- Keep triple-click followed by Backspace deleting a whole paragraph when that paragraph contains a pending suggestion.
-
- Fix selecting and copying struck media in a read-only proposed view
- Keep typed text after struck letters when replacing an inline element and following text in Suggesting mode
- Fall back from
crypto.randomUUIDso authored changes and sync work on non-secure HTTP origins
-
7fbc404by @zbeyens – Clear browser-restored DOM caret on keyup while a node selection is active -
c48142eby @zbeyens – Remove redundant'preserve'value fromCommandFocusPolicy; use'none'(default) or'restore-root' -
51aa797by @zbeyens – Report all changed node keys when an update deletes and recreates a named root. -
fb134b5by @zbeyens – Remove three-way comparison andresolveComparisonfromplitejs/diff, collapseTwoWayComparisonintoComparisonwithoutkind, and move live comparison import fromproposeAuthoredComparisontoeditor.api.authored.proposeComparison.comparenow hashes documentrecordsalongsidemetainbefore.envelopeFingerprint, so callers importing throughproposeComparisonshould passeditor.read.value()asbeforeinstead ofeditor.read.children().Migration:
// Before import { proposeAuthoredComparison } from 'plitejs/authored'; import { compare, type TwoWayComparison } from 'plitejs/diff'; const comparison: TwoWayComparison = await compare({ before, after, schema }); const result = proposeAuthoredComparison(editor, { comparison, groupIds }); // After import { compare, type Comparison } from 'plitejs/diff'; const comparison: Comparison = await compare({ before, after, schema }); const result = editor.api.authored.proposeComparison({ comparison, groupIds, });
-
ec1e083by @zbeyens – Keep the browser selection anchored inside draggable void elements instead of snapping the caret to the start of the document. -
6b19fe1by @zbeyens – Skip the extraEditableDOMRootrender when anEditorRootturns read-only in the same render that already passesreadOnly={true}to its editable, and scope the editable's read-only view-state subscription toreadOnlychanges. -
- Refuse partial cross-block edits and pastes into read-only blocks, soft breaks inside read-only blocks, and writes inside named roots owned by read-only elements
- Preserve named-root selections during explicit-target fragment deletes, node wraps, and full-block text replacements, and fix split unwraps and deleted-range root resolution in named roots
-
- Group consecutive typing over a text selection in Suggesting mode or over a block selection in Editing mode into one undo step
- Preserve empty block containers without inserting text leaves during history serialization, replay, and undo/redo around peer moves
- Keep a peer-deleted paragraph removed when undoing a merged unwrap and line split
-
- Fix history redo of an inline link wrap over a teammate's overlapping link wrap so it splits the teammate's overlapping link around the replayed link without throwing a nesting error.
- Fix history redo over a teammate's replaced or deleted paragraph so edits targeting the removed block drop without overwriting the replacement or typing into a following paragraph.
- Fix history undo of a block split when a teammate wraps the first half and edits inside it so the wrapper and teammate edits stay intact.
-
- Omit
position: relativefrom default inlineEditorElementwrappers so a native text caret beside an inline element paints above it instead of behind it.
- Omit
-
- Extend selections into and out of external text views with
Shift+ArrowUpandShift+ArrowDown - Keep editor focus when clicking inside an editor mounted in a shadow root
- Keep a trailing soft break visible after a refused native key insert
- Let a touch long press select the pressed word when a range spans unmounted blocks
- Extend selections into and out of external text views with
-
bc4d528by @zbeyens – ScopeusePageLayoutFragmentsto the owning paged view, retain ancestor owners of descendant caret roots across virtualized and paged views, and stage ancestor-chain reveals inDOMEditor.scrollIntoViewfor unmounted nested roots. -
27cab74by @zbeyens – Add non-writable content admission, direct-property Suggesting writes, property-only history skipping, and native DOM/IME/Cut/Android/CodeMirror refusal rollback hooks. -
e5956ceby @zbeyens – Fix double-click glyph side detection after emoji and combining marks in paged views -
- Keep opening documents with many content roots and reading authored preview roots linear instead of quadratic in the number of roots
-
- Fix focus selection export over hidden coverage boundaries and after
skip-dom-selectioncommits, prevent no-op React rerenders from clearing active programmatic selection guards early, and preserve backward direction for shadow-DOM selection reads
- Fix focus selection export over hidden coverage boundaries and after
-
- Fix pointer, drag, clipboard, Android composition, and DOM integrity caret restoration inside open and closed shadow roots
- Restore empty-leaf zero-width carets and preserve sibling decorated spans when reverting refused native text inserts
- Recognize trailing display newlines on custom-rendered leaves as canonical during DOM integrity checks
-
92fa100by @zbeyens – Route document-editortransferstep moves (to: 'next' | 'previous') to the selection's root whenfrom,nodes, andrangeare omitted -
- Unify
editor.api.dom.scrollIntoViewonto Plite's native scroll engine for all option combinations and remove thescroll-into-view-if-neededdependency. Calls with explicitblock,inline,behavior,boundary, orscrollModeoptions now work inside iframes, preserve negativescrollLeftin RTL containers, account for CSStransform: scale(), walk nested scroll containers inif-neededmode, and respectvisualViewportoffset and rootscroll-padding.
- Unify
-
ebe4818by @zbeyens – Keep model selection synchronized on plain vertical arrow keys after expanded selections or typing, deliver Shift+Arrow keys to nested child-root editors, and paint projected cross-root selection highlights insideEditorContentchild roots -
- Preserve sticky horizontal caret column across vertical arrow navigation in paged views and when entering scroll containers in Firefox, and fix cross-realm
getComputedStylelookups for iframe editors
- Preserve sticky horizontal caret column across vertical arrow navigation in paged views and when entering scroll containers in Firefox, and fix cross-realm
-
2404e28by @zbeyens – Key nested content-root view-boundary nodes by their full owner chain so a nested root inside a host shown multiple times builds and extends selection without throwing duplicate-key errors -
- Fix
state.transactionandstate.transaction.extendover authored previews and document views - Keep read and document-view guards active across lazy
nodes.entries,nodes.levels, andpoints.positionsiterator callbacks - Fix
tx.slice.replace,editor.update.slice.replace,state.slice.fit, andtx.fragment.replaceover block node selections - Keep one teardown owner for reentrant
editor.destroy()calls and refuseeditor.destroy()during pluginacquirecallbacks
- Fix
-
6eaee8bby @zbeyens – Fix virtualized row height shrinking, host scroll-margin offset, paged host scroll tracking, and mixed-boundary materialization inVirtualizedEditorContentandPagedEditorContent -
- Fix pending mark writes through a named-root view throwing when the caret sits in that root
- Fix Editing mode with authored review retaining replaced document versions in memory
Full changelog: v54.0.0-beta.7...v54.0.0-beta.8