Is there a way to add custom attributes to objects and get them on exported SVG?
I'm using this way for JSON exports. But it's not working for SVG exports.
canvas.item(0).foo = 'bar'; // custom property
var json = JSON.stringify(canvas.toJSON(['foo'])); // include that property in json
canvas.clear();
canvas.loadFromJSON(json);
canvas.item(0).foo; // "bar" <-- the property is preserved
When I export my canvas using canvas.toSVG() the custom attributes will not exported.