From cb1e00d1d149c7a331e9d37cc73927a6aa5c7cf6 Mon Sep 17 00:00:00 2001 From: Cheng-Han, Wu Date: Fri, 17 Jun 2016 16:17:37 +0800 Subject: Add support of exporting raw html --- public/js/index.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'public/js/index.js') 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'; -- cgit v1.2.3