Skip to content

ReadViewRenderer

Unofficial

Renderer for the reading/preview view, managing section-based markdown rendering.

Import:

import type { ReadViewRenderer } from '@obsidian-typings/obsidian-public-latest';

Signature:

export interface ReadViewRenderer

Properties

Property Type Description
addBottomPadding boolean Whether to add bottom padding to the preview.
asyncSections unknown[] Sections that are being rendered asynchronously.
lastRender number Timestamp of the last render operation.
lastScroll number Last recorded scroll position.
lastText string Text content from the last render.
previewEl HTMLElement Container element for the rendered preview.
pusherEl HTMLElement Element used to push content for scroll height calculation.
recycledSections unknown[] Pool of recycled section elements for reuse.
rendered unknown[] Currently rendered section data.
sections RendererSection[] All sections in the rendered document.
text string Current text content being rendered.

Methods

Method Returns Description
clear() void Clear all rendered sections and reset the renderer.
parseAsync() void Parse the text content asynchronously into sections.
parseSync() void Parse the text content synchronously into sections.
queueRender() void Queue a render update for the next animation frame.
set(text) void Set the text content and trigger a re-render.

Links to this page: