Spaces:
Sleeping
Sleeping
drakosfire
commited on
Commit
•
b613fc6
1
Parent(s):
d8b766a
added printing function
Browse files- storeUI.html +19 -2
storeUI.html
CHANGED
@@ -550,7 +550,8 @@ div[contenteditable="true"] p::first-letter {
|
|
550 |
title="As much or as little description as you want to provide. You can provide specific employees, inventory etc">A very standard gear store run by a fae potted plant named Gorgeous</textarea>
|
551 |
<button id="submitDescription">Submit</button>
|
552 |
<button id="parseHTML">Parse HTML</button>
|
553 |
-
|
|
|
554 |
<div class="pages">
|
555 |
<div id="page-1" class="page" data-page-id="page-0">
|
556 |
<div class="columnWrapper">
|
@@ -663,7 +664,23 @@ div[contenteditable="true"] p::first-letter {
|
|
663 |
console.error('Error:', error);
|
664 |
});
|
665 |
});
|
666 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
667 |
// Store initial positions of the blocks
|
668 |
function storeInitialPositions() {
|
669 |
initialPositions = []; // Clear initialPositions before updating
|
|
|
550 |
title="As much or as little description as you want to provide. You can provide specific employees, inventory etc">A very standard gear store run by a fae potted plant named Gorgeous</textarea>
|
551 |
<button id="submitDescription">Submit</button>
|
552 |
<button id="parseHTML">Parse HTML</button>
|
553 |
+
<button id="resetButton">Reset</button>
|
554 |
+
<button onclick="printPageContainer()">Print to PDF</button>
|
555 |
<div class="pages">
|
556 |
<div id="page-1" class="page" data-page-id="page-0">
|
557 |
<div class="columnWrapper">
|
|
|
664 |
console.error('Error:', error);
|
665 |
});
|
666 |
});
|
667 |
+
// Print Function
|
668 |
+
window.printPageContainer = function() {
|
669 |
+
var pageContainer = document.getElementById('pageContainer');
|
670 |
+
if (pageContainer) {
|
671 |
+
var printContents = pageContainer.innerHTML;
|
672 |
+
var originalContents = document.body.innerHTML;
|
673 |
+
|
674 |
+
document.body.innerHTML = printContents;
|
675 |
+
|
676 |
+
window.print();
|
677 |
+
|
678 |
+
document.body.innerHTML = originalContents;
|
679 |
+
} else {
|
680 |
+
console.error('Element with ID "pageContainer" not found.');
|
681 |
+
}
|
682 |
+
}
|
683 |
+
|
684 |
// Store initial positions of the blocks
|
685 |
function storeInitialPositions() {
|
686 |
initialPositions = []; // Clear initialPositions before updating
|