SCEditor

keyPress()

keyPress(func) Since: 1.4.1

Binds a handler to the key press event on the editor.

Syntax

instance.keyPress(func[, excludeWysiwyg][, excludeSource]);

Parameters

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.

Return

Type: sceditor

Example

var textarea = ...;
sceditor.instance(textarea).keyPress(function(e) {
	alert('Key press event fired.');
});