Cute Editor for ASP

Add uneditable regions to a Template

Add uneditable regions to a Template


This section describes how to create non-editable sections of content in WYSIWYG mode. For instance, you may wish to prevent the user from changing the text in a paragraph or table cell.

To make a section of content in the editor unchangable, use these two attributes: CONTENTEDITABLE and UNSELECTABLE. Combined, these two attributes prevent a section of HTML, typically a paragraph or block of text enclosed in DIV or SPAN tags, from being selected and modified. The section can still be deleted. And, if the user switches to View As HTML mode, then the content can be changed.

If the item has properties, like table cells, the properties can still be changed. Add these attributes to content that will be loaded into the editor. The HTML elements they apply to will appear in the editor, but won't be editable. Set contenteditable="false" and unselectable="on".
 
Example:

 

References

Microsoft documentation on the UNSELECTABLE Attribute.

Microsoft documentation on the CONTENTEDITABLE Attribute.