Closed Akshdhiwar closed 3 weeks ago
In the render
function of your component you have access to block
and editor
, so you can use editor.isEditable
to check whether you want to show or hide the block's menus or input fields. Hope that helps!
Thanks @matthewlipski for helping , working fine with props.editor.editable
.
I am trying to make a custom block as per the docs and now I want when the editable is false I don't want the user to access any of the input fields of the custom block.
As of now I'm referring to this docs to create custom block ( Alert block that is shown in docs)
So their is a menu which is been implemented which I don't want user to interact when editable is false.
So is their anything I'm missing out ? Is there any way I can know the editable is false and disable the menu ??
So need help regarding this , any leads would be appreciated! Thanks.