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 'obsidian-dev-utils/obsidian/dataview';

Signature:

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

Parameters:

ParameterTypeDescription
dvDataviewInlineApiThe 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.