DocsProVariables
Variables
ProPro replaces @dateNow(), @url(), @domain(), @random(), and @input() when the snippet is inserted. An email address is left as typed.
Snippet
Hi @random('Sam', 'Alex', 'Kim', 'Noor'), today is @dateNow('%MMMM %D')
Found on @domain(): @url()
Inserted
Hi Sam, today is .
Found on slashnijo.com: https://slashnijo.com/docs/variables
A variable is @ plus a name and parentheses. romain@mail.com is an email, not a variable. A bare @random without parentheses is left as typed. To keep the characters @dateNow() in the inserted text, put a backslash first: \@dateNow().
The variables
| Variable | What it inserts |
|---|---|
@dateNow() | Today’s date, in the browser’s short format. |
@dateNow('%MM/%DD/%YYYY') | Today, with a format you choose. Tokens are in Date formats. |
@url() | The exact address of the page, path included. |
@domain() | The domain of the site, such as docs.example.com. A subdomain stays. |
@random('hello', 'hi') | One of the quoted values, chosen each time. |
@input('Name') | Nothing yet. A form asks for Name, then inserts what you type. |
@input('Name', 'Sam') | The same form, with Sam already filled in. |
The page
@url() inserts the exact address of the page you are typing on, path included. @domain() inserts the domain. A subdomain stays: on https://docs.example.com/guide?ref=1, the domain is docs.example.com and the address is the full URL.
//source
Found on @domain(): @url()
While you edit the snippet
In the popup content field, type @ at the start of a word. A menu lists dateNow, random, input, url, and domain. On Pro, Tab or Enter inserts the variable and selects the part you usually edit, such as the date format or the field label. url and domain have nothing to edit. romain@mail.com does not open that menu, because @ is not at the start of the word.
On Free the menu still appears, so you can see what Pro adds. Choosing a variable opens the pricing page instead of inserting it. Enter in the content field still adds a new line.
Quotes
Arguments belong in single or double quotes. @random('hello', 'hi') picks hello or hi. Without quotes, @random(hello) inserts the word hello as plain text. The same loose form exists for @input(Name): Name becomes the label.
//shipped
Thanks for writing. Your order shipped @dateNow('%MMMM %D').Two @input() fields that share a label share one answer. That behavior is part of Forms.
Write it once. Type // forever.
Install the extension. The same shortcuts work in every tab.