X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/0b89e99ee683a4104d07b0756e090becaa52ad9c..69be72cddc103e106ad80640a85f6a03def3f960:/modules/documentCanvas/canvasManager.js diff --git a/modules/documentCanvas/canvasManager.js b/modules/documentCanvas/canvasManager.js index b6a316e..a42eee6 100644 --- a/modules/documentCanvas/canvasManager.js +++ b/modules/documentCanvas/canvasManager.js @@ -186,7 +186,7 @@ Manager.prototype.onEnterKey = function(e) { if(pos.isAtEnd) { newNode = canvasNode.create({tag: pos.parentNode.attr('wlxml-tag'), klass: pos.parentNode.attr('wlxml-class')}); - this.canvas.nodeInsertAfter({node: newNode, after: canvas.getNodeById(pos.parentNode.attr('id'))}); + this.canvas.nodeInsertAfter({node: newNode, after: this.canvas.getNodeById(pos.parentNode.attr('id'))}); } else { newNode = this.canvas.nodeSplit({node: contextNode, textNodeIdx: pos.textNodeIndex, offset: pos.textNodeOffset}); } @@ -223,11 +223,11 @@ Manager.prototype.command = function(command, meta) { this.sandbox.publish('contentChanged'); } else { - if(!this.canvas.nodeInsideList({node: node})) { + //if(!this.canvas.nodeInsideList({node: node})) { this.canvas.listCreate({start: node, end: canvasNode.create(pos.focusNode), type: meta}); this.selectNode(node, {movecaret: 'end'}); this.sandbox.publish('contentChanged'); - } + //} } }