Closed iamandrewluca closed 4 years ago
Conversation by email:
We don't have that feature by default but you can try to set contenteditable attribute to false. Please take a look at this example: https://jsfiddle.net/dejan_m/v0cLs9pf/100/.
This it seems to work but only for each element in particular. Even if attribute is added editor toolbar is still appears with disabled buttons.
Looking at the spec of contenteditable
it says
If this attribute is missing or its value is invalid, its value is inherited from its parent element: so the element is editable if its parent is editable. https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/contenteditable
I would suggest 2 improvements.
contenteditable="false"
on parent elementscontenteditable="false"
was found in hierarchy do not show editor toolbar at all.The user should be able to set non-editable attribute to the parent element. I have submitted this issue to development, but a timeline has not yet been established for a fix.
Please subscribe to https://www.froala.com/pages/download#updates to see the latest updates on new releases.
Regarding your second suggestion, in case of the non-editable element, a disabled toolbar is the default behavior in the Froala Editor.
Please take a look at this example: https://jsfiddle.net/dejan_m/og0hxf2t/3782/. In future releases, the user will be able to use the editor events in Pages and for example, calls the toolbar.hide() method in case of the disabled toolbar.
Is it possible to make the Froala Editor scrollable while the controll/screen is disabled/readonly?
I'm doing some tests with
froala-pages
anddesign-blocks
to see if it fits my requirements. As I saw it useswysiwyg-editor
for inline editing.Is there any way to mark some blocks as readonly, so the editor could not edit them?