1 import MarkdownIt from 'markdown-it';
3 import mdTasksLists from 'markdown-it-task-lists';
5 export class Markdown {
6 protected renderer: MarkdownIt;
9 this.renderer = new MarkdownIt({html: true});
10 this.renderer.use(mdTasksLists, {label: true});
14 * Get the front-end render used to convert Markdown to HTML.
16 getRenderer(): MarkdownIt {
21 * Convert the given Markdown to HTML.
23 render(markdown: string): string {
24 return this.renderer.render(markdown);