sharepoint中添加FCKeditor编辑器

使用过程如下:

1.下载了FCKeditor.Net_2.6.3.zipFCKeditor_2.6.3.zip(下载地址忘了,非常好找的)

FCKeditor.Net_2.6.3.zip中取到FredCK.FCKeditorV2.dll .

FCKeditor_2.6.3.zip 中取到fckeditor

2.创建webpart工程

引用FredCK.FCKeditorV2.dll

private FredCK.FCKeditorV2.FCKeditor fckContent = new FredCK.FCKeditorV2.FCKeditor();

protected override void CreateChildControls()

{

fckContent.BasePath = "/_layouts/fckeditor/ ";           
this.Controls.Add(this.fckContent);

}

 protected override void Render(HtmlTextWriter writer)
{

fckContent.RenderControl(writer); 

}

好了,webpart做完了。

3。将fckeditor文件夹及其所有内容拷贝到moss站点的_layouts目录(C:/Program Files/Common Files/Microsoft Shared/Web Server Extensions/12/template/layouts/ )

4.在fckeditor中添加文件夹userfiles .开放该文件夹的可写权限给需上传图片的用户。

5。更改文件fckconfig.js.(找到相应的行,值改为我如下所示)

FCKConfig.DefaultLanguage  = 'zh-cn' ;

var _FileBrowserLanguage = 'aspx' ; // asp | aspx | cfm | lasso | perl | php | py
var _QuickUploadLanguage = 'aspx' ; // asp | aspx | cfm | lasso | perl | php | py

6。更改文件fckeditor/editor/filemanager/connectors/aspx /config.ascx

 

 private bool CheckAuthentication()
 {

        return true;
 }

再将public override void SetConfig()中的

UserFilesPath = "/_layouts/fckeditor/userfiles/";

保存。

7.将webpart部署到moss中试试。行了不?

如果不行。检查两个路径BasePath 及UserFilesPath 正确否?注意必须是相对路径。

8.最重要的一点。必须记住:在MOSS站点的bin目录里添加FredCK.FCKeditorV2.dll 。否则,上传图片等功能将用不了。

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值