Page History
You can display computer code on a wiki page either inline or as a block of code.
Inline Code
The markup for monospace type
is double curly brackets:
Code Block |
---|
Wiki Markup |
---|
{scrollbar:icons=false} |
...
Code Block |
---|
The markup for {{monospace type}} is double curled brackets. |
This is rendered as follows.
Type the double curly brackets in the Confluence editor, followed by your monospaced content, followed by closing double curly brackets. The system converts the double curly brackets into the following markup in the XHTML:
Code Block |
---|
<code></code> |
For information on other keyboard shortcuts, refer to the following Atlassian help page:
https://confluence.atlassian.com/conf613/keyboard-shortcuts-964960192.html
Multiexcerpt include | ||||||
---|---|---|---|---|---|---|
|
Block of Code
To display a larger amount of computer code on a wiki page, use one of the following macros:
The No Format macro may be sufficient in many cases. For instructions, refer to the following Atlassian help page:
https://confluence.atlassian.com/conf613/noformat-macro-964960860.html
Multiexcerpt include MultiExcerptName ExitDisclaimer nopanel true PageWithExcerpt wikicontent:Exit Disclaimer to Include The Code Block macro is more configurable. For instructions, refer to the following Atlassian help page:
https://confluence.atlassian.com/conf613/code-block-macro-964960791.html
Multiexcerpt include MultiExcerptName ExitDisclaimer nopanel true PageWithExcerpt wikicontent:Exit Disclaimer to Include
In the examples that follow, each macro contains a URL so it would not be live on the page. This is useful for historical URLs. Most often this macro is used to display executable code so that reserved characters appear as they do in the code.
No Format macro
No Format |
---|
http://gforge.nci.nih.gov |
Code Block macro
Code Block |
---|
http://gforge.nci.nih.gov |
...