Skip to content

BaseEditor

Defined in: src/obsidian/internals/BaseEditor.d.ts:13

Extended by

Properties

cm

cm: EditorView

Defined in: src/obsidian/internals/BaseEditor.d.ts:17

CodeMirror editor instance


containerEl

containerEl: HTMLElement

Defined in: src/obsidian/internals/BaseEditor.d.ts:21

HTML instance the CM editor is attached to

Methods

afterIndent()

afterIndent(): void

Defined in: src/obsidian/internals/BaseEditor.d.ts:26

Clean-up function executed after indenting lists

Returns

void


indentList()

indentList(): void

Defined in: src/obsidian/internals/BaseEditor.d.ts:36

Indents a list by one level

Returns

void


insertCallout()

insertCallout(): void

Defined in: src/obsidian/internals/BaseEditor.d.ts:40

Insert a template callout at the current cursor position

Returns

void


insertCodeblock()

insertCodeblock(): void

Defined in: src/obsidian/internals/BaseEditor.d.ts:44

Insert a template code block at the current cursor position

Returns

void


insertLink(): void

Defined in: src/obsidian/internals/BaseEditor.d.ts:48

Insert a markdown link at the current cursor position

Returns

void


insertMathJax()

insertMathJax(): void

Defined in: src/obsidian/internals/BaseEditor.d.ts:52

Insert a mathjax equation block at the current cursor position

Returns

void


insertText()

insertText(text): void

Defined in: src/obsidian/internals/BaseEditor.d.ts:58

Insert specified text at the current cursor position

Parameters

text

string

Returns

void

newlineAndIndentContinueMarkdownList()

newlineAndIndentContinueMarkdownList(): void

Defined in: src/obsidian/internals/BaseEditor.d.ts:62

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

Returns

void


newlineAndIndentOnly()

newlineAndIndentOnly(): void

Defined in: src/obsidian/internals/BaseEditor.d.ts:66

Inserts a new line at the same indent level

Returns

void


posAtMouse()

posAtMouse(e): EditorPosition

Defined in: src/obsidian/internals/BaseEditor.d.ts:70

Get the character position at a mouse event

Parameters

e

MouseEvent

Returns

EditorPosition


toggleBlockquote()

toggleBlockquote(): void

Defined in: src/obsidian/internals/BaseEditor.d.ts:74

Toggles blockquote syntax on paragraph under cursor

Returns

void


toggleBulletList()

toggleBulletList(): void

Defined in: src/obsidian/internals/BaseEditor.d.ts:78

Toggle bullet point list syntax on paragraph under cursor

Returns

void


toggleCheckList()

toggleCheckList(): void

Defined in: src/obsidian/internals/BaseEditor.d.ts:82

Toggle checkbox syntax on paragraph under cursor

Returns

void


toggleNumberList()

toggleNumberList(): void

Defined in: src/obsidian/internals/BaseEditor.d.ts:86

Toggle numbered list syntax on paragraph under cursor

Returns

void


triggerWikiLink(embed): void

Defined in: src/obsidian/internals/BaseEditor.d.ts:92

Convert word under cursor into a wikilink

Parameters

embed

boolean

Whether to embed the link or not

Returns

void


unindentList()

unindentList(): void

Defined in: src/obsidian/internals/BaseEditor.d.ts:96

Unindents a list by one level

Returns

void