Added setting for PDF page size
This commit is contained in:
parent
fbb366c59e
commit
293aac30ed
@ -129,7 +129,9 @@ define([
|
||||
// Template
|
||||
utils.setInputValue("#textarea-settings-publish-template", settings.template);
|
||||
// PDF template
|
||||
utils.setInputValue("#textarea-settings-publish-pdf-template", settings.pdfTemplate);
|
||||
utils.setInputValue("#textarea-settings-pdf-template", settings.pdfTemplate);
|
||||
// PDF page size
|
||||
utils.setInputValue("#input-settings-pdf-page-size", settings.pdfPageSize);
|
||||
// SSH proxy
|
||||
utils.setInputValue("#input-settings-ssh-proxy", settings.sshProxy);
|
||||
|
||||
@ -165,7 +167,9 @@ define([
|
||||
// Template
|
||||
newSettings.template = utils.getInputTextValue("#textarea-settings-publish-template", event);
|
||||
// PDF template
|
||||
newSettings.pdfTemplate = utils.getInputTextValue("#textarea-settings-publish-pdf-template", event);
|
||||
newSettings.pdfTemplate = utils.getInputTextValue("#textarea-settings-pdf-template", event);
|
||||
// PDF page size
|
||||
newSettings.pdfPageSize = utils.getInputValue("#input-settings-pdf-page-size");
|
||||
// SSH proxy
|
||||
newSettings.sshProxy = utils.checkUrl(utils.getInputTextValue("#input-settings-ssh-proxy", event), true);
|
||||
|
||||
|
@ -983,14 +983,25 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-4 control-label"
|
||||
for="textarea-settings-publish-pdf-template">PDF
|
||||
for="textarea-settings-pdf-template">PDF
|
||||
template <a href="#" class="tooltip-template">(?)</a>
|
||||
</label>
|
||||
<div class="col-lg-7">
|
||||
<textarea id="textarea-settings-publish-pdf-template"
|
||||
<textarea id="textarea-settings-pdf-template"
|
||||
class="form-control"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-4 control-label" for="input-settings-pdf-page-size">PDF page size</label>
|
||||
<div class="col-lg-7">
|
||||
<select id="input-settings-pdf-page-size" class="form-control">
|
||||
<option value="A3">A3</option>
|
||||
<option value="A4">A4</option>
|
||||
<option value="Legal">Legal</option>
|
||||
<option value="Letter">Letter</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-4 control-label"
|
||||
for="input-settings-publish-commit-msg">GitHub commit message</label>
|
||||
|
@ -10,12 +10,12 @@
|
||||
<dt>About:</dt>
|
||||
<dd>
|
||||
<a target="_blank" href="https://github.com/benweet/stackedit/">GitHub
|
||||
project</a>/
|
||||
project</a> /
|
||||
<a target="_blank" href="https://github.com/benweet/stackedit/issues">issue
|
||||
tracker</a>
|
||||
<br />
|
||||
<a target="_blank" href="https://chrome.google.com/webstore/detail/stackedit/iiooodelglhkcpgbajoejffhijaclcdg">Chrome
|
||||
app</a>(thanks for your review!)
|
||||
app</a> (thanks for your review!)
|
||||
<br />
|
||||
<a target="_blank" href="https://twitter.com/stackedit/">Follow on Twitter</a>
|
||||
<br />
|
||||
|
@ -336,6 +336,7 @@ define([
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('POST', HTMLTOPDF_URL, true);
|
||||
xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
|
||||
xhr.setRequestHeader('page-size', settings.pdfPageSize);
|
||||
xhr.responseType = 'blob';
|
||||
xhr.onreadystatechange = function() {
|
||||
if(this.readyState == 4) {
|
||||
|
@ -48,6 +48,7 @@ define([
|
||||
'<body class="pdf"><%= documentHTML %></body>\n',
|
||||
'</html>'
|
||||
].join(""),
|
||||
pdfPageSize: 'A4',
|
||||
sshProxy: SSH_PROXY_URL,
|
||||
shortcuts: {},
|
||||
extensionSettings: {}
|
||||
|
@ -1217,14 +1217,13 @@ div.dropdown-menu textarea {
|
||||
opacity: 0.1;
|
||||
margin-top: -4px;
|
||||
margin-left: -2px;
|
||||
margin-right: 3px;
|
||||
font-size: 12px;
|
||||
margin-right: 2px;
|
||||
font-size: 14px;
|
||||
vertical-align: top;
|
||||
.file-title-navbar & {
|
||||
font-size: 14px;
|
||||
font-size: 16px;
|
||||
margin-top: -2px;
|
||||
margin-left: -4px;
|
||||
margin-right: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user