Closes #692 - Fixes download files in Firefox
This commit is contained in:
@ -275,6 +275,9 @@ class Document extends BaseModel {
|
|||||||
const blob = new Blob([unescape(this.text)], { type: 'text/markdown' });
|
const blob = new Blob([unescape(this.text)], { type: 'text/markdown' });
|
||||||
const url = URL.createObjectURL(blob);
|
const url = URL.createObjectURL(blob);
|
||||||
const a = document.createElement('a');
|
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.href = url;
|
||||||
a.download = `${this.title}.md`;
|
a.download = `${this.title}.md`;
|
||||||
a.click();
|
a.click();
|
||||||
|
Reference in New Issue
Block a user