【发布时间】:2014-06-06 16:43:21
【问题描述】:
我对 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();
}
});
那我叫这两个羽毛
featherProductEditor.launch({ ....
和
featherContentBlockEditor.launch({ ....
但调用的唯一“onSave*:”回调是“featherContentBlockEditor”变量的第二个
为什么?我该如何解决这个问题?
【问题讨论】:
-
您是否尝试过是否调用
onError或onReady回调而不是onSave? -
是的,我已经尝试过了,onError 不返回任何内容。 onReady 总是调用第二根羽毛初始化
-
您在
x.launch({ ...中提供了什么?由于该对象是一个配置覆盖,所以很高兴知道那里有什么。
标签: javascript aviary