SCEditor

readOnly()

readOnly() Since: 1.3.5

Gets if the editor is read only

Syntax

var isReadOnly = instance.readOnly();

Return

Type: boolean

readOnly(val) Since: 1.3.5

Sets if the editor is read only

Syntax

instance.readOnly(val);

Parameters

val
Type: Boolean

If to make the editor read-only.

Return

Type: sceditor

Example

Set the editor to read only:

var textarea = ...;
sceditor.instance(textarea).readOnly(true);

Make the editor editable:

var textarea = ...;
sceditor.instance(textarea).readOnly(false);