}
}
});
+
dlg.on("hide", handleHide);
mask = dlg.mask;
dlg.addKeyListener(27, handleEsc);
d.animateTarget = null;
d.show(options.animEl);
}
+ dlg.toFront();
return this;
},
{
tag: 'figcaption',
- contenteditable : true,
+
style : {
'text-align': 'left',
'margin-top' : '16px',
'font-size' : '16px',
'line-height' : '24px',
- 'font-style': 'italic',
- display : this.caption_display
+ display : this.caption_display
},
cls : this.cls.length > 0 ? (this.cls + '-thumbnail' ) : '',
- html : this.caption
+ cn : [
+ {
+ // we can not rely on yahoo syndication to use CSS elements - so have to use '<i>' to encase stuff.
+ tag : 'i',
+ contenteditable : true,
+ html : this.caption
+ }
+ ]
}
]
this.align = this.getVal(node, 'figure', 'align');
this.caption = this.getVal(node, 'figcaption', 'html');
+ // remove '<i>
+ if (this.caption.trim().match(/^<i[^>]*>/i)) {
+ this.caption = this.caption.trim().replace(/^<i[^>]*>/i, '').replace(/^<\/i>$/i, '');
+ }
//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');
createLink : function(){
//Roo.log("create link?");
var ec = this.editorcore;
- Roo.MessageBox.prompt("Add Link URL",this.createLinkText, function(btn, url) {
- if (btn != 'ok') {
- return;
- }
- if(url && url != 'http:/'+'/'){
- ec.relayCmd('createlink', url);
- }
- });
+ (function() {
+ Roo.MessageBox.prompt("Add Link URL",this.createLinkText, function(btn, url) {
+ if (btn != 'ok') {
+ return;
+ }
+ if(url && url != 'http:/'+'/'){
+ ec.relayCmd('createlink', url);
+ }
+ });
+ }).defer(100, this); // we have to defer this , otherwise the mouse click gives focus to the main window.
},