Last active
December 18, 2015 11:38
-
-
Save conorbuck/5776775 to your computer and use it in GitHub Desktop.
Dark Theme Demo
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
<!-- Load Feather code --> | |
<script type="text/javascript" src="http://feather.aviary.com/js/feather_beta.js"></script> | |
<!-- Instantiate Feather --> | |
<script type='text/javascript'> | |
var featherEditor = new Aviary.Feather({ | |
apiKey: 'YOUR_KEY', | |
apiVersion: 3, | |
tools: 'all', | |
appendTo: '', | |
theme: 'dark', | |
onSave: function(imageID, newURL) { | |
var img = document.getElementById(imageID); | |
img.src = newURL; | |
}, | |
onError: function(errorObj) { | |
alert(errorObj.message); | |
} | |
}); | |
function launchEditor(id, src) { | |
featherEditor.launch({ | |
image: id, | |
url: src | |
}); | |
return false; | |
} | |
</script> | |
<div id='injection_site'></div> | |
<img id='image1' src='http://images.aviary.com/imagesv5/feather_default.jpg'/> | |
<!-- Add an edit button, passing the HTML id of the image and the public URL of the image --> | |
<p><input type='image' src='http://images.aviary.com/images/edit-photo.png' value='Edit photo' onclick="return launchEditor('image1', 'http://images.aviary.com/imagesv5/feather_default.jpg');" /></p> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment