Template:Syntaxhighlight/doc
Sarna News
- HEXTECH Review - Wave 3 Brings More Urban Options To Your Battlefield
- Your BattleTech News Round-Up For March, 2024
- Crashing 'Mechs With Jennifer Brozek, Author Of The Rogue Academy Trilogy
- Getting The Word Out With Rem Alternis, Catalyst Community & Marketing Director
- Bad 'Mechs - Yeoman
- Read more →
This is a documentation subpage for Template:Syntaxhighlight. It may contain usage information, categories and other content that is not part of the original template page. |
Simple wrapper around the <syntaxhighlight>
tag to show syntax-highlighted text. Unlike <syntaxhighlight>
, text that does not fit on the screen will be wrapped.
Contents
Usage[edit]
Parameters[edit]
- lang:
- code: The contents of the syntax highlighted block.
Examples[edit]
{{syntaxhighlight|lang=javascript|code=mw.util.addPortletLink('p-personal', '/w/index.php?title=Special:MyPage/Sandbox&action=edit&preload=Template%3AUser_sandbox%2Fpreload&editintro=Template%3AUser_sandbox', 'My sandbox', 'pt-mysandbox', 'Go to my sandbox');}}
mw.util.addPortletLink('p-personal', '/w/index.php?title=Special:MyPage/Sandbox&action=edit&preload=Template%3AUser_sandbox%2Fpreload&editintro=Template%3AUser_sandbox', 'My sandbox', 'pt-mysandbox', 'Go to my sandbox');
Notes[edit]
There is not yet a "wikitext" or "mediawiki" language code.
Use "html+handlebars"
or "moin"
instead.