Last active
August 29, 2015 14:26
-
-
Save appgiga-code/5bbae3cfd1cea59d6e41 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
//<body>内の画像要素を取得 | |
var image = document.getElementById('image'); | |
//画像編集エディタを利用するための準備 | |
var Editor = new Aviary.Feather({ | |
apiKey: 'ここにClient IDを入力!' | |
}); | |
//画像要素をクリックしたら、「編集エディタ」を表示 | |
image.addEventListener('click', function () { | |
Editor.launch({ | |
//<img>内のidとsrcを取得 | |
image: image.id, | |
url: image.src | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment