Macro | Description | Parameters |
---|---|---|
anchor | Anchor Tag | name: anchor name. |
code | Displays a chunk of code with syntax highlighting, for example Java, XML and SQL. The none type will do nothing and is useful for unknown code types. | 1: syntax highlighter to use, defaults to java. Options include none, sql, xml, and java (optional) |
comment | Wraps comment text (which will not appear on the rendered wiki page). | none |
div | Wraps content in a div tag with an optional CSS class and/or style specified. | class: the CSS class that should be applied to this tag. style: the CSS style that should be applied to this tag. |
file-path | Displays a file system path. The file path should use slashes. Defaults to windows. | 1: file path |
h1 | Wraps content in a h1 tag with an optional CSS class and/or style specified. | class: the CSS class that should be applied to this tag. style: the CSS style that should be applied to this tag. |
image | Displays an image file. | img: the path to the image. alt: alt text (optional) align: alignment of the image (left, right, flow-left, flow-right) (optional) |
labkey | Base LabKey macro, used for including data from the LabKey Server portal into wikis. | tree : renders a LabKey navigation menu. treeId: the id of the menu to render can be one of the following: core.projects, core.CurrentProject, core.projectAdmin, core.folderAdmin, core.SiteAdmin |
link | Generate a weblink. | 1: Text of link, or URL if using a single parameter 2: URL (optional) 3: Image URL (unsupported) 4: CSS style for the span wrapping the anchor (optional) |
list-of-macros | Displays a list of available macros. | none |
mailto | Displays an email address. | 1: mail address |
new-tab-link | Displays a link that opens in a new tab. | 1. Text to display 2. Link to open in a new tab |
quote | Display quotations. | 1: source (optional) 2: displayed description, default is Source (optional) |
span | Wraps content in a span tag with an optional CSS class and/or style specified. | class: the CSS class that should be applied to this tag. style: the CSS style that should be applied to this tag. |
study | See study macro documentation for description of this macro. | See study macro documentation for description of this macro. |
table | Displays a table. | none |
video | Embeds a video from a link. | video: the video URL width: width of the video frame (optional) height: height of the video frame (optional) |
Encase text that you wish to format as code between two {code} tags. Note that the text will be placed inside <pre> tags, so it will not line-wrap. Your code text will look like this:
// Hello World in Java
class HelloWorld {
static public void main( String args[] ) {
System.out.println( "Hello World!" );
}
}
The {div} macro lets you inject arbitrary CSS styles into your wiki page, either as an inline CSS style, or as a class in a separate CSS file.
The following example demonstrates injecting inline CSS styles to the wiki code.
The following wiki code...
{div:style=background-color: #edf0f1;
border:1px solid #dee0e1;
padding-left:20px; padding-right:15px;
margin-left:25px; margin-right:25px}
- list item 1
- list item 2
- list item 3
{div}
...generates the following HTML...
<div style="background-color: rgb(237, 240, 241); border: 1px solid rgb(222, 224, 225);
padding-left: 20px; padding-right: 15px; margin-left: 25px; margin-right: 25px;">
<ul class="minus">
<li>list item 1</li>
<li>list item 2</li>
<li>list item 3</li>
</ul>
</div>
...which renders in the browser as shown below:
To apply a CSS class in wiki code, first create a CSS file that contains your class:
.bluebox {
background-color: #edf0f1;
border:1px solid #dee0e1;
padding-left:20px; padding-right:15px;
margin-left:25px; margin-right:25px
}
Then upload this CSS file to your LabKey Server site as a custom stylesheet. (To upload a custom stylesheet, navigate to Admin -> Site -> Admin Console -> Look and Feel Settings -> Resources tab -> Click Browse next to Custom stylesheet).
Finally, refer to your CSS class with a wrapper {div}:
{div:class=bluebox}
- list item 1
- list item 2
- list item 3
{div}
To define a target anchor:
{anchor:someName}
To link to the target anchor within the same document:
[Link to anchor|#someName]
To link to the target anchor in another document, where the document name is docName.
[Link to anchor|docName#someName]