Skip to content

Develop <=> Main#7496

Merged
bdbch merged 4 commits intomainfrom
develop
Feb 3, 2026
Merged

Develop <=> Main#7496
bdbch merged 4 commits intomainfrom
develop

Conversation

@bdbch
Copy link
Member

@bdbch bdbch commented Feb 3, 2026

No description provided.

bdbch and others added 3 commits January 28, 2026 14:45
…7494)

* fix(react): simplify Tiptap component API and separate menu imports

- Remove isReady from TiptapContextType, editor is now always available
- Move BubbleMenu and FloatingMenu to @tiptap/react/menus entrypoint
- Add backwards-compatible instance prop (deprecated in favor of editor)
- Add helpful error when useTiptap is used outside provider

* Validate editor prop and update demo imports

Throw an error in TiptapWrapper when neither editor nor instance is
provided. Remove the forced cast and expand the deprecation comment to
note upcoming removal. Update demo example imports to use .js/.jsx file
extensions.

* Remove editor prop from BubbleMenu example
Reverts the Default React demo from using the new <Tiptap> component
wrapper back to the traditional useEditor + <EditorContent> pattern
with prop drilling. The MenuBar now receives the editor as a prop
and uses useEditorState for reactive updates.
Copilot AI review requested due to automatic review settings February 3, 2026 16:13
@netlify
Copy link

netlify bot commented Feb 3, 2026

Deploy Preview for tiptap-embed ready!

Name Link
🔨 Latest commit f7df678
🔍 Latest deploy log https://app.netlify.com/projects/tiptap-embed/deploys/69821ed18758bc0008a2e4e0
😎 Deploy Preview https://deploy-preview-7496--tiptap-embed.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@changeset-bot
Copy link

changeset-bot bot commented Feb 3, 2026

🦋 Changeset detected

Latest commit: f7df678

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 72 packages
Name Type
@tiptap/react Major
@tiptap/extension-drag-handle-react Major
@tiptap/core Major
@tiptap/extension-audio Major
@tiptap/extension-blockquote Major
@tiptap/extension-bold Major
@tiptap/extension-bubble-menu Major
@tiptap/extension-bullet-list Major
@tiptap/extension-code-block-lowlight Major
@tiptap/extension-code-block Major
@tiptap/extension-code Major
@tiptap/extension-collaboration-caret Major
@tiptap/extension-collaboration Major
@tiptap/extension-color Major
@tiptap/extension-details Major
@tiptap/extension-document Major
@tiptap/extension-drag-handle-vue-2 Major
@tiptap/extension-drag-handle-vue-3 Major
@tiptap/extension-drag-handle Major
@tiptap/extension-emoji Major
@tiptap/extension-file-handler Major
@tiptap/extension-floating-menu Major
@tiptap/extension-font-family Major
@tiptap/extension-hard-break Major
@tiptap/extension-heading Major
@tiptap/extension-highlight Major
@tiptap/extension-horizontal-rule Major
@tiptap/extension-image Major
@tiptap/extension-invisible-characters Major
@tiptap/extension-italic Major
@tiptap/extension-link Major
@tiptap/extension-list Major
@tiptap/extension-mathematics Major
@tiptap/extension-mention Major
@tiptap/extension-node-range Major
@tiptap/extension-ordered-list Major
@tiptap/extension-paragraph Major
@tiptap/extension-strike Major
@tiptap/extension-subscript Major
@tiptap/extension-superscript Major
@tiptap/extension-table-of-contents Major
@tiptap/extension-table Major
@tiptap/extension-text-align Major
@tiptap/extension-text-style Major
@tiptap/extension-text Major
@tiptap/extension-twitch Major
@tiptap/extension-typography Major
@tiptap/extension-underline Major
@tiptap/extension-unique-id Major
@tiptap/extension-youtube Major
@tiptap/extensions Major
@tiptap/html Major
@tiptap/markdown Major
@tiptap/pm Major
@tiptap/starter-kit Major
@tiptap/static-renderer Major
@tiptap/suggestion Major
@tiptap/vue-2 Major
@tiptap/vue-3 Major
@tiptap/extension-character-count Major
@tiptap/extension-dropcursor Major
@tiptap/extension-focus Major
@tiptap/extension-gapcursor Major
@tiptap/extension-history Major
@tiptap/extension-list-item Major
@tiptap/extension-list-keymap Major
@tiptap/extension-placeholder Major
@tiptap/extension-table-cell Major
@tiptap/extension-table-header Major
@tiptap/extension-table-row Major
@tiptap/extension-task-item Major
@tiptap/extension-task-list Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR merges changes from the develop branch to main, introducing a significant refactoring of the @tiptap/react package's Tiptap component API. The changes simplify the component API by guaranteeing a non-null editor instance from the useTiptap() hook and moving menu components to a separate optional entrypoint.

Changes:

  • Simplified TiptapContext to only provide a non-null editor instance, removing the isReady flag
  • Removed Tiptap.Loading, Tiptap.BubbleMenu, and Tiptap.FloatingMenu components from the main export
  • Moved BubbleMenu and FloatingMenu to @tiptap/react/menus to make floating-ui an optional dependency
  • Changed the primary prop name from instance to editor (with backwards compatibility for instance)
  • Updated workflow configuration to properly configure Slack notifications

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
packages/react/src/Tiptap.tsx Major refactoring of the Tiptap component: simplified context type, removed Loading/BubbleMenu/FloatingMenu components, changed prop naming, and updated all documentation
demos/src/Examples/Default/React/index.tsx Updated to use EditorContent directly instead of Tiptap wrapper, passing editor as prop to MenuBar
demos/src/Examples/Default/React/MenuBar.tsx Refactored from using useTiptap/useTiptapState hooks to receiving editor as prop and using useEditorState directly
.github/workflows/publish.yml Added required webhook and webhook-type parameters to Slack GitHub action configuration
.changeset/tiptap-nonnull-editor-calm-blue-sky.md Changeset documenting the simplified Tiptap component API
.changeset/separate-menu-imports-warm-summer-rain.md Changeset documenting the separation of menu components to optional entrypoint

