addDocumentEditor()

Description

Add a new document editor.

Syntax

DCSObject.addDocumentEditor(string documentEditorContainerId);

Parameters

<string> documentEditorContainerId: The id of a document editor container.

Return value

DocumentEditor

If a document editor is created successfully, it returns a DocumentEditor object, otherwise, it returns null.

Remarks

This method is only supported in HTML5 browsers. If you call it in a non-HTML5 browser, when you check getErrorString(), you will get an error "Your browser doesn’t support HTML5, please use a modern browser like Chrome, Firefox, etc.".

The document editor container must be a DIV element. If the DIV element with the specified id doesn't exist, when you check getErrorString(), you will get an error "The object [object name] does not exist.".

If the document editor with the same container id already exists, it returns null and when you check getErrorString(), you will get an error "The object [object name] already exists.".

Example

if (DCSObject) {
   DCSObject.addDocumentEditor("DCSDocumentEditorContainer2");
}

See Also

getErrorCode
getErrorString