Functions
- urlForPost(postId) ⇒
string Generate a permalink for a post
- urlForTopic(topicId, [topicSlug], [postIndex]) ⇒
string Generate a link for a topic
- quoteText(text, [quotedUser], [contextUrl], [contextTitle]) ⇒
string Turn input text into a forum quote
- link(url, linkText) ⇒
string Generate a hyperlink
- image(url, titleText) ⇒
string Generate an image
- spoiler(body, title) ⇒
string Spoiler something
- bold(text) ⇒
string Format text as bold.
- italic(text) ⇒
string Format text as italic.
- bolditalic(text) ⇒
string Format text as bold italic.
- header1(text) ⇒
string Format text as a first level header.
- header2(text) ⇒
string Format text as a second level header.
- header3(text) ⇒
string Format text as a third level header.
- header4(text) ⇒
string Format text as a fourth level header.
- header5(text) ⇒
string Format text as a fifth level header.
- header6(text) ⇒
string Format text as a sixth level header.
- preformat(text) ⇒
string Format text as a preformatted block
- strikethrough(text) ⇒
string Format text with a strikethrough effect
- list(items) ⇒
string Format text as a list of items
urlForPost(postId) ⇒ string
Generate a permalink for a post
Kind: global function
Returns: string - Absolute URL for post
| Param | Type | Description |
|---|---|---|
| postId | number |
Id or the post to url |
urlForTopic(topicId, [topicSlug], [postIndex]) ⇒ string
Generate a link for a topic
Kind: global function
Returns: string - Absolute URL for topic
| Param | Type | Description |
|---|---|---|
| topicId | number |
Id of the topic to url |
| [topicSlug] | string |
Slug of the topic to url |
| [postIndex] | number |
Index of the post to url to in topic |
quoteText(text, [quotedUser], [contextUrl], [contextTitle]) ⇒ string
Turn input text into a forum quote
Kind: global function
Returns: string - quoted text, with attribution if username provided
| Param | Type | Description |
|---|---|---|
| text | string |
Text to quote |
| [quotedUser] | string |
User who said the quote |
| [contextUrl] | string |
Url to the quoted post |
| [contextTitle] | string |
Title of the quote context link |
link(url, linkText) ⇒ string
Generate a hyperlink
Kind: global function
Returns: string - Linkified url
| Param | Type | Description |
|---|---|---|
| url | string |
URL to link to |
| linkText | string |
Link Text to display |
image(url, titleText) ⇒ string
Generate an image
Kind: global function
Returns: string - Image incantation
| Param | Type | Description |
|---|---|---|
| url | string |
Image URL |
| titleText | string |
Title text to display |
spoiler(body, title) ⇒ string
Spoiler something
Kind: global function
Returns: string - spoilered text
| Param | Type | Description |
|---|---|---|
| body | string |
Spoiler body |
| title | string |
spoiler title to display |
bold(text) ⇒ string
Format text as bold.
Kind: global function
Returns: string - Bolded Text
| Param | Type | Description |
|---|---|---|
| text | string |
Input text |
italic(text) ⇒ string
Format text as italic.
Kind: global function
Returns: string - Italiced Text
| Param | Type | Description |
|---|---|---|
| text | string |
Input text |
bolditalic(text) ⇒ string
Format text as bold italic.
Kind: global function
Returns: string - Bolded and italiced Text
| Param | Type | Description |
|---|---|---|
| text | string |
Input text |
header1(text) ⇒ string
Format text as a first level header.
Kind: global function
Returns: string - Headered Text
| Param | Type | Description |
|---|---|---|
| text | string |
Header text |
header2(text) ⇒ string
Format text as a second level header.
Kind: global function
Returns: string - Headered Text
| Param | Type | Description |
|---|---|---|
| text | string |
Header text |
header3(text) ⇒ string
Format text as a third level header.
Kind: global function
Returns: string - Headered Text
| Param | Type | Description |
|---|---|---|
| text | string |
Header text |
header4(text) ⇒ string
Format text as a fourth level header.
Kind: global function
Returns: string - Headered Text
| Param | Type | Description |
|---|---|---|
| text | string |
Header text |
header5(text) ⇒ string
Format text as a fifth level header.
Kind: global function
Returns: string - Headered Text
| Param | Type | Description |
|---|---|---|
| text | string |
Header text |
header6(text) ⇒ string
Format text as a sixth level header.
Kind: global function
Returns: string - Headered Text
| Param | Type | Description |
|---|---|---|
| text | string |
Header text |
preformat(text) ⇒ string
Format text as a preformatted block
Kind: global function
Returns: string - Text in a preformat block
| Param | Type | Description |
|---|---|---|
| text | string |
The text |
strikethrough(text) ⇒ string
Format text with a strikethrough effect
Kind: global function
Returns: string - The stricken text
| Param | Type | Description |
|---|---|---|
| text | string |
The text to strike out |
list(items) ⇒ string
Format text as a list of items
Kind: global function
Returns: string - The list
| Param | Type | Description |
|---|---|---|
| items | string |
An array of strings to format as a list |