fix: get POC running on the latest version of blocknote again#2
fix: get POC running on the latest version of blocknote again#2nperez0111 wants to merge 3 commits intomainfrom
Conversation
hocuspocus-server/src/setMark.ts
Outdated
| // TODO to get this to work, I needed to pass a copy of the comment mark to get it into the schema | ||
| comments: Mark.create({ | ||
| name: "comment", | ||
| excludes: "", | ||
| inclusive: false, | ||
| keepOnSplit: true, | ||
| group: "blocknoteIgnore", // ignore in blocknote json |
There was a problem hiding this comment.
We need to figure out what to do about this...
There was a problem hiding this comment.
good catch! this was a leftover, it's been fixed already. will make a PR
|
what does this fix exactly? can you explain what was broken? Was something broken before, or only after upgrading to 0.25.1? |
|
If you were to install this with 0.25.0, the example doesn't work, because we changed several things before releasing and this was built while we were still building out comments. For example:
|
|
Ok thanks!! Will review tomorrow :)
Op di 11 mrt 2025 16:03 schreef Nick Perez ***@***.***>:
… If you were to install this with 0.25.0, the example doesn't work, because
we changed several things before releasing and this was built while we were
still building out comments.
For example:
- certain imports needs to be pulled from @blocknote/core/comments
since they were split out
- comments are not available as part of the schema by default, they
are opt-in. So, setMark was not working, I copied over the comments mark,
because it was easier than trying to enable comments on the server side
(because it was expecting a whole threadstore implementation and other
things that we didn't really need)
- some of the types had changed, like comment role to commenter
- yjs was throwing the duplicated error at me so I just re-enabled
that for everyone
—
Reply to this email directly, view it on GitHub
<#2 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAC2BWKXKAODOP4MYBGDTQL2T33NTAVCNFSM6AAAAABYOUUUJOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOMJUGY3TMNJXGM>
.
You are receiving this because your review was requested.Message ID:
***@***.***
com>
[image: nperez0111]*nperez0111* left a comment
(TypeCellOS/BlockNote-demo-nextjs-hocuspocus#2)
<#2 (comment)>
If you were to install this with 0.25.0, the example doesn't work, because
we changed several things before releasing and this was built while we were
still building out comments.
For example:
- certain imports needs to be pulled from @blocknote/core/comments
since they were split out
- comments are not available as part of the schema by default, they
are opt-in. So, setMark was not working, I copied over the comments mark,
because it was easier than trying to enable comments on the server side
(because it was expecting a whole threadstore implementation and other
things that we didn't really need)
- some of the types had changed, like comment role to commenter
- yjs was throwing the duplicated error at me so I just re-enabled
that for everyone
—
Reply to this email directly, view it on GitHub
<#2 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAC2BWKXKAODOP4MYBGDTQL2T33NTAVCNFSM6AAAAABYOUUUJOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOMJUGY3TMNJXGM>
.
You are receiving this because your review was requested.Message ID:
***@***.***
com>
|
| // needed to get the pmSchema | ||
| // if you use a BlockNote custom schema, make sure to pass it to the create options | ||
| const editor = ServerBlockNoteEditor.create(); | ||
| const editor = ServerBlockNoteEditor.create({ |
There was a problem hiding this comment.
let's try with just passing comments to the editor options before merging this, I think that should work right?
There was a problem hiding this comment.
I had tried this, but it wanted a ydoc I think. Maybe your PR will help this
We are going to need an easy way to get the comments extension into the server editor if we are going to use this approach. Either via an option on creating the editor instance or otherwise exposing that plugin to have it in the schema.
I wonder if we need to do all of this though, can't we just make an editor on the server and give it the normal collab options and use editor methods to manipulate the document? May be worht testing, but isn't pertitent to what I'm trying to do at the moment which is the auth part