diff --git a/src/assets/scripts/util.js b/src/assets/scripts/util.js index c70174e..5520ecc 100644 --- a/src/assets/scripts/util.js +++ b/src/assets/scripts/util.js @@ -213,4 +213,17 @@ export function fixCodeWhiteSpace(value = 'pre') { pre.style.whiteSpace = value; }) } +} + +export function downLoadMD(doc) { + let downLink = document.createElement('a'); + + downLink.download = 'content.md'; + downLink.style.display = 'none'; + let blob = new Blob([doc]); + + downLink.href = URL.createObjectURL(blob); + document.body.appendChild(downLink); + downLink.click(); + document.body.removeChild(downLink); } \ No newline at end of file diff --git a/src/components/CodemirrorEditor/aboutDialog.vue b/src/components/CodemirrorEditor/aboutDialog.vue index dc4d8d3..67a90fe 100644 --- a/src/components/CodemirrorEditor/aboutDialog.vue +++ b/src/components/CodemirrorEditor/aboutDialog.vue @@ -1,5 +1,5 @@