Hello,
I have seen many code examples on Inserting an image outside the editor. I have this working fine, but now i am trying to use the same concenpt when selecting a File using the Downloadable Files dialog. Could someone PLEASE give me some insight on how to do this.
ie: This works when selecting an image outside the editor (i can get the path the user selected) --- but this down work when using the Downloadable files. Thank you very much in advance.
function callInsertImage()
{
var ce_img;
ce_img = document.getElementById('<%= ce_image.ClientID%>');
ce_img.focus();
var ce_imgDoc = ce_img.GetDocument()
ce_img.ExecCommand('ImageGalleryByBrowsing')
var ce_imgRange = ce_imgDoc.selection.createRange()
if (ce_imgDoc.selection.type == 'Control')
{
if (ce_imgRange.length == 1)
{
var ce_imgElement = ce_imgRange.item(0)
if (ce_imgElement.tagName == 'IMG')
{
// THIS GUY RIGHT HERE GETS THE PATH TO THE IMAGE SELECTED, HOW DO I DO THIS FOR DOCUMENTS?
document.getElementById('<%= txtImagePath.ClientID %>').value = ce_imgElement.src
}
}
}
}