fix(collaboration): move content validation from beforeTransaction to filterTransaction#7600
Open
dearlordylord wants to merge 2 commits intoueberdosis:mainfrom
Open
Conversation
✅ Deploy Preview for tiptap-embed ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
🦋 Changeset detectedLatest commit: a832c30 The changes in this PR will be included in the next version bump. This PR includes changesets to release 72 packages
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 |
4c50365 to
c75344d
Compare
bdbch
requested changes
Mar 15, 2026
@tiptap/core
@tiptap/extension-audio
@tiptap/extension-blockquote
@tiptap/extension-bold
@tiptap/extension-bullet-list
@tiptap/extension-code
@tiptap/extension-bubble-menu
@tiptap/extension-code-block
@tiptap/extension-code-block-lowlight
@tiptap/extension-collaboration
@tiptap/extension-color
@tiptap/extension-collaboration-caret
@tiptap/extension-details
@tiptap/extension-drag-handle
@tiptap/extension-document
@tiptap/extension-drag-handle-react
@tiptap/extension-drag-handle-vue-2
@tiptap/extension-drag-handle-vue-3
@tiptap/extension-emoji
@tiptap/extension-file-handler
@tiptap/extension-floating-menu
@tiptap/extension-font-family
@tiptap/extension-hard-break
@tiptap/extension-highlight
@tiptap/extension-horizontal-rule
@tiptap/extension-image
@tiptap/extension-italic
@tiptap/extension-invisible-characters
@tiptap/extension-link
@tiptap/extension-list
@tiptap/extension-mathematics
@tiptap/extension-mention
@tiptap/extension-node-range
@tiptap/extension-paragraph
@tiptap/extension-ordered-list
@tiptap/extension-strike
@tiptap/extension-subscript
@tiptap/extension-superscript
@tiptap/extension-table
@tiptap/extension-table-of-contents
@tiptap/extension-text
@tiptap/extension-text-align
@tiptap/extension-text-style
@tiptap/extension-twitch
@tiptap/extension-typography
@tiptap/extension-underline
@tiptap/extension-unique-id
@tiptap/extension-youtube
@tiptap/extensions
@tiptap/html
@tiptap/markdown
@tiptap/pm
@tiptap/starter-kit
@tiptap/react
@tiptap/static-renderer
@tiptap/suggestion
@tiptap/vue-2
@tiptap/vue-3
@tiptap/extension-character-count
@tiptap/extension-dropcursor
@tiptap/extension-gapcursor
@tiptap/extension-focus
@tiptap/extension-history
@tiptap/extension-list-item
@tiptap/extension-list-keymap
@tiptap/extension-placeholder
@tiptap/extension-table-cell
@tiptap/extension-table-header
@tiptap/extension-table-row
@tiptap/extension-task-item
@tiptap/extension-task-list
@tiptap/extension-heading
commit: |
c75344d to
d5908b2
Compare
Author
|
I'll get back on 3rd comment soon. Tackled the 1 and 2 comments now because that case was more obvious |
bdbch
requested changes
Mar 16, 2026
Member
bdbch
left a comment
There was a problem hiding this comment.
Could you please add a changeset that describes what your PR will fix/change?
d5908b2 to
1421d6f
Compare
Author
|
Added a changeset |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #6927
Problem
enableContentCheck+onContentErrordon't work for collaboration:beforeTransactionreturn value is ignored by Yjs -return falseis a no-opbeforeTransactionreads pre-transaction state viayXmlFragmentToProsemirrorJSON(fragment)- the first corrupt transaction is invisiblefilterTransactionalways returnstrue- the TODO at line 260 confirms this was known-incompleteFix
Remove
beforeTransaction. Move validation intofilterTransaction:transaction.doc.check()validates post-transaction statereturn falseis respected by ProseMirror - transaction is rejectedisChangeOrigin(transaction)targets only Yjs sync transactions!docChanged) pass through unvalidatedisDisabled, emitscontentErrorwithdisableCollaborationcallback