I am building a online HTML editor / content management tool and I need to be able to get and set attributes of different tag elements based on the cursor location in a editabled iFrame. So far I have tired the following peices of code with no success.
URLstr = idContent.document.selection.createRange().parentElement().href;
// URLstr = idContent.document.selection.createRange().item(idContent.document.selection).getAttribute("href");
// URLstr = idContent.document.selection.createControlRange().href
// URLstr = idContent.document.selection.createRange().href
if anyone knows what im doing wrong or a good place to get information on what im try to do any help would be greatly appreciated.
URLstr = idContent.document.selection.createRange().parentElement().href;
// URLstr = idContent.document.selection.createRange().item(idContent.document.selection).getAttribute("href");
// URLstr = idContent.document.selection.createControlRange().href
// URLstr = idContent.document.selection.createRange().href
if anyone knows what im doing wrong or a good place to get information on what im try to do any help would be greatly appreciated.