Comment on lines 25 to +28
isReady: false,
get editor(): Editor {
throw new Error('useTiptap must be used within a <Tiptap> provider')
},
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The context default value uses a getter that throws an error when accessed. This is a good defensive pattern, but it will cause runtime errors during SSR or when components try to access the context before it's provided. Consider documenting this behavior or verifying that all code paths that access the editor handle this appropriately.

Note: This is acceptable if the design decision is to require the <Tiptap> provider for all uses of useTiptap(), but it represents a breaking change from the previous behavior where the context could return null.

Copilot uses AI. Check for mistakes.
Comment on lines +2 to +5
'@tiptap/react': minor
---

Simplified Tiptap component API with guaranteed non-null editor instance from useTiptap hook
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR removes several public APIs (Tiptap.Loading, Tiptap.BubbleMenu, Tiptap.FloatingMenu) and changes the behavior of useTiptap() to return a non-nullable editor. While the instance prop is kept for backwards compatibility, users relying on the removed components will experience breaking changes.

Verify that:

  1. The removed components were marked as experimental or beta, OR
  2. This follows the project's versioning policy for deprecations, OR
  3. This should be a major version bump

The changeset should clearly document what users need to migrate (e.g., how to replace Tiptap.Loading with custom logic, and that menus should now be imported from '@tiptap/react/menus').

Suggested change
'@tiptap/react': minor
---
Simplified Tiptap component API with guaranteed non-null editor instance from useTiptap hook
'@tiptap/react': major
---
This release simplifies the `Tiptap` component API and includes breaking changes:
- `useTiptap()` now returns a non-nullable editor instance. The `instance` prop is still accepted for backwards compatibility, but new code should rely on the hook’s return value instead of checking for `null`.
- The `Tiptap.Loading` component has been removed. Replace it with your own loading logic, for example by conditionally rendering a spinner or placeholder while waiting for the editor to be ready.
- `Tiptap.BubbleMenu` and `Tiptap.FloatingMenu` are no longer exported from `@tiptap/react`. Import menus from `@tiptap/react/menus` instead (for example, `import { BubbleMenu, FloatingMenu } from '@tiptap/react/menus'`).

Copilot uses AI. Check for mistakes.
Comment on lines 99 to 112
export type TiptapWrapperProps = {
/**
* The editor instance to provide to child components.
* Can be null during SSR or before initialization.
* Use `useEditor()` to create this instance.
*/
editor?: Editor

/**
* @deprecated Use `editor` instead. Will be removed in the next major version.
*/
instance: Editor | null
instance?: Editor

children: ReactNode
}
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The editor prop in TiptapWrapperProps is marked as optional (editor?: Editor), but the implementation throws an error if no editor is provided. This creates a mismatch between the TypeScript types and runtime behavior.

Consider making the prop required (editor: Editor) for the primary use case, or better yet, use TypeScript's type system to handle both cases properly with overloads. For example:

// When editor is provided, it's required
export type TiptapWrapperPropsWithEditor = {
  editor: Editor
  instance?: never
  children: ReactNode
}

// When using deprecated instance prop
export type TiptapWrapperPropsWithInstance = {
  editor?: never
  instance: Editor
  children: ReactNode
}

export type TiptapWrapperProps = TiptapWrapperPropsWithEditor | TiptapWrapperPropsWithInstance

This would provide better type safety and make the API clearer to users.

Copilot uses AI. Check for mistakes.
import React from 'react'

import { MenuBar } from './MenuBar.tsx'
import { MenuBar } from './MenuBar.jsx'
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The import extension was changed from '.tsx' to '.jsx' but the file 'MenuBar.tsx' has a TypeScript extension. The import should use '.tsx' to match the actual filename, or if you're using TypeScript path resolution that strips extensions, it should use '.js' for compatibility with ESM module resolution.

Suggested change
import { MenuBar } from './MenuBar.jsx'
import { MenuBar } from './MenuBar.tsx'

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +5
---
'@tiptap/react': minor
---

Simplified Tiptap component API with guaranteed non-null editor instance from useTiptap hook
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changeset description is too minimal and doesn't explain the breaking changes or migration path. Users need to know that:

  1. The instance prop is deprecated in favor of editor
  2. Tiptap.Loading, Tiptap.BubbleMenu, and Tiptap.FloatingMenu are removed
  3. useTiptap() now returns a non-null editor (unless SSR with immediatelyRender: false)
  4. BubbleMenu and FloatingMenu should now be imported from '@tiptap/react/menus'

Consider expanding the changeset to explain what users need to change in their code.

Copilot generated this review using guidance from repository custom instructions.
editor?: Editor

/**
* @deprecated Use `editor` instead. Will be removed in the next major version.
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The deprecation of the instance prop is not properly communicated to users via TypeScript. Consider adding a @deprecated JSDoc comment to the instance property in the TiptapWrapperProps type to help IDEs show deprecation warnings to developers.

Suggested change
* @deprecated Use `editor` instead. Will be removed in the next major version.
* Legacy editor instance prop kept for backwards compatibility.
*
* @deprecated Use the `editor` prop instead. This prop will be removed in the next major version.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant