asp.net的fckeditor示例

代码下载

1、拷贝整个Fckeditor文件夹至根目录。
2、添加引用 FredCK.FCKeditorV2.dll 。
3、在“工具”——“选择工具箱项”, “.net framework组件”点“浏览”浏览BIN目录下的FredCK.FCKeditorV2.dll。
4、修改webconfig文件:
 <appSettings>
  <add key="FCKeditor:BasePath" value="~/FCKeditor/"/>
  <add key="FCKeditor:UserFilesPath" value="~/Files"/>
 </appSettings>
5、在设计页面。从工具箱的“常规”选项卡上选择FCKeditor控件,拉到页面上即可。

使用FCKeditor的方法
假设控件id为FCKeditor1,获取它的值就是FCKeditor1.Value;
如把它的值赋给一个textbox
this.TextBox1.Text = FCKeditor1.Value;

其他问题

FCKeditor文字换行问题的解决
FCKeditor Enter(回车键)换行时间距过大。按住Shift+Enter换行时(间距会小)
也就是说它默认直接敲回车是一个<p>键,而按Shift+回车则是<br />键。
 修改fckconfig.js
FCKConfig.EnterMode = 'p' ; // p | div | br
FCKConfig.ShiftEnterMode = 'br' ; // p | div | br

fckedtior的高度设置,设置控件的height即可
 <FCKeditorV2:FCKeditor ID="DXTB1" runat="server" Height="400px">
                    </FCKeditorV2:FCKeditor>


还有其他问题的请留言!
 

posted @ 2009-07-30 12:48  top1  阅读(439)  评论(0编辑  收藏  举报