+ splitWithNewNode: function(node) {\r
+ var selection = window.getSelection();\r
+ if(selection.anchorNode === selection.focusNode && selection.anchorNode.nodeType === Node.TEXT_NODE) {\r
+ var startOffset = selection.anchorOffset;\r
+ var endOffset = selection.focusOffset;\r
+ if(startOffset > endOffset) {\r
+ var tmp = startOffset;\r
+ startOffset = endOffset;\r
+ endOffset = tmp;\r
+ }\r
+ var anchor = selection.anchorNode;\r
+ var prefix = anchor.data.substr(0, startOffset);\r
+ var suffix = anchor.data.substr(endOffset);\r
+ var prefixNode = this._createNode(node.attr('wlxml-tag'), node.attr('wlxml-class'));\r
+ var newNode = this._createNode(node.attr('wlxml-tag'), node.attr('wlxml-class'));\r
+ var suffixNode = this._createNode(node.attr('wlxml-tag'), node.attr('wlxml-class'));\r
+ prefixNode.text(prefix);\r
+ suffixNode.text(suffix);\r
+ node.replaceWith(newNode);\r
+ newNode.before(prefixNode);\r
+ newNode.after(suffixNode);\r
+ mediator.nodeCreated(newNode);\r
+ isDirty = true;\r
+ }\r
+ },\r