Ignore:
Timestamp:
02/24/07 02:18:05 (13 years ago)
Author:
ray
Message:

updated branch

Location:
branches/ray/plugins/HtmlEntities
Files:
2 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/ray/plugins/HtmlEntities/Entities.js

    • Property svn:keywords changed from Rev LastChangedRevision LastChangedDate LastChangedBy HeadURL to LastChangedDate LastChangedRevision LastChangedBy HeadURL Id
  • branches/ray/plugins/HtmlEntities/html-entities.js

    • Property svn:keywords changed from Rev LastChangedRevision LastChangedDate LastChangedBy HeadURL to LastChangedDate LastChangedRevision LastChangedBy HeadURL Id
    r615 r761  
    1010edit Entities.js.  
    1111You may save it under a different name using the xinha_config.HtmlEntities.EntitiesFile variable 
     12 
     13ISO-8859-1 preset is default, set 
     14   
     15  xinha_config.HtmlEntities.Encoding = null; 
     16 
     17if you want all special characters to be converted or want to load a custom file  
    1218\*------------------------------------------*/ 
    1319 
     
    2632  license       : "Creative Commons Attribution-ShareAlike License" 
    2733} 
    28 HTMLArea.Config.prototype.HtmlEntities = 
     34Xinha.Config.prototype.HtmlEntities = 
    2935{ 
     36        Encoding     : 'iso-8859-1', 
    3037        EntitiesFile : _editor_url + "plugins/HtmlEntities/Entities.js" 
    3138} 
    3239HtmlEntities.prototype.onGenerate = function() { 
    33     eval("var e = "+ HTMLArea._geturlcontent(this.editor.config.HtmlEntities.EntitiesFile)); 
    34     var specialReplacements = this.editor.config.specialReplacements; 
    35     for (var i in e) 
    36     { 
    37         specialReplacements[i] = e[i];   
     40    var e = this.editor; 
     41    var url = (e.config.HtmlEntities.Encoding) ?  _editor_url + "plugins/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) 
     46                { 
     47                        specialReplacements[i] =  replacements[i];       
     48                } 
    3849    } 
     50    Xinha._getback(url,callback); 
    3951} 
Note: See TracChangeset for help on using the changeset viewer.