event.preventDefault();
var cursor = canvas.getCursor(),
position = cursor.getPosition(),
event.preventDefault();
var cursor = canvas.getCursor(),
position = cursor.getPosition(),
if(Object.keys(cursor.getPosition()).length === 0) {
var currentElement = canvas.getCurrentNodeElement();
if(currentElement) {
if(Object.keys(cursor.getPosition()).length === 0) {
var currentElement = canvas.getCurrentNodeElement();
if(currentElement) {
tag: currentElement.getWlxmlTag() || 'div',
attrs: {'class': currentElement.getWlxmlClass() || 'p'}
});
added.append({text:''});
tag: currentElement.getWlxmlTag() || 'div',
attrs: {'class': currentElement.getWlxmlClass() || 'p'}
});
added.append({text:''});
{tagName: element.getWlxmlTag() || 'div', attrs: {'class': element.getWlxmlClass() || 'p'}}
);
added.append({text: ''});
{tagName: element.getWlxmlTag() || 'div', attrs: {'class': element.getWlxmlClass() || 'p'}}
);
added.append({text: ''});
element = canvas.getDocumentElement(utils.nearestInDocumentOrder('[document-text-element]:visible', direction, window.getSelection().focusNode));
}
canvas.setCurrentElement(element, {caretTo: caretTo});
element = canvas.getDocumentElement(utils.nearestInDocumentOrder('[document-text-element]:visible', direction, window.getSelection().focusNode));
}
canvas.setCurrentElement(element, {caretTo: caretTo});
handlers.push({key: KEYS.X,
keydown: function(event, canvas) {
handlers.push({key: KEYS.X,
keydown: function(event, canvas) {
keydown: function(event, canvas) {
var cursor = canvas.getCursor(),
position = canvas.getCursor().getPosition(),
keydown: function(event, canvas) {
var cursor = canvas.getCursor(),
position = canvas.getCursor().getPosition(),
var willDeleteWholeText = function() {
return element.getText().length === 1 || selectsWholeTextElement(cursor);
var willDeleteWholeText = function() {
return element.getText().length === 1 || selectsWholeTextElement(cursor);