开发者

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)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