MCPcopy
hub / github.com/tinymce/tinymce / setDirty

Method setDirty

modules/tinymce/src/core/main/ts/api/Editor.ts:959–967  ·  view source on GitHub ↗

* Explicitly sets the dirty state. This will fire the dirty event if the editor dirty state is changed from false to true * by invoking this method. * * @method setDirty * @param {Boolean} state True/false if the editor is considered dirty. * @example * const ajaxSave = () => {

(state: boolean)

Source from the content-addressed store, hash-verified

957 * }
958 */
959 public setDirty(state: boolean): void {
960 const oldState = !this.isNotDirty;
961
962 this.isNotDirty = !state;
963
964 if (state && state !== oldState) {
965 this.dispatch('dirty');
966 }
967 }
968
969 /**
970 * Returns the container element of the editor. The container element includes

Callers 12

constructorMethod · 0.95
resetContentMethod · 0.95
UndoManagerTest.tsFile · 0.80
EditorTest.tsFile · 0.80
renderFunction · 0.80
addUndoLevelFunction · 0.80
redoFunction · 0.80
undoFunction · 0.80
registerEventsFunction · 0.80
saveMethod · 0.80
UndoManagerFunction · 0.80
saveFunction · 0.80

Calls 1

dispatchMethod · 0.65

Tested by

no test coverage detected