Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Indentable and collapsable text and code snippets in MediaWiki

Tags:

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!

like image 967
Amelio Vazquez-Reina Avatar asked Mar 22 '11 23:03

Amelio Vazquez-Reina


1 Answers

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>

(See also: Wikis and Wikipedia)

like image 133
Reinstate Monica - Goodbye SE Avatar answered Jan 03 '23 17:01

Reinstate Monica - Goodbye SE