Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

This element provides the code view settings for use within Ephox EditLive!. 

Configuration Element Tree Structure

<editLive>
<sourceEditor>

Code Block
<editLive>
     ...
     <sourceEditor ... />
     ...
</editLive>

Optional Attributes

showBodyOnly

This attribute is a boolean and can only be true or false. If set to true, only the HTML between the body tags will be shown in Code View mode. HTML outside of the body (eg. style information) will be maintained.

Default Value: false

enabled

If set to true, users will be able to access the Code View for documents. This attribute is a boolean and can only be true or false.

Default Value: true

Example

The following example would ensure that only the content between the <BODY> tags was displayed.

Code Block
<editLive>
     ...
     <sourceEditor showBodyOnly="true" />
     ...
</editLive> 

The following example would allow users to view the source code of a document within EditLive!.

Code Block
<editLive>
     ...
     <sourceEditor enabled="true" />
     ...
</editLive>

Remarks

The <sourceEditor> element can appear only once within the <editLive> element.

If the <sourceEditor> element is to be left blank the element must then be a complete tag; it cannot contain a tag body. Therefore, the tag must be closed in the same line. It should appear as below:

Code Block
<sourceEditor showBodyOnly="false"/>