Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {"url":"//cdn.example.com/blog/image/wzClxXEupWKm.jpg","size":[600,400]}
- TypeError: image.size is undefined
- 'data-ce-max-width': image.size[0]
- 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');
- }
Advertisement
Add Comment
Please, Sign In to add comment