mirror of
https://github.com/outline/outline.git
synced 2026-12-05 18:55:10 +03:00
Closes #692 - Fixes download files in Firefox
This commit is contained in:
1 parent
1bb4583b3f
commit
e20232a869
1 file changed
+3
@@ -275,6 +275,9 @@ class Document extends BaseModel {
|
||||
const blob = new Blob([unescape(this.text)], { type: 'text/markdown' });
|
||||
const url = URL.createObjectURL(blob);
|
||||
const a = document.createElement('a');
|
||||
|
||||
// Firefox support requires the anchor tag be in the DOM to trigger the dl
|
||||
if (document.body) document.body.appendChild(a);
|
||||
a.href = url;
|
||||
a.download = `${this.title}.md`;
|
||||
a.click();
|
||||
|
||||
Reference in new issue
Block a user