Subversion Repositories Applications.papyrus

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
431 ddelon 1
/*
2
 * FCKeditor - The text editor for internet
3
 * Copyright (C) 2003-2005 Frederico Caldeira Knabben
4
 *
5
 * Licensed under the terms of the GNU Lesser General Public License:
6
 * 		http://www.opensource.org/licenses/lgpl-license.php
7
 *
8
 * For further information visit:
9
 * 		http://www.fckeditor.net/
10
 *
11
 * File Name: fckxhtmlentities.js
12
 * 	This file define the HTML entities handled by the editor.
13
 *
14
 * File Authors:
15
 * 		Frederico Caldeira Knabben (fredck@fckeditor.net)
16
 */
17
 
18
if ( FCKConfig.ProcessHTMLEntities )
19
{
20
	FCKXHtmlEntities = new Object();
21
 
22
	FCKXHtmlEntities.Entities = {
23
		// Latin-1 Entities
24
		' ':'nbsp',
25
		'¡':'iexcl',
26
		'¢':'cent',
27
		'£':'pound',
28
		'¤':'curren',
29
		'¥':'yen',
30
		'¦':'brvbar',
31
		'§':'sect',
32
		'¨':'uml',
33
		'©':'copy',
34
		'ª':'ordf',
35
		'«':'laquo',
36
		'¬':'not',
37
		'­':'shy',
38
		'®':'reg',
39
		'¯':'macr',
40
		'°':'deg',
41
		'±':'plusmn',
42
		'²':'sup2',
43
		'³':'sup3',
44
		'´':'acute',
45
		'µ':'micro',
46
		'¶':'para',
47
		'·':'middot',
48
		'¸':'cedil',
49
		'¹':'sup1',
50
		'º':'ordm',
51
		'»':'raquo',
52
		'¼':'frac14',
53
		'½':'frac12',
54
		'¾':'frac34',
55
		'¿':'iquest',
56
		'×':'times',
57
		'÷':'divide',
58
 
59
		// Symbols and Greek Letters
60
 
61
		'ƒ':'fnof',
62
		'•':'bull',
63
		'…':'hellip',
64
		'′':'prime',
65
		'″':'Prime',
66
		'‾':'oline',
67
		'⁄':'frasl',
68
		'℘':'weierp',
69
		'ℑ':'image',
70
		'ℜ':'real',
71
		'™':'trade',
72
		'ℵ':'alefsym',
73
		'←':'larr',
74
		'↑':'uarr',
75
		'→':'rarr',
76
		'↓':'darr',
77
		'↔':'harr',
78
		'↵':'crarr',
79
		'⇐':'lArr',
80
		'⇑':'uArr',
81
		'⇒':'rArr',
82
		'⇓':'dArr',
83
		'⇔':'hArr',
84
		'∀':'forall',
85
		'∂':'part',
86
		'∃':'exist',
87
		'∅':'empty',
88
		'∇':'nabla',
89
		'∈':'isin',
90
		'∉':'notin',
91
		'∋':'ni',
92
		'∏':'prod',
93
		'∑':'sum',
94
		'−':'minus',
95
		'∗':'lowast',
96
		'√':'radic',
97
		'∝':'prop',
98
		'∞':'infin',
99
		'∠':'ang',
100
		'∧':'and',
101
		'∨':'or',
102
		'∩':'cap',
103
		'∪':'cup',
104
		'∫':'int',
105
		'∴':'there4',
106
		'∼':'sim',
107
		'≅':'cong',
108
		'≈':'asymp',
109
		'≠':'ne',
110
		'≡':'equiv',
111
		'≤':'le',
112
		'≥':'ge',
113
		'⊂':'sub',
114
		'⊃':'sup',
115
		'⊄':'nsub',
116
		'⊆':'sube',
117
		'⊇':'supe',
118
		'⊕':'oplus',
119
		'⊗':'otimes',
120
		'⊥':'perp',
121
		'⋅':'sdot',
122
		'◊':'loz',
123
		'♠':'spades',
124
		'♣':'clubs',
125
		'♥':'hearts',
126
		'♦':'diams',
127
 
128
		// Other Special Characters
129
 
130
		'"':'quot',
131
	//	'&':'amp',		// This entity is automatically handled by the XHTML parser.
132
	//	'<':'lt',		// This entity is automatically handled by the XHTML parser.
133
	//	'>':'gt',		// This entity is automatically handled by the XHTML parser.
134
		'ˆ':'circ',
135
		'˜':'tilde',
136
		' ':'ensp',
137
		' ':'emsp',
138
		' ':'thinsp',
139
		'‌':'zwnj',
140
		'‍':'zwj',
141
		'‎':'lrm',
142
		'‏':'rlm',
143
		'–':'ndash',
144
		'—':'mdash',
145
		'‘':'lsquo',
146
		'’':'rsquo',
147
		'‚':'sbquo',
148
		'“':'ldquo',
149
		'”':'rdquo',
150
		'„':'bdquo',
151
		'†':'dagger',
152
		'‡':'Dagger',
153
		'‰':'permil',
154
		'‹':'lsaquo',
155
		'›':'rsaquo',
156
		'¤':'euro'
157
	} ;
158
 
159
	FCKXHtmlEntities.Chars = '' ;
160
 
161
	// Process Base Entities.
162
	for ( var e in FCKXHtmlEntities.Entities )
163
		FCKXHtmlEntities.Chars += e ;
164
 
165
	// Include Latin Letters Entities.
166
	if ( FCKConfig.IncludeLatinEntities )
167
	{
168
		var oEntities = {
169
			'À':'Agrave',
170
			'Á':'Aacute',
171
			'Â':'Acirc',
172
			'Ã':'Atilde',
173
			'Ä':'Auml',
174
			'Å':'Aring',
175
			'Æ':'AElig',
176
			'Ç':'Ccedil',
177
			'È':'Egrave',
178
			'É':'Eacute',
179
			'Ê':'Ecirc',
180
			'Ë':'Euml',
181
			'Ì':'Igrave',
182
			'Í':'Iacute',
183
			'Î':'Icirc',
184
			'Ï':'Iuml',
185
			'Ð':'ETH',
186
			'Ñ':'Ntilde',
187
			'Ò':'Ograve',
188
			'Ó':'Oacute',
189
			'Ô':'Ocirc',
190
			'Õ':'Otilde',
191
			'Ö':'Ouml',
192
			'Ø':'Oslash',
193
			'Ù':'Ugrave',
194
			'Ú':'Uacute',
195
			'Û':'Ucirc',
196
			'Ü':'Uuml',
197
			'Ý':'Yacute',
198
			'Þ':'THORN',
199
			'ß':'szlig',
200
			'à':'agrave',
201
			'á':'aacute',
202
			'â':'acirc',
203
			'ã':'atilde',
204
			'ä':'auml',
205
			'å':'aring',
206
			'æ':'aelig',
207
			'ç':'ccedil',
208
			'è':'egrave',
209
			'é':'eacute',
210
			'ê':'ecirc',
211
			'ë':'euml',
212
			'ì':'igrave',
213
			'í':'iacute',
214
			'î':'icirc',
215
			'ï':'iuml',
216
			'ð':'eth',
217
			'ñ':'ntilde',
218
			'ò':'ograve',
219
			'ó':'oacute',
220
			'ô':'ocirc',
221
			'õ':'otilde',
222
			'ö':'ouml',
223
			'ø':'oslash',
224
			'ù':'ugrave',
225
			'ú':'uacute',
226
			'û':'ucirc',
227
			'ü':'uuml',
228
			'ý':'yacute',
229
			'þ':'thorn',
230
			'ÿ':'yuml',
231
			'Œ':'OElig',
232
			'œ':'oelig',
233
			'Š':'Scaron',
234
			'š':'scaron',
235
			'¾':'Yuml'
236
		} ;
237
 
238
		for ( var e in oEntities )
239
		{
240
			FCKXHtmlEntities.Entities[ e ] = oEntities[ e ] ;
241
			FCKXHtmlEntities.Chars += e ;
242
		}
243
 
244
		oEntities = null ;
245
	}
246
 
247
	// Include Greek Letters Entities.
248
	if ( FCKConfig.IncludeGreekEntities )
249
	{
250
		var oEntities = {
251
			'Α':'Alpha',
252
			'Β':'Beta',
253
			'Γ':'Gamma',
254
			'Δ':'Delta',
255
			'Ε':'Epsilon',
256
			'Ζ':'Zeta',
257
			'Η':'Eta',
258
			'Θ':'Theta',
259
			'Ι':'Iota',
260
			'Κ':'Kappa',
261
			'Λ':'Lambda',
262
			'Μ':'Mu',
263
			'Ν':'Nu',
264
			'Ξ':'Xi',
265
			'Ο':'Omicron',
266
			'Π':'Pi',
267
			'Ρ':'Rho',
268
			'Σ':'Sigma',
269
			'Τ':'Tau',
270
			'Υ':'Upsilon',
271
			'Φ':'Phi',
272
			'Χ':'Chi',
273
			'Ψ':'Psi',
274
			'Ω':'Omega',
275
			'α':'alpha',
276
			'β':'beta',
277
			'γ':'gamma',
278
			'δ':'delta',
279
			'ε':'epsilon',
280
			'ζ':'zeta',
281
			'η':'eta',
282
			'θ':'theta',
283
			'ι':'iota',
284
			'κ':'kappa',
285
			'λ':'lambda',
286
			'μ':'mu',
287
			'ν':'nu',
288
			'ξ':'xi',
289
			'ο':'omicron',
290
			'π':'pi',
291
			'ρ':'rho',
292
			'ς':'sigmaf',
293
			'σ':'sigma',
294
			'τ':'tau',
295
			'υ':'upsilon',
296
			'φ':'phi',
297
			'χ':'chi',
298
			'ψ':'psi',
299
			'ω':'omega'
300
		} ;
301
 
302
		for ( var e in oEntities )
303
		{
304
			FCKXHtmlEntities.Entities[ e ] = oEntities[ e ] ;
305
			FCKXHtmlEntities.Chars += e ;
306
		}
307
 
308
		oEntities = null ;
309
	}
310
 
311
	// Create and Compile the Regex used to separate the entities from the text.
312
	FCKXHtmlEntities.EntitiesRegex = new RegExp('','') ;
313
	FCKXHtmlEntities.EntitiesRegex.compile( '[' + FCKXHtmlEntities.Chars + ']|[^' + FCKXHtmlEntities.Chars + ']+', 'g' ) ;
314
 
315
	FCKXHtmlEntities.GeckoEntitiesMarkerRegex = /#\?-\:/g ;
316
}