I'm using Draft.js Editor
component. I have a custom block renderer specified correctly via blockRendererFn
prop. The component renders the EditorBlock
imported from draft-js as advised in the Draft documentation. In the props I get in my custom block renderer I don't have the information whether the block is readonly or not. At least not by default. I could get it via blockProps
, however I feel I am missing something. Like it should work naturally when using the EditorBlock
. Like it could get the readOnly
value from context or something.
Is it my responsibility to render my block without the EditorBlock
when readOnly
is true
? And id it my responsibility to propagate the readOnly
value to my custom block renderer via blockProps
?