npm @tiptap/react 3.4.0
v3.4.0

latest release: 3.4.1
one day ago

Releases

@tiptap/core@3.4.0

Minor Changes

  • ad51daa: Add mount and unmount events to the Editor instance for tracking mounts and unmounts

Patch Changes

  • 895c73f: Fix can().toggleMark() returning incorrect result when cursor is inside nodes that disallow marks

    Fixed an issue where can().toggleMark('bold') incorrectly returned true when the cursor was positioned inside a code block (with no selection), even though marks are not allowed in code blocks. The method now correctly returns false in this scenario by checking if the parent node allows the mark type when the selection is a cursor.

@tiptap/extension-dropcursor@3.4.0

Patch Changes

  • ef909f1: Updated DropcursorOptions.color types to use types defined in prosemirror-dropcursor

@tiptap/extension-code-block@3.4.0

Patch Changes

  • 11c8085: Added indentation support for code blocks via Tab. Is deactivated by default.

    New Extension Options:

    • enableTabIndentation: boolean - controls if tab completion should be enabled
    • tabSize: number - controls how many spaces are inserted for a tab

@tiptap/extension-code-block-lowlight@3.4.0

Patch Changes

  • 11c8085: Added indentation support for code blocks via Tab. Is deactivated by default.

    New Extension Options:

    • enableTabIndentation: boolean - controls if tab completion should be enabled
    • tabSize: number - controls how many spaces are inserted for a tab

@tiptap/extension-details@3.4.0

Patch Changes

  • d3773c7: Fixed an issue where the input method editor (IME) failed to handle Chinese text correctly when entering the first word. Users can now input multiple words as expected.

@tiptap/extension-drag-handle-vue-2@3.4.0

Patch Changes

  • 2cb08d3: Use factory function for object default value as required by vue 2.
  • 2cb08d3: Fixed a bug that would cause Vue 2 to throw errors in console because Vue 2 expects factory functions for prop defaults

@tiptap/suggestion@3.4.0

Patch Changes

  • 3733bb9: Allow consumers to handle the Escape key via render().onKeyDown before the suggestion plugin auto-exits.

    Previously the suggestion plugin intercepted Escape internally and immediately called onExit, preventing render().onKeyDown from receiving the event and stopping propagation. Now render().onKeyDown is invoked first for Escape; if it returns true the plugin assumes the consumer handled the event (so they can call event.preventDefault() / event.stopPropagation() and optionally call exitSuggestion(view) themselves). If it returns false (or is absent), the plugin will continue to call onExit and close the suggestion as before.

    This change enables scenarios where the editor is inside a modal/drawer and the consumer needs to prevent the outer UI from reacting to Escape while still controlling the suggestion's lifecycle.

  • 90cbed5: Remove the global document mousedown handler that closed suggestion popups when clicking outside.

    Previously the suggestion plugin listened for document mousedown events and closed suggestion UIs when the user clicked outside the editor or suggestion portal. That behavior has been removed to avoid framework-specific coupling (for example reliance on .react-renderer) and related compatibility issues.

    Now suggestions are closed via other signals:

    • pressing Escape (unchanged)
    • selection/cursor changes
    • renderer.onExit (renderers can call this)
    • programmatic calls to exitSuggestion(view)

Don't miss a new react release

NewReleases is sending notifications on new releases.