summaryrefslogtreecommitdiff
path: root/public/js/index.js
diff options
context:
space:
mode:
authorWu Cheng-Han2015-09-25 19:09:43 +0800
committerWu Cheng-Han2015-09-25 19:09:43 +0800
commit5f82df7eb2f37b06684e380fd261b8eb9ea2d50b (patch)
treebdffc648391cbce4f7f9a3b235687e2a8593627f /public/js/index.js
parent60414febee5fd14743fd80cad9d681c3027272dd (diff)
Added support of export to HTML, and changed the navbar menu for consistency
Diffstat (limited to 'public/js/index.js')
-rw-r--r--public/js/index.js13
1 files changed, 9 insertions, 4 deletions
diff --git a/public/js/index.js b/public/js/index.js
index 8e1bd41d..8bfecede 100644
--- a/public/js/index.js
+++ b/public/js/index.js
@@ -285,9 +285,10 @@ var ui = {
new: $(".ui-new"),
publish: $(".ui-publish"),
download: {
- markdown: $(".ui-download-markdown")
+ markdown: $(".ui-download-markdown"),
+ html: $(".ui-download-html")
},
- save: {
+ export: {
dropbox: $(".ui-save-dropbox")
},
import: {
@@ -801,8 +802,12 @@ ui.toolbar.download.markdown.click(function () {
});
saveAs(blob, filename);
});
-//save to dropbox
-ui.toolbar.save.dropbox.click(function () {
+//html
+ui.toolbar.download.html.click(function () {
+ exportToHTML(ui.area.markdown);
+});
+//export to dropbox
+ui.toolbar.export.dropbox.click(function () {
var filename = renderFilename(ui.area.markdown) + '.md';
var options = {
files: [