Customizable MIME type for Google Drive
This commit is contained in:
parent
5a1ea7c14f
commit
c8dd5498c9
@ -123,6 +123,8 @@ define([
|
|||||||
utils.setInputRadio("radio-settings-edit-mode", settings.editMode);
|
utils.setInputRadio("radio-settings-edit-mode", settings.editMode);
|
||||||
// Commit message
|
// Commit message
|
||||||
utils.setInputValue("#input-settings-publish-commit-msg", settings.commitMsg);
|
utils.setInputValue("#input-settings-publish-commit-msg", settings.commitMsg);
|
||||||
|
// Markdown MIME type
|
||||||
|
utils.setInputValue("#input-settings-markdown-mime-type", settings.markdownMimeType);
|
||||||
// Gdrive multi-accounts
|
// Gdrive multi-accounts
|
||||||
utils.setInputValue("#input-settings-gdrive-multiaccount", settings.gdriveMultiAccount);
|
utils.setInputValue("#input-settings-gdrive-multiaccount", settings.gdriveMultiAccount);
|
||||||
// Gdrive full access
|
// Gdrive full access
|
||||||
@ -168,6 +170,8 @@ define([
|
|||||||
newSettings.commitMsg = utils.getInputTextValue("#input-settings-publish-commit-msg", event);
|
newSettings.commitMsg = utils.getInputTextValue("#input-settings-publish-commit-msg", event);
|
||||||
// Gdrive multi-accounts
|
// Gdrive multi-accounts
|
||||||
newSettings.gdriveMultiAccount = utils.getInputIntValue("#input-settings-gdrive-multiaccount");
|
newSettings.gdriveMultiAccount = utils.getInputIntValue("#input-settings-gdrive-multiaccount");
|
||||||
|
// Markdown MIME type
|
||||||
|
newSettings.markdownMimeType = utils.getInputValue("#input-settings-markdown-mime-type");
|
||||||
// Gdrive full access
|
// Gdrive full access
|
||||||
newSettings.gdriveFullAccess = utils.getInputChecked("#input-settings-gdrive-full-access");
|
newSettings.gdriveFullAccess = utils.getInputChecked("#input-settings-gdrive-full-access");
|
||||||
// Drobox full access
|
// Drobox full access
|
||||||
|
@ -233,7 +233,7 @@ define([
|
|||||||
var boundary = '-------314159265358979323846';
|
var boundary = '-------314159265358979323846';
|
||||||
var delimiter = "\r\n--" + boundary + "\r\n";
|
var delimiter = "\r\n--" + boundary + "\r\n";
|
||||||
var close_delim = "\r\n--" + boundary + "--";
|
var close_delim = "\r\n--" + boundary + "--";
|
||||||
contentType = contentType || 'text/x-markdown';
|
contentType = contentType || settings.markdownMimeType;
|
||||||
var metadata = {
|
var metadata = {
|
||||||
title: title,
|
title: title,
|
||||||
mimeType: contentType
|
mimeType: contentType
|
||||||
@ -768,6 +768,9 @@ define([
|
|||||||
title: title,
|
title: title,
|
||||||
content: content
|
content: content
|
||||||
};
|
};
|
||||||
|
if(publishDate) {
|
||||||
|
data.published = publishDate.toISOString();
|
||||||
|
}
|
||||||
var type = "POST";
|
var type = "POST";
|
||||||
// If it's an update
|
// If it's an update
|
||||||
if(postId !== undefined) {
|
if(postId !== undefined) {
|
||||||
|
@ -53,8 +53,8 @@
|
|||||||
<pre id="wmd-input" class="ui-layout-center form-control"><div class="editor-content" contenteditable=true></div><div class="editor-margin"></div></pre>
|
<pre id="wmd-input" class="ui-layout-center form-control"><div class="editor-content" contenteditable=true></div><div class="editor-margin"></div></pre>
|
||||||
<div class="preview-panel">
|
<div class="preview-panel">
|
||||||
<div class="layout-resizer layout-resizer-preview"></div>
|
<div class="layout-resizer layout-resizer-preview"></div>
|
||||||
<div class="layout-toggler layout-toggler-navbar btn btn-info"><i class="icon-th"></i></div>
|
<div class="layout-toggler layout-toggler-navbar btn btn-info" title="Toggle navigation bar"><i class="icon-th"></i></div>
|
||||||
<div class="layout-toggler layout-toggler-preview btn btn-info"><i class="icon-none"></i></div>
|
<div class="layout-toggler layout-toggler-preview btn btn-info" title="Toggle preview"><i class="icon-none"></i></div>
|
||||||
<div class="preview-container">
|
<div class="preview-container">
|
||||||
<div id="preview-contents">
|
<div id="preview-contents">
|
||||||
<div id="wmd-preview" class="preview-content"></div>
|
<div id="wmd-preview" class="preview-content"></div>
|
||||||
@ -1076,6 +1076,17 @@
|
|||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-sm-4 control-label"
|
||||||
|
for="input-settings-markdown-mime-type">Markdown MIME type</a>
|
||||||
|
</label>
|
||||||
|
<div class="col-sm-7">
|
||||||
|
<select id="input-settings-markdown-mime-type" class="form-control">
|
||||||
|
<option value="text/plain">text/plain</option>
|
||||||
|
<option value="text/x-markdown">text/x-markdown</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-4 control-label">Permissions</label>
|
<label class="col-sm-4 control-label">Permissions</label>
|
||||||
<div class="col-sm-7">
|
<div class="col-sm-7">
|
||||||
|
@ -14,6 +14,7 @@ define([
|
|||||||
defaultContent: "\n\n\n> Written with [StackEdit](" + constants.MAIN_URL + ").",
|
defaultContent: "\n\n\n> Written with [StackEdit](" + constants.MAIN_URL + ").",
|
||||||
commitMsg: "Published with " + constants.MAIN_URL,
|
commitMsg: "Published with " + constants.MAIN_URL,
|
||||||
conflictMode: 'merge',
|
conflictMode: 'merge',
|
||||||
|
markdownMimeType: 'text/x-markdown',
|
||||||
gdriveMultiAccount: 1,
|
gdriveMultiAccount: 1,
|
||||||
gdriveFullAccess: true,
|
gdriveFullAccess: true,
|
||||||
dropboxFullAccess: true,
|
dropboxFullAccess: true,
|
||||||
|
Loading…
Reference in New Issue
Block a user