How to integrate a CKEditor in ASP.Net application

Feb 27, 2014 by Alexandra

What is a rich text editor?

Most applications available require a small amount of user interaction, such as username and password input, however there are some applications that expect more than two simple texts from the user. For example, if you are in the process of developing a website that expects the visitors to create, let's say - a simple message template which could contain Bold text, symbols such as: Ø, ►, ¶ or perhaps, images , that's when you need a rich text editor, not a simple textbox.

What is CKEditor?

CKEditor is a ready-to-use rich text editor that can be easily integrated into most web applications. For further details, you can also check out the official site .

Why you should use CKEditor

If you are in the process of developing an application that has to integrate either a simple HTML editor or a rich text editor, then CKEditor is the right solution for you. Here are some advantages:

* First of all, this is an Open Source application, which means that it's 100% free
* More available skins (such as Moono or Kama) can be found at:
* CKEditor features can be easily customized according to your application's needs
* Big companies such as IBM, Oracle or Adobe have already integrated it into their applications

So here you can see an example of how the editor displays a web page's content, during the editing process:

CKEditor features

and here is the HTML5 code that is generated:

 Generated HTML5 code

How to integrate CKEditor in an ASP.Net application?


1. The first step in integrating the CKEditor is to download the latest versions of the CKEditor 3.x and the CKEditor for APS.NET control from the official website:

2. Unpack the CKEditor 3.x package and copy its contents to the application folder of the project you wish to integrate it

3. Unpack the CKEditor for ASP.NET control and copy the CKEditor.NET.dll library to the References folder of your project. The DLL file is found at the following path: bin\Release\CKEditor.NET.dll

4. Within your solution, add a reference to the newly copied library.

5. Don't forget to register the CKEditor control within the page that will integrate it, such as:

<%@ Register Assembly="CKEditor.NET" Namespace="CKEditor.NET" TagPrefix="CKEditor" %>

6. The final step is to insert an instance of the control into the body of the page and to set it's base path to the directory which contains the CKEditor copied at step 2. An example of how you can use the control:

<CKEditor:CKEditorControl ID="ckTextEditor" BasePath="~/ckeditor/" runat="server" ClientIDMode="Static" />

Issues that might appear during the integration of CKEditor

In case the CKEditor control does not display correctly, manually edit the paths set within the controller properties, such as BasePath, ContentCss and TemplateFiles.

In case your application needs the editor text to be saved in a SQL database, do not forget to set the field type as nvarchar(MAX), since the user might want a larger text input. Also, nvarchar can accept Unicode text, whereas varchar can accept only ASCII.

Note: only use ntext as field type if you are working with SQL Server versions earlier than 2005. The ntext type is considered by most as being obsolete (similar to text and image), so Microsoft recommends replacing it with nvarchar(max), varchar(max) and varbinary(max).

So this is the tutorial on how to integrate a CKEditor in ASP.Net application, if you have any questions, suggestions, I'll be looking forward to reading them :)

Tags: How To  HTML5  Tutorial 


See more commented on 8/28/2018 8:02:09 AM

I have examined among the articles on your internet site now, and that I truly like your fashion. thanks a million and please preserve up the powerful work. Very thrilling to read. I truely love to examine such a pleasant article. thank you! hold rocking. Per week and hardly got here across this. I guess i am not the only one having all the entertainment here! preserve up the coolest work. thanks very a good deal and will look for more postings from you.

Visit us commented on 8/28/2018 11:44:12 AM

The planet we reside in today is fully various as opposed to ten years ago, right now people are always on the internet, which makes having a presence on the web that far more appealing for business to possess. Writing is an interesting art if properly crafted. The more interesting fact is that anyone can write. All you need to do is begin to write and then, your creative juices will take over.

Salzburg commented on 8/30/2018 7:02:28 AM

My Essay creator is the go-to source for the final touch of academic assignments. if you are screaming out “Write my essay for me,” you’ve come to the maximum elite essay writing carrier. I am genuinely enjoying your website. You certainly have some outstanding insight and top notch memories.

adult models commented on 8/30/2018 11:51:35 AM

All I hear maybe some of whining about something you may repair if you weren't too busy on the lookout for interest. that is beneficial, nonetheless, it could be important so you can take a look at out the following internet site. As a blogger, I am sure that you would like your blog to make some serious noise online. You want people to talk about it and you want your visitors to recommend it to their friends and family members.

cleaning new windows commented on 8/30/2018 2:40:11 PM

I able to see which you are a professional at your subject! I am launching a website soon, and your information can be very useful for me. thank you for all of your assists and wishing you all of the fulfillment of your business. Test more information on Nanchang. hold up the exciting artwork. It will become questioning if I must use this write-up on my other website, I am able to hyperlink it lower returned for your internet website online despite the fact that.

advanced roofing commented on 9/19/2018 8:04:46 AM

A weblog is taken into account one of your most vital advertising and promoting tools. Customers love blogs as a result of they're commonly complete with fantastic unfastened facts. Here are 5 hints for writing a superb weblog. In this text, we are going to speak about how to make an excellent weblog. keep in mind that weblog stands for a blog.

at house clean commented on 9/19/2018 11:20:29 AM

This article covers many glorious ways to power website guests on your weblog additionally to some hints on the thanks to use these ways effectively. this text is geared toward younger and approaching blogs who've appropriate content material and ar seeking to realize many readers.

Personal Injury Attorney commented on 9/22/2018 11:08:28 AM

Before you hit the place up button of your most recent web log access, you had higher make sure that it's right enough in your on-line readers-assuming that you simply have created a following of on-line readers. obtaining a durable following in your weblog entails quite simply exquisite promotion and recognition.

Your Comment:

Blog Home   SBP Home
RSS Feed       Contact


 Blog Archives  |  Terms of Use  |  Privacy Policy
© 2018 SBP Romania. All rights reserved.