summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
Diffstat (limited to 'public')
-rw-r--r--public/js/index.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/public/js/index.js b/public/js/index.js
index d3c02b12..1e4bc9fe 100644
--- a/public/js/index.js
+++ b/public/js/index.js
@@ -799,7 +799,9 @@ var url = window.location.protocol + '//' + window.location.host + window.locati
ui.toolbar.publish.attr("href", url + "/publish");
//download
//markdown
-ui.toolbar.download.markdown.click(function () {
+ui.toolbar.download.markdown.click(function (e) {
+ e.preventDefault();
+ e.stopPropagation();
var filename = renderFilename(ui.area.markdown) + '.md';
var markdown = editor.getValue();
var blob = new Blob([markdown], {
@@ -808,7 +810,9 @@ ui.toolbar.download.markdown.click(function () {
saveAs(blob, filename);
});
//html
-ui.toolbar.download.html.click(function () {
+ui.toolbar.download.html.click(function (e) {
+ e.preventDefault();
+ e.stopPropagation();
exportToHTML(ui.area.markdown);
});
//export to dropbox