]
};
}
-
- var captionhtml = this.caption_display == 'hidden' ? this.caption : (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',
contenteditable : 'false',
+
style : {
display: 'block',
float : this.align ,
{
tag: 'figcaption',
-
+ 'data-display' : this.caption_display,
style : {
'text-align': 'left',
'margin-top' : '16px',
this.cls = this.getVal(node, 'div', 'class');
this.href = this.getVal(node, 'a', 'href');
+
this.image_src = this.getVal(node, 'img', 'src');
this.align = this.getVal(node, 'figure', 'align');
if (this.caption.trim().match(/^<i[^>]*>/i)) {
this.caption = this.caption.trim().replace(/^<i[^>]*>/i, '').replace(/^<\/i>$/i, '');
}
+ this.caption_display = this.getVal(node, 'figcaption', 'data-display');
//this.text_align = this.getVal(node, 'figcaption', 'style','text-align');
this.width = this.getVal(node, 'figure', 'style', 'max-width');
//this.margin = this.getVal(node, 'figure', 'style', 'margin');