Namespace: collapsible

Marked.collapsible

Collapsible sections methods

Requires

Methods

collapseAll(dir)

Collapse or expand all sections

Parameters:
Name Type Description
dir boolean

Flag to collapse (true) or expand (false)

init() → {boolean}

Initialize collapsible headers. Adds markup to contents between headers.

Returns:

success

Type
boolean

restore()

Restore collapsed sections (from Marked.collapsible.store)

reveal($el, level)

Reveal section, updating code blocks and bookmarks as needed

Parameters:
Name Type Description
$el object

jQuery element to toggle (header)

level number

Used only in recursion to expand child sections

store()

Store collapsed sections in Cocoa object for restore after a window refresh

updateTOC()

Update the TOC to reflect collapsed sections.