Skip to content

MarkdownAPI

The markdown API provides utilities for creating markdown using js.

Constructors

new MarkdownAPI()

new MarkdownAPI(apiInstance): MarkdownAPI

Parameters

Parameter Type

apiInstance

API

Returns

MarkdownAPI

Defined in

jsEngine/api/MarkdownAPI.ts:22

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

markdown

string

the string to wrap

Returns

MarkdownString

Defined in

jsEngine/api/MarkdownAPI.ts:40


createBlockQuote()

createBlockQuote(): BlockQuoteElement

Creates a new markdown block quote element.

Returns

BlockQuoteElement

Defined in

jsEngine/api/MarkdownAPI.ts:111


createBoldText()

createBoldText(text): TextElement

Creates a new markdown text element with bold formatting.

Parameters

Parameter Type Description

text

string

Returns

TextElement

Defined in

jsEngine/api/MarkdownAPI.ts:58


createBuilder()

createBuilder(): MarkdownBuilder

Creates a markdown builder.

Returns

MarkdownBuilder

Defined in

jsEngine/api/MarkdownAPI.ts:29


createCallout()

createCallout(title, type, args): CalloutElement

Creates a new markdown callout element.

Parameters

Parameter Type Default value Description

title

string

undefined

the title of the callout

type

string

undefined

the type of the callout

args

string

''

the callout args, optional

Returns

CalloutElement

Defined in

jsEngine/api/MarkdownAPI.ts:122


createCode()

createCode(text): CodeElement

Creates a new markdown code element.

Parameters

Parameter Type Description

text

string

Returns

CodeElement

Defined in

jsEngine/api/MarkdownAPI.ts:85


createCodeBlock()

createCodeBlock(language, content): CodeBlockElement

Creates a new markdown code block element.

Parameters

Parameter Type Description

language

string

the language of the code block

content

string

the content of the code block

Returns

CodeBlockElement

Defined in

jsEngine/api/MarkdownAPI.ts:132


createCursiveText()

createCursiveText(text): TextElement

Creates a new markdown text element with cursive formatting.

Parameters

Parameter Type Description

text

string

Returns

TextElement

Defined in

jsEngine/api/MarkdownAPI.ts:67


createHeading()

createHeading(level, content): HeadingElement

Creates a new markdown heading element.

Parameters

Parameter Type Description

level

number

the level of the heading from 1 to 6

content

string

the text of the heading

Returns

HeadingElement

Defined in

jsEngine/api/MarkdownAPI.ts:104


createList()

createList(ordered): ListElement

Creates a new markdown list element.

Parameters

Parameter Type Description

ordered

boolean

whether the list should be ordered or not (use 1. or -)

Returns

ListElement

Defined in

jsEngine/api/MarkdownAPI.ts:151


createParagraph()

createParagraph(content): ParagraphElement

Creates a new markdown paragraph element.

Parameters

Parameter Type Description

content

string

Returns

ParagraphElement

Defined in

jsEngine/api/MarkdownAPI.ts:94


createTable()

createTable(header, body): TableElement

Creates a new markdown table element.

Parameters

Parameter Type Description

header

string[]

the header row

body

string[][]

the table body

Returns

TableElement

Defined in

jsEngine/api/MarkdownAPI.ts:142


createText()

createText(text): TextElement

Creates a new markdown text element.

Parameters

Parameter Type Description

text

string

Returns

TextElement

Defined in

jsEngine/api/MarkdownAPI.ts:49


createUnderlinedText()

createUnderlinedText(text): TextElement

Creates a new markdown text element with underline formatting.

Parameters

Parameter Type Description

text

string

Returns

TextElement

Defined in

jsEngine/api/MarkdownAPI.ts:76