X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/9968c4c2c8e89849e3a52babde85709c9ef08ad2..d221e72024aa5d6f90e256728fa70f622d4e57d7:/src/smartxml/core.js?ds=sidebyside diff --git a/src/smartxml/core.js b/src/smartxml/core.js index 4297c1a..65b7852 100644 --- a/src/smartxml/core.js +++ b/src/smartxml/core.js @@ -240,6 +240,21 @@ var textNodeTransformations = { } }), + append: function(node) { + if(node.nodeType === Node.TEXT_NODE) { + this.appendText(node.getText()); + node.detach(); + return this; + } + }, + prepend: function(node) { + if(node.nodeType === Node.TEXT_NODE) { + this.prependText(node.getText()); + node.detach(); + return this; + } + }, + appendText: function(text) { this.nativeNode.data = this.nativeNode.data + text; this.triggerTextChangeEvent();