Skip to content

CodeBlockElement

Defined in: jsEngine/api/markdown/AbstractMarkdownElementContainer.ts:360

Represents a markdown code block.

Extends

  • AbstractMarkdownElementContainer

Constructors

new CodeBlockElement()

new CodeBlockElement(apiInstance, language, content): CodeBlockElement

Defined in: jsEngine/api/markdown/AbstractMarkdownElementContainer.ts:363

Parameters

Parameter Type

apiInstance

API

language

string

content

string

Returns

CodeBlockElement

Overrides

AbstractMarkdownElementContainer.constructor

Properties

apiInstance

readonly apiInstance: API

Defined in: jsEngine/api/markdown/AbstractMarkdownElement.ts:9

Inherited from

AbstractMarkdownElementContainer.apiInstance


language

language: string

Defined in: jsEngine/api/markdown/AbstractMarkdownElementContainer.ts:361


markdownElements

markdownElements: AbstractMarkdownElement[]

Defined in: jsEngine/api/markdown/AbstractMarkdownElementContainer.ts:12

Inherited from

AbstractMarkdownElementContainer.markdownElements

Methods

addBoldText()

addBoldText(text): AbstractMarkdownElementContainer

Defined in: jsEngine/api/markdown/AbstractMarkdownElementContainer.ts:53

Parameters

Parameter Type

text

string

Returns

AbstractMarkdownElementContainer

Inherited from

AbstractMarkdownElementContainer.addBoldText


addCode()

addCode(text): AbstractMarkdownElementContainer

Defined in: jsEngine/api/markdown/AbstractMarkdownElementContainer.ts:85

Parameters

Parameter Type

text

string

Returns

AbstractMarkdownElementContainer

Inherited from

AbstractMarkdownElementContainer.addCode


addCursiveText()

addCursiveText(text): AbstractMarkdownElementContainer

Defined in: jsEngine/api/markdown/AbstractMarkdownElementContainer.ts:61

Parameters

Parameter Type

text

string

Returns

AbstractMarkdownElementContainer

Inherited from

AbstractMarkdownElementContainer.addCursiveText


addElement()

addElement(element): void

Defined in: jsEngine/api/markdown/AbstractMarkdownElementContainer.ts:35

Adds a child element to the container.

Parameters

Parameter Type Description

element

AbstractMarkdownElement

Returns

void

Throws

Error if the element is not allowed in the container.

Inherited from

AbstractMarkdownElementContainer.addElement


addHighlightedText()

addHighlightedText(text): AbstractMarkdownElementContainer

Defined in: jsEngine/api/markdown/AbstractMarkdownElementContainer.ts:77

Parameters

Parameter Type

text

string

Returns

AbstractMarkdownElementContainer

Inherited from

AbstractMarkdownElementContainer.addHighlightedText


addText()

addText(text): AbstractMarkdownElementContainer

Defined in: jsEngine/api/markdown/AbstractMarkdownElementContainer.ts:45

Parameters

Parameter Type

text

string

Returns

AbstractMarkdownElementContainer

Inherited from

AbstractMarkdownElementContainer.addText


addUnderlinedText()

addUnderlinedText(text): AbstractMarkdownElementContainer

Defined in: jsEngine/api/markdown/AbstractMarkdownElementContainer.ts:69

Parameters

Parameter Type

text

string

Returns

AbstractMarkdownElementContainer

Inherited from

AbstractMarkdownElementContainer.addUnderlinedText


createBlockQuote()

createBlockQuote(): BlockQuoteElement

Defined in: jsEngine/api/markdown/AbstractMarkdownElementContainer.ts:109

Returns

BlockQuoteElement

Inherited from

AbstractMarkdownElementContainer.createBlockQuote


createCallout()

createCallout(title, type, args): CalloutElement

Defined in: jsEngine/api/markdown/AbstractMarkdownElementContainer.ts:115

Parameters

Parameter Type Default value

title

string

undefined

type

string

undefined

args

string

''

Returns

CalloutElement

Inherited from

AbstractMarkdownElementContainer.createCallout


createCodeBlock()

createCodeBlock(language, content): CodeBlockElement

Defined in: jsEngine/api/markdown/AbstractMarkdownElementContainer.ts:131

Parameters

Parameter Type

language

string

content

string

Returns

CodeBlockElement

Inherited from

AbstractMarkdownElementContainer.createCodeBlock


createCollapsibleCallout()

createCollapsibleCallout(title, type, args, collapsed): CalloutElement

Defined in: jsEngine/api/markdown/AbstractMarkdownElementContainer.ts:123

Parameters

Parameter Type Default value

title

string

undefined

type

string

undefined

args

string

''

collapsed

boolean

false

Returns

CalloutElement

Inherited from

AbstractMarkdownElementContainer.createCollapsibleCallout


createHeading()

createHeading(level, content): HeadingElement

Defined in: jsEngine/api/markdown/AbstractMarkdownElementContainer.ts:101

Parameters

Parameter Type

level

number

content

string

Returns

HeadingElement

Inherited from

AbstractMarkdownElementContainer.createHeading


createList()

createList(ordered): ListElement

Defined in: jsEngine/api/markdown/AbstractMarkdownElementContainer.ts:147

Parameters

Parameter Type Default value

ordered

boolean

false

Returns

ListElement

Inherited from

AbstractMarkdownElementContainer.createList


createOrderedList()

createOrderedList(): ListElement

Defined in: jsEngine/api/markdown/AbstractMarkdownElementContainer.ts:155

Returns

ListElement

Inherited from

AbstractMarkdownElementContainer.createOrderedList


createParagraph()

createParagraph(content): ParagraphElement

Defined in: jsEngine/api/markdown/AbstractMarkdownElementContainer.ts:93

Parameters

Parameter Type

content

string

Returns

ParagraphElement

Inherited from

AbstractMarkdownElementContainer.createParagraph


createTable()

createTable(header, body): TableElement

Defined in: jsEngine/api/markdown/AbstractMarkdownElementContainer.ts:139

Parameters

Parameter Type

header

string[]

body

TableElementType[][]

Returns

TableElement

Inherited from

AbstractMarkdownElementContainer.createTable


toMarkdown()

toMarkdown(): MarkdownString

Defined in: jsEngine/api/markdown/AbstractMarkdownElement.ts:28

Converts the element to a MarkdownString.

Returns

MarkdownString

Inherited from

AbstractMarkdownElementContainer.toMarkdown


toString()

toString(): string

Defined in: jsEngine/api/markdown/AbstractMarkdownElementContainer.ts:370

Converts the element to a string.

Returns

string

Overrides

AbstractMarkdownElementContainer.toString