From 5f82df7eb2f37b06684e380fd261b8eb9ea2d50b Mon Sep 17 00:00:00 2001 From: Wu Cheng-Han Date: Fri, 25 Sep 2015 19:09:43 +0800 Subject: Added support of export to HTML, and changed the navbar menu for consistency --- public/js/index.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'public/js/index.js') 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: [ -- cgit v1.2.3