Amelio Vazquez-Reina
Amelio Vazquez-Reina

Reputation: 96398

Indentable and collapsable text and code snippets in MediaWiki

Is it possible to define indentable and collapsable blocks of text or code (e.g. formatted with Syntax Highlight Geshi) in MediaWiki?

I have seen collapsable tables and lists in Wikipedia, and would like to apply the same concept to paragraphs and code snippets.

Thanks!

Upvotes: 6

Views: 1790

Answers (1)

Yes, you will need to have ToggleDisplay and SyntaxHighlight GeSHi installed.

Then on your page add code like this (example for C++):

<toggledisplay showtext="this is the show text">
<syntaxhighlight lang="cpp">
 <Put the code here>
</syntaxhighlight>
</toggledisplay>

Upvotes: 4

Related Questions