Inline CKEditor (feincms3.inline_ckeditor)

class feincms3.inline_ckeditor.InlineCKEditorField(*args, **kwargs)[source]

This field uses an inline CKEditor 4 instance to edit HTML. All HTML is cleansed using html-sanitizer.

The default configuration of both InlineCKEditorField and HTML sanitizer only allows a heavily restricted subset of HTML. This should make it easier to write CSS which works for all possible combinations of content which can be added through Django’s administration interface.

The field supports the following keyword arguments to alter its configuration and behavior:

  • cleanse: A callable which gets messy HTML and returns cleansed HTML.

  • ckeditor: A CDN URL for CKEditor 4.

  • config: Change the CKEditor 4 configuration. See the source for the current default.

  • config_name: Alternative way of configuring the CKEditor. Uses the FEINCMS3_CKEDITOR_CONFIG setting.

clean(value, instance)[source]

Run the cleaned form value through the cleanse callable

contribute_to_class(cls, name, **kwargs)[source]

Add a get_*_excerpt method to models which returns a de-HTML-ified excerpt of the contents of this field


Act as if we were a models.TextField. Migrations do not have to know that’s not 100% true.


Ensure that forms use the InlineCKEditorWidget