sharepoint中添加FCKeditor编辑器

    技术2025-11-13  14

    使用过程如下:

    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 。否则,上传图片等功能将用不了。

    最新回复(0)