+
+ var canvas = this;
+ this.wrapper.on('keydown', function(e) {
+ if(e.which === 13) {
+ e.preventDefault();
+ var cursor = canvas.getCursor();
+ if(!cursor.isSelecting()) {
+ var position = cursor.getPosition();
+ position.element.split({offset: position.offset});
+ }
+ }
+ });
+
+ this.wrapper.on('keyup', function(e) {
+ if(e.which >= 37 && e.which <= 40)
+ canvas.markAsCurrent(canvas.getCursor().getPosition().element)
+ });
+
+ this.wrapper.on('click', '[wlxml-tag], [wlxml-text]', function(e) {
+ e.stopPropagation();
+ canvas.markAsCurrent(canvas.getCursor().getPosition().element)
+ });
+