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

Package detail

@tiptap/react

ueberdosis7.1mMIT3.6.6TypeScript support: included

React components for tiptap

tiptap, tiptap react components

readme

Tiptap Editor

LFX Health Score Build Status Version Downloads License Chat Sponsor

Tiptap Editor

The Tiptap Editor is a headless, framework-agnostic rich text editor that's customizable and extendable through extensions. Its headless nature means it comes without a set user interface, offering full design freedom (for a jumpstart, see linked UI templates below). Tiptap is based on the highly reliable ProseMirror library.

Tiptap Editor is complemented by the collaboration open-source backend Hocuspocus. Both the Editor and Hocuspocus form the foundation of the Tiptap Suite.

How does the Tiptap Editor work?

  • Headless Framework: Tiptap does not rely on a user interface. So there is no need for class overrides or code hacks. If you do need an example UI feel free to browse our UI templates linked below.
  • Framework-agnostic: The Tiptap Editor is designed to work across different frontend frameworks. This means whether you're using Vue, React, or plain JavaScript, Tiptap integrates without compatibility issues.
  • Extension based: Extensions in Tiptap allow for a tailored editing experience, from simple text styling to advanced features like drag-and-drop block editing. You have the option to choose from over 100 extensions available in the documentation and community to enhance your editor's functionality.
  • Customize your UX: The editor was built to give you control to define your own extensions and nodes.

Editor Pro Extensions

The Pro Extensions are a set of advanced functionalities that enhance the capabilities of the Tiptap Editor. They are additional features that can be integrated into the base editor to provide more sophisticated editing options.

Key functionalities include collaborative editing, commenting, versioning, document conversion and AI related features. Review the docs right here.

Pro Extensions need a valid subscription.

Make your editor collaborative

Interested in collaborative editing? Check out our open-source package Hocuspocus - a collaboration backend built around the CRDT power of Yjs. Hocuspocus serves as the backbone for the Tiptap Suite.

Documentation

For more detailed information, make sure to check out our documentation. If you encounter any problems or have suggestions for our system, please open an issue.

Examples, CodeSandbox and UI Templates

Have a look at the examples to see Tiptap in action or review and fork our codesandboxes.

About Tiptap

Tiptap is a collection of developer components based on open-source technology, forming the basis of our advanced, paid features. It includes the open-source editor component, collaboration features, Content AI, and Tiptap Cloud. We are developing open-source products that also shape our paid features. We're committed to improving both, ensuring quality and reliability in every update.

For more details, visit the Tiptap documentation or website.

Community

For help, discussion about best practices, or any other conversation that would benefit from being searchable:

Discuss Tiptap on GitHub

Sponsors 💖


Complish

Storyblok

PostHog

Reflect

Ziff Media

Basewell

Poggio

iFixit, ApostropheCMS, Novadiscovery, Omics Data Automation, Flow Mobile, DocIQ and hundreds of awesome individuals.

Contributing

Feel like adding some magic of your own to Tiptap Editor Core? We welcome contributions! Please see our CONTRIBUTING guidelines for how to get started.

Contributors

Sam Willis, Brian Hung, Dirk Holtwick, Sam Duvall, Christoph Flathmann, Erick Wilder, Marius Tolzmann, jjangga0214, Maya Nedeljkovich, Ryan Bliss, Gregor and many more.

License

The MIT License (MIT). Please see License File for more information.

changelog

Releases

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