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

Package detail

@tiptap/extension-color

ueberdosis2.7mMIT3.6.1TypeScript support: included

text color extension for tiptap

tiptap, tiptap extension

readme

@tiptap/extension-color

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