sourceMode() Since: 1.4.0
Gets if the editor is in source mode.
Syntax
var isInSourceMode = instance.sourceMode();
Return
Type: boolean
Gets if the editor is in source mode.
var isInSourceMode = instance.sourceMode();
Type: boolean
Sets if the editor is in source mode.
instance.sourceMode(val);
val
Type: Boolean
If to put the editor into source mode or not.
Type: sceditor
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);