Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@tiptap/extension-highlight

ueberdosis3.4mMIT3.10.0TypeScript support: included

highlight extension for tiptap

tiptap, tiptap extension

readme

@tiptap/extension-highlight

Version Downloads License Sponsor

Introduction

Tiptap is a headless wrapper around ProseMirror – a toolkit for building rich text WYSIWYG editors, which is already in use at many well-known companies such as New York Times, The Guardian or Atlassian.

Official Documentation

Documentation can be found on the Tiptap website.

License

Tiptap is open sourced software licensed under the MIT license.

changelog

Releases

v3.10.0

@tiptap/core

Minor Changes

  • Add a new ResizableNodeview NodeView to core that wraps elements (images, videos, iframes) with configurable resize handles. It provides live onResize/onCommit callbacks, min/max constraints, aspect-ratio support, and styling hooks (class names + data attributes) to improve UX when resizing media inside the editor.
  • the addNodeView function can now return null to dynamically disable rendering of a node view

    While this should not directly cause any issues, it's noteworthy as it still could affect some behavior in some edge cases.

@tiptap/extension-image

Minor Changes

  • Added a new resize option that allows images to be resized. The option adds resize handlers to images allowing users to manually resize images via drag and drop or touch

v3.9.1

@tiptap/extension-table

Patch Changes

  • Add a renderWrapper option to the Table extension so consumers can customize whether the table wrapper for the resizable node view should be rendered in non-editable mode as well.

v3.9.0

@tiptap/vue-3

Patch Changes

  • Fix attribute forwarding for BubbleMenu and FloatingMenu Vue 3 components to allow setting z-index and other HTML attributes

@tiptap/extension-hard-break

Patch Changes

  • Ensure that markdown hard breaks (two spaces followed by a newline) are parsed so they render as line breaks (<br>) in the editor when using contentType: 'markdown'.

    Fixes #7107

@tiptap/extension-unique-id

Minor Changes

  • Add updateDocument option to disable document updates caused by the Unique ID extension.

@tiptap/core

