SCEditor

sourceMode()

sourceMode() Since: 1.4.0

Gets if the editor is in source mode.

Syntax

var isInSourceMode = instance.sourceMode();

Return

Type: boolean

sourceMode(val) Since: 1.4.0

Sets if the editor is in source mode.

Syntax

instance.sourceMode(val);

Parameters

val
Type: Boolean

If to put the editor into source mode or not.

Return

Type: sceditor

Example

Set the editor to source mode:

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

Set the editor to WYSIWYG mode:

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