Skip to content

Commit

Permalink
Fix spacing in exported html
Browse files Browse the repository at this point in the history
  • Loading branch information
williamngan committed Aug 24, 2018
1 parent 282a3e8 commit 3334d28
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions demo/edit/js/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ document.getElementById("closemenu").addEventListener("click", function(evt) {


document.getElementById("save").addEventListener("click", function(evt) {
var html = '<html><head><script src="https://unpkg.com/pts/dist/pts.min.js"></script></head>'
html += '<body style="font-family: sans-serif; margin: 0;"><div id="pt" style="width: 800px; height: 600px; margin: 30px auto 0;"></div>'
html += '<div style="padding: 20px 0; font-family: sans-serif; font-size: 0.8em; color: #9ab; text-align: center;">Generated by <a href="https://ptsjs.org/demo/edit">Pts demo editor</a>. Learn more at <a href="https://ptsjs.org">https://ptsjs.org</a>.</div><script>';
var html = '<html>\n <head><script src="https://unpkg.com/pts/dist/pts.min.js"></script></head>\n';
html += '\n <body style="font-family: sans-serif; margin: 0;">\n <div id="pt" style="width: 800px; height: 600px; margin: 30px auto 0;"></div>';
html += '\n <div style="padding: 20px 0; font-family: sans-serif; font-size: 0.8em; color: #9ab; text-align: center;">\n Generated by <a href="https://ptsjs.org/demo/edit">Pts demo editor</a>. Learn more at <a href="https://ptsjs.org">https://ptsjs.org</a>.\n </div>\n\n <script>\n\n\n';
html += window.editor.getValue();
html += '</script></body></html>';
html += '\n\n\n </script>\n </body>\n</html>';
var blob = new Blob([ html ], {type: "text/plain;charset=utf-8"});
saveAs(blob, "pts_demo.html");
});
Expand Down

0 comments on commit 3334d28

Please sign in to comment.