Div | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
On this page
|
Warning | ||
---|---|---|
| ||
Please note that the URL user and URL password parameters are removed from 2.2.4 release. We recommend using profiles to access your data from remote locations. |
Overview
Excerpt |
---|
The The Code Pro macro extends the native code Code macro. The following features are included:
|
Info | ||
---|---|---|
| ||
After retrieving the source code from the various sources, the code macro Code macro is then used under the covers. This means behavior will be equivalent to existing code macro Code macro behavior! The native code macro Code macro must be enabled (the default). |
...
This macro can be deployed using one of the following methods:
Selected from the Macro Browsermacro browser | code-pro |
---|---|
Markup Shortcutshortcut | {code-pro} |
Screenshot
Parameters
Click a column heading to toggle the sorting of that column.
...
highlightColor | #ffffec |
---|---|
rowStyles | background:#f0f0f0;color:#222;font-size:14px;border-bottom:black 2px solid;border-top:black 2px solid;, |
style | background-color:white; |
autoNumber | true |
...
...
...
...
Macro editor label | Code | Code Pro | Default | Description |
---|
...
Macro parameter | ||
---|---|---|
Profile |
...
Select a profile from the list. Profiles are pre-defined, parameter defaults configured by your administrator. The saved parameters can be re-used across multiple macro instances. Provides support for defaulting various parameters including |
...
URL related parameters: |
...
URL to source code, URL user, URL password, and URL connection timeout. If needed, usage of specific profiles can be controlled by administrators using CMSP. Profiles offer a way to secure user and password information for non-public sites. |
...
profile | ||||
Language for syntax highlighting | Select from a list of languages shipped by default with the |
...
Code macro. New languages can be added by using the |
...
Code macro configuration. The following is the current list of shipped default languages |
...
:
|
...
language | ||
Title |
...
Enter the title of the code panel. May default to title provided in profile.
|
...
title |
...
Show line numbers |
...
false | Enable this option to show line numbers for the source. |
...
linenumbers | ||
URL to source code |
...
Enter the URL of a source file. If specified, the included data will follow the body and script data (if any). Always use the raw or download link to your source and not the HTML link your repository manager shows. Use of this parameter may be restricted for security reasons. See your administrator for details. Examples:
|
...
url |
URL |
...
user (Removed) |
...
Enter user name required to access URL access via basic authentication.
| user | ||||||
URL user |
...
password (Removed) |
...
Enter the password required to access the specified URL via basic authentication. |
...
| password | |||||
URL connection timeout |
...
Enter time in milliseconds such that URL connections does not disconnect before getting data. Use this to increase the access time needed for slow connections. Note that if a zero is given the connection may wait infinitely. | timeout | |||
Location of source code | macro body | Enter the location of the attachment. If left blank, the macro body content is used unless a URL is given in URL to source code. If a location is specified, the included data |
...
follows the body data (if any). The following options are available:
|
...
|
...
script | ||
Sections |
...
Enter a comma separated list of section selections. A selection can be a simple literal string or a range specified by line numbers or regular expressions. Each selection identifies one or more lines of the code that will be displayed. Since 1.1. Sections parameter has more details.
|
...
sections |
...
Collapse section type | default | Collapse section type that determines how the expand and collapse section looks and behaves. The following options are available:
|
...
|
...
|
...
collapseType |
...
Collapse initially |
...
...
false | Select to |
...
show the code section |
...
as collapsed. |
...
collapse | ||
First line number |
...
Enter the number to display for the first line. |
...
The first line is forced to be this number, otherwise line numbers start at 1. | firstline | |||
Theme | Default | Select the CSS theme to |
...
be applied. Same as |
...
Code macro. |
...
theme | ||
File encoding |
...
Specify the encoding for an external file, if different |
...
from default system |
...
handling. |
...
Example: UTF8. | encoding |
Examples
You can get source from virtually any repository or other source of data provided they provide a url URL link to the raw source the raw source text (as if you were downloading the source file). Here are just a few examples.
Table plus | ||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||
|
...