Changes between Version 1 and Version 2 of Documentation/Plugins/HtmlEntities


Ignore:
Timestamp:
02/16/07 12:39:17 (13 years ago)
Author:
ray
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Documentation/Plugins/HtmlEntities

    v1 v2  
    22[wiki:Plugins Back To Plugins][[BR]] 
    33 
    4 Internally, the editor (actually !JavaScript) treats strings as Unicode, disregarding of the charset you are using in your page. As a result all named entities are decoded when editing, thereby possibly breaking the encoding of characters that are not available in the actual codepage, e.g. the € in iso-8859-1. 
     4Internally, the editor (actually !JavaScript) treats strings as Unicode, disregarding of the charset you are using in your page. As a result all named entities are decoded when editing, thereby possibly breaking the encoding of characters that are not available in the actual codepage, e.g. the € in ISO-8859-1, or “quotation marks”.  
     5Maybe these characters are rendered correctly in the browser, but they produce a "non SGML character number ..." error in HTML validation. 
    56 
    6 If you enable this plugin, all "special characters" are converted to named entities. 
    77 
    88== Usage == 
    9 If you want to exclude characters that are available in the used charset, you can edit the file Entities in the plugin folder by deleting or commenting out the respective lines. Then you save the file under a different name and reference it like this 
     9If you use the ISO-8859-1 charset, just load the plugin and all characters that are not contained therein are converted. 
     10 
     11If you want all non ASCII characters converted to named entites, set  
    1012{{{ 
    1113#!text/x-javascript 
    12  xinha_config.HtmlEntities.EntitiesFile = _editor_url + "plugins/HtmlEntities/iso-8859-1.js";  
     14 xinha_config.HtmlEntities.Encoding= null;  
    1315}}} 
    14 This preset file is already included in the distribution.[[BR]] 
    15 This way you will have no needless entities. 
     16 
     17If you want to exclude characters that are available in the used charset other than ISO-8859-1, you can edit the file Entities in the plugin folder by deleting or commenting out the respective lines. Then you save the file under a different name and reference it like this 
     18{{{ 
     19#!text/x-javascript 
     20 xinha_config.HtmlEntities.Encoding= null;  
     21 xinha_config.HtmlEntities.EntitiesFile = "/url/to/your/file.js";  
     22}}} 
     23This way you will have no needless entities. If you have done this for any charset, please consider sending it along, so that we can include it as a preset. 
    1624 
    1725The conversion map provided by mharrisonline in ticket #127[[BR]]