Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Description

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

Configuration Element Tree Structure

<editLive>
<sourceEditor>

<editLive>
     ...
     <sourceEditor ... />
     ...
</editLive>

Optional Attributes

showBodyOnly

If set to true only the HTML between the body tags will be shown in HTML View mode. HTML outside of the body (eg. style information) will be maintained.

If the AutoSubmit load-time property is set to true, when a HTML form containing EditLive! for Java is submitted a hidden form field will be populated with the contents of the code view of EditLive! for Java.

Default Value: false

Note: This attribute is a boolean and can only be true or false.

errorDialog

If set to "simple" then HTML errors are not silently corrected when switching back to design view. Instead, the error will be displayed to the user and the editor will remain in code view until the error is fixed.

enabled

If set to true users will be able to access the Code view for documents.

Default Value: true

Note: This attribute is a boolean and can only be true or false.

Example

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

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

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

<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:

<sourceEditor showBodyOnly="false"/>
  • No labels