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


Ignore:
Timestamp:
09/30/05 08:08:02 (14 years ago)
Author:
niko
Comment:

added information for #538

Legend:

Unmodified
Added
Removed
Modified
  • Documentation/Plugins/SuperClean

    v1 v2  
    33[wiki:Plugins Back to Plugins] 
    44 
    5 The SuperClean plugin, developed by [http://code.gogo.co.nz/ James Sleeman] provides a combined interface for HTMLTidy, Word cleaning, and stripping out font typefaces, colours and sizes.  For the tidy functionality it uses a PHP backend file. 
     5The SuperClean plugin, developed by [http://code.gogo.co.nz/ James Sleeman] and improved by Niko Sams based on code by Udo Schmal provides a combined interface for HTMLTidy, Word cleaning, stripping out font typefaces, colours and sizes, and calling custom filter-functions.[[BR]] 
     6For the tidy functionality it uses a PHP backend file. 
     7 
     8=== Plugin-Setting filters: === 
     9Defines the avaliable filters 
     10{{{ 
     11editor.config.SuperClean.filters = { 
     12               'tidy': HTMLArea._lc('General tidy up and correction of some problems.', 'SuperClean'), 
     13               'myfilter': 'My special Filter' 
     14              }; 
     15}}} 
     16 
     17==== Avaliable built-in filters: ==== 
     18 * tidy: calls HTMLTidy (through the php-backend) 
     19 * word_clean: calls the Xinha Word-Clean-Functions 
     20 * remove_faces: removes all font-faces 
     21 * remove_sizes: removes all font-sizes 
     22 * remove_colors: removes all font-colors 
     23 
     24==== Custom filters ==== 
     25Custom filters must be defined in plugins/Filter/filters/myfilter.js[[BR]] 
     26example: 
     27{{{ 
     28function(html, editor) { 
     29  //...do something fancy with html... 
     30  return(html); 
     31} 
     32}}} 
     33 
     34 
     35=== Plugin-Setting show_dialog === 
     36If false all filters are applied on button click, if true a dialog asks which filters should be used 
     37{{{ 
     38//example (=default) 
     39editor.config.SuperClean.show_dialog = true; 
     40}}} 
     41 
     42=== Plugin-Setting tidy_handler: === 
     43Set to the URL of a handler for html tidy, this handler (see tidy.php for an example) must that a single post variable "content" which contains the HTML to tidy, and return javascript like editor.setHTML('<strong>Tidied Html</strong>') 
     44it's called through XMLHTTPRequest 
     45{{{ 
     46//example (=default setting) 
     47editor.config.SuperClean.tidy_handler = _editor_url + 'plugins/SuperClean/tidy.php' 
     48}}} 
     49