The CKEditor Accordion module provies a CKEditor plugin for creating an accordion.
Unfortunately it's not very accessible.
Thankfully someone opened an issue and another user created a patch for version 7 and 8.
Unfortunately there were still a couple additional issues with this patch:
- The caret that showed the open / closed state of the accordion was not clickable
- There was no hover state
- There was no UW Purple!
I re-rolled the patch to address these last few issues and you can download the new patch below.
- Download CKEditor Accordion Module v 7.x-1.1
drush dl ckeditor_accordion-7.x-1.1 - Copy this patch file into the PARENT directory
- From command line run: patch -p0 < name-of-the-file.patch
- Enable CKEditor Accordion Module
- Config ckeditor_accordion module at: admin/config/content/ckeditor_accordion
- Check "Collapse all tabs by default"
- Config ckeditor at: admin/config/content/ckeditor
- Edit profile -> EDITOR APPEARANCE -> Plugins -> Enable CKEditor Accordion
- Add the accordion button to your toolbar
- Edit profile -> ADVANCED OPTIONS -> Custom JavaScript configuration add:
config.extraAllowedContent = 'div(*)[*]{*}; dl(*); dt[aria*](*); span(*); a(*); dd[aria*](*)';
See patch at:
https://gist.github.com/druliner/4d443aa9d32d27a2031ae5815ff57ee9