Skip to content

Content still gets removed after disabling collaboration on content errors #6927

@sbalay

Description

@sbalay

Affected Packages

core, extension-collaboration

Version(s)

3.0.0

Bug Description

Problem

When collaboration is enabled and invalid content is loaded (i.e. unknown node types), those invalid nodes get removed even if the suggested setup to deal with schema errors is implemented.

According to the tiptap code here, returning false on a beforeTransaction event handler should prevent the transaction from being applied but that's not what's happening.

Looking at the yjs code that dispatches the beforeTransaction event, it doesnt seem to care about the returned value: https://github.com/yjs/yjs/blob/main/src/utils/Transaction.js#L467

Browser Used

Chrome

Code Example URL

No response

Expected Behavior

Content should not be wiped out if the doc recommendations are implemented

Additional Context (Optional)

No response

Dependency Updates

  • Yes, I've updated all my dependencies.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Open SourceThe issue or pull reuqest is related to the open source packages of Tiptap.

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions