summaryrefslogtreecommitdiff
path: root/public/js/index.js
diff options
context:
space:
mode:
authorCheng-Han, Wu2016-06-17 16:17:37 +0800
committerCheng-Han, Wu2016-06-17 16:17:37 +0800
commitcb1e00d1d149c7a331e9d37cc73927a6aa5c7cf6 (patch)
tree18180fd111bd2db2969ed594e80823f52ec9880b /public/js/index.js
parent4d244763164eb88638aec85d85529ea49feb0f94 (diff)
Add support of exporting raw html
Diffstat (limited to 'public/js/index.js')
-rw-r--r--public/js/index.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/public/js/index.js b/public/js/index.js
index 27a3398b..2da07b5d 100644
--- a/public/js/index.js
+++ b/public/js/index.js
@@ -505,7 +505,8 @@ var ui = {
publish: $(".ui-publish"),
download: {
markdown: $(".ui-download-markdown"),
- html: $(".ui-download-html")
+ html: $(".ui-download-html"),
+ rawhtml: $(".ui-download-raw-html")
},
export: {
dropbox: $(".ui-save-dropbox"),
@@ -1174,6 +1175,12 @@ ui.toolbar.download.html.click(function (e) {
e.stopPropagation();
exportToHTML(ui.area.markdown);
});
+// raw html
+ui.toolbar.download.rawhtml.click(function (e) {
+ e.preventDefault();
+ e.stopPropagation();
+ exportToRawHTML(ui.area.markdown);
+});
//export to dropbox
ui.toolbar.export.dropbox.click(function () {
var filename = renderFilename(ui.area.markdown) + '.md';