v3.3.0
-
5423726: Make input rules and paste rules respect extension
priority
by registering them per-extension instead of aggregating them into a single global plugin.Previously all
addInputRules()
andaddPasteRules()
were gathered into one global plugin which ran before the other plugins. That caused conflicts where some extensions (for example mention/suggestion with#
) could not preempt the built-in heading input rule.- Input and paste rules are now created and registered at the position of the owning extension. This makes their execution order follow the extension sorting/
priority
mechanism. - Behavior is more predictable: extensions with higher
priority
can now take precedence over lower priority extensions' input/paste rules.
- This is a behavioral change. If you relied on the old global ordering (input rules always running before other plugins), you may observe different outcomes. In most cases this is desirable and fixes conflicts (like the
#
mention vs. heading shortcut), but be aware of the change. - If you need to force the previous behavior for a specific rule, you can:
- Register the rule as a ProseMirror plugin via
addProseMirrorPlugins()
on the extension and place it where you want it to run. - Adjust the extension
priority
value so the extension sits earlier or later in the ordering.
- Register the rule as a ProseMirror plugin via
If you have any questions or see regressions after upgrading, please open an issue with a small repro and we'll help triage.
- Input and paste rules are now created and registered at the position of the owning extension. This makes their execution order follow the extension sorting/
-
5423726: Fix paste rule handling for node views and defensively guard empty ranges.
This patch ensures paste rules can correctly inspect node content when node-specific size metadata (
nodeSize
) is present, falling back tonode.content.size
when needed. It also skips empty or invalid node ranges before callingtextBetween
, preventing runtime errors originating from internal Fragment/Node traversals (for example: "Cannot read properties of undefined (reading 'nodeSize')").
-
5423726: Change the
generateID
option to accept a context object:{ node, pos }
.This lets ID generators access both the ProseMirror
node
and itspos
within the document when creating IDs, enabling logic that depends on node content, type, or position.The change is backwards-compatible: existing
generateID
functions that ignore the new context will continue to work. Example usage:editor.use(UniqueID, { generateID: ({ node, pos }) => `${node.type.name}-${pos}-${uuidv4()}`, })
-
5423726: Ensure
ReactRenderer.destroy()
removes the renderer DOM element when present.- When consumers append a
ReactRenderer
's.element
to the DOM (for example many demos append it todocument.body
), previously callingdestroy()
removed the portal renderer but left the DOM node in place which could lead to accumulating.react-renderer
elements. destroy()
now also removes the element from its parent node if present, preventing leaked DOM nodes / React roots.
- When consumers append a
-
5423726: Add a safe API to exit suggestions and remove decorations.
- Dispatching a metadata-only transaction with
{ exit: true }
will now reliably deactivate the suggestion plugin and remove inline decorations. - Pressing Escape now triggers renderer.onExit and dispatches the exit meta, so suggestions close immediately without needing document edits.
- Clicking outside the editor will also close active suggestions.
- Exported
exitSuggestion(view, pluginKey?)
helper to programmatically close suggestions safely.
- Dispatching a metadata-only transaction with
v3.2.2
-
1cab7ff: Change the
generateID
option to accept a context object:{ node, pos }
.This lets ID generators access both the ProseMirror
node
and itspos
within the document when creating IDs, enabling logic that depends on node content, type, or position.
v3.2.1
- 6a2873f: Ensure drag previews for node views work correctly in Safari by attaching an offscreen clone of the node to the DOM while calling
setDragImage
, and by preserving the original element's pixelwidth
/height
so the preview matches the original. This prevents Safari from immediately cancelling the drag when a detached element is used as the drag image.
v3.1.0
- 978c548: Expose
onDragStart
andonDragEnd
callbacks to improve custom drag behavior. This allows better UI control compared to relying oneditor.view.dragging
, especially when using absolute-positioned drag handles.
- 978c548: Expose
onDragStart
andonDragEnd
callbacks to improve custom drag behavior. This allows better UI control compared to relying oneditor.view.dragging
, especially when using absolute-positioned drag handles.
- 2718eea: Fixed bubble menus having invalid positions on node selections
- 43747ce: Fixed a problem where the emoji extension would interfer with editor's in composing mode (for example in IME conversion)
- c868252: Fixed an issue with the mathematics regex using modern negative lookups causing crashes in older Safari versions.
- c0d33fd: Fixed a bug causing invalid number of columns being created while converting tables to Markdown
- 0943a52: Fixed an issue preventing overriding the default options of the static renderer's
renderToMarkdown
function.
v3.0.9
- 072b110: Fixed the Vue 3 Drag Handle so it only appears when the user starts interacting with the text editor.
- 22fcc31: Update TaskItem aria-label when node changes
- 22d6050: fix renderToMarkdown rendering a link href's as undefined
v3.0.7
- 6b42853: Fix: Fix a problem with the inline option and virtual elements missing getClientRects
- 6b42853: Fix: Fix a problem with the inline option and virtual elements missing getClientRects