Added support of export to HTML, and changed the navbar menu for consistency

This commit is contained in:
Wu Cheng-Han 2015-09-25 19:09:43 +08:00
parent 60414febee
commit 5f82df7eb2
6 changed files with 253 additions and 12 deletions

View file

@ -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: [