Skip to main content

Extends Wagtail to use the amazing Froala editor. This Wagtail extension requires Wagtail 1.5.x, as it uses WAGTAILADMIN_RICH_TEXT_EDITORS.

Installation

Run the command pip install wagtailfroala

Add wagtailfroala to your INSTALLED_APPS.

Add wagtailfroala.rich_text.FroalaRichTextArea to WAGTAILADMIN_RICH_TEXT_EDITORS in your settings.

For example, to use Froala for all RichTextField and RichTextBlock instances:

WAGTAILADMIN_RICH_TEXT_EDITORS = {
    'default': {
        'WIDGET': 'wagtailfroala.rich_text.FroalaRichTextArea',
        'OPTIONS': {
            'key': 'xxxxxxxxxxxx'
         }
    }
}

Or, to use Froala only for defined instances…

WAGTAILADMIN_RICH_TEXT_EDITORS = {
    'default': {
        'WIDGET': 'wagtail.wagtailadmin.rich_text.HalloRichTextArea'
    },
    'froala': {
        'WIDGET': 'wagtailfroala.rich_text.FroalaRichTextArea',
        'OPTIONS': {
            'key': 'xxxxxxxxxxxx',
            'toolbarButtons': [
                'paragraphFormat', 'fontFamily', 'bold', 'italic',
                'underline', 'formatOL', 'formatUL', 'align',
                'color', '|', 'insertHR', 'insertLink', '|', 'undo', 'redo'
            ]
        }
    },
    'froala_small': {
        'WIDGET': 'wagtailfroala.rich_text.FroalaRichTextArea',
        'OPTIONS': {
            'key': 'xxxxxxxxxxxx',
            'toolbarButtons': ['fontFamily', 'bold', 'italic', 'underline', 'color', '|', 'insertLink'],
            'editorClass': 'editor-small'
        }
    }
}
html_field = RichTextField(editor='froala')
stream_field = StreamField([
    ('html', RichTextBlock(editor='froala_small'))
])

Options

You will need to ensure that the key option is correctly set with your Froala license key.

By default, Codemirror HTML syntax highlighting is enabled, you can disable it if you wish.

FROALA_CODEMIRROR = False

Font Awesome is required by Froala for toolbar icons, so it is included by default. If you don’t want to include it or already have a version included, you can disable it.

FROALA_FONT_AWESOME = False

To Do

Please feel free to contribute.

Release files for wagtailfroala 0.2.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wagtailfroala 0.2.10
File Size Uploaded
wagtailfroala-0.2.10.tar.gz 330.0 kB Details

Release files / wagtailfroala-0.2.10.tar.gz

Download URL wagtailfroala-0.2.10.tar.gz
Size 330.0 kB
Tags Source
SHA-256 checksum
How to use checksums
f72d7f5391acbecb434aa53823037cdb91d511677032baf356afe98945a3ff05
BLAKE2b-256 checksum
How to use checksums
52a59636aae7cb319235dc0267cd1d859485d6a471793464fbe62cbd1c693ca8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

0.2.11

1 release file

This release

0.2.10 This release

1 release file

0.2.9

1 release file

0.2.8

1 release file

0.2.7

1 release file

0.2.3

1 release file

0.2.1

1 release file

0.2

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page