Open imryanjay opened 3 years ago
Could be an additional property to each Block in data.
blocks: [
{
"type": "paragraph",
"data": {
"text": "Hello World",
},
"config": {
"readOnly": true,
}
},
]
Wonderful feature, hope to use it.
+1 to this feature!
Is this function implemented?
I'd like to use editor.js to create simple forms / survey type pages and then display the page in readonly mode but allow the viewer to enter data in to textbox, checkbox, radio button fields and then have that data saved. This feature would help with this but maybe not deliver the full functionality
I'd like to use editor.js to create simple forms / survey type pages and then display the page in readonly mode but allow the viewer to enter data in to textbox, checkbox, radio button fields and then have that data saved. This feature would help with this but maybe not deliver the full functionality
actually looking into editorjs for this as well, is there a solution to this by now?
When you create form elements, save them to database and let form owners edit the forms, the block name / id should never change again or data structure would constantly change for the same form...
ps: actually, it's probably enough if removing a form element can be disabled. Not sure yet, but that should be possible
With the great addition to ReadOnly setting the entire editor to contentEditable=false, it would great to implement this on a per block basis.
An example use case could be blocks received from an API where a parent user has set certain blocks that must be in an editor, while allowing a child user the ability to add / edit more.
a Block.ReadOnly could function the same as the editorJS readOnly by disabling the inline toolbar, as well as block settings.
To currently achieve this, I am passing readOnly: true to a block's data object
Disabling contentEditable on the Block element, then hiding the inline toolbar and block settings button. Works, but not ideal.
Thoughts on this as a feature?