Skip to content

Instantly share code, notes, and snippets.

@conorbuck
Last active August 29, 2015 14:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save conorbuck/930e2116e61ffc6137d3 to your computer and use it in GitHub Desktop.
Save conorbuck/930e2116e61ffc6137d3 to your computer and use it in GitHub Desktop.
<!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