Skip to content

ShowCodeBlockBuilderParams

The parameters of showCodeBlockBuilder.

Import:

import type { ShowCodeBlockBuilderParams } from '@mnaoumov/obsidian-lib/modals/code-block-builder';

Signature:

export interface ShowCodeBlockBuilderParams extends ModalParamsBase

Extends: ModalParamsBase

Properties

PropertyTypeDescription
appAppAn Obsidian app instance.
(Inherited from ModalParamsBase)
cssClasses?string[]A CSS class to apply to the modal.
(Inherited from ModalParamsBase)
editor?Editor | nullThe editor the Insert button writes into.
fieldsreadonly CodeBlockBuilderInput[]The fields of the code block, in the order they are written into it. Required fields are shown first.
languagestringThe language of the code block: the text after its opening fence.
onUpdatePreview?(params: CodeBlockBuilderPreviewParams) => voidDraws a live preview of the code block. Called once when the modal opens and again after every change.
title?stringThe title of the modal.

Links to this page: