UNPKG

@oiij/markdown-it

Version:

A Vue Composable for markdown-it

19 lines (18 loc) 719 B
import markdownIt, { Options } from "markdown-it"; import * as vue0 from "vue"; import { Ref, TemplateRef } from "vue"; //#region src/index.d.ts type MarkDownItOptions = Options & { manual?: boolean; domPurify?: boolean; }; declare function useMarkdownIt(templateRef?: TemplateRef<HTMLElement>, defaultValue?: Ref<string> | string, options?: MarkDownItOptions): { value: Ref<string | undefined, string | undefined>; html: Ref<string, string>; templateRef: Readonly<vue0.ShallowRef<HTMLElement | null>> | undefined; md: markdownIt; render: (value: string) => string; }; type MarkdownItReturns = ReturnType<typeof useMarkdownIt>; //#endregion export { MarkDownItOptions, MarkdownItReturns, useMarkdownIt };