Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
i can export canvas to JSON using the following code
var canvas = new fabric.Canvas('c');
data = JSON.stringify(canvas)


and can load back using this call
canvas.loadFromJSON(data, canvas.renderAll.bind(canvas));


what i want is to save the "data" as a file on client side, giving the client the functionality to save his work on his machine and load it whenever he wants to continue

so how to download the JSON object as a file and reload it just using javascript
Posted

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900