1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
3
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
4
* Copyright (C) 2003-2007 Frederico Caldeira Knabben
8
* Licensed under the terms of any of the following licenses at your
11
* - GNU General Public License Version 2 or later (the "GPL")
12
* http://www.gnu.org/licenses/gpl.html
14
* - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
15
* http://www.gnu.org/licenses/lgpl.html
17
* - Mozilla Public License Version 1.1 or later (the "MPL")
18
* http://www.mozilla.org/MPL/MPL-1.1.html
22
* This is the Debug window.
23
* It automatically popups if the Debug = true in the configuration file.
25
<html xmlns="http://www.w3.org/1999/xhtml">
27
<title>FCKeditor Debug Window</title>
28
<meta name="robots" content="noindex, nofollow" />
29
<script type="text/javascript">
34
if ( !window.FCKMessages )
35
window.FCKMessages = new Array() ;
37
window.onload = function()
39
oWindow = document.getElementById('xOutput').contentWindow ;
40
oWindow.document.open() ;
41
oWindow.document.write( '<div id="divMsg"><\/div>' ) ;
42
oWindow.document.close() ;
43
oDiv = oWindow.document.getElementById('divMsg') ;
46
function Output( message, color, noParse )
48
if ( !noParse && message != null && isNaN( message ) )
49
message = message.replace(/</g, "<") ;
52
message = '<font color="' + color + '">' + message + '<\/font>' ;
54
window.FCKMessages[ window.FCKMessages.length ] = message ;
58
function OutputObject( anyObject, color )
62
if ( anyObject != null )
64
message = 'Properties of: ' + anyObject + '</b><blockquote>' ;
66
for (var prop in anyObject)
70
var sVal = anyObject[ prop ] != null ? anyObject[ prop ] + '' : '[null]' ;
71
message += '<b>' + prop + '</b> : ' + sVal.replace(/</g, '<') + '<br>' ;
77
message += '<b>' + prop + '</b> : [' + typeof( anyObject[ prop ] ) + ']<br>' ;
81
message += '<b>' + prop + '</b> : [-error-]<br>' ;
86
message += '</blockquote><b>' ;
88
message = 'OutputObject : Object is "null".' ;
90
Output( message, color, true ) ;
95
window.setTimeout( 'CheckMessages()', 100 ) ;
98
function CheckMessages()
100
if ( window.FCKMessages.length > 0 )
102
// Get the first item in the queue
103
var sMessage = window.FCKMessages[0] ;
105
// Removes the first item from the queue
106
var oTempArray = new Array() ;
107
for ( i = 1 ; i < window.FCKMessages.length ; i++ )
108
oTempArray[ i - 1 ] = window.FCKMessages[ i ] ;
109
window.FCKMessages = oTempArray ;
113
( d.getHours() + 100 + '' ).substr( 1,2 ) + ':' +
114
( d.getMinutes() + 100 + '' ).substr( 1,2 ) + ':' +
115
( d.getSeconds() + 100 + '' ).substr( 1,2 ) + ':' +
116
( d.getMilliseconds() + 1000 + '' ).substr( 1,3 ) ;
118
var oMsgDiv = oWindow.document.createElement( 'div' ) ;
119
oMsgDiv.innerHTML = sTime + ': <b>' + sMessage + '<\/b>' ;
120
oDiv.appendChild( oMsgDiv ) ;
121
oMsgDiv.scrollIntoView() ;
127
oDiv.innerHTML = '' ;
131
<body style="margin: 10px">
132
<table style="height: 100%" cellspacing="5" cellpadding="0" width="100%" border="0">
135
<table cellspacing="0" cellpadding="0" width="100%" border="0">
137
<td style="font-weight: bold; font-size: 1.2em;">
138
FCKeditor Debug Window</td>
140
<input type="button" value="Clear" onclick="Clear();" /></td>
145
<tr style="height: 100%">
146
<td style="border: #696969 1px solid">
147
<iframe id="xOutput" width="100%" height="100%" scrolling="auto" src="javascript:void(0)"
148
frameborder="0"></iframe>