eWebEditor Home >> eWebEditor Manual V11.2 >> Developer Guide >> JavaScript API

3.7.9 setReadOnly

Description

Set the editor as readonly mode (new in V 8.0)

Syntax

object.setReadOnly(string s_Mode);

Parameter

The only parameter is a string indicating the effect of readonly mode. It must be one of the following numeric literals:

"": Cancel the readonly mode

"1": Readonly mode 1, including the status bar

"2": Readonly mode 2, not including the status bar

Example:

The following method has demonstrated how to switch an editor named "MyEditor" to the readonly mode.

myEditor.setReadOnly('1');