fix image loading
[roojs1] / Roo / htmleditor / BlockFigure.js
index a7fe2f8..0cc0e7a 100644 (file)
@@ -311,6 +311,8 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, {
             };
         }
         
+        var captionhtml = this.caption_display == 'hidden' ? this.caption : (this.caption.length ? this.caption : "Caption");
+        
         return  {
             tag: 'figure',
             'data-block' : 'Figure',
@@ -346,7 +348,7 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, {
                             // we can not rely on yahoo syndication to use CSS elements - so have to use  '<i>' to encase stuff.
                             tag : 'i',
                             contenteditable : true,
-                            html : this.caption
+                            html : captionhtml
                         }
                     ]