[module] Collapse Text

HOT TIP: this content is flagged as highly recommended !

Compatibility:

0
Project page quote (external)
Project page quoted on: 
2016-08-22

As this is an input filter, it will only work where input filters are applied.

This input filter must come after the HTML filter, and should go after the convert line breaks filter.

To make a section of text collapsible, surround it with [collapse] and [/collapse]. You may nest the [collapse] tags to have collapsible sections within collapsible sections.

To make the text collapsed initially, start with [collapse collapsed]. As a shortcut, you may use [collapsed], as this will be expanded into [collapse collapsed].

You may supply a title to be displayed in two ways. There is a title= option for the [collapse] tag, or the module will find the first header tag and use that instead. New in 6.x-2.5, you can control the default title used if one isn't specified.

Also supported is a class= option, which allows you to add CSS classes.

Older versions had a slightly different specification, which is still supported.

I have an old (internal) Drupal6 site I use for tracking a software development project, including issue tracking. It often has long code listings, stack trace listings etc. that can become unwieldy and difficult to read. This module was the perfect solution. I now make nearly all code listing [collapsed] by default and it has made reading and organising this work far easier.