+Manager.prototype.insertNewNode = function(wlxmlTag, wlxmlClass) {\r
+ //TODO: Insert inline\r
+ var anchor = $(window.getSelection().anchorNode);\r
+ var anchorOffset = window.getSelection().anchorOffset;\r
+ \r
+ var parent = anchor.parent();\r
+ var idx = parent.contents().index(anchor);\r
+ \r
+ if(anchorOffset < anchor.text().length) {\r
+ var newNode = this.canvas.splitNode({node: {id: parent.attr('id')}, textNodeIdx: idx, offset: anchorOffset});\r
+ this.selectNode(new wlxmlNode.Node(newNode), {movecaret: true});\r
+ }\r
+\r
+ \r
+ \r
+ this.sandbox.publish('contentChanged');\r
+};\r
+\r