MarkdownAPI
Defined in: jsEngine/api/MarkdownAPI.ts:21
The markdown API provides utilities for creating markdown using js.
Constructors
new MarkdownAPI()
new MarkdownAPI(
apiInstance):MarkdownAPI
Defined in: jsEngine/api/MarkdownAPI.ts:24
Parameters
| Parameter | Type |
|---|---|
|
|
Returns
Methods
create()
create(
markdown):MarkdownString
Defined in: jsEngine/api/MarkdownAPI.ts:42
Creates a markdown string form a normal string. This does not modify the string. It only wraps it in an object, so that the plugin can recognize and render it as markdown.
Parameters
| Parameter | Type | Description |
|---|---|---|
|
|
|
the string to wrap |
Returns
createBlockQuote()
createBlockQuote():
BlockQuoteElement
Defined in: jsEngine/api/MarkdownAPI.ts:140
Creates a new markdown block quote element.
Returns
createBoldText()
createBoldText(
text):TextElement
Defined in: jsEngine/api/MarkdownAPI.ts:64
Creates a new markdown text element with bold formatting.
Parameters
| Parameter | Type | Description |
|---|---|---|
|
|
|
Returns
createBuilder()
createBuilder():
MarkdownBuilder
Defined in: jsEngine/api/MarkdownAPI.ts:31
Creates a markdown builder.
Returns
createCallout()
createCallout(
title,type,args):CalloutElement
Defined in: jsEngine/api/MarkdownAPI.ts:151
Creates a new markdown callout element.
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
|
|
|
|
the title of the callout |
|
|
|
|
the type of the callout |
|
|
|
|
the callout args, optional |
Returns
createCode()
createCode(
text):CodeElement
Defined in: jsEngine/api/MarkdownAPI.ts:108
Creates a new markdown code element.
Parameters
| Parameter | Type | Description |
|---|---|---|
|
|
|
Returns
createCodeBlock()
createCodeBlock(
language,content):CodeBlockElement
Defined in: jsEngine/api/MarkdownAPI.ts:177
Creates a new markdown code block element.
Parameters
| Parameter | Type | Description |
|---|---|---|
|
|
|
the language of the code block |
|
|
|
the content of the code block |
Returns
createCollapsibleCallout()
createCollapsibleCallout(
title,type,args,collapsed):CalloutElement
Defined in: jsEngine/api/MarkdownAPI.ts:165
Creates a new markdown collapsible callout element.
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
|
|
|
|
the title of the callout |
|
|
|
|
the type of the callout |
|
|
|
|
the callout args, optional |
|
|
|
|
whether the callout should be collapsed by default, optional |
Returns
createCursiveText()
createCursiveText(
text):TextElement
Defined in: jsEngine/api/MarkdownAPI.ts:75
Creates a new markdown text element with cursive formatting.
Parameters
| Parameter | Type | Description |
|---|---|---|
|
|
|
Returns
createHeading()
createHeading(
level,content):HeadingElement
Defined in: jsEngine/api/MarkdownAPI.ts:131
Creates a new markdown heading element.
Parameters
| Parameter | Type | Description |
|---|---|---|
|
|
|
the level of the heading from 1 to 6 |
|
|
|
the text of the heading |
Returns
createHighlightedText()
createHighlightedText(
text):TextElement
Defined in: jsEngine/api/MarkdownAPI.ts:97
Creates a new markdown text element with highlighted formatting.
Parameters
| Parameter | Type | Description |
|---|---|---|
|
|
|
Returns
createList()
createList(
ordered):ListElement
Defined in: jsEngine/api/MarkdownAPI.ts:200
Creates a new markdown list element.
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
|
|
|
|
whether the list should be ordered or not (use 1. or -), defaults to unordered |
Returns
createOrderedList()
createOrderedList():
ListElement
Defined in: jsEngine/api/MarkdownAPI.ts:209
Creates a new ordered markdown list element.
Returns
createParagraph()
createParagraph(
content):ParagraphElement
Defined in: jsEngine/api/MarkdownAPI.ts:119
Creates a new markdown paragraph element.
Parameters
| Parameter | Type | Description |
|---|---|---|
|
|
|
Returns
createTable()
createTable(
header,body):TableElement
Defined in: jsEngine/api/MarkdownAPI.ts:189
Creates a new markdown table element.
Parameters
| Parameter | Type | Description |
|---|---|---|
|
|
|
the header row |
|
|
|
the table body |
Returns
createText()
createText(
text):TextElement
Defined in: jsEngine/api/MarkdownAPI.ts:53
Creates a new markdown text element.
Parameters
| Parameter | Type | Description |
|---|---|---|
|
|
|
Returns
createUnderlinedText()
createUnderlinedText(
text):TextElement
Defined in: jsEngine/api/MarkdownAPI.ts:86
Creates a new markdown text element with underline formatting.
Parameters
| Parameter | Type | Description |
|---|---|---|
|
|
|