Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

CollaborationExtension registered at runtime installs no sync plugin, so edits never reach the Y.Doc

Aberta
#3,175 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 2 dias

@adarshsm já está trabalhando nisso.

Desde 10/10/2026.

  • #3178 de @adarshsm — aberto

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
25/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
react, typescript
Domínio
frontend, web-dev

Direção de pesquisa

Start in ExtensionManager.replaceExtension, which installs the plugins of the extension passed in but skips its nested blockNoteExtensions; CollaborationExtension is where YSync, YCursor and YUndo live. Reproduce by creating an editor without the collaboration option and registering CollaborationExtension at runtime, then check whether the Y.XmlFragment changes after typing. Done means nested extensions are installed on runtime registration, or registration throws when they cannot be.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

Version: BlockNote 0.55 (@blocknote/core, @blocknote/react)

What happens

Collaboration registered on an editor that already exists doesn't sync. The editor becomes editable, typing works locally, and nothing is written to the Y.XmlFragment, so edits are silently lost.

We create a read-only editor without collaboration (fed a static snapshot, no provider). When the user switches to editing, we attach collaboration to that same editor instead of remounting it, which keeps scroll position and node views stable.

Cause (from reading the source)

ExtensionManager.replaceExtension installs the ProseMirror plugins of the extension it is given, but not those of that extension's nested blockNoteExtensions. For CollaborationExtension, the nested ones carry the actual plugins: YSync, YCursor, YUndo and the rest. So none of them are installed.

Workaround

Registering the sub-extensions flat works, in this order (the cursor plugin reads the sync plugin's state in its init):

  • YSync
  • YCursor
  • YUndo
  • ForkYDoc
  • RelativePositionMapping
  • SchemaMigration

FixUpSchemaExtension is not exported, so it can't be registered that way.

Repro
  1. Create an editor without the collaboration option.
  2. Register CollaborationExtension at runtime, with a Y.XmlFragment and a provider.
  3. Type in the editor.
  4. The fragment stays empty, and other clients see nothing.
Expected

Either nested blockNoteExtensions are installed when an extension is registered at runtime, or registering an extension whose nested extensions can't be installed throws instead of failing silently. A documented way to attach collaboration to an existing editor would also help.

Linguagem predominante
TypeScript
Estrelas
10.3k
Forks
778
Merge médio
2d 12h
PRs com merge (30d)
27

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de TypeCellOS/BlockNote

Todas as issues de TypeCellOS/BlockNote

Issues semelhantes

Mais issues de TypeScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.