set marked to string
This commit is contained in:
@@ -554,7 +554,7 @@ export class UmbInputMarkdownElement extends FormControlMixin(UmbLitElement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
renderPreview(markdown: string) {
|
renderPreview(markdown: string) {
|
||||||
const markdownAsHtml = marked.parse(markdown);
|
const markdownAsHtml = marked.parse(markdown) as string;
|
||||||
const sanitizedHtml = markdownAsHtml ? DOMPurify.sanitize(markdownAsHtml) : '';
|
const sanitizedHtml = markdownAsHtml ? DOMPurify.sanitize(markdownAsHtml) : '';
|
||||||
return html`<uui-scroll-container id="preview"> ${unsafeHTML(sanitizedHtml)} </uui-scroll-container>`;
|
return html`<uui-scroll-container id="preview"> ${unsafeHTML(sanitizedHtml)} </uui-scroll-container>`;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user