BlockNote icon indicating copy to clipboard operation
BlockNote copied to clipboard

Can we create isEditable field for each block?? It will be awsome

Open Adiyasa26 opened this issue 2 years ago • 1 comments

Hello guys I'm new here, and the past few months I've been learning about the tiptap and prosemirror tools. Here I actually have an idea about creating a project but I have a problem that is whether tiptap or prosemirror itself cannot create a WYSWYG document that is partly editable and partly uneditable.

As far as I found, in tiptap or prosemirror, or maybe in blocknotejs itself, only the editor can be toggled to enable editing or not, not each block or node.

I searched the community of prosemirror itself and found very little about this. Can I get help here, please

[CLUE] But I found a clue from the prosemirror documentation but it's still incomplete and I don't know where to find a more complete one. It says isAtom or atom, which means for each node is not as free to do editing, but I don't know if this is right for my solution or not, again, I don't know how to implement it. Is there anyone who can give me an overview or even a feature on this blocknotejs? Thanks

Adiyasa26 avatar Nov 15 '23 13:11 Adiyasa26

I think an ideal solution would be one that doesn't require editing the underlying ProseMirror schema. You make a good point with isAtom, but that would require being able to change each block/node's definition on the fly, which AFAIK isn't possible. One solution might be to create non-editable equivalents of each editable block type, but I don't think that's a great approach either. While I think this is a fairly niche use case, we'll probably look deeper into it at some point in the future👍

matthewlipski avatar Dec 05 '23 13:12 matthewlipski