X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/097ad6254d6b36c226072b0c7bdcaa5f945dc483..59f806bb8a3b304b1c1293d8634bcf38bcd31332:/src/smartxml/core.js?ds=inline 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) {