(markdown: string, filename?: string)
| 58 | } |
| 59 | |
| 60 | export function saveMarkdown(markdown: string, filename?: string) { |
| 61 | if (markdown) { |
| 62 | const blob = new Blob([markdown], { type: "text/markdown;charset=utf-8" }) |
| 63 | filename = filename || "CodeBox-page" |
| 64 | saveAs(blob, `${filename}-${dayjs().format("YYYY-MM-DD HH:mm:ss")}.md`) |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | export async function saveMarkdownWithLocalImages(markdown: string, filename?: string) { |
| 69 | if (!markdown) return |
no outgoing calls
no test coverage detected