document is not defined in backend side (nodejs) #3233
Replies: 1 comment 1 reply
-
Little late at the party, I was also trying something similar, I was able to get it working using some browser mock api packages, like below Important: In extensions list, if you have Collaboration Extension, then it will give below error, but without it, it works.
Error: Unexpected content type in insert operation
at /home/node/app/node_modules/yjs/dist/yjs.cjs:5382:23
at Array.forEach ()
at typeListInsertGenericsAfter (/home/node/app/node_modules/yjs/dist/yjs.cjs:5353:11)
at typeListInsertGenerics (/home/node/app/node_modules/yjs/dist/yjs.cjs:5410:12)
at /home/node/app/node_modules/yjs/dist/yjs.cjs:7737:9
at transact (/home/node/app/node_modules/yjs/dist/yjs.cjs:3415:14)
at YXmlFragment.insert (/home/node/app/node_modules/yjs/dist/yjs.cjs:7736:7)
at file:///home/node/app/node_modules/y-prosemirror/src/plugins/sync-plugin.js:1125:20
at transact (/home/node/app/node_modules/yjs/dist/yjs.cjs:3415:14)
at Doc.transact (/home/node/app/node_modules/yjs/dist/yjs.cjs:562:12)
Also, as tiptap is based on prosemirror, if you search on google "prosemirror run on node js", you will find many things you can try, I am also trying them currently, will update here, if i found something. @patrickalima98 were you able to resolve the issue & get the setup working?, If yes, can you share what worked for you, did you used something different? |
Beta Was this translation helpful? Give feedback.
-
Hello how are you!
First of all, thank you so much for this amazing project!
I have a question, I'm developing a backend in which it should be possible to send parts of documents to update a document already created in the database.
I thought about using the Api
setContent
of the Editor instance, but when using the Editor on the backend (nodejs), I get the following error:How can I use an instance of the editor, so that I can insert or remove parts of the document, in the backend with nodejs. I couldn't find any information about it.
thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions