Added MathJax library in default template
This commit is contained in:
parent
18b7037764
commit
04050b2999
@ -186,5 +186,18 @@ define([
|
||||
]);
|
||||
};
|
||||
|
||||
// Log error messages
|
||||
googleAnalytics.onError = function(error) {
|
||||
if(_.isString(error) || !error.message) {
|
||||
return;
|
||||
}
|
||||
_gaq.push([
|
||||
'_trackEvent',
|
||||
"Error",
|
||||
"message",
|
||||
error.message
|
||||
]);
|
||||
};
|
||||
|
||||
return googleAnalytics;
|
||||
});
|
@ -173,8 +173,8 @@ define([
|
||||
|
||||
// syncIndex associations
|
||||
syncLocations = syncLocations || {};
|
||||
var sync = _.reduce(syncLocations, function(sync, syncAttributes, syncIndex) {
|
||||
return sync + syncIndex + ";";
|
||||
var sync = _.reduce(syncLocations, function(sync, syncAttributes) {
|
||||
return sync + syncAttributes.syncIndex + ";";
|
||||
}, ";");
|
||||
|
||||
localStorage[fileIndex + ".title"] = title;
|
||||
|
@ -1,11 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title><%= documentTitle %></title>
|
||||
<link rel="stylesheet"
|
||||
href="<%= siteUrl %>css/main-min.css" />
|
||||
</head>
|
||||
<body><%= documentHTML %>
|
||||
</body>
|
||||
</html>
|
@ -36,7 +36,11 @@ define([
|
||||
// Store publishIndex
|
||||
publishAttributes.publishIndex = publishIndex;
|
||||
// Replace provider ID by provider module in attributes
|
||||
publishAttributes.provider = providerMap[publishAttributes.provider];
|
||||
var provider = providerMap[publishAttributes.provider];
|
||||
if(!provider) {
|
||||
throw new Error("Invalid provider ID: " + publishAttributes.provider);
|
||||
}
|
||||
publishAttributes.provider = provider;
|
||||
fileDesc.publishLocations[publishIndex] = publishAttributes;
|
||||
}
|
||||
catch(e) {
|
||||
@ -60,7 +64,7 @@ define([
|
||||
publishAttributes: publishAttributes
|
||||
});
|
||||
}
|
||||
catch (e) {
|
||||
catch(e) {
|
||||
extensionMgr.onError(e);
|
||||
throw e;
|
||||
}
|
||||
@ -233,7 +237,7 @@ define([
|
||||
$(".action-download-template").click(function() {
|
||||
var content = publisher.applyTemplate();
|
||||
var title = fileMgr.getCurrentFile().title;
|
||||
utils.saveAs(content, title + ".txt");
|
||||
utils.saveAs(content, title + (settings.template.indexOf("documentHTML") === -1 ? ".md" : ".html"));
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -18,6 +18,9 @@ define([
|
||||
'<link rel="stylesheet" href="',
|
||||
MAIN_URL,
|
||||
'css/main-min.css" />\n',
|
||||
'<script type="text/javascript" src="',
|
||||
MAIN_URL,
|
||||
'lib/MathJax/MathJax.js?config=TeX-AMS_HTML"></script>\n',
|
||||
'</head>\n',
|
||||
'<body><%= documentHTML %></body>\n',
|
||||
'</html>'
|
||||
|
@ -28,7 +28,11 @@ define([
|
||||
// Store syncIndex
|
||||
syncAttributes.syncIndex = syncIndex;
|
||||
// Replace provider ID by provider module in attributes
|
||||
syncAttributes.provider = providerMap[syncAttributes.provider];
|
||||
var provider = providerMap[syncAttributes.provider];
|
||||
if(!provider) {
|
||||
throw new Error("Invalid provider ID: " + syncAttributes.provider);
|
||||
}
|
||||
syncAttributes.provider = provider;
|
||||
fileDesc.syncLocations[syncIndex] = syncAttributes;
|
||||
}
|
||||
catch(e) {
|
||||
|
Loading…
Reference in New Issue
Block a user