}
}
});
+
dlg.on("hide", handleHide);
mask = dlg.mask;
dlg.addKeyListener(27, handleEsc);
d.animateTarget = null;
d.show(options.animEl);
}
+ dlg.toFront();
return this;
},
Roo.each( Array.from(dom.childNodes), function( e ) {
switch(true) {
- case e.nodeType == 8 && typeof(this.replaceComment) != 'undefined': // comment
+ case e.nodeType == 8 && this.replaceComment !== false: // comment
this.replaceComment(e);
return;
{
tag : true, // all elements.
- replace : function(n)
+ replaceTag : function(n)
{
n.parentNode.removeChild(n);
}
{
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');
});
new Roo.htmleditor.FilterBlack({ node : d, tag : this.black});
// should be fonts..
- new Roo.htmleditor.FilterKeepChildren({node : d, tag : [ 'FONT' ]} );
+ new Roo.htmleditor.FilterKeepChildren({node : d, tag : [ 'FONT', 'O:P' ]} );
new Roo.htmleditor.FilterParagraph({ node : d });
new Roo.htmleditor.FilterSpan({ node : d });
new Roo.htmleditor.FilterLongBr({ node : d });
'IFRAME', 'LAYER', 'LINK', 'META', 'OBJECT',
'SCRIPT', 'STYLE' ,'TITLE', 'XML',
//'FONT' // CLEAN LATER..
- 'COLGROUP', 'COL' // messy tables.
+ 'COLGROUP', 'COL' // messy tables.
+
];
Roo.HtmlEditorCore.clean = [ // ?? needed???
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.
},