MarkdownAPI
The markdown API provides utilities for creating markdown using js.
Constructors
new MarkdownAPI()
new MarkdownAPI(
apiInstance
):MarkdownAPI
Parameters
Parameter | Type |
---|---|
|
Returns
Defined in
jsEngine/api/MarkdownAPI.ts:24
Methods
create()
create(
markdown
):MarkdownString
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
Defined in
jsEngine/api/MarkdownAPI.ts:42
createBlockQuote()
createBlockQuote():
BlockQuoteElement
Creates a new markdown block quote element.
Returns
Defined in
jsEngine/api/MarkdownAPI.ts:140
createBoldText()
createBoldText(
text
):TextElement
Creates a new markdown text element with bold formatting.
Parameters
Parameter | Type | Description |
---|---|---|
|
|
Returns
Defined in
jsEngine/api/MarkdownAPI.ts:64
createBuilder()
createBuilder():
MarkdownBuilder
Creates a markdown builder.
Returns
Defined in
jsEngine/api/MarkdownAPI.ts:31
createCallout()
createCallout(
title
,type
,args
):CalloutElement
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
Defined in
jsEngine/api/MarkdownAPI.ts:151
createCode()
createCode(
text
):CodeElement
Creates a new markdown code element.
Parameters
Parameter | Type | Description |
---|---|---|
|
|
Returns
Defined in
jsEngine/api/MarkdownAPI.ts:108
createCodeBlock()
createCodeBlock(
language
,content
):CodeBlockElement
Creates a new markdown code block element.
Parameters
Parameter | Type | Description |
---|---|---|
|
|
the language of the code block |
|
|
the content of the code block |
Returns
Defined in
jsEngine/api/MarkdownAPI.ts:177
createCollapsibleCallout()
createCollapsibleCallout(
title
,type
,args
,collapsed
):CalloutElement
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
Defined in
jsEngine/api/MarkdownAPI.ts:165
createCursiveText()
createCursiveText(
text
):TextElement
Creates a new markdown text element with cursive formatting.
Parameters
Parameter | Type | Description |
---|---|---|
|
|
Returns
Defined in
jsEngine/api/MarkdownAPI.ts:75
createHeading()
createHeading(
level
,content
):HeadingElement
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
Defined in
jsEngine/api/MarkdownAPI.ts:131
createHighlightedText()
createHighlightedText(
text
):TextElement
Creates a new markdown text element with highlighted formatting.
Parameters
Parameter | Type | Description |
---|---|---|
|
|
Returns
Defined in
jsEngine/api/MarkdownAPI.ts:97
createList()
createList(
ordered
):ListElement
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
Defined in
jsEngine/api/MarkdownAPI.ts:200
createOrderedList()
createOrderedList():
ListElement
Creates a new ordered markdown list element.
Returns
Defined in
jsEngine/api/MarkdownAPI.ts:209
createParagraph()
createParagraph(
content
):ParagraphElement
Creates a new markdown paragraph element.
Parameters
Parameter | Type | Description |
---|---|---|
|
|
Returns
Defined in
jsEngine/api/MarkdownAPI.ts:119
createTable()
createTable(
header
,body
):TableElement
Creates a new markdown table element.
Parameters
Parameter | Type | Description |
---|---|---|
|
|
the header row |
|
|
the table body |
Returns
Defined in
jsEngine/api/MarkdownAPI.ts:189
createText()
createText(
text
):TextElement
Creates a new markdown text element.
Parameters
Parameter | Type | Description |
---|---|---|
|
|
Returns
Defined in
jsEngine/api/MarkdownAPI.ts:53
createUnderlinedText()
createUnderlinedText(
text
):TextElement
Creates a new markdown text element with underline formatting.
Parameters
Parameter | Type | Description |
---|---|---|
|
|