possibility to add pictures to the instructions

This commit is contained in:
Delucse
2020-09-29 20:12:33 +02:00
parent 3a92a6a08c
commit 8991e2b40b
6 changed files with 170 additions and 4 deletions
+8 -1
View File
@@ -58,10 +58,17 @@ class Builder extends Component {
window.scrollTo(0, 0);
}
else{
// export steps without attribute 'url'
var steps = this.props.steps.map(step => {
if(step.url){
delete step.url;
}
return step;
});
var tutorial = {
id: this.props.id,
title: this.props.title,
steps: this.props.steps
steps: steps
}
var blob = new Blob([JSON.stringify(tutorial)], { type: 'text/json' });
saveAs(blob, `${detectWhitespacesAndReturnReadableResult(tutorial.title)}.json`);