1、找到eWebEditor编辑器所在的目录,然后搜索到editor.js文件,由于eWebEditor有很多个版本,所以editor.js文件所在的目录也有所不同,有的可能在Include目录下,有的可能在js目录下。
2、用记事本打开editor.js文件,找到如下代码:
if (element.YUSERONCLICK) {
eval(element.YUSERONCLICK + "anonymous()");
}
eval(element.YUSERONCLICK + "anonymous()");
}
由于eWebEditor编辑器版本不同,有的可能找不到上面的代码,而是下面这样的代码,两种代码只是书写格式不同而已,含义是一样的:
if (element.YUSERONCLICK) eval(element.YUSERONCLICK + "anonymous()");
3、将上面的代码替换为下面的代码即可:
if(navigator.appVersion.match(/8./i)=='8.')
{
if (element.YUSERONCLICK) eval(element.YUSERONCLICK + "onclick(event)");
}
else
{
if (element.YUSERONCLICK) eval(element.YUSERONCLICK + "anonymous()");
}
{
if (element.YUSERONCLICK) eval(element.YUSERONCLICK + "onclick(event)");
}
else
{
if (element.YUSERONCLICK) eval(element.YUSERONCLICK + "anonymous()");
}
调用代码:
<tr>
<td width="120" align="right" class="text04">**
<textarea id="txtContent" style="display: none;" runat="server"></textarea>
</td>
<td align="left" valign="middle" style=" 711px">
<iframe id="eWebEditor" src="../eWebEditorExtension/ewebeditor.htm? id=txtContent&style=coolblue" frameborder="0" scrolling="no" width="760" height="400" runat="server" style=" 605px"></iframe>
</td>
</tr>