SCEditor

nodeChanged()

nodeChanged(func) Since: 1.4.1

Binds a handler to the WYSIWYG nodeChanged event.

This will fire whenever the DOM node that contains the caret changes.

This event will only fire in the WYSIWYG editor as the source editor is text based so doesn’t have any DOM nodes to cause the event.

Syntax

instance.nodeChanged(func);

Parameters

func
Type Function

Function that will be called when the event occurs

Return

Type: sceditor

Example

var textarea = ...;
sceditor.instance(textarea).nodeChanged(function(e) {
    alert('Current node has changed');
});