npm @tiptap/extension-image 3.3.0
v3.3.0

latest release: 3.3.1
10 days ago

Releases

@tiptap/core@3.3.0

Minor Changes

  • 5423726: Make input rules and paste rules respect extension priority by registering
    them per-extension instead of aggregating them into a single global plugin.

    Why

    Previously all addInputRules() and addPasteRules() 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.

    What changed

    • 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.

    Migration & compatibility

    • 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.

    If you have any questions or see regressions after upgrading, please open an
    issue with a small repro and we'll help triage.

Patch Changes

  • 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 to
    node.content.size when needed. It also skips empty or invalid node ranges
    before calling textBetween, preventing runtime errors originating from
    internal Fragment/Node traversals (for example: "Cannot read properties of
    undefined (reading 'nodeSize')").

@tiptap/extension-unique-id@3.3.0

Patch Changes

  • 5423726: Change the generateID option to accept a context object: { node, pos }.

    This lets ID generators access both the ProseMirror node and its pos 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()}`,
    })
    

@tiptap/react@3.3.0

Patch Changes

  • 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 to document.body), previously calling destroy() 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.

@tiptap/suggestion@3.3.0

Patch Changes

  • 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.

Don't miss a new extension-image release

NewReleases is sending notifications on new releases.