Macro000000 | Description | Parameters |
---|---|---|
anchor | Anchor Tag | name: The target anchor name. Example: {anchor:name=section1} |
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 (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. Example: {div:class=bluebox}...{div} |
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) Example: {image:img=http://www.target_domain.com/images/logo.gif|align=right} |
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. | |
list-of-macros | Displays a list of available macros. | |
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. Example: {new-tab-link:DisplayText|http://www.google.com} |
quote | Displays quotations. | 1: The source for the quote (optional) 2: Displayed description, default is Source (optional) Example: {quote:http://www.abrahamlincolnonline.org/lincoln/speeches/gettysburg.htm|Link}Four score and seven years ago{quote} |
span | Wraps content in a span tag with an optional CSS class and/or style specified. Also supports Font Awesome icons. | class: the CSS class that should be applied to this tag. style: the CSS style that should be applied to this tag. Example: {span:class=fa fa-arrow-right}{span} |
table | Displays a table. | none |
video | Displays a video from an external URL at the width and height given. | height: in pixels width: in pixels Example: {video:https://www.youtube.com/embed/JEE4807UHN4|height:500|width:750} |
Encase text that you wish to format as code between two {code} tags. For example,
{code:java}
// Hello World in Java
class HelloWorld {
static public void main( String args[] ) {
System.out.println( "Hello World!" );
}
}
{code}
Using "code:java" specifies that the Java formatting option should be used, the default behavior. The above will render as:
// Hello World in Java
class HelloWorld {
static public void main( String args[] ) {
System.out.println( "Hello World!" );
}
}
Displays a variety of menus on the server. For example:
{labkey:tree|core.currentProject}
displays the folders in the Documentation project:
Possible values:
{labkey:tree|core.projects}
{labkey:tree|core.currentProject}
{labkey:tree|core.projectAdmin}
{labkey:tree|core.folderAdmin}
{labkey:tree|core.siteAdmin}
The following wiki code...
{span:style=text-decoration:line-through}
Strike through this text.
{span}
...renders text with a line through it.
Strike through this text.
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: #FCAE76;
border:1px solid #FE7D1F;
padding-left:20px; padding-right:15px;
margin-left:25px; margin-right:25px}
- list item 1
- list item 2
- list item 3
{div}
...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: #E7EFF4;
border:1px solid #dee0e1;
padding: 10px 13px;
margin: 10px 20px;
}
Then upload this CSS file to your LabKey Server as a custom stylesheet, either site-wide or for a specific project. Learn how in this topic:
Finally, refer to your CSS class with a wrapper {div}:{div:class=bluebox}
Some text in an instruction box:
- list item 1
- list item 2
- list item 3
{div}
And it will appear in your wiki as:
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]
{div:style=color:red;display:inline-block}RED TEXT{div}
{span:style=float:right}[emoji.jpg]{span}
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.