Skip to the content.
Home   Demo   Downloads   Release Notes   Documentation
Report Bug   FAQ   Screenshots   Forum Archive   Developers  

Plugin: SuperClean

Back to Plugins

The SuperClean plugin, developed by 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.

Configuration

See the NewbieGuide for how to set configuration values in general, the below configuration options are available for this plugin.

Configuration of this plugin is not normally required, however there are some options to customise it if necessary.

Plugin-Setting filters:

Defines the avaliable filters

xinha_config.SuperClean.filters = {
               'tidy': HTMLArea._lc('General tidy up and correction of some problems.', 'SuperClean'),
               'myfilter': 'My special Filter'
              };

Avaliable built-in filters:

Custom filters

Custom filters must be defined in plugins/Filter/filters/myfilter.js
example:

function(html, editor) {
  //...do something fancy with html...
  return(html);
}

Plugin-Setting show_dialog

If false all filters are applied on button click, if true a dialog asks which filters should be used

//example (=default)
xinha_config.SuperClean.show_dialog = true;

Plugin-Setting tidy_handler:

Set 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(‘Tidied Html’) it’s called through XMLHTTPRequest

//example (=default setting)
xinha_config.SuperClean.tidy_handler = _editor_url + 'plugins/SuperClean/tidy.php'