facebook / lexical

Lexical is an extensible text editor framework that provides excellent reliability, accessibility and performance.
https://lexical.dev
MIT License
19.39k stars 1.64k forks source link

Feature: Support YJS Subdocs with Collaboration #6065

Open jpulec opened 4 months ago

jpulec commented 4 months ago

Description

Currently, it seems that the LexicalCollaborationPlugin makes a lot of assumptions about there only being a single YJS doc and it being set at the root. When trying to use subdocs and only pass a subdoc as the primary doc to be used with lexical collaboration, things don't seem to quite sync correctly.

StyleT commented 4 months ago

Hi!

Actually subdocs are supported. Example would be the caption within the Image node (see playground code).