@dfinity/gix-components
Version:
A UI kit developed by the GIX team
15 lines (14 loc) • 792 B
TypeScript
export declare const targetBlankLinkRenderer: (href: string | null | undefined, title: string | null | undefined, text: string) => string;
/**
* Based on https://github.com/markedjs/marked/blob/master/src/Renderer.js#L186
* @returns <a> tag to image
*/
export declare const imageToLinkRenderer: (src: string | null | undefined, title: string | null | undefined, alt: string) => string;
/** Avoid <img> tags; instead, apply the same logic as for markdown images by either escaping them or converting them to links. */
export declare const htmlRenderer: (html: string) => string;
/**
* Uses markedjs.
* Escape or transform to links some raw HTML tags (img, svg)
* @see {@link https://github.com/markedjs/marked}
*/
export declare const markdownToHTML: (text: string) => Promise<string>;