PDF-Ausgabe hinzugefügt

This commit is contained in:
Sven Schmalle
2019-12-13 17:19:13 +01:00
parent f2308d25d6
commit e9a1b087b8
3 changed files with 41 additions and 4 deletions

View File

@ -118,6 +118,7 @@
<li id="btnEditpage"><a href="#" onclick="EditPage()">Edit</a></li>
<li id="btnPreviewpage"><a href="#" onclick="PreviewPage()">Preview</a></li>
<li id="btnSavepage"><a href="#" onclick="SavePage()">Save</a></li>
<li id="btnPDFgen"><a href="#" onclick="PDFGen()">PDF</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
@ -198,7 +199,7 @@
$.ajax({
method: "GET",
contentType:'application/json; charset=utf-8',
url: '/p/'+window.location.pathname,
url: '/_api/md/'+window.location.pathname,
dataType: "json",
data: "",
success: function(content){
@ -213,7 +214,7 @@
$.ajax({
method: "GET",
contentType:'application/json; charset=utf-8',
url: '/p/sidebar',
url: '/_api/md/sidebar',
dataType: "json",
data: "",
success: function(content){
@ -235,7 +236,7 @@
$.ajax({
method: "GET",
contentType:'application/json; charset=utf-8',
url: '/p/'+window.location.pathname,
url: '/_api/md/'+window.location.pathname,
dataType: "json",
data: "",
success: function(content){
@ -279,6 +280,10 @@
});
}
function PDFGen() {
// Öffnet die PDF über die API einfach in einem neuen Fenster
window.open('/_api/pdf'+window.location.pathname);
}
</script>
<script>