Have Loader save JSON and Text

Had a request on Discord from Storydweller to have the Loader save JSON (as it can load JSON). So we put that in place and it is patched in ZIM 016.

// save a json file
const obj = {a:[1,2,3], b:"hello"};
new Loader().save({content:obj, type:"json"}); 
// save a text file
const textInput = new TextInput().center();
new Button({label:"SUBMIT", wait:"SAVED"})
	.center()
	.mov(0,100)
	.tap(()=>{
		new Loader().save({
			content:textInput.text, 
			filename:"answer.txt", 
			type:"text"
		});
	});
2 Likes

it would be cool if handwriting.js can be used saved as .txt
more info on

so the best option is selectable from a new List()

https://www.chenyuho.com/project/handwritingjs/

idea

Cool. Libraries like this can be used with ZIM - they do not have to be in ZIM.