Serializer plugin constructor for Sketchable instances.
- Source:
Methods
(static) load(jsonStr) → {Sketchable}
Load canvas from JSON string.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
jsonStr |
string
|
JSON data saved with |
Example
sketchableInstance.serializer.load(jsonStr);
(static) save() → {string}
Save canvas data as JSON string.
- Source:
Returns:
- Type:
-
string
Serialized canvas data.
Example
var contents = sketchableInstance.serializer.save();