fix #7775 - BlockFigure caption_edit option - to enable/disable caption editing
[roojs1] / Roo / htmleditor / BlockFigure.js
index d2a165d..9fac188 100644 (file)
@@ -369,7 +369,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,
+                                    contenteditable : Roo.htmleditor.BlockFigure.caption_edit,
                                     html : captionhtml
                                 }
                                 
@@ -406,7 +406,7 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, {
 
         this.caption_display = this.getVal(node, 'figcaption', 'data-display');
         var dc = this.getVal(node, true, 'data-caption');
-        if (this.caption_display == 'none' && figcaption != '' && dc && dc.length) {
+        if (dc && dc.length) {
             this.caption = dc;
         }
         //this.text_align = this.getVal(node, 'figcaption', 'style','text-align');
@@ -426,5 +426,9 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, {
     
     
     
-})
+});
+
+Roo.apply(Roo.htmleditor.BlockFigure, {
+    caption_edit : true
+});