Skip to content Skip to sidebar Skip to footer

Wagtail / Hallo.js - Adding Plugins But Modified Content Is Not Saved

I'm running on Wagtail 1.3.1, Django 1.7.11. I have activated hallohtml and hallojustify plugins and they appear in toolbar (without icons but buttons are here). The buttons can be

Solution 1:

By design, Wagtail only allows a subset of HTML tags and attributes, and strips out any that are not on its whitelist. This is done for several reasons: it prevents editors from inserting malicious content (such as <script> tags), and encourages site developers to keep content and presentation separate. (You shouldn't really be including formatting information such as left/right/centre alignment inside rich text content - that should be defined inside your template and CSS.)

You can customise the HTML whitelisting rules using the construct_whitelister_element_rules hook - however, I'd encourage you to reconsider whether you really need to overload the rich text editor with so much functionality, or whether there's a more structured way of achieving what you want (such as StreamField).

Post a Comment for "Wagtail / Hallo.js - Adding Plugins But Modified Content Is Not Saved"