From 747502e694efb5131e1f589adcb608580347e1e0 Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Thu, 13 Oct 2016 16:35:43 +0800 Subject: [PATCH] Fix HTML exporting --- public/js/extra.js | 4 +++- public/js/index.js | 4 +++- public/views/foot.ejs | 1 + public/views/pretty.ejs | 1 + webpackBaseConfig.js | 6 ++++-- 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/public/js/extra.js b/public/js/extra.js index e19a35d..d853bf9 100644 --- a/public/js/extra.js +++ b/public/js/extra.js @@ -1084,5 +1084,7 @@ module.exports = { owner: owner, updateLastChangeUser: updateLastChangeUser, updateOwner: updateOwner, - parseMeta: parseMeta + parseMeta: parseMeta, + exportToHTML: exportToHTML, + exportToRawHTML: exportToRawHTML }; diff --git a/public/js/index.js b/public/js/index.js index 4d74532..de0ba0b 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -53,6 +53,8 @@ var owner = extra.owner; var updateLastChangeUser = extra.updateLastChangeUser; var updateOwner = extra.updateOwner; var parseMeta = extra.parseMeta; +var exportToHTML = extra.exportToHTML; +var exportToRawHTML = extra.exportToRawHTML; var historyModule = require('./history'); var writeHistory = historyModule.writeHistory; @@ -755,7 +757,7 @@ function updateStatusBar() { } //ui vars -var ui = { +window.ui = { spinner: $(".ui-spinner"), content: $(".ui-content"), toolbar: { diff --git a/public/views/foot.ejs b/public/views/foot.ejs index 983ce3d..4294070 100644 --- a/public/views/foot.ejs +++ b/public/views/foot.ejs @@ -22,6 +22,7 @@ + <%- include build/index-scripts %> diff --git a/public/views/pretty.ejs b/public/views/pretty.ejs index d5814fc..8fecb04 100644 --- a/public/views/pretty.ejs +++ b/public/views/pretty.ejs @@ -102,6 +102,7 @@ + <%- include build/pretty-scripts %> diff --git a/webpackBaseConfig.js b/webpackBaseConfig.js index 072ef7b..7648cd8 100644 --- a/webpackBaseConfig.js +++ b/webpackBaseConfig.js @@ -13,7 +13,8 @@ module.exports = { $: "jquery", jQuery: "jquery", "window.jQuery": "jquery", - "moment": "moment" + "moment": "moment", + "Handlebars": "handlebars" }), new ExtractTextPlugin("[name].css"), new webpack.optimize.CommonsChunkPlugin({ @@ -127,7 +128,8 @@ module.exports = { "socket.io-client": "io", "lodash": "_", "jquery": "$", - "moment": "moment" + "moment": "moment", + "handlebars": "Handlebars" }, module: {