Patch Changes

  • Only remove injected CSS on unmount if no other editors are in the document (fixes #6836)

@tiptap/extension-drag-handle

Patch Changes

  • Replace DOM traversal with browser's native elementsFromPoint for better performance.

    • Use elementsFromPoint instead of querySelectorAll
    • Add clampToContent helper for coordinate boundary validation
    • Add findClosestTopLevelBlock helper for efficient block lookup
    • Future-proof for root-level mousemove listeners

@tiptap/react

Patch Changes

  • Prevent Bubble Menu plugin from re-loading every time the BubbleMenu component re-renders. Reverts a regression introduced in v3.6.3, in PR #7028.

v3.8.0

@tiptap/extension-unique-id

Minor Changes

  • Add updateDocument option to disable document updates caused by the Unique ID extension.

@tiptap/react

Patch Changes

  • Prevent Bubble Menu plugin from re-loading every time the BubbleMenu component re-renders. Reverts a regression introduced in v3.6.3, in PR #7028.

v3.7.2

@tiptap/html

Patch Changes

v3.7.1

@tiptap/markdown

Patch Changes

  • Editors will not throw an error anymore when content is an empty string and contentType is markdown
  • Remove invalid server configuration from package.json

v3.7.0

@tiptap/core

Minor Changes

  • All commands and their corresponding TypeScript types are now exported from @tiptap/core so they can be imported and referenced directly by consumers. This makes it easier to build typed helpers, extensions, and tests that depend on the command signatures.

    Why:

    • Previously some command option types were only available as internal types or scattered across files, which made it awkward for downstream users to import and reuse them.
    import { commands } from '@tiptap/core'

    Notes:

    • This is a non-breaking, additive change. It improves ergonomics for TypeScript consumers.
    • If you rely on previously private/internal types, prefer the exported types from @tiptap/core going forward.
  • Add comprehensive bidirectional markdown support to Tiptap through a new @tiptap/markdown package and Markdown utilities in @tiptap/core.

    New Package: @tiptap/markdown - A new official extension that provides full Markdown parsing and serialization capabilities using MarkedJS as the underlying Markdown parser.

    Core Features:

    Extension API

    • Markdown Extension: Main extension that adds Markdown support to your editor
    • MarkdownManager: Core engine for parsing and serializing Markdown
      • Parse Markdown strings to Tiptap JSON: editor.markdown.parse(markdown)
      • Serialize Tiptap JSON to Markdown: editor.markdown.serialize(json)
      • Access to underlying marked.js instance: editor.markdown.instance

    Editor Methods

    • editor.getMarkdown(): Serialize current editor content to Markdown string
    • editor.markdown: Access to MarkdownManager instance for advanced operations

    Editor Options:

    • contentType: Control the type of content that is inserted into the editor. Can be json, html or markdown - defaults to json and will automatically detect invalid content types (like JSON when it is actually Markdown).
      new Editor({
        content: '# Hello World',
        contentType: 'markdown'
      })

    Command Options: All content commands now support an contentType option:

    • setContent(markdown, { contentType: 'markdown' }): Replace editor content with markdown
    • insertContent(markdown, { contentType: 'markdown' }): Insert markdown at cursor position
    • insertContentAt(position, markdown, { contentType: 'markdown' }): Insert Markdown at specific position

    For more, check the documentation.

Patch Changes

  • The extension manager now provides a new property baseExtensions that contains an unflattened array of extensions

@tiptap/markdown

Minor Changes

  • Add comprehensive bidirectional markdown support to Tiptap through a new @tiptap/markdown package and Markdown utilities in @tiptap/core.

    New Package: @tiptap/markdown - A new official extension that provides full Markdown parsing and serialization capabilities using MarkedJS as the underlying Markdown parser.

    Core Features:

    Extension API

    • Markdown Extension: Main extension that adds Markdown support to your editor
    • MarkdownManager: Core engine for parsing and serializing Markdown
      • Parse Markdown strings to Tiptap JSON: editor.markdown.parse(markdown)
      • Serialize Tiptap JSON to Markdown: editor.markdown.serialize(json)
      • Access to underlying marked.js instance: editor.markdown.instance

    Editor Methods

    • editor.getMarkdown(): Serialize current editor content to Markdown string
    • editor.markdown: Access to MarkdownManager instance for advanced operations

    Editor Options:

    • contentType: Control the type of content that is inserted into the editor. Can be json, html or markdown - defaults to json and will automatically detect invalid content types (like JSON when it is actually Markdown).
      new Editor({
        content: '# Hello World',
        contentType: 'markdown'
      })

    Command Options: All content commands now support an contentType option:

    • setContent(markdown, { contentType: 'markdown' }): Replace editor content with markdown
    • insertContent(markdown, { contentType: 'markdown' }): Insert markdown at cursor position
    • insertContentAt(position, markdown, { contentType: 'markdown' }): Insert Markdown at specific position

    For more, check the documentation.

Patch Changes

  • Paste Handlers and onPaste plugin now respect shouldAutoLink/validate options

@tiptap/extensions

Patch Changes

  • Make the TrailingNode extension's node option optional and derive the default node type from the editor schema when available.

    Previously the extension used a hard-coded 'paragraph' default and the node option was required in the TypeScript definitions. This change:

    • makes node optional in the options type,
    • prefers the editor schema's top node default type when resolving the trailing node, and
    • falls back to the configured option or 'paragraph' as a last resort.

    This fixes cases where projects use a different top-level default node and prevents the extension from inserting an incorrect trailing node type.

v3.6.7

@tiptap/html

Patch Changes

  • Fix CVE-2025-61927 by bumping happy-dom to 20.0.0

    Bumps the transitive/dev dependency happy-dom from ^18.0.1 → ^20.0.0 in @tiptap/html to address CVE-2025-61927. This is a dependency/security-only change and does not modify any public APIs.

    Why:

    • happy-dom released a security fix for CVE-2025-61927; updating prevents the vulnerability being pulled into consumers that depend on @tiptap/html.

v3.6.6

@tiptap/extension-floating-menu

Patch Changes

  • Fixed a problem where the position of a menu is not updated on creation when shouldShow is true

@tiptap/extension-bubble-menu

Patch Changes

  • Fixed a problem where the position of a menu is not updated on creation when shouldShow is true

@tiptap/vue-3

Patch Changes

  • Fixed a bug that caused conditionally rendered bubble menus not to be attached to the DOM correctly

v3.6.5

@tiptap/extension-horizontal-rule

Patch Changes

  • Added nextNodeType option to horizontal-rule extension, allowing users to specify which node type should be inserted after a horizontal rule

@tiptap/html

Patch Changes

  • Fix: Clean up happy-dom window instance fixing a memory leak caused by unclosed happy-dom windows

@tiptap/core

Patch Changes

  • Editors can now emit transaction and update events before being mounted. This means smoother state handling and instant feedback from editors, even when they're not in the DOM.

v3.6.4

@tiptap/html

Patch Changes

  • Fix: Clean up happy-dom window instance fixing a memory leak caused by unclosed happy-dom windows

v3.6.3

@tiptap/react

Patch Changes

  • Updated the React FloatingMenu plugin hook dependencies to match the BubbleMenu behavior. The FloatingMenu will now respond to changes in appendTo, pluginKey, shouldShow, and options.
  • Resolved an issue where the React BubbleMenu did not update when FloatingUI option props changed after initial mount. The BubbleMenu now correctly responds to updated option props.
  • Improved the BubbleMenu's usability by ensuring the appendTo prop passed to the React BubbleMenu component is now correctly forwarded to the underlying bubble menu plugin. This fix allows developers to customize where the BubbleMenu is attached in the DOM, helping resolve issues with positioning and portal setups in React apps.

@tiptap/extensions

Patch Changes

  • The Selection extension now uses the correct SelectionOptions type, providing accurate typings for its options.

@tiptap/extension-code-block

Patch Changes

  • Configuration options for the CodeBlock extension now support null and undefined values. This makes custom setups more flexible and avoids unnecessary type errors when omitting optional overrides. All existing default values and fallback logic remain in place - no breaking changes for existing code.

@tiptap/core

Patch Changes

  • Refined the JSONContent.attrs definition to exactly mirror the structure returned by editor.getJSON(). This ensures strict type safety and consistency between the editor output and the expected type, eliminating errors caused by mismatched attribute signatures.

@tiptap/extension-table-of-contents

Patch Changes

  • Improve typings by inferring the storage type for the Table of Contents extension

@tiptap/extension-floating-menu

Patch Changes

  • You can now pass a callback to the appendTo option in the floating and bubble menu extensions. The callback must return an element synchronously, so menus can be appended to elements that are created dynamically.

@tiptap/extension-bubble-menu

Patch Changes

  • You can now pass a callback to the appendTo option in the floating and bubble menu extensions. The callback must return an element synchronously, so menus can be appended to elements that are created dynamically.

v3.6.2

@tiptap/extension-bubble-menu

Patch Changes

  • Fix a bug where the bubble menu could throw an error if the editor was destroyed while the plugin was cleaning up.

v3.6.1

@tiptap/react

Patch Changes

  • Hotfix: Fix a crash in the React package that could occur during mounting/unmounting when the editor wasn't fully initialized. This prevents a runtime error and improves stability.

v3.6.0

@tiptap/core

Patch Changes

  • Improve typing and docs for EditorOptions.element to reflect all supported mounting modes and align behavior across adapters.

    • element now accepts:
      • Element: the editor is appended inside the given element.
      • { mount: HTMLElement }: the editor is mounted directly to mount (no extra wrapper).
      • (editorEl: HTMLElement) => void: a function that receives the editor element so you can place it anywhere in the DOM.
      • null: no automatic mounting.

@tiptap/extension-table

Patch Changes

  • Parse cell colwidth from nearest <colgroup> when missing on the cell

    When importing HTML, table column widths are often declared on a surrounding <colgroup> rather than on each <td>. Previously, tableCell only read the colwidth attribute from the cell itself and would lose width information in that case. The implementation now falls back to reading the corresponding <col>'s width from the table's <colgroup> using the cell's index.

    This is a non-breaking bugfix that preserves layout information when HTML uses <colgroup>. Consider adding a small demo or unit test to assert colwidth is preserved for cells when only the <colgroup> contains width attributes.

  • Fixes table wrapper replacement and lost selections when resizable: true.

    TableView.ignoreMutation now ignores attribute/childList/characterData mutations that occur inside the table wrapper but outside the editable contentDOM, preventing wrapper re-creation during resize interactions so selections (e.g. mergeCells()) are preserved.

    No API or breaking changes.

@tiptap/extension-bubble-menu

Patch Changes

  • Remove recently added updateBubbleMenuPosition method because it would not work in the React and Vue versions of the BubbleMenu, only in the vanilla extension. And that would confuse developers.

    Write the transactionHandler method as an arrow function because arrow functions have no this, so the this remains the instance of the BubbleMenuView class.

@tiptap/extension-unique-id

Minor Changes

  • Create a utility to add unique IDs to a document in the server

    The utility is called generateUniqueIds and is exported from the @tiptap/extension-unique-id package.

    It has the same functionality as the UniqueID extension, but without the need to create an Editor instance. This lets you add unique IDs to the document in the server.

    It takes the following parameters:

    • doc: The Tiptap JSON document to add unique IDs to.
    • extensions: The extensions to use. Must include the UniqueID extension.

    It returns the updated Tiptap JSON document, with the unique IDs added to the nodes.

@tiptap/vue-3

Minor Changes

  • Pass attrs through Vue 3 menus

v3.5.3

@tiptap/extension-text-style

Patch Changes

  • Merge nested span styles only for immediate child spans and guard style values.

    • Replace non-standard/fragile selector approach and avoid re-processing nested <span> elements.
    • Read parent style once, merge with child style only when present, and remove empty style attributes.
    • Improves parsing performance and robustness in browsers, Node/JSDOM and tests.

    This change fixes a bug that could cause exponential work when parsing deeply nested <span> elements - in extreme cases that could make the tab unresponsive or crash the renderer. It is a bugfix / performance improvement with no public API changes.

v3.5.2

@tiptap/react

Patch Changes

  • Tiptap will now correctly insert a React MarkViews' content into the correct element within MarkViewContent component

v3.5.1

@tiptap/extension-floating-menu

Patch Changes

  • Add appendTo support to FloatingMenu and pass it through in React/Vue 2/Vue 3 for both BubbleMenu and FloatingMenu to allow fixing clipping/z-index issues.

@tiptap/react

Patch Changes

  • Add appendTo support to FloatingMenu and pass it through in React/Vue 2/Vue 3 for both BubbleMenu and FloatingMenu to allow fixing clipping/z-index issues.

@tiptap/vue-2

Patch Changes

  • Add appendTo support to FloatingMenu and pass it through in React/Vue 2/Vue 3 for both BubbleMenu and FloatingMenu to allow fixing clipping/z-index issues.

@tiptap/vue-3

Patch Changes

  • Add appendTo support to FloatingMenu and pass it through in React/Vue 2/Vue 3 for both BubbleMenu and FloatingMenu to allow fixing clipping/z-index issues.

2.4.0 (2024-05-14)

Bug Fixes

  • core: configure should use the parent of the current instance, to avoid duplication (#5147) (4db463c)
  • fix ts error for BubbleMenu and FloatingMenu in @tiptap/react (#5126) (baff4af)

Features

2.3.2 (2024-05-08)

Bug Fixes

2.3.1 (2024-04-30)

Note: Version bump only for package tiptap

2.3.0 (2024-04-09)

Bug Fixes

Features

  • core: apply input and paste rules when using insertContent methods (#5046) (96b6abc)

2.2.6 (2024-04-06)

Bug Fixes

  • unexpected renderText() for contentful nodes (#3410) (d6c71a8)

2.2.5 (2024-04-05)

Bug Fixes

  • Disallow only whitespace between markdown shortcuts delimiters (#4866) (aa029fe)
  • extension-link: Avoid auto-linking partial text for invalid TLDs (#4865) (4474d05)

2.2.4 (2024-02-23)

Bug Fixes

  • mark nocookie youtube url as valid when parsing html (#4883) (099e10d)
  • typecheck drag and clipboard events for testing environments (bbee9a3)

2.2.3 (2024-02-15)

Bug Fixes

2.2.2 (2024-02-07)

Bug Fixes

  • react: use ref instead of state in useEditor to prevent rerenders (#4856) (56a5737)

2.2.1 (2024-01-31)

Note: Version bump only for package tiptap

2.2.0 (2024-01-29)

Bug Fixes

2.2.0-rc.8 (2024-01-08)

Bug Fixes

  • core: fix options now being empty (fc67cb1)

2.2.0-rc.7 (2023-11-27)

Bug Fixes

  • core: set defaultOptions to undefined by default (448b433)

2.2.0-rc.6 (2023-11-23)

Reverts

  • Revert "fix/react-renderer-node-attrs (#4321)" (a4af83c), closes #4321
  • Revert "autolink improvement" (ef10ae5)

2.2.0-rc.4 (2023-10-10)

Bug Fixes

  • add missing attributes in extension-link (#4429) (0578265)
  • history: use correct shortcuts for undo/redo (520ce79)

Features

  • extension/youtube: Allow youtube shorts urls to be embedded (4d79cb8)

2.2.0-rc.3 (2023-08-18)

2.2.0-rc.1 (2023-08-18)

2.2.0-rc.0 (2023-08-18)

Features

  • placeholder: allow editor-is-empty class on any node (#4335) (ff929b1)

2.1.16 (2024-01-10)

Bug Fixes

  • core: fix new lines being added via elementFromString (#4767) (2235908)

Reverts

  • Revert "fix(extension-link): fix link not being kept when pasting url with link (#3975)" (1b34271), closes #3975

2.1.15 (2024-01-08)

Bug Fixes

  • core: fix insertContentAt keeping new lines in html content (#4465) (135a12f)
  • link: fix tests (d495d92)

Reverts

  • Revert "update package-lock" (faead69)

2.1.14 (2024-01-08)

Bug Fixes

  • typography: require spaces after divisions to not break date formats (#4696) (f6d7e00)

2.1.13 (2023-11-30)

Bug Fixes

  • react: fix performance regression because of select/deselect (#4661) (ad7f659)

2.1.12 (2023-10-11)

Bug Fixes

  • link: restore pasteHandler and add existing url check (#4523) (1a7b428)

2.1.11 (2023-09-20)

Reverts

2.1.10 (2023-09-15)

Note: Version bump only for package tiptap

2.1.9 (2023-09-14)

Bug Fixes

  • add missing attributes in extension-link (#4429) (74b6444)

2.1.8 (2023-09-04)

Note: Version bump only for package tiptap

2.1.7 (2023-09-04)

Bug Fixes

  • horizontal-rule: fix insertion being broken on empty docs (#4375) (2a83166)

2.1.6 (2023-08-18)

Bug Fixes

  • core: fix broken export (4227f32)

2.1.5 (2023-08-18)

Bug Fixes

2.1.4 (2023-08-18)

Bug Fixes

2.1.3 (2023-08-18)

Bug Fixes

  • fix autolink when code is not enabled for editor (#4344) (f2ac7b9)

2.1.2 (2023-08-17)

Bug Fixes

  • core: fix error when merging class attributes (#4340) (a251946)

2.1.1 (2023-08-16)

Note: Version bump only for package tiptap

2.1.0 (2023-08-16)

Note: Version bump only for package tiptap

2.1.0-rc.14 (2023-08-11)

Note: Version bump only for package tiptap

2.1.0-rc.13 (2023-08-11)

Bug Fixes

2.1.0-rc.12 (2023-07-14)

2.1.0-rc.11 (2023-07-07)

Bug Fixes

  • core: fix cut and insertContentAt functions (#4187) (6b65af8)
  • tests: fix link rel tests (c1d1854)

2.1.0-rc.10 (2023-07-07)

Bug Fixes

  • do not use window.open for links in readonly mode (#4073) (4bca77e)
  • extension-link: fixes link going to wrong url (#4078) (3053865)
  • link: Prevent auto-linking when typing URL inside inline code mark (#4160) (b24df3a)
  • react: check props.clientRect before creating ReactRenderer (#4138) (d710846)
  • react: update select state when text selection is around node (#4148) (5bd5bd4)

Features

2.1.0-rc.9 (2023-06-15)

2.1.0-rc.8 (2023-05-25)

2.1.0-rc.7 (2023-05-25)

2.1.0-rc.5 (2023-05-25)

Bug Fixes

  • extension-link: fix paste handling (d19267e)
  • typo in commands.md (a2a9822)

Features

2.1.0-rc.4 (2023-04-27)

Bug Fixes

  • link: fix links autolinking when not needed (#3989) (71946c1)

2.1.0-rc.3 (2023-04-26)

Bug Fixes

  • core: remove configure from extend functionality (4af54da)

2.1.0-rc.2 (2023-04-26)

Bug Fixes

  • extension-link: fix link not being kept when pasting url with link (#3975) (e7d7d49)

2.1.0-rc.1 (2023-04-12)

Bug Fixes

  • bubble-menu: fix debounce not working with collab/collaboration cursor (#3956) (e8cef04)

2.1.0-rc.0 (2023-04-05)

Bug Fixes

  • clear nodes when cursor at start of empty isolating parent (#3943) (7278ee2)
  • list-item: improve delete behaviour (09782a5)
  • lists: improve list behaviour (684e48a)
  • Update peerDependencies to fix lerna version tasks (#3914) (0c1bba3)

2.1.0-rc.12 (2023-07-14)

Note: Version bump only for package tiptap

2.1.0-rc.11 (2023-07-07)

Bug Fixes

  • core: fix cut and insertContentAt functions (#4187) (6b65af8)
  • tests: fix link rel tests (c1d1854)

2.1.0-rc.10 (2023-07-07)

Bug Fixes

  • do not use window.open for links in readonly mode (#4073) (4bca77e)
  • extension-link: fixes link going to wrong url (#4078) (3053865)
  • link: Prevent auto-linking when typing URL inside inline code mark (#4160) (b24df3a)
  • react: check props.clientRect before creating ReactRenderer (#4138) (d710846)
  • react: update select state when text selection is around node (#4148) (5bd5bd4)

Features

2.1.0-rc.9 (2023-06-15)

Bug Fixes

  • list-item: improve delete behaviour (09782a5)
  • lists: improve list behaviour (684e48a)

2.1.0-rc.8 (2023-05-25)

Note: Version bump only for package tiptap

2.1.0-rc.7 (2023-05-25)

Note: Version bump only for package tiptap

2.1.0-rc.6 (2023-05-25)

Note: Version bump only for package tiptap

2.1.0-rc.5 (2023-05-25)

Bug Fixes

  • extension-link: fix paste handling (d19267e)
  • typo in commands.md (a2a9822)

Features

2.1.0-rc.4 (2023-04-27)

Bug Fixes

  • link: fix links autolinking when not needed (#3989) (71946c1)

2.1.0-rc.3 (2023-04-26)

Bug Fixes

  • core: remove configure from extend functionality (4af54da)

2.1.0-rc.2 (2023-04-26)

Bug Fixes

  • extension-link: fix link not being kept when pasting url with link (#3975) (e7d7d49)

2.1.0-rc.1 (2023-04-12)

Bug Fixes

  • bubble-menu: fix debounce not working with collab/collaboration cursor (#3956) (e8cef04)

2.1.0-rc.0 (2023-04-05)

Bug Fixes

  • clear nodes when cursor at start of empty isolating parent (#3943) (7278ee2)
  • Update peerDependencies to fix lerna version tasks (#3914) (0c1bba3)

2.1.0-rc.0 (2023-04-05)

Bug Fixes

  • clear nodes when cursor at start of empty isolating parent (#3943) (7278ee2)
  • Update peerDependencies to fix lerna version tasks (#3914) (0c1bba3)
  • bubble-menu: fix debounce not working with collab/collaboration cursor (#3956) (a78f8cd)

2.0.3 (2023-04-13)

Bug Fixes

  • bubble-menu: fix debounce not working with collab/collaboration cursor (#3956) (e8cef04)

2.0.2 (2023-04-03)

Bug Fixes

  • react: fix rebinding events not overwriting editor.on (#3935) (64ab357)

Features

2.0.1 (2023-03-30)

Bug Fixes

  • Update peerDependencies to fix lerna version tasks (#3914) (0534f76)

2.0.0 (2023-03-29)

What's Changed