TypeCellOS / BlockNote

A React Rich Text Editor that's block-based (Notion style) and extensible. Built on top of Prosemirror and Tiptap.
https://www.blocknotejs.org/
Mozilla Public License 2.0
6.07k stars 411 forks source link

render sidemenucontroller when editor editable field is set to false. #701

Open sijirama opened 3 months ago

sijirama commented 3 months ago

Is your feature request related to a problem? Please describe. basically i'll like to be able to use the sidemenu controller when the editor editable field is set to false.

Describe the solution you'd like to be able to use the sidemenu controller when editable field is false.

Describe alternatives you've considered i genuinely do not know, maybe another field passed to the editor called, showSideMenu, that defaults to false.

Additional context Screenshot from 2024-04-11 23-57-54

sijirama commented 3 months ago

i can attempt this , never mind.

i don't know how you would like this to be set, if you even want this to be set, you pass in sideMenu and editable already, would you like another option to be passed to handle this?

matthewlipski commented 1 month ago

Ah, the reason you're running into this issue is it's not the controller that figures out when and for which block the side menu should be shown. That's done by the side menu plugin, and the controller uses information from it to show, hide, and position the side menu in the UI.

So unfortunately, this isn't possible atm but it may be a good idea to let people configure which UI elements can remain active when the editor is read-only. Thoughts on this @YousefED?