I was trying to get the URL of the uploaded image via media uploader option "Insert from URL"
I use and below code, It works for just for "Insert Media",
var abc = wp.media.frames.abc = wp.media({
frame: 'post',
state: 'insert',
library: { type: 'image' },
editing: false,
multiple: false,
});
abc.on( 'insert', function() {
json = fn.state().get( 'selection' ).first().toJSON();
console.log(json.title);
console.log(json.url);
});
How can I get the URL from tab "Insert from URL", When user insert URL & click on Add Image/Insert in Page?
Any suggestions. Thanks in advance. :)