X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/097ad6254d6b36c226072b0c7bdcaa5f945dc483..baae83e34afb199c43dea6c37ad607987fb93ebb:/src/smartxml/core.js diff --git a/src/smartxml/core.js b/src/smartxml/core.js index 867353d..4d3c2c1 100644 --- a/src/smartxml/core.js +++ b/src/smartxml/core.js @@ -188,9 +188,15 @@ var elementNodeTransformations = { }; var textNodeTransformations = { - setText: function(text) { - this.nativeNode.data = text; - this.triggerTextChangeEvent(); + setText: { + impl: function(t, text) { + t.oldText = this.getText(); + this.nativeNode.data = text; + this.triggerTextChangeEvent(); + }, + undo: function(t) { + this.setText(t.oldText); + } }, appendText: function(text) {