UNPKG

vue-markdown-unified

Version:

Vue3 VNode to render markdown

47 lines (43 loc) 1.2 kB
import { VNode } from 'vue'; import { Components } from 'hast-util-to-jsx-runtime'; export { Components } from 'hast-util-to-jsx-runtime'; import { Pluggable } from 'unified'; export { PluggableList, Plugin } from 'unified'; interface PrismOptions { ignoreMissing?: Boolean; defaultLanguage?: string; showLineNumbers?: Boolean | string[] | false; } interface VueMarkdownOptions { animated?: Boolean; enableSanitize?: Boolean; isBreaks?: Boolean; enableLatex?: Boolean; allowHtml?: Boolean; /** * List of remark plugins to use. */ remarkPlugins?: Pluggable[]; /** * List of rehype plugins to use. */ rehypePlugins?: Pluggable[]; /** * Options for `remark-rehype`. */ remarkRehypeOptions?: Record<string, unknown>; /** * Components to use for rendering. */ components?: Components; prismOptions?: PrismOptions; } interface MarkdownProps extends VueMarkdownOptions { /** * Markdown content to render. */ content: string; } declare function Markdown(content: string, options?: VueMarkdownOptions): VNode; export { Markdown }; export type { MarkdownProps, VueMarkdownOptions };