Web编辑器的使用

来源:互联网 发布:单片机香烟烟雾传感器 编辑:程序博客网 时间:2024/05/09 12:28

1、复制web编辑器到你的项目中的表现层(UI)
2、添加引用:FredCK.FCKeditorV2.dll到你的项目中来


3、页面中加引用
<%@ Register TagPrefix="FCKeditorV2" Namespace="FredCK.FCKeditorV2" Assembly="FredCK.FCKeditorV2" %>


4、加控件(在需要显示控件的地方加如下代码)


<table id="table2" style="BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; 
                BORDER-BOTTOM: black 1px solid" width="100%" align="center" bgcolor="#ffffff" border="0" runat="server">
 <tr bgcolor="#bfcbcc" style="width:420px;">
<td align="center">新闻内容(请在下面编辑新闻内容)
  <textarea style="DISPLAY: none" tabindex="8" name="content" rows="1"></textarea>
</td>
 </tr>
<tr>
 <td style="height:370px; width:100%;">
  <FCKeditorV2:FCKeditor id="content" runat="server" BasePath="~/fckeditor/" Width="100%" Height="370">
               </FCKeditorV2:FCKeditor>
 </td>
   </tr>
     </table>
5、在page_load事件中加入
if(!ispostback)
{
}
else
{
  scont=content.value;
}




0 0
原创粉丝点击