$.extend(DocumentNodeElement.prototype, {
defaultDisplayStyle: 'block',
+ init: function() {},
addWidget: function(widget) {
this.dom.children('.canvas-widgets').append(widget.DOM ? widget.DOM : widget);
},
this.toggleHighlight(toggle);
},
+ markAsCurrent: function() {},
+
toggleHighlight: function(toggle) {
this._container().toggleClass('highlighted-element', toggle);
},
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 || {});