Guest User

Untitled

a guest
Jun 22nd, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. {"url":"//cdn.example.com/blog/image/wzClxXEupWKm.jpg","size":[600,400]}
  2.  
  3. TypeError: image.size is undefined
  4. 'data-ce-max-width': image.size[0]
  5.  
  6. if (parseInt(ev.target.status) === 200) {
  7. // Unpack the response (from JSON)
  8. var response = JSON.parse(ev.target.responseText);
  9.  
  10. // Trigger the save event against the dialog with details of the
  11. // image to be inserted.
  12. dialog.save(
  13. response.url,
  14. response.size,
  15. {
  16. 'alt': response.alt,
  17. 'data-ce-max-width': image.size[0]
  18. });
  19.  
  20. } else {
  21. // The request failed, notify the user
  22. new ContentTools.FlashUI('no');
  23. }
Advertisement
Add Comment
Please, Sign In to add comment