Skip to content

Collaborative Editable Voids #279

Answered by BitPhinix
Bartlett-Will asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @Bartlett-Will,

It's hard to give you specific advice for your implementation without knowing more details but the first thing I would try is to avoid nested editors to avoid the overhead of having multiple slate instances on the same page. While it isn't obvious in a lot of cases it is almost always doable and the better way to go.

If you can't avoid nested editors you could reference the nested doc by key and use a different shared type for it. E.g.

const doc = new Y.Doc();

// Main editor
const sharedType = doc.getArray<SyncElement>('content');
const yjsEditor = withYjs(editor, sharedType);

// Nested editor
const nestedEditorSharedType = doc.getArray<SyncElement>('nested-id'); // R…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@Bartlett-Will
Comment options

@BitPhinix
Comment options

@Bartlett-Will
Comment options

@Bartlett-Will
Comment options

@BitPhinix
Comment options

Answer selected by Bartlett-Will
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants