Skip to content

listRenderedButtonCaptions

Lists the captions of the buttons a note’s source will actually render, in source order.

Which fences render a button is decided exactly as countRenderedButtons describes. A caption is read from the fence’s own config block; a fence naming none takes CodeScript Toolkit’s default, (no caption), which is what its button then shows.

Import:

import { listRenderedButtonCaptions } from 'obsidian-dev-utils/script-utils/demo-vault-buttons';

Signature:

function listRenderedButtonCaptions(source: string): string[]

Parameters:

Parameter Type Description
source string The note’s markdown.

Returns: string[] — The captions, one per rendered button.


Links to this page: