Subversion Repositories Applications.papyrus

Rev

Rev 431 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 431 Rev 875
Line 1... Line 1...
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
4
 * Copyright (C) 2003-2005 Frederico Caldeira Knabben
4
 * Copyright (C) 2003-2006 Frederico Caldeira Knabben
5
 * 
5
 * 
6
 * Licensed under the terms of the GNU Lesser General Public License:
6
 * Licensed under the terms of the GNU Lesser General Public License:
7
 * 		http://www.opensource.org/licenses/lgpl-license.php
7
 * 		http://www.opensource.org/licenses/lgpl-license.php
8
 * 
8
 * 
9
 * For further information visit:
9
 * For further information visit:
10
 * 		http://www.fckeditor.net/
10
 * 		http://www.fckeditor.net/
11
 * 
11
 * 
-
 
12
 * "Support Open Source software. What about a donation today?"
-
 
13
 * 
12
 * File Name: fck_paste.html
14
 * File Name: fck_paste.html
13
 * 	This dialog is shown when, for some reason (usually security settings), 
15
 * 	This dialog is shown when, for some reason (usually security settings), 
14
 * 	the user is not able to paste data from the clipboard to the editor using 
16
 * 	the user is not able to paste data from the clipboard to the editor using 
15
 * 	the toolbar buttons or the context menu.
17
 * 	the toolbar buttons or the context menu.
16
 * 
18
 * 
