Skip to content

getRenderedContainer

Renders the content using the provided renderer function in a temporary container, and then returns the container.

Import:

import { getRenderedContainer } from '@mnaoumov/obsidian-lib/dataview';

Signature:

function getRenderedContainer(dv: DataviewInlineApi, renderer: () => Promisable<void>): Promise<HTMLParagraphElement>

Parameters:

Parameter Type Description
dv DataviewInlineApi The DataviewInlineApi instance.
renderer () => Promisable<void> The function responsible for rendering the content.

Returns: Promise<HTMLParagraphElement> — A Promise that resolves to the HTML paragraph element that was used as the temporary container.