Subversion Repositories Applications.papyrus

Rev

Rev 1688 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1688 Rev 1921
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2
<!--
2
<!--
3
 * FCKeditor - The text editor for internet
3
 * FCKeditor - The text editor for Internet - http://www.fckeditor.net
4
 * Copyright (C) 2003-2006 Frederico Caldeira Knabben
4
 * Copyright (C) 2003-2008 Frederico Caldeira Knabben
-
 
5
 *
-
 
6
 * == BEGIN LICENSE ==
5
 * 
7
 *
6
 * Licensed under the terms of the GNU Lesser General Public License:
8
 * Licensed under the terms of any of the following licenses at your
-
 
9
 * choice:
-
 
10
 *
-
 
11
 *  - GNU General Public License Version 2 or later (the "GPL")
7
 * 		http://www.opensource.org/licenses/lgpl-license.php
12
 *    http://www.gnu.org/licenses/gpl.html
8
 * 
13
 *
9
 * For further information visit:
14
 *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
10
 * 		http://www.fckeditor.net/
15
 *    http://www.gnu.org/licenses/lgpl.html
11
 * 
16
 *
12
 * "Support Open Source software. What about a donation today?"
17
 *  - Mozilla Public License Version 1.1 or later (the "MPL")
-
 
18
 *    http://www.mozilla.org/MPL/MPL-1.1.html
13
 * 
19
 *
14
 * File Name: fck_paste.html
20
 * == END LICENSE ==
-
 
21
 *
15
 * 	This dialog is shown when, for some reason (usually security settings), 
22
 * This dialog is shown when, for some reason (usually security settings),
16
 * 	the user is not able to paste data from the clipboard to the editor using 
23
 * the user is not able to paste data from the clipboard to the editor using
17
 * 	the toolbar buttons or the context menu.
24
 * the toolbar buttons or the context menu.
18
 * 
-
 
19
 * File Authors:
-
 
20
 * 		Frederico Caldeira Knabben (fredck@fckeditor.net)
-
 
21
-->
25
-->
22
<html xmlns="http://www.w3.org/1999/xhtml">
26
<html xmlns="http://www.w3.org/1999/xhtml">
23
<head>
27
<head>
24
	<title></title>
28
	<title></title>
25
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
29
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
26
	<meta name="robots" content="noindex, nofollow" />
30
	<meta name="robots" content="noindex, nofollow" />
-
 
31
	<script src="common/fck_dialog_common.js" type="text/javascript"></script>
27
	<script type="text/javascript">
32
	<script type="text/javascript">
-
 
33
var dialog = window.parent ;
28
var oEditor = window.parent.InnerDialogLoaded() ;
34
var oEditor = dialog.InnerDialogLoaded() ;
-
 
35
var FCK = oEditor.FCK;
-
 
36
var FCKTools	= oEditor.FCKTools ;
-
 
37
var FCKConfig	= oEditor.FCKConfig ;
-
 
38
var FCKBrowserInfo = oEditor.FCKBrowserInfo ;
29
 
39
 
