Skip to content

Bookmark

Unofficial

A bookmark marking a specific position in the editor document that tracks changes.

Import:

import type { Bookmark } from '@obsidian-typings/obsidian-public-latest';

Signature:

export interface Bookmark

Properties

PropertyTypeDescription
assocnumberAssociation direction for the bookmark (-1 for left, 1 for right).
cmCodeMirrorEditorThe CodeMirror editor instance this bookmark belongs to.
idnumberUnique identifier for this bookmark.
offsetnumberCharacter offset of the bookmark within its line.

Methods

MethodReturnsDescription
clear()voidRemove this bookmark from the editor.
find()EditorPosition | nullFind the current position of this bookmark, or null if cleared.
update(changeDesc)voidUpdate the bookmark position in response to a document change.

Links to this page: