contentContainer = $('<div>')
.attr('document-element-content', '');
- wrapper.append(widgetsContainer, contentContainer);
+ wrapper.append(contentContainer, widgetsContainer);
widgetsContainer.find('*').add(widgetsContainer).attr('tabindex', -1);
return wrapper;
},
detach: function() {
var parents = this.parents();
this.dom.detach();
- this.canvas = null;
if(parents[0]) {
parents[0].refreshPath();
}
this.toggleHighlight(toggle);
},
+ markAsCurrent: function() {},
+
toggleHighlight: function(toggle) {
this._container().toggleClass('highlighted-element', toggle);
},
},
detach: function() {
this.dom.detach();
- this.canvas = null;
return this;
},
setText: function(text) {
- this.dom.contents()[0].data = text;
+ if(text === '') {
+ text = utils.unicode.ZWS;
+ }
+ if(text !== this.getText()) {
+ this.dom.contents()[0].data = text;
+ }
},
getText: function(options) {
options = _.extend({raw: false}, options || {});