CleanUpProcess
The class you should extend when implementing a custom clean-up process. You can override each of the four clean-up methods individually.
public class myCleanUp extends CleanUpProcess {
public String cleanUpOnLoad(String strRawData) throws Exception {
//TODO:
implement your clean-up process
}
}cleanUpOnLoad
public String cleanUpOnLoad(
String strRawData
)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
public String cleanUpClipboard(
String strRawData
)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
public String cleanUpClipboardWithFilter(
String strRawData
)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
public String cleanUpOnSave(
String strRawData
)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.
customTags
java.util.Properties customTags;
Contains the custom elements as a set of properties.
String myCustomTag = customTags.getProperty("mytag");encoding
String encoding;
Contains the current encoding used by the applet. If no encoding was set, this field has the value null .
String curEncoding = encoding;
dtd
com.wutka.dtd.DTD dtd;
Contains the DTD currently used in the editor.
Object[] dtdItems = dtd.getItems();
dropIllegalAttributes
boolean dropIllegalAttributes;
Determines whether attributes not allowed according to the current DTD will be removed.
if(dropIllegalAttributes) { // execute your code here }dropIllegalTags
boolean dropIllegalTags;
Determines whether tags not allowed according to the current DTD will be removed.
if(dropIllegalTags) { // execute your code here }apiObject
Object apiObject;
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.
SwingEditorApplet theApplet = (SwingEditorApplet)apiObject; theApplet.clear();
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
Contains the data to be cleaned by the clean-up process.
TYPE
cleanUpOnLoad | cleanUpOnSave | cleanUpClipboard | cleanUpClipboardWithFilter
Contains the type of clean-up process to be performed. Use this to differenciate the different types of clean-up processes.
ENCODING
Contains the encoding of the document in the editor.
DROPILLEGALTAGS
true | false
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
true | false
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.