Skip to content

Feature: Support storing Y.Map as a NodeState value #7293

Open

Description

@etrepum

Description

Currently, the NodeState/Yjs integration only allows "JSON" values to be stored as NodeState values. The NodeState itself is stores as a Y.Map, but you can not nest other shared data structures in it.

For situations where you would be collaborating on a subset of that value (e.g. a list of comments on a particular node) it would make sense to use a shared data type.

Impact

It will be possible to do things with NodeState that you must currently do manually with Yjs outside of the lexical document.

Activity

  1. added
    enhancement
    on Mar 5, 2025
  2. etrepum commented on Oct 6, 2025

    @etrepum
    CollaboratorAuthor

    This might not be feasible with collab v2 (at least for TextNode) because it has to serialize NodeState to string attributes, although I think most use cases can live with that restriction since it's probably more applicable to ElementNode and DecoratorNode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions