Hur man testar anpassade widgets utan att ladda ner programvara! (1 / 3 steg)
Steg 1: Att få koden
<!--belastning fjäder kod ->
< script type = "text/javascript" src = "http://feather.aviary.com/js/feather.js" >< / script >
<!--instansiera fjäder ->
< script type = "text/javascript" >
var featherEditor = ny Aviary.Feather ({
apiKey: '',
apiVersion: 2,
verktyg: "alla",
tilläggtill: '',
onSave: funktion (imageID, newURL) {
var img = document.getElementById(imageID);
<!--belastning fjäder kod ->
< script type = "text/javascript" src = "http://feather.aviary.com/js/feather.js" >< / script >
<!--instansiera fjäder ->
< script type = "text/javascript" >
var featherEditor = ny Aviary.Feather ({
apiKey: '',
apiVersion: 2,
verktyg: "alla",
tilläggtill: '',
onSave: funktion (imageID, newURL) {
var img = document.getElementById(imageID);
img.src = newURL;
}
});
funktion launchEditor (id, src) {
featherEditor.launch({
bild: id,
URL: src
});
returnera false;
}
< / script >
< div id = "injection_site" >< / div >
< img-id = "image1" src = "http://images.aviary.com/imagesv5/feather_default.jpg" / >
<!--Lägg till redigeringsknappen, passerar html-id för bilden och den offentliga URL ot bilden-->
< p >< input type = "bild" src = "http://advanced.aviary.com/images/feather/edit-photo.png" value = "Redigera bild" onclick = "avkastning launchEditor ('image1', 'http://images.aviary.com/imagesv5/feather_default.jpg');" / >< /p >
Nu allt du behöver göra är kopiera och klistra in koden till ett anteckningsblock. (Ovan)