ReferenceView Markdown ↗
Browser rendering API
Generated public signatures, parameters, return values and data fields.
Signatures and descriptions are extracted from public exports and JSDoc. Chinese explanations are checked against current source. See Embed in Vue for the component integration.
Render and rasterize
renderTextDiagram
@quirekit/text-diagram/browserMIT@param language - Explicit grammar. @param source - Exact draft. @param options - Cancellable render owner. @returns A static SVG snapshot tied to exactly this source.
renderTextDiagramts
function renderTextDiagram(language: TextDiagramLanguage, source: string, options: TextDiagramRenderOptions): Promise<TextDiagramSnapshot>rasterizeTextDiagram
@quirekit/text-diagram/browserMIT@param snapshot - Already sanitized, source-bound SVG. @param owner - Canvas owner. @param signal - Save lifetime. @returns A bounded PNG from this snapshot, without rereading the draft.
rasterizeTextDiagramts
function rasterizeTextDiagram(snapshot: TextDiagramSnapshot, owner: Document, signal: AbortSignal): Promise<TextDiagramRaster>Options
TextDiagramRenderOptions
@quirekit/text-diagram/browserMITExplicit render lifetime; no host editor state is captured.
TextDiagramRenderOptionsts
export interface TextDiagramRenderOptions {
readonly signal: AbortSignal;
readonly ownerDocument?: Document;
readonly typography?: TextDiagramTypography;
}TextDiagramTypography
@quirekit/text-diagram/browserMITMermaid measurement typography, shared by editor, reading and export.
TextDiagramTypographyts
export interface TextDiagramTypography {
readonly fontFamily: string;
readonly fontSize: number;
}