We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 83125bf commit 0eba7d4Copy full SHA for 0eba7d4
editor/js/Menubar.File.js
@@ -78,12 +78,13 @@ Menubar.File = function ( editor ) {
78
function Export () {
79
80
var output = JSON.stringify( editor.toJSON(), null, '\t' );
81
-
82
- var blob = new Blob( [ output ], { type: 'text/plain' } );
83
- var objectURL = URL.createObjectURL( blob );
84
85
- window.open( objectURL, '_blank' );
86
- window.focus();
+ var filename = 'framejs.json';
+ var contentType = 'application/octet-stream';
+ var a = document.createElement('a');
+ var blob = new Blob([output], {'type':contentType});
+ a.href = window.URL.createObjectURL(blob);
+ a.download = filename;
87
+ a.click();
88
89
}
90
0 commit comments