store : {
xtype : 'SimpleStore',
data : [
- ['auto'],
- ['50%'],
+ ['100%'],
['80%'],
- ['100%']
+ ['50%'],
+ ['20%'],
+ ['10%']
],
fields : [ 'val'],
xns : Roo.data
}
},
-
+
{
xtype : 'Button',
text: 'Hide Caption',
var ret = {
tag: 'figure',
'data-block' : 'Figure',
-
+ 'data-width' : this.width,
+ 'data-caption' : this.caption,
contenteditable : 'false',
style : {
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%'
},
this.image_src = this.getVal(node, 'img', 'src');
this.align = this.getVal(node, 'figure', 'align');
+
+ /// not really used - as hidden captions do not store the content here..
var figcaption = this.getVal(node, 'figcaption', false);
if (figcaption !== '') {
this.caption = this.getVal(figcaption, 'i', 'html');
this.caption_display = this.getVal(node, 'figcaption', 'data-display');
+ var dc = this.getVal(node, true, 'data-caption');
+ if (dc && dc.length) {
+ this.caption = dc;
+ }
//this.text_align = this.getVal(node, 'figcaption', 'style','text-align');
- this.width = this.getVal(node, 'figcaption', 'style', 'width');
+ this.width = this.getVal(node, true, 'data-width');
//this.margin = this.getVal(node, 'figure', 'style', 'margin');
},