Fixing borders around inline document node elements which text starts at a new line
[fnpeditor.git] / modules / documentCanvas / canvas / documentElement.js
index d58d8c1..384186f 100644 (file)
@@ -360,7 +360,11 @@ $.extend(DocumentNodeElement.prototype, {
         var displayCss = toggle ? 'inline-block' : 'none';
         var label = this.dom().children('.canvas-widgets').find('.canvas-widget-label');
         label.css('display', displayCss);
-        this.dom().toggleClass('highlighted-element');
+        this.toggleHighlight(toggle);
+    },
+
+    toggleHighlight: function(toogle) {
+        this._container().toggleClass('highlighted-element');
     }
 });
 
@@ -530,6 +534,10 @@ $.extend(DocumentTextElement.prototype, {
         this.after(newElement);
         newElement.after(rhsTextElement);
         return newElement;
+    },
+
+    toggleHighlight: function() {
+        // do nothing for now
     }
 });