Dear Tobster,
Please refer to the following code:
<%@ Page Language="C#"%>
<%@ Register TagPrefix="CE" Namespace="CuteEditor" Assembly="CuteEditor" %>
<html>
<head>
<script language="JavaScript" type="text/javascript" >
function changeImg() {
var editor1 = document.getElementById('<%=Editor1.ClientID%>');
//Get the editor content
var editdoc = editor1.GetDocument();
var range = editdoc.selection.createRange();
if (editdoc.selection.type == 'Control') { if (range.length == 1) { var element = range.item(0);
if (element.tagName == 'IMG') {
//please add your code here
alert(element.src);
}
}
}
}
</script>
<body>
<form id="Form1" runat="server">
<table cellpadding="15">
<tr>
<td>
<CE:Editor id="Editor1" runat="server"></CE:Editor><br />
<br/><br/>
<p style="width:600">
<INPUT type=button value="change image" onclick="changeImg()" ID="Button1">
</P>
<br>
</td>
</tr>
</table>
</form>
</body>
</html>