onlineeditor.ascx
上传用户:wenllgg125
上传日期:2020-04-09
资源大小:7277k
文件大小:1k
源码类别:

SCSI/ASPI

开发平台:

Others

  1. <%@ Control Language="c#" Inherits="Discuz.Web.Admin.OnlineEditor" Codebehind="onlineeditor.ascx.cs" %>
  2. <%@ Register TagPrefix="cc1" Namespace="Discuz.Control" Assembly="Discuz.Control" %>
  3.     
  4. <textarea name="DataTextarea" id="DataTextarea" runat="server" cols="80" rows="20"></textarea>
  5. <script type="text/javascript" src="../../javascript/common.js"></script>
  6. <script type="text/javascript" src="../../javascript/dnteditor.js"></script>
  7. <script type="text/javascript" src="../../javascript/post.js"></script>
  8. <script type="text/javascript">
  9.     var dntEditor;
  10.       
  11.     function CreateEditor()
  12.     {
  13.         dntEditor = new DNTeditor('<% =controlname%>_DataTextarea', '90%', '250',document.getElementById('<% = DataTextarea.ClientID%>').value);
  14.         dntEditor.BasePath = '<%=Discuz.Config.BaseConfigs.GetForumPath %>';
  15.         dntEditor.ReplaceTextarea();
  16.     }
  17.     function PrepareSave()
  18.     {
  19.         document.getElementById('<% =controlname%>_DataTextarea').value = dntEditor.GetHtml();
  20.     }
  21.     function validate(theform)
  22.     {
  23.        PrepareSave();
  24.        return true;
  25.     }
  26.     CreateEditor();
  27. </script>