Chapter III. Reference
Prev | 5. Clean-up Class and Form Fields | Next

## 5. Clean-up Class and Form Fields

### 5.1. Methods and Properties of the Client Side Clean-Up Base Class

#### 5.1.1. Base class

CleanUpProcess

Description:

  The class you should extend when implementing a custom clean-up process. You can override each of the four clean-up methods individually.

Example:

      public class myCleanUp extends CleanUpProcess {
          public String cleanUpOnLoad(String strRawData) throws Exception {
               //TODO:
              implement your clean-up process
          }
      }

#### 5.1.2. Methods

cleanUpOnLoad

Syntax:

      public String cleanUpOnLoad(
          String strRawData
      )

Description:

  Cleans up the string specified by strRawData and returns the cleaned data if no exception occurs. This method should be overridden for a custom implementation of the clean-up occurring when content is loaded.

cleanUpClipboard

Syntax:

      public String cleanUpClipboard(
          String strRawData
      )

Description:

  Cleans up the string specified by strRawData and returns the cleaned data if no exception occurs. This method should be overridden for a custom implementation of the clean-up occurring when content is pasted from the clipboard.

cleanUpClipboardWithFilter

Syntax:

      public String cleanUpClipboardWithFilter(
          String strRawData
      )

Description:

  Cleans up the string specified by strRawData and returns the cleaned data if no exception occurs. This method should be overridden for a custom implementation of the clean-up occurring when the `PASTEWITHFILTER` action is fired. See the chapter Actions .

cleanUpOnSave

Syntax:

      public String cleanUpOnSave(
          String strRawData
      )

Description:

  Cleans up the string specified by strRawData and returns the cleaned data if no exception occurs. This method should be overridden for a custom implementation of the clean-up occurring when content is exported.

#### 5.1.3. Properties

customTags

Declaration:

      java.util.Properties customTags;

Description:

  Contains the custom elements as a set of properties.

Example:

      String myCustomTag = customTags.getProperty("mytag");

encoding

Declaration:

      String encoding;

Description:

  Contains the current encoding used by the applet. If no encoding was set, this field has the value `null` .

Example:

      String curEncoding = encoding;

dtd

Declaration:

      com.wutka.dtd.DTD dtd;

Description:

  Contains the DTD currently used in the editor.

Example:

      Object[] dtdItems = dtd.getItems();

dropIllegalAttributes

Declaration:

      boolean dropIllegalAttributes;

Description:

  Determines whether attributes not allowed according to the current DTD will be removed.

Example:

      if(dropIllegalAttributes) { // execute your code here }

dropIllegalTags

Declaration:

      boolean dropIllegalTags;

Description:

  Determines whether tags not allowed according to the current DTD will be removed.

Example:

      if(dropIllegalTags) { // execute your code here }

apiObject

Declaration:

      Object apiObject;

Description:

  Contains a reference to the applet. Use this reference to access the applet's API methods described in the chapter JavaScript API / Java API . To access these API methods within the applet, you have to cast `apiObject` to `com.realobjects.eop.japplet.SwingEditorApplet` before you can access the methods.

Example:

      SwingEditorApplet theApplet = (SwingEditorApplet)apiObject;
      theApplet.clear();

### 5.2. Form Fields Sent to the Server by the Server Side Clean-Up Process

### Note:

All fields sent to the server side clean-up process are form fields. The value of the form fields is of type `string` . The form fields are sent by a POST request.

HTMLDATA

Description:

  Contains the data to be cleaned by the clean-up process.

TYPE

Possible values:

  `cleanUpOnLoad | cleanUpOnSave | cleanUpClipboard | cleanUpClipboardWithFilter`

Description:

  Contains the type of clean-up process to be performed. Use this to differenciate the different types of clean-up processes.

ENCODING

Description:

  Contains the encoding of the document in the editor.

DROPILLEGALTAGS

Possible values:

  `true | false`

Description:

  Contains the value of the `dropillegaltags` property. If this equals "true", all tags not allowed according to the DTD specified in the editor will be removed.

DROPILLEGALATTRIBUTES

Possible values:

  `true | false`

Description:

  Contains the value of the `dropillegalattributes` property. If this equals "true", all attributes not allowed according to the DTD specified in the editor will be removed.

Prev | Up | Next
4. CSS Reference | Home | 6. Keys Available in EOPDATA for each Action