30
window.onload = function ()
40
window.onload = function ()
31
{
41
{
32
	// First of all, translate the dialog box texts
42
	// First of all, translate the dialog box texts
33
	oEditor.FCKLanguageManager.TranslatePage(document) ;
43
	oEditor.FCKLanguageManager.TranslatePage(document) ;
34
	
44
 
35
	if ( window.parent.dialogArguments.CustomValue == 'Word' )
45
	var sPastingType = dialog.Args().CustomValue ;
-
 
46
 
-
 
47
	if ( sPastingType == 'Word' || sPastingType == 'Security' )
36
	{
48
	{
-
 
49
		if ( sPastingType == 'Security' )
-
 
50
			document.getElementById( 'xSecurityMsg' ).style.display = '' ;
-
 
51
 
-
 
52
		// For document.domain compatibility (#123) we must do all the magic in
-
 
53
		// the URL for IE.
-
 
54
		var sFrameUrl = !oEditor.FCK_IS_CUSTOM_DOMAIN || !FCKBrowserInfo.IsIE ?
-
 
55
			'javascript:void(0)' :
-
 
56
			'javascript:void( (function(){' +
-
 
57
				'document.open() ;' +
-
 
58
				'document.domain=\'' + document.domain + '\' ;' +
-
 
59
				'document.write(\'<html><head><script>window.onerror = function() { return true ; };<\/script><\/head><body><\/body><\/html>\') ;' +
-
 
60
				'document.close() ;' +
-
 
61
				'document.body.contentEditable = true ;' +
-
 
62
				'window.focus() ;' +
-
 
63
				'})() )' ;
-
 
64
 
37
		var oFrame = document.getElementById('frmData')
65
		var eFrameSpace = document.getElementById( 'xFrameSpace' ) ;
-
 
66
		eFrameSpace.innerHTML = '<iframe id="frmData" src="' + sFrameUrl + '" ' +
-
 
67
					'height="98%" width="99%" frameborder="0" style="border: #000000 1px; background-color: #ffffff"><\/iframe>' ;
-
 
68
 
38
		oFrame.style.display = '' ;
69
		var oFrame = eFrameSpace.firstChild ;
39
		
70
 
-
 
71
		if ( !oEditor.FCK_IS_CUSTOM_DOMAIN || !FCKBrowserInfo.IsIE )
-
 
72
		{
-
 
73
			// Avoid errors if the pasted content has any script that fails: #389
40
		if ( oFrame.contentDocument ) 
74
			var oDoc = oFrame.contentWindow.document ;
-
 
75
			oDoc.open() ;
-
 
76
			oDoc.write('<html><head><script>window.onerror = function() { return true ; };<\/script><\/head><body><\/body><\/html>') ;
-
 
77
			oDoc.close() ;
-
 
78
 
-
 
79
			if ( FCKBrowserInfo.IsIE )
41
			oFrame.contentDocument.designMode = 'on' ;
80
				oDoc.body.contentEditable = true ;
42
		else
81
			else
-
 
82
				oDoc.designMode = 'on' ;
-
 
83
 
43
			oFrame.contentWindow.document.body.contentEditable = true ;
84
			oFrame.contentWindow.focus();
-
 
85
		}
44
	}
86
	}
45
	else
87
	else
46
	{
88
	{
47
		document.getElementById('txtData').style.display = '' ;
89
		document.getElementById('txtData').style.display = '' ;
48
		document.getElementById('oWordCommands').style.display = 'none' ;
-
 
49
	}
90
	}
-
 
91
 
-
 
92
	if ( sPastingType != 'Word' )
-
 
93
		document.getElementById('oWordCommands').style.display = 'none' ;
50
 
94
 
51
	window.parent.SetOkButton( true ) ;	
95
	dialog.SetOkButton( true ) ;
52
	window.parent.SetAutoSize( true ) ;	
96
	dialog.SetAutoSize( true ) ;
53
}
97
}
54
 
98
 
