Last active
August 29, 2015 14:20
-
-
Save conorbuck/930e2116e61ffc6137d3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Aviary Web Editor</title> | |
</head> | |
<body> | |
<img id="test" src="http://images.aviary.com/imagesv5/feather_default.jpg" /> | |
<script src="http://feather.aviary.com/imaging/v2/editor.js"></script> | |
<script> | |
var editor = new Aviary.Feather({ | |
authenticationURL: '/get_auth', | |
apiKey: 'API_KEY', | |
onSaveButtonClicked: function(){ | |
editor.saveHiRes(); | |
return false; | |
}, | |
onSaveHiRes: function(imageId, url){ | |
console.log(url); | |
editor.close(); | |
}, | |
onLoad: function(){ | |
editor.launch({ | |
image: 'test', | |
url: 'http://images.aviary.com/imagesv5/feather_default.jpg', | |
hiresUrl: 'http://images.aviary.com/imagesv5/feather_default.jpg', | |
hiresWidth: 841, | |
hiresHeight: 600 | |
}); | |
}, | |
onError: function(errorObj) { | |
console.log(errorObj); | |
} | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment