Sorry Marco
If I’d have read most of the posts I would have realised its another plugin conflicting (Weptile Image Slider)
Got it resolved with another slider I can use with your plugin.
Great Plugin
I’m glad that you have resolved. In the future I’ll try to take a look at that conflict with Weptile Image Slider, and find a solution to let our plugin work together with it.
Thank you.
I made further investigation on this issue. The responsible is the Weptile Image Slider, which alters a native WP javascript function (send_to_editor), without restoring it.
If anyone is interested in let Black Studio TinyMCE Widget play together with Weptile Image Slider, here’s an hack.
Change the js/weptile-image-slider-widget-admin.js
file coming with Weptile Image Slider as follows:
Locate this block of code:
jQuery('[id$="slider-images-upload-button"]').live('click',function () {
submit_button_id = jQuery(this).attr('id');
img_url_text_container_id = jQuery(this).prev().attr('id');
tb_show('', 'media-upload.php?TB_iframe=true&');
var iframe = jQuery('#TB_iframeContent');
iframe.css('display','none');
iframe.load(function(){
var iframeDoc = iframe[0].contentWindow.document;
var iframeJQuery = iframe[0].contentWindow.jQuery;
iframeJQuery('#tab-type_url').remove();
iframe.css('display','');
apply_insert_button_filter(iframeJQuery);
});
return false;
});
window.send_to_editor = function (html) {
var imgurl = jQuery('img', html).attr('src');
jQuery('#'+img_url_text_container_id).val(imgurl).prop('disabled',false);
clearTimeout(timeout);
tb_remove();
jQuery('#' + submit_button_id).parent().parent().find('input[name=savewidget]').click();
};
and change it to:
jQuery('[id$="slider-images-upload-button"]').live('click',function () {
window.weptile_backup_send_to_editor = window.send_to_editor;
window.send_to_editor = window.weptile_send_to_editor;
submit_button_id = jQuery(this).attr('id');
img_url_text_container_id = jQuery(this).prev().attr('id');
tb_show('', 'media-upload.php?TB_iframe=true&');
var iframe = jQuery('#TB_iframeContent');
iframe.css('display','none');
iframe.load(function(){
var iframeDoc = iframe[0].contentWindow.document;
var iframeJQuery = iframe[0].contentWindow.jQuery;
iframeJQuery('#tab-type_url').remove();
iframe.css('display','');
apply_insert_button_filter(iframeJQuery);
});
return false;
});
window.weptile_send_to_editor = function (html) {
var imgurl = jQuery('img', html).attr('src');
jQuery('#'+img_url_text_container_id).val(imgurl).prop('disabled',false);
clearTimeout(timeout);
tb_remove();
jQuery('#' + submit_button_id).parent().parent().find('input[name=savewidget]').click();
window.send_to_editor = window.weptile_backup_send_to_editor;
};
Marco thank you again for spotting this. We’ll fix this in our next plugin update. FYI.