mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-14 06:43:25 +08:00
chore: Update RunOptions docs
Co-authored-by: Alois Klink <alois@aloisklink.com>
This commit is contained in:
parent
40b5f868de
commit
38b2cbc3d1
@ -23,19 +23,22 @@ export type {
|
|||||||
ParseOptions,
|
ParseOptions,
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
* The options used when running mermaid.
|
|
||||||
*
|
|
||||||
* @param querySelector - The query selector to use when finding elements to render. Default: .mermaid
|
|
||||||
* @param nodes - The nodes to render. If this is set, querySelector will be ignored.
|
|
||||||
* @param postRenderCallback - A callback to call after each diagram is rendered.
|
|
||||||
* @param suppressErrors - If true, errors will be logged to the console, but not thrown. Default: false
|
|
||||||
*/
|
|
||||||
export interface RunOptions {
|
export interface RunOptions {
|
||||||
// Default: .mermaid
|
/**
|
||||||
|
* The query selector to use when finding elements to render. Default: `".mermaid"`.
|
||||||
|
*/
|
||||||
querySelector?: string;
|
querySelector?: string;
|
||||||
|
/**
|
||||||
|
* The nodes to render. If this is set, `querySelector` will be ignored.
|
||||||
|
*/
|
||||||
nodes?: ArrayLike<HTMLElement>;
|
nodes?: ArrayLike<HTMLElement>;
|
||||||
|
/**
|
||||||
|
* A callback to call after each diagram is rendered.
|
||||||
|
*/
|
||||||
postRenderCallback?: (id: string) => unknown;
|
postRenderCallback?: (id: string) => unknown;
|
||||||
|
/**
|
||||||
|
* If `true`, errors will be logged to the console, but not thrown. Default: `false`
|
||||||
|
*/
|
||||||
suppressErrors?: boolean;
|
suppressErrors?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user