jonge-democraten / website

JD website
https://jongedemocraten.nl
MIT License
6 stars 2 forks source link

Trainers page with expand/collapse section #72

Closed bartromgens closed 9 years ago

bartromgens commented 9 years ago

See http://jongedemocraten.nl/scholing-vorming-1/trainers.html.

Is it possible to create this in a normal Mezzanine RichTextPage?

Pi2048 commented 9 years ago

Probably not. The onclick attribute is not one of the whitelisted attributes in the RICHTEXT_ALLOWED_ATTRIBUTES setting. Also, the script tag is filtered because it is not in the whitelisted RICHTEXT_SCRIPT_TAG_WHITELIST setting.

This is a problem and should probably be fixed.

Pi2048 commented 9 years ago

This now works. I have fixed this in the following way:

In order to make a show/hide functionality, do the following:

Pi2048 commented 9 years ago

This should probably be documented in the admin/design documentation, but not in the user documentation. I wouldn't support it for casual use. Its usability is also not sufficient for such cases.