Blocks with special formatting
Alert
Blocks with special formatting work in dynamic tables and on pages created in the old editor.
You can use block formating to present text as a block with a specified formatting. For example, you can highlight syntax in the source code, add a fragment of boxed text, or set up the width and position of a block on your page.
Wiki also supports markup of mathematical formulas and special languages for visualizing diagrams.
To add a special formatting block to a page created in the old editor, use the following markup:
%%(<format> <parameters>)
A text fragment, software code, or data markup in a specified format
%%
For example:
%%(php width=300 border="2px solid red")
<?
phpinfo();
$s = "Hello, World!\n";
print $s;
%%
Block formatting
To add special formatting to your text, specify a value for the <format>
field in the block's markup:
Format | Description |
---|---|
wacko |
Plain text |
Programming language. For example: C , Python , or Java |
Code in the specified programming language. View the list of supported languages in Supported programming languages. |
csv |
Data in CSV format |
math |
Mathematical formula using text markup |
Diagram type:
|
Diagram in text markup |
comment |
Comments: Text that will not be displayed on your page. |
Block parameters
The list of available parameters depends on the selected block format.
These parameters are supported for all formats: wrapper
, align
, width
, and border
. For parameter descriptions, see Borders, width, and alignment of blocks.