Sections of content to be loaded into EditLive! can be marked as being read-only. EditLive! uses the contenteditable HTML attribute to indicate whether an element and its children are editable within EditLive!. If contenteditable is set to false, then the content of that element and its child elements become read-only.
The following example demonstrates how to create a read-only section within a document. The DIV with the text <div>This is <b>read only</b> content.</div> will be read-only.
Inheritance for Read-Only Content
When an element is marked as read-only, all its child elements are also created as read-only sections. However, the read-only property can be overwritten for specific child elements. This is achieved by explicitly setting the contenteditable attribute to true for that element. The following example demonstrates how to create a read-only parent element (a div) with an editable child element (a paragraph element).
Setting an Entire HTML Document as Read-Only Using the Load-Time Properties
Using the contendeditable attribute of the <body> Configuration File element, developers can specify whether content is read-only. Developers can also use the setReadOnly Method to define whether the editor's contents are read-only.