Macros

It's easy to add Macros to Cadey or replace the built-in ones. This document lists the Macros available in the official implementation of Cadey.
To get more info about Macros and how you should use them, always refer to the documentation of the implementation you're using.
Please note Cadey is unstable at the moment and the API or Macro behavior may change in the future.
Table of contents:
  1. Italic
  2. Bold
  3. Strikethrough
  4. Heading
  5. Link
  6. Image
  7. Code
  8. List
  9. Table

Italic

italic is used to apply italic style to a block of text.
Example: [italic Cadey markup language]
Will be rendered as:
Cadey markup language

Bold

bold is used to apply bold style to a block of text.
Example: [bold Cadey markup language]
Will be rendered as:
Cadey markup language

Strike

strike is used to apply strikethrough style to a block of text.
Example: [strike Markdown] Cadey markup language
Will be rendered as:
Markdown Cadey markup language

Heading

heading is used to make a heading.
Supported named parameters:
Name Type Required Default Value Description
size Number No 1 HTML heading level
Example:
[heading :size 1 Size is one]
[heading :size 2 Size is two]
[heading :size 3 Size is three]
[heading :size 4 Size is four]
[heading :size 5 Size is five]
Will be rendered as:
link is used to make a hyperlink.
Supported parameters:
Position Type Required Default Value Description
0 URL Yes Link address
...rest Text No The URL Link title
Example:
[link https://cadey.io Cadey]
Will be rendered as:

Image

image is used to insert an image.
Supported parameters:
Position Type Required Description
0 URL Yes Image address
...rest Text No Alt text (If :alt is not provided)
Supported named parameters:
Name Type Required Description
alt Text No Image alt text
width Number No Image width
height Number No Image height
Example:
[image /img/jelly.jpg Neon Jelly :width 386 :height 256]
Will be rendered as:
NeonJelly

Code

code is used to insert a code block into the document.
Supported named parameters:
Name Type Required Description
language Text No Language: used for highlighting
content Text No File path to read from, works on node and on the browser. Auto detects language.
Example:
[code :language javascript [: console.log("Hello world!") :]]
Will be rendered as:
console.log("Hello world!")

List

list is used to insert a list into the document.
Supported parameters:
Position Type Required Description
Any Text Yes Items in the list
Supported named parameters:
Name Type Valid Values Required Default Description
type Text ordered or unordered No unordered Type of the list element
Example:
Bands I like: [list :type ordered Metallica [: System Of A Down]]
Will be rendered as:
Music I listen to:
  1. Metallica
  2. System Of A Down

Nested Lists

You can nest lists like this:
Example:
Songs I like:
[list :type ordered 
  [: Metallica:
      [list
        [: To Live Is To Die]
        [: Eye of the Beholder]
        [: Master of Puppets]]]
  [: System Of A Down:
      [list
        I-E-A-I-A-I-O
        [: Chic 'N' Stu]]]]
Will be rendered as:
Songs I like:
  1. Metallica:
    • To Live Is To Die
    • Eye of the Beholder
    • Master of Puppets
  2. System Of A Down:
    • I-E-A-I-A-I-O
    • Chic 'N' Stu

Table

table is used to insert a table into the document.
Supported named parameters:
Name Type Required Description
header Text No Header of the table
row Text Yes Table rows
Example:
[
  table
    [:header Name    Type   Required Description             ]
    [:row    header  Text   No       [: Header of the table ]]
    [:row    row     Text   Yes      [: Table rows          ]]
]
Will be rendered as:
Name Type Required Description
header Text No Header of the table
row Text Yes Table rows
Generated by Cadey 0.0.2. View source here.