Changeset 560


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
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/examples/ext_example-menu.php

    r511 r560  
    260260<?php 
    261261        $d = @dir($LocalPluginPath); 
     262        $dir_array = array(); 
    262263        while (false !== ($entry = $d->read()))  //not a dot file or directory 
    263264        {       if(substr($entry,0,1) != '.') 
    264                 { echo '<label><input type="checkbox" name="plugins" id="plugins" value="' . $entry . '"> ' . $entry . '</label>'."\n"; 
     265                { 
     266                        $dir_array[] = $entry; 
    265267                } 
    266268        } 
    267269        $d->close(); 
     270        sort($dir_array); 
     271        foreach ($dir_array as $entry) 
     272        { 
     273                echo '<label><input type="checkbox" name="plugins" id="plugins" value="' . $entry . '"> ' . $entry . '</label>'."\n"; 
     274        } 
     275 
    268276?> 
    269277      </div> 
  • 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.