1
ContentToolプラグインで画像を挿入する方法応答では、私私は華麗なプラグインですが、私は、インサート画像]ボタンをクリックすると、私はいくつかのエラー</p> <p>を経験してい</p> <p>が、これはどのようなPHPファイルの送信であるコンテンツツールのプラグインを使用してい
{"url":"\/\/cdn.example.com\/blog\/image\/wzClxXEupWKm.jpg","size":[600,400]}
が、Mozillaのコンソールがエラーに
TypeError: image.size is undefined
'data-ce-max-width': image.size[0]
少しPAを与えていますエラーがあなたのコードに基づいて
if (parseInt(ev.target.status) === 200) {
// Unpack the response (from JSON)
var response = JSON.parse(ev.target.responseText);
// Trigger the save event against the dialog with details of the
// image to be inserted.
dialog.save(
response.url,
response.size,
{
'alt': response.alt,
'data-ce-max-width': image.size[0]
});
} else {
// The request failed, notify the user
new ContentTools.FlashUI('no');
}
@ContentTools