.
// Do that before getDocumentHead because WebKit moves
//
elements to the at this point.
var div = doc.createElement( 'div' ) ;
div.innerHTML = headInnerHtml ;
// Move the
nodes to .
FCKDomTools.MoveChildren( div, getDocumentHead( doc ) ) ;
}
doc.body.innerHTML = html.match( /([\s\S]*)<\/body>/i )[1] ;
//prevent clicking on hyperlinks and navigating away
doc.addEventListener('click', function( ev )
{
ev.preventDefault() ;
ev.stopPropagation() ;
}, true ) ;
},
Panel_Contructor : function( doc, baseLocation )
{
var head = getDocumentHead( doc ) ;
// Set the href.
head.appendChild( doc.createElement('base') ).href = baseLocation ;
doc.body.style.margin = '0px' ;
doc.body.style.padding = '0px' ;
},
ToolbarSet_GetOutElement : function( win, outMatch )
{
var toolbarTarget = win.parent ;
var targetWindowParts = outMatch[1].split( '.' ) ;
while ( targetWindowParts.length > 0 )
{
var part = targetWindowParts.shift() ;
if ( part.length > 0 )
toolbarTarget = toolbarTarget[ part ] ;
}
toolbarTarget = toolbarTarget.document.getElementById( outMatch[2] ) ;
},
ToolbarSet_InitOutFrame : function( doc )
{
var head = getDocumentHead( doc ) ;
head.appendChild( doc.createElement('base') ).href = window.document.location ;
var targetWindow = doc.defaultView;
targetWindow.adjust = function()
{
targetWindow.frameElement.height = doc.body.scrollHeight;
} ;
targetWindow.onresize = targetWindow.adjust ;
targetWindow.setTimeout( targetWindow.adjust, 0 ) ;
doc.body.style.overflow = 'hidden';
doc.body.innerHTML = document.getElementById( 'xToolbarSpace' ).innerHTML ;
}
} ;
})();
/*
* ### Overrides
*/
( function()
{
// Save references for override reuse.
var _Original_FCKPanel_Window_OnFocus = FCKPanel_Window_OnFocus ;
var _Original_FCKPanel_Window_OnBlur = FCKPanel_Window_OnBlur ;
var _Original_FCK_StartEditor = FCK.StartEditor ;
FCKPanel_Window_OnFocus = function( e, panel )
{
// Call the original implementation.
_Original_FCKPanel_Window_OnFocus.call( this, e, panel ) ;
if ( panel._focusTimer )
clearTimeout( panel._focusTimer ) ;
}
FCKPanel_Window_OnBlur = function( e, panel )
{
// Delay the execution of the original function.
panel._focusTimer = FCKTools.SetTimeout( _Original_FCKPanel_Window_OnBlur, 100, this, [ e, panel ] ) ;
}
FCK.StartEditor = function()
{
// Force pointing to the CSS files instead of using the inline CSS cached styles.
window.FCK_InternalCSS = FCKConfig.BasePath + 'css/fck_internal.css' ;
window.FCK_ShowTableBordersCSS = FCKConfig.BasePath + 'css/fck_showtableborders_gecko.css' ;
_Original_FCK_StartEditor.apply( this, arguments ) ;
}
})();
}