You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to get the header block at the first position of the editor, as soon as it is opened. It should be possible with initialBlock configuration of editorJS, but does not seem to do the job. I get an error saying This block can not be displayed.
Is initialBlock config not meant to do this job ?
The text was updated successfully, but these errors were encountered:
The problem is the value you are sending to the initialBlock key. The value should be the key defined in the tools object as a string and not the imported class. You can refer the documentation here
The initialBlock is not designed for this purpose, because it is actually the default block that will be created on each Enter press. It is not the thing you want, I think.
If you want to init an empty editor with the header as the first block, pass it as data property:
newEditorJS({// other options...data: {blocks: [{type: 'header',data: {text: '',level: 2}},]},})
I want to get the header block at the first position of the editor, as soon as it is opened. It should be possible with initialBlock configuration of editorJS, but does not seem to do the job. I get an error saying
This block can not be displayed
.Is initialBlock config not meant to do this job ?
The text was updated successfully, but these errors were encountered: