X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=Roo%2Fhtmleditor%2FBlockFigure.js;h=530ff6e75de381dd58ac03468bc2bcbf76b8745c;hb=bea67c903044a64d1e9fc90aa2ab9eaae2e9a836;hp=b7f3fc61da08376f31236264ff9aeb0c22d89e53;hpb=d8d46460033881e248c734f400fc135d5b5c8ce6;p=roojs1 diff --git a/Roo/htmleditor/BlockFigure.js b/Roo/htmleditor/BlockFigure.js index b7f3fc61da..530ff6e75d 100644 --- a/Roo/htmleditor/BlockFigure.js +++ b/Roo/htmleditor/BlockFigure.js @@ -348,9 +348,9 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, { fontSize : '16px', lineHeight : '24px', display : this.caption_display, - maxWidth : this.width + ' !important', + maxWidth : (this.align == 'center' ? this.width : 100% ) + ' !important', margin: m, - width: this.width + width: this.align == 'center' ? this.width : 100%, }, @@ -395,7 +395,10 @@ Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, { this.align = this.getVal(node, 'figure', 'align'); var figcaption = this.getVal(node, 'figcaption', false); - this.caption = this.getVal(figcaption, 'i', 'html'); + if (figcaption !== '') { + this.caption = this.getVal(figcaption, 'i', 'html'); + } + this.caption_display = this.getVal(node, 'figcaption', 'data-display'); //this.text_align = this.getVal(node, 'figcaption', 'style','text-align');