1 /*------------------------------------------*\
5 Intended to faciliate the use of special characters with ISO 8 bit encodings.
7 Using the conversion map provided by mharrisonline in ticket #127
9 If you want to adjust the list, e.g. to except the characters that are available in the used charset,
11 You may save it under a different name using the xinha_config.HtmlEntities.EntitiesFile variable
13 ISO-8859-1 preset is default, set
15 xinha_config.HtmlEntities.Encoding = null;
17 if you want all special characters to be converted or want to load a custom file
18 \*------------------------------------------*/
20 function HtmlEntities(editor
) {
24 HtmlEntities
._pluginInfo
= {
25 name
: "HtmlEntities",
27 developer
: "Raimund Meyer",
28 developer_url
: "http://x-webservice.net",
29 c_owner
: "Xinha community",
32 license
: "Creative Commons Attribution-ShareAlike License"
34 Xinha
.Config
.prototype.HtmlEntities
=
36 Encoding
: 'iso-8859-1',
37 EntitiesFile
: Xinha
.getPluginDir("HtmlEntities") + "/Entities.js"
39 HtmlEntities
.prototype.onGenerate = function() {
41 var url
= (e
.config
.HtmlEntities
.Encoding
) ? Xinha
.getPluginDir("HtmlEntities") + "/"+e
.config
.HtmlEntities
.Encoding
+".js" : e
.config
.HtmlEntities
.EntitiesFile
;
42 var callback = function (getback
) {
43 var specialReplacements
= e
.config
.specialReplacements
;
44 eval("var replacements =" + getback
);
45 for (var i
in replacements
)
47 specialReplacements
[i
] = replacements
[i
];
50 Xinha
._getback(url
,callback
);