@tinymce/tinymce-react
Advanced tools
Comparing version 6.0.0-feature.20241214094116267.sha177bb0f to 6.0.0-feature.20250211101340132.sha1969a59
@@ -138,2 +138,3 @@ import * as React from 'react'; | ||
private elementRef; | ||
private latestUpdate; | ||
private inline; | ||
@@ -140,0 +141,0 @@ private currentContent?; |
@@ -43,2 +43,3 @@ "use strict"; | ||
var _this = _super.call(this, props) || this; | ||
_this.latestUpdate = null; | ||
_this.rollbackTimer = undefined; | ||
@@ -94,3 +95,11 @@ _this.valueCursor = undefined; | ||
if ((0, Utils_1.isFunction)(_this.props.onEditorChange)) { | ||
_this.props.onEditorChange(newContent, editor); | ||
if (_this.latestUpdate === null) { | ||
setTimeout(function () { | ||
if (_this.props.onEditorChange && _this.latestUpdate !== null) { | ||
_this.props.onEditorChange(_this.latestUpdate, editor); | ||
_this.latestUpdate = null; | ||
} | ||
}); | ||
} | ||
_this.latestUpdate = newContent; | ||
} | ||
@@ -97,0 +106,0 @@ } |
@@ -138,2 +138,3 @@ import * as React from 'react'; | ||
private elementRef; | ||
private latestUpdate; | ||
private inline; | ||
@@ -140,0 +141,0 @@ private currentContent?; |
@@ -40,2 +40,3 @@ var __extends = (this && this.__extends) || (function () { | ||
var _this = _super.call(this, props) || this; | ||
_this.latestUpdate = null; | ||
_this.rollbackTimer = undefined; | ||
@@ -91,3 +92,11 @@ _this.valueCursor = undefined; | ||
if (isFunction(_this.props.onEditorChange)) { | ||
_this.props.onEditorChange(newContent, editor); | ||
if (_this.latestUpdate === null) { | ||
setTimeout(function () { | ||
if (_this.props.onEditorChange && _this.latestUpdate !== null) { | ||
_this.props.onEditorChange(_this.latestUpdate, editor); | ||
_this.latestUpdate = null; | ||
} | ||
}); | ||
} | ||
_this.latestUpdate = newContent; | ||
} | ||
@@ -94,0 +103,0 @@ } |
@@ -79,4 +79,4 @@ { | ||
}, | ||
"version": "6.0.0-feature.20241214094116267.sha177bb0f", | ||
"version": "6.0.0-feature.20250211101340132.sha1969a59", | ||
"name": "@tinymce/tinymce-react" | ||
} |
111622
2048