Skip to content

BaseEditor

Extended by

Properties

cm

cm: EditorView

CodeMirror editor instance


containerEl

containerEl: HTMLElement

HTML instance the CM editor is attached to

Methods

afterIndent()

afterIndent(): void

Clean-up function executed after indenting lists

Returns

void


indentList()

indentList(): void

Indents a list by one level

Returns

void


insertCallout()

insertCallout(): void

Insert a template callout at the current cursor position

Returns

void


insertCodeblock()

insertCodeblock(): void

Insert a template code block at the current cursor position

Returns

void


insertLink(): void

Insert a markdown link at the current cursor position

Returns

void


insertMathJax()

insertMathJax(): void

Insert a mathjax equation block at the current cursor position

Returns

void


insertText()

insertText(text): void

Insert specified text at the current cursor position

Parameters

text: string

Returns

void


newlineAndIndentContinueMarkdownList()

newlineAndIndentContinueMarkdownList(): void

Inserts a new line and continues a markdown bullet point list at the same level

Returns

void


newlineAndIndentOnly()

newlineAndIndentOnly(): void

Inserts a new line at the same indent level

Returns

void


posAtMouse()

posAtMouse(e): EditorPosition

Get the character position at a mouse event

Parameters

e: MouseEvent

Returns

EditorPosition


toggleBlockquote()

toggleBlockquote(): void

Toggles blockquote syntax on paragraph under cursor

Returns

void


toggleBulletList()

toggleBulletList(): void

Toggle bullet point list syntax on paragraph under cursor

Returns

void


toggleCheckList()

toggleCheckList(): void

Toggle checkbox syntax on paragraph under cursor

Returns

void


toggleNumberList()

toggleNumberList(): void

Toggle numbered list syntax on paragraph under cursor

Returns

void


triggerWikiLink(embed): void

Convert word under cursor into a wikilink

Parameters

embed: boolean

Whether to embed the link or not

Returns

void


unindentList()

unindentList(): void

Unindents a list by one level

Returns

void