focus() Since: 1.3.0
Focuses the editor.
Syntax
instance.focus();
Return
Type: sceditor
Focuses the editor.
instance.focus();
Type: sceditor
Binds a handler to the focus event. This is just a shortcut for:
instance.bind('focus', func[, excludeWysiwyg][, excludeSource]);
instance.focus(func[, excludeWysiwyg][, excludeSource]);
func
Type Function
Function that will be called when the event occurs
excludeWysiwyg
Type: Boolean
Default: false
If to not bind the event to the WYSIWYG editor.
excludeSource
Type: Boolean
Default: false
If to not bind the event to the source editor.
Type: sceditor
var textarea = ...;
sceditor.instance(textarea).focus(function(e) {
alert('Gained focus');
});