Skip to content

ReadViewRenderer

Unofficial

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

Import:

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

Signature:

export interface ReadViewRenderer

Properties

PropertyTypeDescription
addBottomPaddingbooleanWhether to add bottom padding to the preview.
asyncSectionsunknown[]Sections that are being rendered asynchronously.
lastRendernumberTimestamp of the last render operation.
lastScrollnumberLast recorded scroll position.
lastTextstringText content from the last render.
previewElHTMLElementContainer element for the rendered preview.
pusherElHTMLElementElement used to push content for scroll height calculation.
recycledSectionsunknown[]Pool of recycled section elements for reuse.
renderedunknown[]Currently rendered section data.
sectionsRendererSection[]All sections in the rendered document.
textstringCurrent text content being rendered.

Methods

MethodReturnsDescription
clear()voidClear all rendered sections and reset the renderer.
parseAsync()voidParse the text content asynchronously into sections.
parseSync()voidParse the text content synchronously into sections.
queueRender()voidQueue a render update for the next animation frame.
set(text)voidSet the text content and trigger a re-render.

Links to this page: