我对 Aviary Feather 的集成有疑问。在我的 javascript 中,我需要像这样使用 Feathers:
// Aviary init
var featherProductEditor = new Aviary.Feather({
apiKey: 'myapykey',
apiVersion: 3,
theme: 'dark',
tools: 'all',
appendTo: '',
onSave: function(imageID, newURL) {
// Do things for featherProductEditor
console.log('featherProductEditor');
// Close the editor
featherProductEditor.close();
}
});
// Aviary init
var featherContentBlockEditor = new Aviary.Feather({
apiKey: 'myapykey',
apiVersion: 3,
theme: 'light',
tools: 'all',
appendTo: '',
onSave: function(imageID, newURL) {
// Do things for featherContentBlockEditor
console.log('featherContentBlockEditor');
// Close the editor
featherContentBlockEditor.close();
}
});
然后我称这两个 Feather
featherProductEditor.launch({ ....
和
featherContentBlockEditor.launch({ ....
但唯一调用的“ onSave*: ”回调是“ featherContentBlockEditor ”变量的第二个
为什么?我该如何解决这个问题?