Interface I_CmsHtmlConverter

All Known Implementing Classes:
A_CmsHtmlConverter, CmsHtmlConverterJTidy

public interface I_CmsHtmlConverter
HTML converters can be used to clean up HTML code and/or pretty print the code.

They can be configured in the configuration file opencms-vfs.xml and triggered when saving XML contents or XML pages. Their behavior is configurable by setting the content-conversion property value on VFS resources.

Since:
7.5.1
  • Method Summary

    Modifier and Type
    Method
    Description
    Converts the given HTML code according to the settings of this converter.
    Returns the encoding used for the HTML code conversion.
    Returns the conversion modes to use as List of String parameters.
    void
    init(String encoding, List<String> modes)
    Initializes the HTML converter instance.
  • Method Details

    • convertToString

      Converts the given HTML code according to the settings of this converter.

      Parameters:
      htmlInput - the HTML input stored in a string
      Returns:
      string containing the converted HTML
      Throws:
      UnsupportedEncodingException - if the encoding set for the conversion is not supported
    • getEncoding

      Returns the encoding used for the HTML code conversion.

      Returns:
      the encoding used for the HTML code conversion
    • getModes

      Returns the conversion modes to use as List of String parameters.

      Returns:
      the conversion modes to use as List of String parameters
    • init

      void init(String encoding, List<String> modes)
      Initializes the HTML converter instance.

      Possible values for the conversion mode are dependent from the converter implementation.

      Parameters:
      encoding - the encoding used for the HTML code conversion
      modes - the conversion modes to use