mirror of
https://github.com/michivonah/click-guide.git
synced 2025-12-22 14:06:29 +01:00
remove all existing steps before file import
This commit is contained in:
parent
e95f5aff56
commit
5efe19df58
1 changed files with 8 additions and 0 deletions
|
|
@ -12,6 +12,7 @@ printBtn.addEventListener('click', function(){
|
|||
const importBtn = document.getElementById("importBtn");
|
||||
const fileInput = document.getElementById("file-import-input");
|
||||
importBtn.addEventListener('click', function(){
|
||||
removeAllSteps();
|
||||
fileInput.click();
|
||||
});
|
||||
|
||||
|
|
@ -161,6 +162,13 @@ function createStepElement(label, description, imgSrc, triggerAction, triggerEle
|
|||
return container;
|
||||
}
|
||||
|
||||
function removeAllSteps(){
|
||||
const steps = document.querySelectorAll(".step");
|
||||
for (const step of steps){
|
||||
step.remove();
|
||||
}
|
||||
}
|
||||
|
||||
// export guide
|
||||
function exportGuide(){
|
||||
// get metadata
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue