Home > ASP.Net, BlogEngine.Net > Integrating FCKeditor with BlogEngine.Net

Integrating FCKeditor with BlogEngine.Net

For six years, FCKEditor has been a widely used implementable text editor for web applications. It succeeds in providing web programmers to produce content management systems that can produce dynamic content very quickly for almost any web development language. FCKEditor is one of the most used advanced text editors on the Internet. The things that make it particularly very impressive are its professional look and its support for multiple languages.

By default BlogEngine.Net supports TinyMCE, BE mentions that other editors can also be used. If you want to replace TinyMCE with FCKEditor, there is no definite guide on this topic. Recently, i came across a requirement to use FCKeditor with BlogEngine.Net. I came across a very nice post on BE discussion forum “Problem using fckeditor“. By following these steps, i was able to use FCKeditor without any error. Following is the extract from the same post:

Here is what i did to make it work. I provide all steps to have a complete documentation. “Webroot” is the directory where you installed BlogEngine.Net in. You should change the web.config in the last step, because you have to restart your application anyway.

  • Download the FCKEditor main package at http://www.fckeditor.net/download .
    • Extract the zip file to your webroot. You now have a folder fckeditor in your webroot.
  • Download the FCKEditor.NET package at http://www.fckeditor.net/download .
    • Extract the zip file to a temporary folder.
    • Copy FredCK.FCKeditorV2.dll from {temporary folder}\bin\Release\2.0\ to the \bin\ directory of your webroot.
  • Create a folder “userfiles” in your webroot. Add write permissions to this folder for the Network Service account (Windows Server 2003).
  • Switch off HTTP compression in the blog settings
  • add_entry.aspx ({webroot}\admin\Pages\):
    • add <%@ Register Assembly=”FredCK.FCKeditorV2″ Namespace=”FredCK.FCKeditorV2″ TagPrefix=”fck” %>
    • replace <Blog:TextEditor runat=”server” id=”txtContent” TabIndex=”4″ /> with <fck:FCKeditor id=”txtContent” runat=”server” BasePath=”/FCKeditor/” Height=”700″ Width=”800″ />
    • remove upload fields (txtUploadImage, txtUploadFile)
  • add_entry.aspx.cs ({webroot}\admin\Pages\):
    • replace txtContent.Text with txtContent.Value
    • remove all references to the old upload fields (txtUploadImage, txtUploadFile)
    • the function SizeFormat() can also be removed
  • fckconfig.js ({webroot}\fckeditor\):
    • set _FileBrowserLanguage to ‘aspx’
    • set _QuickUploadLanguage to ‘aspx’
  • config.ascx ({webroot}\fckeditor\editor\filemanager\connectors\aspx\):
    • you have to implement a session check in CheckAuthentication() or just return true (not recommended)
  • Set enableSessionState=”true” in the <pages> section in web.config
There are a couple of disadvantages of this approach:
  1. This integration is done by making changes to BE core, this will create problems in version upgrades.
  2. TinyMCE is fully XHTML compliant, but for FCKeditor no such claim can be made.
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: