Ignore:
Timestamp:
08/28/06 15:55:24 (13 years ago)
Author:
ray
Message:
  • Ticket #835 Pass editor to custom filters
  • Ticket #836 Additional incarnations of fancy quotes
  • Ticket #837 Sort plugins in extended example
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/plugins/SuperClean/super-clean.js

    r522 r560  
    4848      if(opts[filter]) 
    4949      { 
    50         D = SuperClean.filterFunctions[filter](D); 
     50        D = SuperClean.filterFunctions[filter](D, editor); 
    5151      } 
    5252    } 
     
    106106  // or 'filter_name' : {label: "Label", checked: true/false, filterFunction: function(html) { ... return html;} } 
    107107  // filterFunction in the second format above is optional. 
    108    
     108 
    109109  'filters': { 'tidy': HTMLArea._lc('General tidy up and correction of some problems.', 'SuperClean'), 
    110110               'word_clean': HTMLArea._lc('Clean bad HTML from Microsoft Word', 'SuperClean'), 
     
    160160  D = D.replace(new RegExp(String.fromCharCode(8216),"g"),"'"); 
    161161  D = D.replace(new RegExp(String.fromCharCode(8217),"g"),"'"); 
     162  D = D.replace(new RegExp(String.fromCharCode(8218),"g"),"'"); 
     163  D = D.replace(new RegExp(String.fromCharCode(8219),"g"),"'"); 
    162164  D = D.replace(new RegExp(String.fromCharCode(8220),"g"),"\""); 
    163165  D = D.replace(new RegExp(String.fromCharCode(8221),"g"),"\""); 
     166  D = D.replace(new RegExp(String.fromCharCode(8222),"g"),"\""); 
     167  D = D.replace(new RegExp(String.fromCharCode(8223),"g"),"\""); 
    164168  return D; 
    165169}; 
     
    193197  //load the filter-functions 
    194198  for(var filter in this.editor.config.SuperClean.filters) 
    195   {     
     199  { 
    196200    if(!SuperClean.filterFunctions[filter]) 
    197201    { 
     
    250254    var filtDetail = this.SuperClean.editor.config.SuperClean.filters[filter]; 
    251255    if(typeof filtDetail.label == 'undefined') 
    252     {     
     256    { 
    253257      htmlFilters += "        <input type=\"checkbox\" name=\"["+filter+"]\" id=\"["+filter+"]\" checked />\n"; 
    254258      htmlFilters += "        <label for=\"["+filter+"]\">"+this.SuperClean.editor.config.SuperClean.filters[filter]+"</label>\n"; 
Note: See TracChangeset for help on using the changeset viewer.