As you can see, I got a crash flash when I typing the first character… but if there are contents inside a paragraph block, my input method just work as expected…
does this also occur without Yjs? I.e. can you add a ProseMirror widget to the last position of the document and reproduce the issue? y-prosemirror only interacts with ProseMirror through the ProseMirror API. The y-prosemirror cursor plugin simply adds a widget to the ProseMirror editor.
我遇到了同样的问题,发现是这个插件的原因
Machine translation: I encountered the same problem and found that it was the reason for this plugin
// @tiptap-pro/extension-unique-id
...
// check initial content for missing ids
onCreate() {
// Don’t do this when the collaboration extension is active
// because this may update the content, so Y.js tries to merge these changes.
// This leads to empty block nodes.
// See: https://github.com/ueberdosis/tiptap/issues/2400
if (this.editor.extensionManager.extensions.find((extension) => extension.name === 'collaboration')) {
return
}
新文档的一个节点没有 id
Machine translation: A node in the new document does not have an ID