The XHTML WYSIWYG Editor For Desktop & Web Applications

Locking

In WYSIWYG mode, areas of content can be locked (made read-only). Elements can be locked by specifying the following CSS vendor-specific extension:

NameValuesInitial valueApplies toInherited?PercentagesMedia groups
-xs-lockyes | no | true | false | inheritnoallyesn/aall

The following example locks all elements except an element with ID "content":

  1. body {
  2. color: black;
  3. background-color: white;
  4. -xs-lock: yes;
  5. }
  6. #content {
  7. border: 1px dashed red;
  8. -xs-lock: no;
  9. }

The -xs-lock property can be added to a CSS file that is referenced by the following <param> tag:

  1. <param name="CSS" value="http://yourserver/format.css" />

Or it can be added to an editor specific CSS file referenced by the following <param> tag:

  1. <param name="EditorCSS" value="http://yourserver/editor.css" />

Locking properties can also be applied at run-time. Here is a Visual Basic example:

  1. XHTMLEditor1.EditorCSS = "h1 {-xs-lock: yes}"