setBackgroundColor()

Description

Sets the background color of the document editor. It is a value specifying the 32-bit RGBA value.

Syntax

DocumentEditorObject.ui.setBackgroundColor(iValue);

Parameters

<int> iValue: the value to set

Return value

bool

Remarks

Default is 0xFFFFFFFF. The byte-ordering of the 32-bit RGBA value is RRGGBBAA. RR represents red, GG represents green, BB represents blue, AA represents opacity, all ranging from 0 to 0xFF. For AA, 0 is transparent, 0xFF is non-transparent.
In the browser, opacity ranges from 0 to 1. We will convert it automatically, therefore, sometimes the value you get might be slightly different from the value you set.
For non-HTML5 browsers like IE 6-9, AA value larger than 0 will be regarded as non-transparent.

Example

if (DCSObject)
{
    var documenteditor = DCSObject.getDocumentEditor("DocumentEditorContainer");  // Gets a specified document editor
    documenteditor.ui.setBackgroundColor(0xFFFF00FF); // Sets the background color of the document editor
}
      

See also

ui.getBackgroundColor()