55
function Ok()
99
function Ok()
56
{
100
{
-
 
101
	// Before doing anything, save undo snapshot.
-
 
102
	oEditor.FCKUndo.SaveUndoStep() ;
-
 
103
 
57
	var sHtml ;
104
	var sHtml ;
58
	
105
 
59
	if ( window.parent.dialogArguments.CustomValue == 'Word' )
106
	var sPastingType = dialog.Args().CustomValue ;
-
 
107
 
-
 
108
	if ( sPastingType == 'Word' || sPastingType == 'Security' )
60
	{
109
	{
61
		var oFrame = document.getElementById('frmData') ;
110
		var oFrame = document.getElementById('frmData') ;
-
 
111
		var oBody ;
62
		
112
 
63
		if ( oFrame.contentDocument ) 
113
		if ( oFrame.contentDocument )
64
			sHtml = oFrame.contentDocument.body.innerHTML ;
114
			oBody = oFrame.contentDocument.body ;
65
		else
115
		else
66
			sHtml = oFrame.contentWindow.document.body.innerHTML ;
116
			oBody = oFrame.contentWindow.document.body ;
-
 
117
 
-
 
118
		if ( sPastingType == 'Word' )
-
 
119
		{
-
 
120
			// If a plugin creates a FCK.CustomCleanWord function it will be called instead of the default one
-
 
121
			if ( typeof( FCK.CustomCleanWord ) == 'function' )
-
 
122
				sHtml = FCK.CustomCleanWord( oBody, document.getElementById('chkRemoveFont').checked, document.getElementById('chkRemoveStyles').checked ) ;
-
 
123
			else
-
 
124
				sHtml = CleanWord( oBody, document.getElementById('chkRemoveFont').checked, document.getElementById('chkRemoveStyles').checked ) ;
-
 
125
		}
-
 
126
		else
-
 
127
			sHtml = oBody.innerHTML ;
-
 
128
 
-
 
129
		// Fix relative anchor URLs (IE automatically adds the current page URL).
67
 
130
		var re = new RegExp( window.location + "#", "g" ) ;
68
		sHtml = CleanWord( sHtml ) ;
131
		sHtml = sHtml.replace( re, '#') ;
69
	}
132
	}
70
	else
133
	else
71
	{
134
	{
72
		var sHtml = oEditor.FCKTools.HTMLEncode( document.getElementById('txtData').value )  ;
135
		sHtml = oEditor.FCKTools.HTMLEncode( document.getElementById('txtData').value )  ;
-
 
136
		sHtml = FCKTools.ProcessLineBreaks( oEditor, FCKConfig, sHtml ) ;
-
 
137
 
-
 
138
		// FCK.InsertHtml() does not work for us, since document fragments cannot contain node fragments. :(
-
 
139
		// Use the marker method instead. It's primitive, but it works.
-
 
140
		var range = new oEditor.FCKDomRange( oEditor.FCK.EditorWindow ) ;
-
 
141
		var oDoc = oEditor.FCK.EditorDocument ;
-
 
142
		dialog.Selection.EnsureSelection() ;
-
 
143
		range.MoveToSelection() ;
-
 
144
		range.DeleteContents() ;
-
 
145
		var marker = [] ;
-
 
146
		for ( var i = 0 ; i < 5 ; i++ )
-
 
147
			marker.push( parseInt(Math.random() * 100000, 10 ) ) ;
-
 
148
		marker = marker.join( "" ) ;
-
 
149
		range.InsertNode ( oDoc.createTextNode( marker ) ) ;
-
 
150
		var bookmark = range.CreateBookmark() ;
-
 
151
 
-
 
152
		// Now we've got a marker indicating the paste position in the editor document.
-
 
153
		// Find its position in the HTML code.
-
 
154
		var htmlString = oDoc.body.innerHTML ;
-
 
155
		var index = htmlString.indexOf( marker ) ;
-
 
156
 
-
 
157
		// Split it the HTML code up, add the code we generated, and put them back together.
-
 
158
		var htmlList = [] ;
73
		sHtml = sHtml.replace( /\n/g, '<BR>' ) ;
159
		htmlList.push( htmlString.substr( 0, index ) ) ;
-
 
160
		htmlList.push( sHtml ) ;
-
 
161
		htmlList.push( htmlString.substr( index + marker.length ) ) ;
-
 
162
		htmlString = htmlList.join( "" ) ;
-
 
163
 
-
 
164
		if ( oEditor.FCKBrowserInfo.IsIE )
-
 
165
			oEditor.FCK.SetInnerHtml( htmlString ) ;
-
 
166
		else
-
 
167
			oDoc.body.innerHTML = htmlString ;
-
 
168
 
-
 
169
		range.MoveToBookmark( bookmark ) ;
-
 
170
		range.Collapse( false ) ;
-
 
171
		range.Select() ;
-
 
172
		range.Release() ;
-
 
173
		return true ;
74
	}
174
	}
75
	
175
 
76
	oEditor.FCK.InsertHtml( sHtml ) ;
176
	oEditor.FCK.InsertHtml( sHtml ) ;
77
	
177
 
78
	return true ;
178
	return true ;
79
}
179
}
-
 
180
 
-
 
181
// This function will be called from the PasteFromWord dialog (fck_paste.html)
-
 
182
// Input: oNode a DOM node that contains the raw paste from the clipboard
80
 
183
// bIgnoreFont, bRemoveStyles booleans according to the values set in the dialog
-
 
