Class: XMLEditorApp

XMLEditorApp()

A sample XML editor application which leverages XMLEditor.

Also implements a number of interactive actions (static methods) like newDocument, closeDocument, etc, which may be used independently from XMLEditorApp.

Constructor

new XMLEditorApp()

Constructs a sample XML editor application, the implementation of custom HTML element <xxe-app>.
Source:

Classes

XMLEditorApp

Members

autoRecover :boolean

A cover for XMLEditor#autoRecover.
Type:
  • boolean
Source:

autoSave :string

Get/set the autoSave property of this XML editor application.

Default: none; files are not automatically saved.

The value of this property is a string which has the following syntax:

value -> mode [ S interval ]? [ S enabled ]?
mode -> local|remote|both 
interval -> strictly_positive_number s|m|h
enabled -> on|off

Examples: "remote", "both 2m", "remote 30s on", "both off".

Autosave modes are:

  • local: automatically save local files (when this is technically possible, i.e. on Chrome, not on Firefox).
  • remote: automatically save remote files.
  • both: automatically save both local and remote files.

Autosave interval units are:

  • s: seconds.
  • m: minutes.
  • h: hours.

Default interval is "30s". Minimal interval is "10s".

The default value of enabled is "on". This flag specifies whether the autosave feature is initially enabled. User may change this setting at anytime using the UI.

Type:
  • string
Source:

button2PastesText :boolean

Type:
  • boolean
Source:

checkLeaveApp :boolean

Get/set the checkLeaveApp property of this XML editor application.

Default: true. If true and the document being edited has unsaved changes then ask users to confirm if they really want to leave the page and loose their changes.

Type:
  • boolean
Source:

clientProperties :string

Type:
  • string
Source:

documentStorage :string

Get/set the documentStorage property of this XML editor application.

The values of the documentStorage property are:

"local"
Default value. Create and edit only local files, that is, files which are found on the computer running the web browser hosting this XML editor application.
"remote"
Create and edit only remote files, that is, files which are accessed on the server side by xxeserver.
"both"
Local files and remote files are both supported.
Type:
  • string
Source:

serverURL :string

A cover for XMLEditor#serverURL.
Type:
  • string
Source:

Methods

(static) closeDocument(xmlEditor)

Close the document being edited in specified XML editor.

If this document has unsaved changes, the user will have to confirm whether she/he really wants to discard these changes.

This static method in invoked by button Close but may be used independently from XMLEditorApp.

Parameters:
Name Type Description
xmlEditor XMLEditor the XML editor.
Source:

(static) newDocument(xmlEditor)

Open a newly created local document in specified XML editor.

This static method in invoked by New|New Local Document but may be used independently from XMLEditorApp.

Parameters:
Name Type Description
xmlEditor XMLEditor the XML editor.
Source:

(static) newRemoteFile(xmlEditor)

Open a newly created remote document in specified XML editor.

This static method in invoked by New|New Remote Document but may be used independently from XMLEditorApp.

Parameters:
Name Type Description
xmlEditor XMLEditor the XML editor.
Source:

(static) openDocument(xmlEditor)

Open an existing local document in specified XML editor.

This static method in invoked by Open|Open Local Document but may be used independently from XMLEditorApp.

Parameters:
Name Type Description
xmlEditor XMLEditor the XML editor.
Source:

(static) openRemoteFile(xmlEditor)

Open an existing remote document in specified XML editor.

This static method in invoked by Open|Open Remote Document but may be used independently from XMLEditorApp.

Parameters:
Name Type Description
xmlEditor XMLEditor the XML editor.
Source:

(static) saveDocument(xmlEditor)

Save the document being edited in specified XML editor.

This static method in invoked by button Save but may be used independently from XMLEditorApp.

Parameters:
Name Type Description
xmlEditor XMLEditor the XML editor.
Source:

(static) saveDocumentAs(xmlEditor)

Save the document being edited in specified XML editor to a different location, the user being prompted to specify this location.

This static method in invoked by button Save As but may be used independently from XMLEditorApp.

Parameters:
Name Type Description
xmlEditor XMLEditor the XML editor.
Source: