TinyMCE:API/tinymce.Editor/isDirty

From Moxiecode Documentation Wiki

Jump to: navigation, search

Contents

Method: isDirty

Summary

Returns true/false if the editor is dirty or not. It will get dirty if the user has made modifications to the contents.

There is no method for changing the dirty state. Instead, you can directly set the isNotDirty property of the editor.

Syntax

<bool> isDirty()

Returns

True/false if the editor is dirty or not. It will get dirty if the user has made modifications to the contents.

Examples

if (tinyMCE.activeEditor.isDirty())
   alert("You must save your contents.");
Personal tools