Skip to content

CreateInlineTokenWidgetsExtensionParams

Parameters for createInlineTokenWidgetsExtension.

Import:

import type { CreateInlineTokenWidgetsExtensionParams } from '@mnaoumov/obsidian-lib/codemirror/inline-token-widgets';

Signature:

export interface CreateInlineTokenWidgetsExtensionParams

Properties

PropertyTypeDescription
regExpRegExpThe regular expression a token matches. The g flag is added when missing.
renderInlineTokenRenderFunctionRenders a token into the widget's element.
shouldDecorate?(params: InlineTokenShouldDecorateParams) => booleanDecides whether a match becomes a widget, such as to skip a match inside code. Every match does by default.
shouldRevealOnSelection?booleanWhether a token shows its source while a selection, the cursor included, touches it.

Links to this page: