Skip to content

ReplaceCodeBlockParams

Options for replaceCodeBlock.

Import:

import type { ReplaceCodeBlockParams } from 'obsidian-dev-utils/obsidian/markdown-code-block-processor';

Signature:

export interface ReplaceCodeBlockParams extends GetCodeBlockMarkdownInfoParams

Extends: GetCodeBlockMarkdownInfoParams

Properties

PropertyTypeDescription
abortSignal?AbortSignalAn abort signal to control the execution of the function.
appAppAn Obsidian app instance.
(Inherited from GetCodeBlockMarkdownInfoParams)
codeBlockProviderValueProvider<string, ContentArgs>Provides a new code block.
ctxMarkdownPostProcessorContextA MarkdownPostProcessorContext object.
(Inherited from GetCodeBlockMarkdownInfoParams)
elHTMLElementA HTMLElement representing the code block.
(Inherited from GetCodeBlockMarkdownInfoParams)
resourceLockComponentnull | ResourceLockComponentThe resource-lock component used to lock the note while it is being modified.
shouldKeepGapWhenEmpty?booleanWhether to keep the gap when the new code block is empty.
shouldPreserveLinePrefix?booleanWhether to preserve the line prefix of the code block.
sourcestringA source of the code block.
(Inherited from GetCodeBlockMarkdownInfoParams)

Links to this page: