Cm5TextMarkerOptions
Unofficial
Options for creating a text marker in CodeMirror 5.
Import:
import type { Cm5TextMarkerOptions } from '@obsidian-typings/obsidian-public-latest';Signature:
export interface Cm5TextMarkerOptionsProperties
| Property | Type | Description | |
|---|---|---|---|
| addToHistory? | boolean | When set to true, adding this marker will create an event in the undo history. | |
| atomic? | boolean | Atomic ranges act as a single unit when cursor movement is concerned. | |
| attributes? | Record<string, string> | When given, add the attributes to the elements created for the marked text. | |
| className? | string | Assigns a CSS class to the marked stretch of text. | |
| clearOnEnter? | boolean | When enabled, will cause the mark to clear itself whenever the cursor enters its range. | |
| clearWhenEmpty? | boolean | Determines whether the mark is automatically cleared when it becomes empty. | |
| collapsed? | boolean | Collapsed ranges do not show up in the display. | |
| css? | string | A string of CSS to be applied to the covered text. | |
| endStyle? | string | Equivalent to startStyle, but for the rightmost span. | |
| handleMouseEvents? | boolean | Whether the editor will capture mouse and drag events occurring in this widget. | |
| inclusiveLeft? | boolean | Determines whether text inserted on the left of the marker will end up inside or outside of it. | |
| inclusiveRight? | boolean | Like inclusiveLeft, but for the right side. | |
| readOnly? | boolean | A read-only span cannot be modified except by calling setValue. | |
| replacedWith? | HTMLElement | Use a given node to display this range. Implies both collapsed and atomic. | |
| selectLeft? | boolean | For atomic ranges, determines whether the cursor is allowed to be placed directly to the left. | |
| selectRight? | boolean | Like selectLeft, but for the right side. | |
| shared? | boolean | When set to true, makes the marker appear in all linked documents. | |
| startStyle? | string | Can be used to specify an extra CSS class for the leftmost span of the marker. | |
| title? | string | When given, will give the nodes a HTML title attribute with the given value. |