图片编辑器

<!DOCTYPE html>
<head>
<!-- Load widget code -->
<script type="text/javascript" src="http://feather.aviary.com/js/feather.js"></script>




<!-- Instantiate the widget -->
<script type="text/javascript">


    var featherEditor = new Aviary.Feather({
        apiKey: '1234567',
        apiVersion: 2,
        tools: ['draw', 'stickers'],
        onSave: function(imageID, newURL) {
            var img = document.getElementById(imageID);
            img.src = newURL;
        },
        postUrl: 'http://example.com/featherposturl'
    });


    function launchEditor(id, src) {
        featherEditor.launch({
            image: id,
            url: src
        });
        return false;
    }


</script>                         


</head>


<body>
<!-- Add an edit button, passing the HTML id of the image
    and the public URL to the image -->
<a href="#" onclick="return launchEditor('editableimage1', 
    'http://www.aviary.com/Content/images/feature_top_phone.png');">Edit!</a>


<!-- original line of HTML here: -->
<img id="editableimage1" src="http://www.aviary.com/Content/images/feature_top_phone.png"/>
</body>


你可能感兴趣的:(图片编辑器)