//return DocumentTextElement.fromHTMLElement(htmlElement, canvas);
return $element.data('canvas-element');
}
//return DocumentTextElement.fromHTMLElement(htmlElement, canvas);
return $element.data('canvas-element');
}
triggerKeyEvent: function(keyEvent, selection) {
selection = selection || this.getSelection();
triggerKeyEvent: function(keyEvent, selection) {
selection = selection || this.getSelection();
/* globals window */
var selection = window.getSelection(),
anchorElement = this.canvas.getDocumentElement(selection.anchorNode),
/* globals window */
var selection = window.getSelection(),
anchorElement = this.canvas.getDocumentElement(selection.anchorNode),