I need to find an image with a file path (file_path) which is available inside tinymce. Since i am using jquery tinymce version. i think i can find image inside tinymce with specified file path.
Function call from thickbox to my parent window
self.parent.edit_img(title,alternate,align,file_path);
Function declaration in parent
function edit_img(title,alternate,align,file_path)
{
var content=tinyMCE.get('comment').getContent();
alert('Image path: '+file);
alert(content);
}
Help me to fetch im开发者_Python百科age inside tinymce and i need to edit that image attributes
Solution for my problem is here Function call from thickbox to my parent window
self.parent.edit_img(title,alternate,align,file_path);
Function declaration in parent
function edit_img(title,alternate,align,file_path)
{
file=decodeURIComponent(file);
//To get image name from image_path
file_arr=file.split('/');
file=file_arr[file_arr.length-1];
//Checking image inside tinymce and changing its edited attributes
tinymce.activeEditor.$("img[src$='"+file+"']").attr({'alt' : alternate , 'align' : align , 'title' : title});
}
Description Since i use many images i need to identify which image i am editing so i checked with
$("img[src$='"+file+"']")
In this way i had edited images via calling thick box and updating specific image inside tinymce, Thank you
加载中,请稍侯......
精彩评论