(dom: Element, filename?: string)
| 49 | } |
| 50 | |
| 51 | export function saveHtml(dom: Element, filename?: string) { |
| 52 | if (dom) { |
| 53 | const htmlContent = dom.outerHTML |
| 54 | const blob = new Blob([htmlContent], { type: "text/html;charset=utf-8" }) |
| 55 | filename = filename || "CodeBox-page" |
| 56 | saveAs(blob, `${filename}-${dayjs().format("YYYY-MM-DD HH:mm:ss")}.html`) |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | export function saveMarkdown(markdown: string, filename?: string) { |
| 61 | if (markdown) { |
no outgoing calls
no test coverage detected