Information Publishing WebPart

Source: Internet
Author: User
Tags zip

In a Moss project, I need to develop the information publishing system separately. The key content of the information publishing system is the editor.

Moss uses the Rich text editor, which is of course best if we can use the editor in WebPart. I don't know how to apply a rich text editor to a WebPart, because I didn't spend much time on it because of project time issues, so I decided to use a different editor.

Our requirements for the editor are:

Be able to do simple editing work;

Can upload pictures to the server and insert pictures;

The demand was very simple, so I found several editors who were more enthusiastic in the industry.

Webhtmleditor: This is Lion editor, very good, able to support design pattern development, can be easily applied to WebPart, in the previous project, I used the editor. However, since the editor is charged, I have decided not to accept it this time.

Ewebeditor: This is also very good, I also used in non-MOSS project, but because the upload image function is not open, also had to give up. Listen to someone say, upload image function is there, but I have not found the upload Map feature version. If you have one, you want to share it.

Freetextbox: I also used this, this is not a picture upload function.

FCKeditor: This is useless, it is said to be good, so this time to study. The editor was eventually adopted.

The use process is as follows:

1. Download the Fckeditor.net_2.6.3.zip and fckeditor_2.6.3.zip (download the address forgot, very easy to find)

Take the FredCK.FCKeditorV2.dll from the Fckeditor.net_2.6.3.zip.

Take the FCKeditor from the Fckeditor_2.6.3.zip

2. Create a WebPart Project

Referencing 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);
}

Okay, WebPart's done.

3. Copy the FCKeditor folder and all its contents to the _layouts directory of the Moss site (C:\Program files\common files\microsoft Shared\Web Server Extensions\12\ Template\layouts\)

4. Add folders to the FCKeditor userfiles. Open the folder's writable permissions to users who need to upload pictures.

5. Change file fckconfig.js. (the corresponding row is found, and the value is changed to what I see below)

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. Change File Fckeditor\editor\filemanager\connectors\aspx\config.ascx

private bool CheckAuthentication()
{
return true;
}

The public override void Setconfig () is then

Userfilespath = "/_layouts/fckeditor/userfiles/";

Save.

7. Try to deploy WebPart to Moss. All right, no?

If not. Check two paths basepath and Userfilespath correct? Note that must be a relative path.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.