var C={tag:'figure','data-block':'Figure','data-width':this.width,'data-caption':this.caption,contenteditable:'false',style:{display:'block',float:this.align,maxWidth:this.align=='center'?'100% !important':(this.width+' !important'),width:this.align=='center'?'100%':this.width,margin:'0px',padding:this.align=='center'?'0':'0 10px',textAlign:this.align}
,align:this.align,cn:[A,{tag:'figcaption','data-display':this.caption_display,style:{textAlign:'left',fontSize:'16px',lineHeight:'24px',display:this.caption_display,maxWidth:(this.align=='center'?this.width:'100%')+' !important',margin:m,width:this.align=='center'?this.width:'100%'}
,cls:this.cls.length>0?(this.cls+'-thumbnail'):'',cn:[{tag:'div',style:{marginTop:'16px',textAlign:'left'},align:'left',cn:[{tag:'i',contenteditable:Roo.htmleditor.BlockFigure.caption_edit,html:B}]}]}]};return C;},readElement:function(A){this.video_url=this.getVal(A,'div','src');
-this.cls=this.getVal(A,'div','class');this.href=this.getVal(A,'a','href');this.image_src=this.getVal(A,'img','src');this.align=this.getVal(A,'figure','align');var B=this.getVal(A,'figcaption',false);if(B!==''){this.caption=this.getVal(B,'i','html');}this.caption_display=this.getVal(A,'figure','data-display');
-Roo.log('CAPTION DISPLAY');Roo.log(this.caption_display);if(this.caption_display==''){this.caption_display=this.getVal(A,'figcaption','data-display');Roo.log(this.caption_display);}var dc=this.getVal(A,true,'data-caption');if(this.caption_display=='none'&&B!=''&&dc&&dc.length){this.caption=dc;
-}this.width=this.getVal(A,true,'data-width');},removeNode:function(){return this.node;}});Roo.apply(Roo.htmleditor.BlockFigure,{caption_edit:true});
+this.cls=this.getVal(A,'div','class');this.href=this.getVal(A,'a','href');this.image_src=this.getVal(A,'img','src');this.align=this.getVal(A,'figure','align');this.caption_display=this.getVal(A,'figure','data-display');if(this.caption_display==''){this.caption_display=this.getVal(A,'figcaption','data-display');
+}var B=this.getVal(A,'figcaption',false);Roo.log('FIGCAPTION');Roo.log(B);if(B!==''){this.caption=this.getVal(B,'i','html');}var dc=this.getVal(A,true,'data-caption');if(this.caption_display=='none'&&B!=''&&dc&&dc.length){this.caption=dc;}this.width=this.getVal(A,true,'data-width');
+},removeNode:function(){return this.node;}});Roo.apply(Roo.htmleditor.BlockFigure,{caption_edit:true});
// Roo/htmleditor/BlockTable.js
Roo.htmleditor.BlockTable=function(A){if(A.node){this.readElement(A.node);this.updateElement(A.node);}Roo.apply(this,A);if(!A.node){this.rows=[];for(var r=0;r<this.no_row;r++){this.rows[r]=[];for(var c=0;c<this.no_col;c++){this.rows[r][c]=this.emptyCell();
}}}};Roo.extend(Roo.htmleditor.BlockTable,Roo.htmleditor.Block,{rows:false,no_col:1,no_row:1,width:'100%',friendly_name:'Table',deleteTitle:'Delete Table',contextMenu:function(A){var B=function(){return Roo.htmleditor.Block.factory(A.tb.selectedNode);};var C=typeof(Roo.bootstrap)=='undefined'?Roo:Roo.bootstrap;
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');
- }
-
+ // data-display is stored in figure
this.caption_display = this.getVal(node, 'figure', 'data-display');
- Roo.log('CAPTION DISPLAY');
- Roo.log(this.caption_display);
+
+ // backward compatible
+ // it was stored in figcaption
if(this.caption_display == '') {
this.caption_display = this.getVal(node, 'figcaption', 'data-display');
- Roo.log(this.caption_display);
}
+ var figcaption = this.getVal(node, 'figcaption', false);
+ Roo.log('FIGCAPTION');
+ Roo.log(figcaption);
+
+ if (figcaption !== '') {
+ this.caption = this.getVal(figcaption, 'i', 'html');
+ }
+
+
var dc = this.getVal(node, true, 'data-caption');
if (this.caption_display == 'none' && figcaption != '' && dc && dc.length) {
this.caption = dc;
var C={tag:'figure','data-block':'Figure','data-width':this.width,'data-caption':this.caption,contenteditable:'false',style:{display:'block',float:this.align,maxWidth:this.align=='center'?'100% !important':(this.width+' !important'),width:this.align=='center'?'100%':this.width,margin:'0px',padding:this.align=='center'?'0':'0 10px',textAlign:this.align}
,align:this.align,cn:[A,{tag:'figcaption','data-display':this.caption_display,style:{textAlign:'left',fontSize:'16px',lineHeight:'24px',display:this.caption_display,maxWidth:(this.align=='center'?this.width:'100%')+' !important',margin:m,width:this.align=='center'?this.width:'100%'}
,cls:this.cls.length>0?(this.cls+'-thumbnail'):'',cn:[{tag:'div',style:{marginTop:'16px',textAlign:'left'},align:'left',cn:[{tag:'i',contenteditable:Roo.htmleditor.BlockFigure.caption_edit,html:B}]}]}]};return C;},readElement:function(A){this.video_url=this.getVal(A,'div','src');
-this.cls=this.getVal(A,'div','class');this.href=this.getVal(A,'a','href');this.image_src=this.getVal(A,'img','src');this.align=this.getVal(A,'figure','align');var B=this.getVal(A,'figcaption',false);if(B!==''){this.caption=this.getVal(B,'i','html');}this.caption_display=this.getVal(A,'figure','data-display');
-Roo.log('CAPTION DISPLAY');Roo.log(this.caption_display);if(this.caption_display==''){this.caption_display=this.getVal(A,'figcaption','data-display');Roo.log(this.caption_display);}var dc=this.getVal(A,true,'data-caption');if(this.caption_display=='none'&&B!=''&&dc&&dc.length){this.caption=dc;
-}this.width=this.getVal(A,true,'data-width');},removeNode:function(){return this.node;}});Roo.apply(Roo.htmleditor.BlockFigure,{caption_edit:true});
+this.cls=this.getVal(A,'div','class');this.href=this.getVal(A,'a','href');this.image_src=this.getVal(A,'img','src');this.align=this.getVal(A,'figure','align');this.caption_display=this.getVal(A,'figure','data-display');if(this.caption_display==''){this.caption_display=this.getVal(A,'figcaption','data-display');
+}var B=this.getVal(A,'figcaption',false);Roo.log('FIGCAPTION');Roo.log(B);if(B!==''){this.caption=this.getVal(B,'i','html');}var dc=this.getVal(A,true,'data-caption');if(this.caption_display=='none'&&B!=''&&dc&&dc.length){this.caption=dc;}this.width=this.getVal(A,true,'data-width');
+},removeNode:function(){return this.node;}});Roo.apply(Roo.htmleditor.BlockFigure,{caption_edit:true});
// Roo/htmleditor/BlockTable.js
Roo.htmleditor.BlockTable=function(A){if(A.node){this.readElement(A.node);this.updateElement(A.node);}Roo.apply(this,A);if(!A.node){this.rows=[];for(var r=0;r<this.no_row;r++){this.rows[r]=[];for(var c=0;c<this.no_col;c++){this.rows[r][c]=this.emptyCell();
}}}};Roo.extend(Roo.htmleditor.BlockTable,Roo.htmleditor.Block,{rows:false,no_col:1,no_row:1,width:'100%',friendly_name:'Table',deleteTitle:'Delete Table',contextMenu:function(A){var B=function(){return Roo.htmleditor.Block.factory(A.tb.selectedNode);};var C=typeof(Roo.bootstrap)=='undefined'?Roo:Roo.bootstrap;
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');
- }
-
+ // data-display is stored in figure
this.caption_display = this.getVal(node, 'figure', 'data-display');
- Roo.log('CAPTION DISPLAY');
- Roo.log(this.caption_display);
+
+ // backward compatible
+ // it was stored in figcaption
if(this.caption_display == '') {
this.caption_display = this.getVal(node, 'figcaption', 'data-display');
- Roo.log(this.caption_display);
}
+ var figcaption = this.getVal(node, 'figcaption', false);
+ Roo.log('FIGCAPTION');
+ Roo.log(figcaption);
+
+ if (figcaption !== '') {
+ this.caption = this.getVal(figcaption, 'i', 'html');
+ }
+
+
var dc = this.getVal(node, true, 'data-caption');
if (this.caption_display == 'none' && figcaption != '' && dc && dc.length) {
this.caption = dc;
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');
- }
-
+ // data-display is stored in figure
this.caption_display = this.getVal(node, 'figure', 'data-display');
- Roo.log('CAPTION DISPLAY');
- Roo.log(this.caption_display);
+
+ // backward compatible
+ // it was stored in figcaption
if(this.caption_display == '') {
this.caption_display = this.getVal(node, 'figcaption', 'data-display');
- Roo.log(this.caption_display);
}
+ var figcaption = this.getVal(node, 'figcaption', false);
+ Roo.log('FIGCAPTION');
+ Roo.log(figcaption);
+
+ if (figcaption !== '') {
+ this.caption = this.getVal(figcaption, 'i', 'html');
+ }
+
+
var dc = this.getVal(node, true, 'data-caption');
if (this.caption_display == 'none' && figcaption != '' && dc && dc.length) {
this.caption = dc;
var C={tag:'figure','data-block':'Figure','data-width':this.width,'data-caption':this.caption,contenteditable:'false',style:{display:'block',float:this.align,maxWidth:this.align=='center'?'100% !important':(this.width+' !important'),width:this.align=='center'?'100%':this.width,margin:'0px',padding:this.align=='center'?'0':'0 10px',textAlign:this.align}
,align:this.align,cn:[A,{tag:'figcaption','data-display':this.caption_display,style:{textAlign:'left',fontSize:'16px',lineHeight:'24px',display:this.caption_display,maxWidth:(this.align=='center'?this.width:'100%')+' !important',margin:m,width:this.align=='center'?this.width:'100%'}
,cls:this.cls.length>0?(this.cls+'-thumbnail'):'',cn:[{tag:'div',style:{marginTop:'16px',textAlign:'left'},align:'left',cn:[{tag:'i',contenteditable:Roo.htmleditor.BlockFigure.caption_edit,html:B}]}]}]};return C;},readElement:function(A){this.video_url=this.getVal(A,'div','src');
-this.cls=this.getVal(A,'div','class');this.href=this.getVal(A,'a','href');this.image_src=this.getVal(A,'img','src');this.align=this.getVal(A,'figure','align');var B=this.getVal(A,'figcaption',false);if(B!==''){this.caption=this.getVal(B,'i','html');}this.caption_display=this.getVal(A,'figure','data-display');
-Roo.log('CAPTION DISPLAY');Roo.log(this.caption_display);if(this.caption_display==''){this.caption_display=this.getVal(A,'figcaption','data-display');Roo.log(this.caption_display);}var dc=this.getVal(A,true,'data-caption');if(this.caption_display=='none'&&B!=''&&dc&&dc.length){this.caption=dc;
-}this.width=this.getVal(A,true,'data-width');},removeNode:function(){return this.node;}});Roo.apply(Roo.htmleditor.BlockFigure,{caption_edit:true});
+this.cls=this.getVal(A,'div','class');this.href=this.getVal(A,'a','href');this.image_src=this.getVal(A,'img','src');this.align=this.getVal(A,'figure','align');this.caption_display=this.getVal(A,'figure','data-display');if(this.caption_display==''){this.caption_display=this.getVal(A,'figcaption','data-display');
+}var B=this.getVal(A,'figcaption',false);Roo.log('FIGCAPTION');Roo.log(B);if(B!==''){this.caption=this.getVal(B,'i','html');}var dc=this.getVal(A,true,'data-caption');if(this.caption_display=='none'&&B!=''&&dc&&dc.length){this.caption=dc;}this.width=this.getVal(A,true,'data-width');
+},removeNode:function(){return this.node;}});Roo.apply(Roo.htmleditor.BlockFigure,{caption_edit:true});
// Roo/htmleditor/BlockTable.js
Roo.htmleditor.BlockTable=function(A){if(A.node){this.readElement(A.node);this.updateElement(A.node);}Roo.apply(this,A);if(!A.node){this.rows=[];for(var r=0;r<this.no_row;r++){this.rows[r]=[];for(var c=0;c<this.no_col;c++){this.rows[r][c]=this.emptyCell();
}}}};Roo.extend(Roo.htmleditor.BlockTable,Roo.htmleditor.Block,{rows:false,no_col:1,no_row:1,width:'100%',friendly_name:'Table',deleteTitle:'Delete Table',contextMenu:function(A){var B=function(){return Roo.htmleditor.Block.factory(A.tb.selectedNode);};var C=typeof(Roo.bootstrap)=='undefined'?Roo:Roo.bootstrap;