现在公布方法:替换editor.js 函数
// Toolbar button onmouseup handler function BtnMouseUp() { if (event.srcElement.tagName != "IMG") { event.cancelBubble = true; return false; } var image = event.srcElement; var element = image.parentElement; //if (element.YUSERONCLICK) eval(element.YUSERONCLICK + "anonymous()"); if(navigator.appVersion.match(/8./i)=='8.') { if (element.YUSERONCLICK) eval(element.YUSERONCLICK + "onclick(event)"); } else { if (element.YUSERONCLICK) eval(element.YUSERONCLICK + "anonymous()"); } element.className = "BtnMouseOverUp"; image.className = "Ico"; event.cancelBubble = true; return false; }
注意ASP.NET页面运行后的HTML标签的Name属性值可能要改变
运行前:
<form enctype="multipart/form-data" action="#" method="post" id="adminform" name="form1" runat="server"> <p>发表文章</p> <span>标题:</span><input type="text" name="title" id="admintitle" runat="server"/><br /> <span>附件:</span><asp:FileUpload id="file" runat="server"/><br /> <span>类型:</span><select name="type" id="adminselect" runat="server"> <option value="课件">课件</option> <option value="代码">代码</option> </select><br /> <span>内容:</span><br /> <textarea id="admintext" name="text" cols="70" rows="21" runat="server"></textarea><br /> <input type="button" value="高级编辑" class="button" style="width:100px;" onclick="eWebEditorPopUp('adminform', 'admintext', 700, 500);"/> <input type="reset" value="重置" class="button"/> <asp:Button ID="button1" CssClass="button" runat="server" Text="提交" onclick="button1_Click"/> <span id="fileex" runat="server"><a></a></span> <span id="result" runat="server"><a></a></span> </form>
运行后:
<form name="adminform" method="post" action="admin_admin.aspx" id="adminform" enctype="multipart/form-data"> <div> <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwULLTE0MDM0NzkyMTgPZBYCAgMPFgIeCWlubmVyaHRtbAUHemFpdGlhbmRkskyzG8f4ESObK9M+JsGrnfiYCY8=" /> </div> <p>发表文章</p> <span>标题:</span><input name="admintitle" type="text" id="admintitle" /><br /> <span>附件:</span><input type="file" name="file" id="file" /><br /> <span>类型:</span><select name="adminselect" id="adminselect"> <option value="课件">课件</option> <option value="代码">代码</option> </select><br /> <span>内容:</span><br /> <textarea name="admintext" id="admintext" cols="70" rows="21"></textarea><br /> <input type="button" value="高级编辑" class="button" style="width:100px;" onclick="eWebEditorPopUp('adminform', 'admintext', 700, 500);"/> <input type="reset" value="重置" class="button"/> <input type="submit" name="button1" value="提交" id="button1" class="button" /> <span id="fileex"><a></a></span> <span id="result"><a></a></span> <div> <input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWBQL/wejzAwKgz8D1BwL4jJyHDAKE9LONCQKs34rGBiVbt02kJursZrIBBXPl/aUiozt2" /> </div></form>