wiki:SimpleSpoilers

SimpleSpoilers plugin

Description

Allows you to mark sections of a page to be hidden by default when exported. It uses minimal javascript, which means it does not render in the built-in preview mode.

Compatibility

While it should work with all modern browsers, I have only tested it with Firefox and Internet Explorer.

Install

Save the attached SimpleSpoilers.py to your Wikidpad/user_extensions file.

Usage

Mark the beginning and the ending of a spoiler with a spoiler tag. The first tag should include a name for the spoiler. The button for showing the spoiler will appear at this first tag. The ending tag should not include a name and should be after all the hidden content. Getting these out of order, putting a name on the ending tag, or leaving it off the first tag will all cause weird things to happen. Spoilers (should) be nestable, if you really need it.

Example

[:spoiler: The Life of Brian]
The movie "The Life of Brian" is about a man named Brian and what happens in his life.
[:spoiler:]

Styling

The output has a div tag containing one button and one div for the hidden contents. Keeping with other HTML I've seen from WikidPad, all three elements have the "wikidpad" class. Additionally, the top most div has the "spoiler" class as well.

Last modified 6 years ago Last modified on Oct 9, 2011 2:39:06 AM

Attachments (1)

Download all attachments as: .zip