diff --git a/public/res/extensions/buttonHtmlCode.js b/public/res/extensions/buttonHtmlCode.js
index ad664de0..272ebfeb 100644
--- a/public/res/extensions/buttonHtmlCode.js
+++ b/public/res/extensions/buttonHtmlCode.js
@@ -41,7 +41,7 @@ define([
var htmlCode = _.template(buttonHtmlCode.config.template, {
documentTitle: selectedFileDesc.title,
documentMarkdown: selectedFileDesc.content,
- trimmedDocumentMarkdown: selectedFileDesc.content.substring(selectedFileDesc.frontMatter ? selectedFileDesc.frontMatter._frontMatter.length : 0),
+ strippedDocumentMarkdown: selectedFileDesc.content.substring(selectedFileDesc.frontMatter ? selectedFileDesc.frontMatter._frontMatter.length : 0),
documentHTML: html,
frontMatter: selectedFileDesc.frontMatter,
publishAttributes: undefined,
diff --git a/public/res/html/settingsTemplateTooltip.html b/public/res/html/settingsTemplateTooltip.html
index c474f50f..40fb1cbe 100644
--- a/public/res/html/settingsTemplateTooltip.html
+++ b/public/res/html/settingsTemplateTooltip.html
@@ -6,7 +6,7 @@ Available variables:
documentMarkdown: document in Markdown format
- trimmedDocumentMarkdown: document without front matter
+ strippedDocumentMarkdown: document without front matter
documentHTML: document in HTML format
diff --git a/public/res/providers/tumblrProvider.js b/public/res/providers/tumblrProvider.js
index 947af490..6e6cc031 100644
--- a/public/res/providers/tumblrProvider.js
+++ b/public/res/providers/tumblrProvider.js
@@ -1,9 +1,10 @@
define([
"underscore",
+ "settings",
"utils",
"classes/Provider",
"helpers/tumblrHelper"
-], function(_, utils, Provider, tumblrHelper) {
+], function(_, settings, utils, Provider, tumblrHelper) {
var tumblrProvider = new Provider("tumblr", "Tumblr");
tumblrProvider.publishPreferencesInputIds = [
@@ -16,7 +17,22 @@ define([
frontMatter.tags !== undefined && (labelList = frontMatter.tags);
}
_.isString(labelList) && (labelList = _.compact(labelList.split(/[\s,]/)));
- tumblrHelper.upload(publishAttributes.blogHostname, publishAttributes.postId, labelList.join(','), publishAttributes.format == "markdown" ? "markdown" : "html", title, content, function(error, postId) {
+
+ // Deduce format from publishAttributes/template
+ var format = (function() {
+ if(publishAttributes.format == 'html') {
+ return 'html';
+ }
+ if(publishAttributes.format == 'template') {
+ var template = publishAttributes.customTmpl || settings.template;
+ if(template.indexOf("documentHTML") !== -1) {
+ return 'html';
+ }
+ }
+ return 'markdown';
+ })();
+
+ tumblrHelper.upload(publishAttributes.blogHostname, publishAttributes.postId, labelList.join(','), format, title, content, function(error, postId) {
if(error) {
callback(error);
return;
diff --git a/public/res/publisher.js b/public/res/publisher.js
index 518d2b85..5f419061 100644
--- a/public/res/publisher.js
+++ b/public/res/publisher.js
@@ -62,7 +62,7 @@ define([
return _.template(template, {
documentTitle: fileDesc.title,
documentMarkdown: fileDesc.content,
- trimmedDocumentMarkdown: fileDesc.content.substring(fileDesc.frontMatter ? fileDesc.frontMatter._frontMatter.length : 0),
+ strippedDocumentMarkdown: fileDesc.content.substring(fileDesc.frontMatter ? fileDesc.frontMatter._frontMatter.length : 0),
documentHTML: html,
frontMatter: fileDesc.frontMatter,
publishAttributes: publishAttributes
diff --git a/public/res/styles/main.less b/public/res/styles/main.less
index c1eca266..1df86fa0 100644
--- a/public/res/styles/main.less
+++ b/public/res/styles/main.less
@@ -1215,15 +1215,14 @@ div.dropdown-menu textarea {
.title-icon-category {
display: inline-block;
opacity: 0.1;
- margin-top: -4px;
+ margin-top: -2px;
margin-left: -2px;
margin-right: 2px;
font-size: 14px;
vertical-align: top;
.file-title-navbar & {
font-size: 16px;
- margin-top: -2px;
- margin-left: -4px;
+ margin-left: -3px;
}
}