Line 27... Line 29...
27
window.onload = function ()
29
window.onload = function ()
28
{
30
{
29
	// First of all, translate the dialog box texts
31
	// First of all, translate the dialog box texts
30
	oEditor.FCKLanguageManager.TranslatePage(document) ;
32
	oEditor.FCKLanguageManager.TranslatePage(document) ;
Line 31... Line -...
31
	
-
 
32
	window.parent.SetOkButton( true ) ;	
-
 
33
 
33
	
34
	if ( window.parent.dialogArguments.CustomValue == 'Word' )
34
	if ( window.parent.dialogArguments.CustomValue == 'Word' )
35
	{
35
	{
36
		var oFrame = document.getElementById('frmData')
36
		var oFrame = document.getElementById('frmData')
Line 44... Line 44...
44
	else
44
	else
45
	{
45
	{
46
		document.getElementById('txtData').style.display = '' ;
46
		document.getElementById('txtData').style.display = '' ;
47
		document.getElementById('oWordCommands').style.display = 'none' ;
47
		document.getElementById('oWordCommands').style.display = 'none' ;
48
	}
48
	}
-
 
49
 
-
 
50
	window.parent.SetOkButton( true ) ;	
-
 
51
	window.parent.SetAutoSize( true ) ;	
49
}
52
}
Line 50... Line 53...
50
 
53
 
51
function Ok()
54
function Ok()
52
{
55
{
Line 142... Line 145...
142
	html = html.replace( /<FONT\s*>(.*?)<\/FONT>/gi, '$1' ) ;
145
	html = html.replace( /<FONT\s*>(.*?)<\/FONT>/gi, '$1' ) ;
Line 143... Line 146...
143
 
146
 
144
	// Remove XML elements and declarations
147
	// Remove XML elements and declarations
Line 145... Line 148...
145
	html = html.replace(/<\\?\?xml[^>]*>/gi, "") ;
148
	html = html.replace(/<\\?\?xml[^>]*>/gi, "") ;
146
	
149
	
Line 147... Line 150...
147
	// Remove Tags with XML namespace declarations: <o:p></o:p>
150
	// Remove Tags with XML namespace declarations: <o:p><\/o:p>
Line 148... Line 151...
148
	html = html.replace(/<\/?\w+:[^>]*>/gi, "") ;
151
	html = html.replace(/<\/?\w+:[^>]*>/gi, "") ;
Line 154... Line 157...
154
	html = html.replace( /<H3([^>]*)>/gi, '<div$1><b><font size="4">' ) ;
157
	html = html.replace( /<H3([^>]*)>/gi, '<div$1><b><font size="4">' ) ;
155
	html = html.replace( /<H4([^>]*)>/gi, '<div$1><b><font size="3">' ) ;
158
	html = html.replace( /<H4([^>]*)>/gi, '<div$1><b><font size="3">' ) ;
156
	html = html.replace( /<H5([^>]*)>/gi, '<div$1><b><font size="2">' ) ;
159
	html = html.replace( /<H5([^>]*)>/gi, '<div$1><b><font size="2">' ) ;
157
	html = html.replace( /<H6([^>]*)>/gi, '<div$1><b><font size="1">' ) ;
160
	html = html.replace( /<H6([^>]*)>/gi, '<div$1><b><font size="1">' ) ;
Line 158... Line 161...
158
 
161
 
Line 159... Line 162...
159
	html = html.replace( /<\/H\d>/gi, '</font></b></div>' ) ;
162
	html = html.replace( /<\/H\d>/gi, '<\/font><\/b><\/div>' ) ;
Line 160... Line 163...
160
	
163
	
161
	html = html.replace( /<(U|I|STRIKE)>&nbsp;<\/\1>/g, '&nbsp;' ) ;
164
	html = html.replace( /<(U|I|STRIKE)>&nbsp;<\/\1>/g, '&nbsp;' ) ;
162
 
165
 
163
	// Remove empty tags (three times, just to be sure).
166
	// Remove empty tags (three times, just to be sure).
Line 164... Line 167...
164
	html = html.replace( /<([^\s>]+)[^>]*>\s*<\/\1>/g, '' ) ;
167
	html = html.replace( /<([^\s>]+)[^>]*>\s*<\/\1>/g, '' ) ;
165
	html = html.replace( /<([^\s>]+)[^>]*>\s*<\/\1>/g, '' ) ;
168
	html = html.replace( /<([^\s>]+)[^>]*>\s*<\/\1>/g, '' ) ;
166
	html = html.replace( /<([^\s>]+)[^>]*>\s*<\/\1>/g, '' ) ;
169
	html = html.replace( /<([^\s>]+)[^>]*>\s*<\/\1>/g, '' ) ;
Line 167... Line 170...
167
 
170
 
168
	// Transform <P> to <DIV>
171
	// Transform <P> to <DIV>
Line 169... Line 172...
169
	var re = new RegExp("(<P)([^>]*>.*?)(<\/P>)","gi") ;	// Different because of a IE 5.0 error
172
	var re = new RegExp("(<P)([^>]*>.*?)(<\/P>)","gi") ;	// Different because of a IE 5.0 error
Line 185... Line 188...
185
				</td>
188
				</td>
186
			</tr>
189
			</tr>
187
			<tr>
190
			<tr>
188
				<td valign="top" height="100%" style="BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid">
191
				<td valign="top" height="100%" style="BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid">
189
					<textarea id="txtData" style="BORDER-RIGHT: #000000 1px; BORDER-TOP: #000000 1px; DISPLAY: none; BORDER-LEFT: #000000 1px; WIDTH: 99%; BORDER-BOTTOM: #000000 1px; HEIGHT: 98%"></textarea>
192
					<textarea id="txtData" style="BORDER-RIGHT: #000000 1px; BORDER-TOP: #000000 1px; DISPLAY: none; BORDER-LEFT: #000000 1px; WIDTH: 99%; BORDER-BOTTOM: #000000 1px; HEIGHT: 98%"></textarea>
190
					<iframe id="frmData" src="../fckblank.html" height="98%" width="99%" frameborder="no" style="BORDER-RIGHT: #000000 1px; BORDER-TOP: #000000 1px; DISPLAY: none; BORDER-LEFT: #000000 1px; BORDER-BOTTOM: #000000 1px; BACKGROUND-COLOR: #ffffff">
193
					<iframe id="frmData" src="../fckblank.html" height="98%" width="99%" frameborder="0" style="BORDER-RIGHT: #000000 1px; BORDER-TOP: #000000 1px; DISPLAY: none; BORDER-LEFT: #000000 1px; BORDER-BOTTOM: #000000 1px; BACKGROUND-COLOR: #ffffff">
191
					</iframe>
194
					</iframe>
192
				</td>
195
				</td>
193
			</tr>
196
			</tr>
194
			<tr id="oWordCommands">
197
			<tr id="oWordCommands">
195
				<td>
198
				<td>