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 Highligh开发者_开发技巧t 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!
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)
精彩评论