@platejs/cli
Patch Changes
@platejs/test
Published @platejs/test@54.0.0-beta.10.
platejs
Patch Changes
-
- Redesign
BaseCalloutPluginas a multi-block container (blockContent,min: 1) withwrap,unwrap,toggle, andupserttransforms, direct-child Enter/Backspace container rules, neutral optionalvariant/icon/backgroundColorproperties (removing the hardcoded'💡'schema default and making DOCX callouticonoptional), prioritized GitHub Flavored Markdown Alerts (> [!NOTE]..> [!CAUTION]) with<callout>MDX fallback, and v53-to-v54 flat callout migration (apps persisting named v54 documents with flat callouts should bump their schema version and wrap flat callout children into a paragraph). - Add
BaseDetailsPlugin.api.reveal(target)to open closed ancestor Details in the calling view for aLocationorNodeKey, following named-root owners and working in read-only views. - Keep display math (
$$) containing disallowed HTML-like tags lossless across Markdown round-trips while remaining safe for plain CommonMark readers.
- Redesign
-
- Add a detached
exportDocx(document, { plugins, projection, ... })overload for server and worker DOCX export without creating an editor, and typeDocxEncodeContext['readPlugin']as nullable withkey(node?)support - Add
plainTextformat mappings forBaseMediaEmbedPlugin,BaseDatePlugin,BaseFootnotePlugin, andBaseFootnoteDefinitionPlugin
- Add a detached
-
- Place the caret after the inserted inline equation when completing
$...$viaMathRules.markdown({ variant: '$' })so typing continues in the surrounding paragraph - Contribute
inputRuleVetofromBaseEquationPluginandBaseInlineEquationPluginso input rules do not fire inside equation voids
- Place the caret after the inserted inline equation when completing
-
63d41c6by @zbeyens – Close an active combobox when focus moves to another editor inside a ShadowRoot. -
7feb3d3by @zbeyens – Emit the HTML5datetimeattribute on canonicalBaseDatePlugin<time>elements, decode pasted Google Docs date smart chips (span[data-rich-links]), and validate canonical calendar days in UTC during Markdown and HTML serialization so output does not vary by host timezone. -
- Fix
exportDocxlivereviewTOC bookmark recovery,codeBlockinside blockquote styling, continuous list numbering after astartOverride, per-root list diagnostics, and story-levelquote-structurediagnostics inside table cells and footnote definitions.
- Fix
-
- Remove unused
KeyboardHandlerexport fromplatejs/react, exportNodeChangeContextandTextChangeContext, narrowDOMHandlerdefault event type toReact.SyntheticEventanddomBeforeInputtoInputEvent - Skip node and text change walks when no
on.nodeChange,on.textChange,onNodeChange, oronTextChangelistener is registered - Scope
AffinityPluginboundary reads and selection updates to named content roots
- Remove unused
-
4b1bfd7by @zbeyens – Fix inline-void projection, stale same-transaction fixes, write-permission checks, and async teardown inplatejs/lint, and add sessiondismiss,range, flattened overlap paint, labeledLintFix, and arrayat().Migration:
- Read
lint.api.at()asreadonly LintFinding[]instead ofLintFinding | null. - Read
fix.text(and optionalfix.label) from eachLintFixentry infinding.fixes. - Replace
[data-lint-id]queries withlint.api.range(finding.id).
- Read
-
4105671by @zbeyens – Unifyplatejs/mediaembed URL parsing intoparseMediaEmbedUrl(preserving Vimeo?h=hashes and path-ID YouTube precedence), addImageRules.autoImage({ variant: 'paste' }), remove 18 dead/internal exports anddisableEmbedInsert, widenAlignedMediaInsertInput['textAlign']for logical RTL alignment, and derive defaultBaseFilePluginfilenames from URL pathnames. -
- Preflight
BaseMediaPlugin.api.insertUrlwitheditor.canbefore opening the URL prompt, and updateParagraphPlugin's toggle shortcut tomod+alt+digit0. - Rename
StructuralRuleContext.read(StructuralRuleRead) toStructuralRuleContext.state(StructuralRuleState) so structural rules keep access to their plugin's own root-scopedreadmethods. - Limit void
on.keyDowncancellation toevent.preventDefault(), ignore pre-cancelled events, preservereturn falseacrossonKeyDownprops, and keepevent.stopPropagation()stopping later handlers on non-keydown events such asonPaste. - Scope
BaseLockPluginauthorization nonces to the active update so refused lock or unlock updates do not leak nonces, and notifyeditor.cansubscribers whenBaseFieldPluginchangesfillRole.
- Preflight
-
3dd2acaby @zbeyens – Write marquee box styles after committing selection updates during block selection drags. -
- Remove unused
injectoptions (excludePlugins,excludeBelowPlugins,maxLevel),inject.nodePropshooks (classNames,transformClassName,transformStyle),getPluginNodeClass, and duplicate node prop type aliases (LeafStaticProps,NodeStaticProps,TextStaticProps,EditorNodeProps,EditorHTMLProps); simplifygetInjectMatch(editor, plugin)to return(node) => boolean - Require explicit
inject.nodeProps.styleKeyinstead of defaulting tonodeKey, preventing invalid inline styles on non-CSS node properties while keepinglineHeightstyles intact - Fix live and static rendering parity across
editOnly.renderelement fallbacks (preserving children, declaredcontentRoots, and non-editOnlywrappers),leafAttributesandtextAttributes(mergingclassName/style, passing plugin context andattributes, activating numeric0marks, and gating onreadOnly),useViewElementAttributes(editOnlygating and reserved editor host attribute rejection), and static void-tag<EditorElement>rendering
- Remove unused
-
c006703by @zbeyens – Remove theplatejs/tabbablesubpath and drop theunist-util-visitruntime dependency.Migration: Import
TabbableEntryandTabbablePluginStatefromplatejs/tabbable/react:import type { TabbableEntry, TabbablePluginState, } from 'platejs/tabbable/react';
-
1878a75by @zbeyens – AllowResizable'sonResizeEndcallback to returnfalseto discard the local preview width when a resize write is vetoed (for example byBaseLockPlugin). -
- Remove unused
LineHeightDefinitionandTextAlignDefinitiontype exports - Composite translucent CSS colors (
rgba(),hsla(),#RGBA,#RRGGBBAA) over white and convert HSL hue angle units (turn,rad,grad) in DOCX export - Set
data-editor-format-painter="once" | "sticky"on mounted editable hosts whileFormatPainterPluginis armed and editable
- Remove unused
-
- Re-export
clearSyncCache,DocumentChangeJson,SyncAccess,SyncStoppedReason,SyncConnectRequest,SyncPeerMatch, andSyncServeracrossplatejs/sync* - Skip persistent
editor-sync-cache-v1caching for editors using the unconfigured'local'default user ID - Update
platejs/sync/cloudflareto expose typedSyncRoomHost<TServer>.server,alarm(), andSyncRoomOptions
- Re-export
-
- Run
TabbablePluginas an exact-view fallback after plugin shortcuts, open comboboxes, nested editors, and void controls, with Shadow DOM and iframe support.
- Run
-
951e6b1by @zbeyens – Skip default empty source paragraphs and keep the named root when merging table cells, insert body cells before the first body row below a header row, and preserve cellNodeKeyidentity when removing arowSpananchor row. -
7a7d861by @zbeyens – Skip struck-deleted headings, struck-deleted heading text, inline void text, and whitespace-only headings inreadTocHeadingsandBaseTocPluginread.headings().
plitejs
Patch Changes
-
- Classify WAI-ARIA widgets inside
contenteditable="false"chrome (including SVG role widgets) as interactive controls so outer editor focus and keyboard handlers yield to them. - Resolve live-region speaker focus per focused browsing context across iframes.
- Gate
aria-multilineandaria-readonlyonEditorContentby WAI-ARIA 1.2 role compatibility when a caller overridesrole. - Resolve void nodes across open Shadow DOM boundaries in
DOMEditor.resolveNode.
- Classify WAI-ARIA widgets inside
-
- Keep
editor.candry runs from firing pluginon.transactionChangelisteners, marking the live DOM node map dirty, or advancing the live element ID counter. - Resolve
joinKeepsPrefixOccupantagainst the provided state's root when evaluating the main root while the editor's live selection is in a named root.
- Keep
-
951e6b1by @zbeyens – Returnundefinedorfalseinstead of throwing when reading ranges, adjacent points, or edge checks on an empty container element such as arowSpan-covered table row. -
- Forward caller
onInputCaptureandonKeyDownCapturehandlers on editable roots
- Forward caller
-
- Add
access: 'read', optionalexpiresAt,server.updateGrant,server.disconnect, andonErrortoplitejs/sync/server - Move auth tokens out of
Sec-WebSocket-Protocolinto protocol v2helloandreauthframes (SYNC_PROTOCOL = 2) - Add discriminated
SyncStatus(opening | connecting | connected | offline | stopped), core write admission,restart(),whenSynced(),resetOutbox(), and losslessSyncKeptItem.text/exportChange()toplitejs/sync - Add row-per-batch IndexedDB outbox (
editor-sync-outbox-v2), cold-boot(room, actor)LRU snapshot cache (clearSyncCache), drain-time plain text coalescing, and browser lifecycle / 50 ms presence throttling - Persist Cloudflare Durable Object connection state in SQLite (
sync_connections) with< 128 Battachments, subclass-safealarm(),ping/pongauto-response, and typedSyncRoomHost<TServer>.server
- Add
-
3dd2acaby @zbeyens – Normalize drag auto-scroll speed by elapsed frame time and avoid redundant selection clears and full-document mark scans during block selection drags. -
5b82e78by @zbeyens – Rebase v4 steps over an incremental mutable state instead of re-indexing and cloning the document per pair, and skip stale deferred mouseup selection imports after a newer edit or selection placement. -
70edc57by @zbeyens – Escalate colliding created element IDs across all v4 element-creating step pairs (insert_node,split_node,wrap_inline) duringrebaseV4Changes, and readstate.recordsdynamically indocViewFromMutableStateso multi-step register rebases see prior register updates. -
c006703by @zbeyens – Drop thelodashruntime dependency soplitejsships with zero runtime dependencies, and remove eight low-level DOM helpers (CAN_USE_DOM,closestShadowAware,getActiveElement,hasShadowRoot,isAfter,isBefore,isDOMSelection,normalizeDOMPoint) fromplitejs/dom.Migration: Replace those removed
plitejs/domhelpers with standard browser DOM APIs oreditor.api.dom.*.
Full changelog: v54.0.0-beta.1...v54.0.0-beta.10