Changed Roo/htmleditor/BlockFigure.js
authorAlan <alan@roojs.com>
Tue, 15 Mar 2022 07:12:13 +0000 (15:12 +0800)
committerAlan <alan@roojs.com>
Tue, 15 Mar 2022 07:12:13 +0000 (15:12 +0800)
Roo/htmleditor/BlockFigure.js

index 8bc7f8e..901d69a 100644 (file)
@@ -273,8 +273,7 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, {
             style: {
                 width : iw,
                 maxWidth : iw + ' !important', // this is not getting rendered?
             style: {
                 width : iw,
                 maxWidth : iw + ' !important', // this is not getting rendered?
-                margin : m 
-                
+                margin : m  
                 
             }
         };
                 
             }
         };
@@ -315,6 +314,7 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, {
         // we remove caption totally if its hidden... - will delete data.. but otherwise we end up with fake caption
         var captionhtml = this.caption_display == 'none' ? '' : (this.caption.length ? this.caption : "Caption");
         
         // we remove caption totally if its hidden... - will delete data.. but otherwise we end up with fake caption
         var captionhtml = this.caption_display == 'none' ? '' : (this.caption.length ? this.caption : "Caption");
         
+  
         return  {
             tag: 'figure',
             'data-block' : 'Figure',
         return  {
             tag: 'figure',
             'data-block' : 'Figure',
@@ -327,7 +327,7 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, {
                 maxWidth :  this.align == 'center' ? '100% !important' : (this.width + ' !important'),
                 width : this.align == 'center' ? '100%' : this.width,
                 margin:  '0px',
                 maxWidth :  this.align == 'center' ? '100% !important' : (this.width + ' !important'),
                 width : this.align == 'center' ? '100%' : this.width,
                 margin:  '0px',
-                padding: this.align == 'center' ? '10px 0' : '0',
+                padding: this.align == 'center' ? '0' : '0 10px' ,
                 textAlign : this.align   // seems to work for email..
                 
             },
                 textAlign : this.align   // seems to work for email..
                 
             },