RedactorConfiguration class

RedactorConfiguration class

Provides access to a list of supported formats, built-in and custom user formats.

Learn more:

The RedactorConfiguration type exposes the following members:

Methods

Method Description
find_format Finds format configurations for a given file extension.
find_format_file
find_format_string
get_instance Returns a singleton instance with the default configuration of built-in formats.

Properties

Property Description
available_formats The list of recognized formats, see DocumentFormatConfiguration.

Example

# Add a custom user format handler
adobe_photoshop_settings = DocumentFormatConfiguration()
adobe_photoshop_settings.extension_filter = ".psd"
adobe_photoshop_settings.document_type = MyAdobePhotoshopFormatInstance

config = RedactorConfiguration.get_instance()
config.available_formats.add(adobe_photoshop_settings)
# Retrieve a built-in or custom user format handler
config = RedactorConfiguration.get_instance()
format_settings = config.find_format(".psd")

See Also