184
// Output: the cleaned string
81
function CleanUpBox()
185
function CleanWord( oNode, bIgnoreFont, bRemoveStyles )
82
{
-
 
83
	var oFrame = document.getElementById('frmData') ;
-
 
84
	
-
 
85
	if ( oFrame.contentDocument ) 
186
{
86
		oFrame.contentDocument.body.innerHTML = '' ;
-
 
87
	else
-
 
88
		oFrame.contentWindow.document.body.innerHTML = '' ;
-
 
89
}
-
 
90
 
-
 
91
function CleanWord( html )
187
	var html = oNode.innerHTML ;
92
{
188
 
93
	var bIgnoreFont = document.getElementById('chkRemoveFont').checked ;
-
 
94
	var bRemoveStyles = document.getElementById('chkRemoveStyles').checked ;
-
 
95
 
-
 
96
	html = html.replace(/<o:p>\s*<\/o:p>/g, "") ;
189
	html = html.replace(/<o:p>\s*<\/o:p>/g, '') ;
97
	html = html.replace(/<o:p>.*?<\/o:p>/g, "&nbsp;") ;
190
	html = html.replace(/<o:p>[\s\S]*?<\/o:p>/g, '&nbsp;') ;
98
	
191
 
99
	// Remove mso-xxx styles.
192
	// Remove mso-xxx styles.
100
	html = html.replace( /\s*mso-[^:]+:[^;"]+;?/gi, "" ) ;
193
	html = html.replace( /\s*mso-[^:]+:[^;"]+;?/gi, '' ) ;
101
 
194
 
102
	// Remove margin styles.
195
	// Remove margin styles.
103
	html = html.replace( /\s*MARGIN: 0cm 0cm 0pt\s*;/gi, "" ) ;
196
	html = html.replace( /\s*MARGIN: 0cm 0cm 0pt\s*;/gi, '' ) ;
104
	html = html.replace( /\s*MARGIN: 0cm 0cm 0pt\s*"/gi, "\"" ) ;
197
	html = html.replace( /\s*MARGIN: 0cm 0cm 0pt\s*"/gi, "\"" ) ;
105
 
198
 
106
	html = html.replace( /\s*TEXT-INDENT: 0cm\s*;/gi, "" ) ;
199
	html = html.replace( /\s*TEXT-INDENT: 0cm\s*;/gi, '' ) ;
107
	html = html.replace( /\s*TEXT-INDENT: 0cm\s*"/gi, "\"" ) ;
200
	html = html.replace( /\s*TEXT-INDENT: 0cm\s*"/gi, "\"" ) ;
108
 
201
 
109
	html = html.replace( /\s*TEXT-ALIGN: [^\s;]+;?"/gi, "\"" ) ;
202
	html = html.replace( /\s*TEXT-ALIGN: [^\s;]+;?"/gi, "\"" ) ;
110
 
203
 
111
	html = html.replace( /\s*PAGE-BREAK-BEFORE: [^\s;]+;?"/gi, "\"" ) ;
204
	html = html.replace( /\s*PAGE-BREAK-BEFORE: [^\s;]+;?"/gi, "\"" ) ;
112
 
205
 
113
	html = html.replace( /\s*FONT-VARIANT: [^\s;]+;?"/gi, "\"" ) ;
206
	html = html.replace( /\s*FONT-VARIANT: [^\s;]+;?"/gi, "\"" ) ;
114
 
207
 
115
	html = html.replace( /\s*tab-stops:[^;"]*;?/gi, "" ) ;
208
	html = html.replace( /\s*tab-stops:[^;"]*;?/gi, '' ) ;
116
	html = html.replace( /\s*tab-stops:[^"]*/gi, "" ) ;
209
	html = html.replace( /\s*tab-stops:[^"]*/gi, '' ) ;
117
 
210
 
118
	// Remove FONT face attributes.
211
	// Remove FONT face attributes.
119
	if ( bIgnoreFont )
212
	if ( bIgnoreFont )
120
	{
213
	{
121
		html = html.replace( /\s*face="[^"]*"/gi, "" ) ;
214
		html = html.replace( /\s*face="[^"]*"/gi, '' ) ;
122
		html = html.replace( /\s*face=[^ >]*/gi, "" ) ;
215
		html = html.replace( /\s*face=[^ >]*/gi, '' ) ;
123
 
216
 
124
		html = html.replace( /\s*FONT-FAMILY:[^;"]*;?/gi, "" ) ;
217
		html = html.replace( /\s*FONT-FAMILY:[^;"]*;?/gi, '' ) ;
125
	}
218
	}
126
	
219
 
127
	// Remove Class attributes
220
	// Remove Class attributes
128
	html = html.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi, "<$1$3") ;
221
	html = html.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi, "<$1$3") ;
129
 
222
 
130
	// Remove styles.
223
	// Remove styles.
131
	if ( bRemoveStyles )
224
	if ( bRemoveStyles )
132
		html = html.replace( /<(\w[^>]*) style="([^\"]*)"([^>]*)/gi, "<$1$3" ) ;
225
		html = html.replace( /<(\w[^>]*) style="([^\"]*)"([^>]*)/gi, "<$1$3" ) ;
-
 
226
 
-
 
227
	// Remove style, meta and link tags
-
 
228
	html = html.replace( /<STYLE[^>]*>[\s\S]*?<\/STYLE[^>]*>/gi, '' ) ;
-
 
229
	html = html.replace( /<(?:META|LINK)[^>]*>\s*/gi, '' ) ;
133
 
230
 
134
	// Remove empty styles.
231
	// Remove empty styles.
135
	html =  html.replace( /\s*style="\s*"/gi, '' ) ;
232
	html =  html.replace( /\s*style="\s*"/gi, '' ) ;
136
	
233
 
137
	html = html.replace( /<SPAN\s*[^>]*>\s*&nbsp;\s*<\/SPAN>/gi, '&nbsp;' ) ;
234
	html = html.replace( /<SPAN\s*[^>]*>\s*&nbsp;\s*<\/SPAN>/gi, '&nbsp;' ) ;
138
	
235
 
139
	html = html.replace( /<SPAN\s*[^>]*><\/SPAN>/gi, '' ) ;
236
	html = html.replace( /<SPAN\s*[^>]*><\/SPAN>/gi, '' ) ;
140
	
237
 
141
	// Remove Lang attributes
238
	// Remove Lang attributes
142
	html = html.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi, "<$1$3") ;
239
	html = html.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi, "<$1$3") ;
143
	
240
 
144
	html = html.replace( /<SPAN\s*>(.*?)<\/SPAN>/gi, '$1' ) ;
241
	html = html.replace( /<SPAN\s*>([\s\S]*?)<\/SPAN>/gi, '$1' ) ;
145
	
242
 
146
	html = html.replace( /<FONT\s*>(.*?)<\/FONT>/gi, '$1' ) ;
243
	html = html.replace( /<FONT\s*>([\s\S]*?)<\/FONT>/gi, '$1' ) ;
147
 
244
 
-
 
245
	// Remove XML elements and declarations
-
 
246
	html = html.replace(/<\\?\?xml[^>]*>/gi, '' ) ;
-
 
247
 
148
	// Remove XML elements and declarations
248
	// Remove w: tags with contents.
149
	html = html.replace(/<\\?\?xml[^>]*>/gi, "") ;
249
	html = html.replace( /<w:[^>]*>[\s\S]*?<\/w:[^>]*>/gi, '' ) ;
150
	
250
 
151
	// Remove Tags with XML namespace declarations: <o:p><\/o:p>
251
	// Remove Tags with XML namespace declarations: <o:p><\/o:p>
152
	html = html.replace(/<\/?\w+:[^>]*>/gi, "") ;
252
	html = html.replace(/<\/?\w+:[^>]*>/gi, '' ) ;
153
	
253
 
-
 
254
	// Remove comments [SF BUG-1481861].
-
 
255
	html = html.replace(/<\!--[\s\S]*?-->/g, '' ) ;
154
	// Remove comments [SF BUG-1481861].
256
 
155
	html = html.replace(/<\!--.*-->/g, "") ;
257
	html = html.replace( /<(U|I|STRIKE)>&nbsp;<\/\1>/g, '&nbsp;' ) ;
156
	
258
 
157
	html = html.replace( /<H\d>\s*<\/H\d>/gi, '' ) ;
259
	html = html.replace( /<H\d>\s*<\/H\d>/gi, '' ) ;
158
 
-
 
159
	html = html.replace( /<H1([^>]*)>/gi, '<div$1><b><font size="6">' ) ;
-
 
160
	html = html.replace( /<H2([^>]*)>/gi, '<div$1><b><font size="5">' ) ;
-
 
161
	html = html.replace( /<H3([^>]*)>/gi, '<div$1><b><font size="4">' ) ;
-
 
-
 
260
 
162
	html = html.replace( /<H4([^>]*)>/gi, '<div$1><b><font size="3">' ) ;
261
	// Remove "display:none" tags.
163
	html = html.replace( /<H5([^>]*)>/gi, '<div$1><b><font size="2">' ) ;
262
	html = html.replace( /<(\w+)[^>]*\sstyle="[^"]*DISPLAY\s?:\s?none[\s\S]*?<\/\1>/ig, '' ) ;
-
 
263
 
-
 
264
	// Remove language tags
164
	html = html.replace( /<H6([^>]*)>/gi, '<div$1><b><font size="1">' ) ;
265
	html = html.replace( /<(\w[^>]*) language=([^ |>]*)([^>]*)/gi, "<$1$3") ;
165
 
266
 
-
 
267
	// Remove onmouseover and onmouseout events (from MS Word comments effect)
-
 
268
	html = html.replace( /<(\w[^>]*) onmouseover="([^\"]*)"([^>]*)/gi, "<$1$3") ;
166
	html = html.replace( /<\/H\d>/gi, '<\/font><\/b><\/div>' ) ;
269
	html = html.replace( /<(\w[^>]*) onmouseout="([^\"]*)"([^>]*)/gi, "<$1$3") ;
-
 
270
 
-
 
271
	if ( FCKConfig.CleanWordKeepsStructure )
-
 
272
	{
167
	
273
		// The original <Hn> tag send from Word is something like this: <Hn style="margin-top:0px;margin-bottom:0px">
-
 
274
		html = html.replace( /<H(\d)([^>]*)>/gi, '<h$1>' ) ;
-
 
275
 
-
 
276
		// Word likes to insert extra <font> tags, when using MSIE. (Wierd).
-
 
277
		html = html.replace( /<(H\d)><FONT[^>]*>([\s\S]*?)<\/FONT><\/\1>/gi, '<$1>$2<\/$1>' );
-
 
278
		html = html.replace( /<(H\d)><EM>([\s\S]*?)<\/EM><\/\1>/gi, '<$1>$2<\/$1>' );
-
 
279
	}
-
 
280
	else
-
 
281
	{
-
 
282
		html = html.replace( /<H1([^>]*)>/gi, '<div$1><b><font size="6">' ) ;
-
 
283
		html = html.replace( /<H2([^>]*)>/gi, '<div$1><b><font size="5">' ) ;
168
	html = html.replace( /<(U|I|STRIKE)>&nbsp;<\/\1>/g, '&nbsp;' ) ;
284
		html = html.replace( /<H3([^>]*)>/gi, '<div$1><b><font size="4">' ) ;
169
 
285
		html = html.replace( /<H4([^>]*)>/gi, '<div$1><b><font size="3">' ) ;
170
	// Remove empty tags (three times, just to be sure).
286
		html = html.replace( /<H5([^>]*)>/gi, '<div$1><b><font size="2">' ) ;
171
	html = html.replace( /<([^\s>]+)(\s[^>]*)?>\s*<\/\1>/g, '' ) ;
287
		html = html.replace( /<H6([^>]*)>/gi, '<div$1><b><font size="1">' ) ;
172
	html = html.replace( /<([^\s>]+)(\s[^>]*)?>\s*<\/\1>/g, '' ) ;
288
 
173
	html = html.replace( /<([^\s>]+)(\s[^>]*)?>\s*<\/\1>/g, '' ) ;
289
		html = html.replace( /<\/H\d>/gi, '<\/font><\/b><\/div>' ) ;
174
 
290
 
-
 
291
		// Transform <P> to <DIV>
-
 
292
		var re = new RegExp( '(<P)([^>]*>[\\s\\S]*?)(<\/P>)', 'gi' ) ;	// Different because of a IE 5.0 error
175
	// Transform <P> to <DIV>
293
		html = html.replace( re, '<div$2<\/div>' ) ;
176
	var re = new RegExp( "(<P)([^>]*>.*?)(<\/P>)", "gi" ) ;	// Different because of a IE 5.0 error
294
 
-
 
295
		// Remove empty tags (three times, just to be sure).
177
	html = html.replace( re, "<div$2<\/div>" ) ;
296
		// This also removes any empty anchor
178
	
297
		html = html.replace( /<([^\s>]+)(\s[^>]*)?>\s*<\/\1>/g, '' ) ;
179
	// Fix relative anchor URLs (IE automatically adds the current page URL).
298
		html = html.replace( /<([^\s>]+)(\s[^>]*)?>\s*<\/\1>/g, '' ) ;
180
	re = new RegExp( window.location + "#", "g" ) ;
299
		html = html.replace( /<([^\s>]+)(\s[^>]*)?>\s*<\/\1>/g, '' ) ;
181
	html = html.replace( re, '#') ;
300
	}
182
 
301
 
183
	return html ;
302
	return html ;
184
}
303
}
185
 
304
 
186
	</script>
305
	</script>
-
 
306
 
187
</head>
307
</head>
188
<body style="overflow: hidden">
308
<body style="overflow: hidden">
189
	<table cellspacing="0" cellpadding="0" width="100%" border="0" style="height: 98%">
309
	<table cellspacing="0" cellpadding="0" width="100%" border="0" style="height: 98%">
190
		<tr>
310
		<tr>
191
			<td>
311
			<td>
-
 
312
				<div id="xSecurityMsg" style="display: none">
-
 
313
					<span fcklang="DlgPasteSec">Because of your browser security settings,
-
 
314
						the editor is not able to access your clipboard data directly. You are required
-
 
315
						to paste it again in this window.</span><br />
-
 
316
					&nbsp;
-
 
317
				</div>
-
 
318
				<div>
192
				<span fcklang="DlgPasteMsg2">Please paste inside the following box using the keyboard
319
					<span fcklang="DlgPasteMsg2">Please paste inside the following box using the keyboard
193
					(<strong>Ctrl+V</strong>) and hit <strong>OK</strong>.</span>
320
						(<strong>Ctrl+V</strong>) and hit <strong>OK</strong>.</span><br />
194
				<br />
321
					&nbsp;
195
				&nbsp;
322
				</div>
196
			</td>
323
			</td>
197
		</tr>
324
		</tr>
198
		<tr>
325
		<tr>
199
			<td valign="top" height="100%" style="border-right: #000000 1px solid; border-top: #000000 1px solid;
326
			<td id="xFrameSpace" valign="top" height="100%" style="border: #000000 1px solid">
200
				border-left: #000000 1px solid; border-bottom: #000000 1px solid">
-
 
201
				<textarea id="txtData" cols="80" rows="5" style="border: #000000 1px; display: none;
327
				<textarea id="txtData" cols="80" rows="5" style="border: #000000 1px; display: none;
202
					width: 99%; height: 98%"></textarea>
328
					width: 99%; height: 98%"></textarea>
203
				<iframe id="frmData" src="javascript:void(0)" height="98%" width="99%" frameborder="0"
-
 
204
					style="border-right: #000000 1px; border-top: #000000 1px; display: none; border-left: #000000 1px;
-
 
205
					border-bottom: #000000 1px; background-color: #ffffff"></iframe>
-
 
206
			</td>
329
			</td>
207
		</tr>
330
		</tr>
208
		<tr id="oWordCommands">
331
		<tr id="oWordCommands">
209
			<td>
332
			<td>
210
				<table border="0" cellpadding="0" cellspacing="0" width="100%">
-
 
211
					<tr>
333
 
212
						<td nowrap="nowrap">
-
 
213
							<input id="chkRemoveFont" type="checkbox" checked="checked" />
334
					<input id="chkRemoveFont" type="checkbox" checked="checked" />
214
							<label for="chkRemoveFont" fcklang="DlgPasteIgnoreFont">
335
					<label for="chkRemoveFont" fcklang="DlgPasteIgnoreFont">
215
								Ignore Font Face definitions</label>
336
						Ignore Font Face definitions</label>
216
							<br />
337
					<br />
217
							<input id="chkRemoveStyles" type="checkbox" />
338
					<input id="chkRemoveStyles" type="checkbox" />
218
							<label for="chkRemoveStyles" fcklang="DlgPasteRemoveStyles">
339
					<label for="chkRemoveStyles" fcklang="DlgPasteRemoveStyles">
219
								Remove Styles definitions</label>
340
						Remove Styles definitions</label>
220
						</td>
-
 
221
						<td align="right" valign="top">
-
 
222
							<input type="button" fcklang="DlgPasteCleanBox" value="Clean Up Box" onclick="CleanUpBox()" />
-
 
223
						</td>
-
 
224
					</tr>
341
 
225
				</table>
-
 
226
			</td>
342
			</td>
227
		</tr>
343
		</tr>
228
	</table>
344
	</table>
229
</body>
345
</body>
230
</html>
346
</html>