How to implement CKEditor in your asp.net website.

In Dynamic website world, we need to give end user a handy tool for content formation to display a unique And formatted text over the reflected web page ,So today i will discuss about how to integrate CKEDITOR In Your Asp.Net Website in Represented steps

(Note :- Download the dll and Ckeditor Folder from This link)


Step 1

Add Reference of CKEditor dll file to your solution with add References Menu.

Step 2

Copy the CkEditor Folder in your solution file.





Step 3

Now Register a custom control in your web page by Register notation as follows

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<%@ Register Assembly="CKEditor.NET" Namespace="CKEditor.NET" TagPrefix="CKEditor" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <CKEditor:CKEditorControl runat="server"></CKEditor:CKEditorControl>
    </div>
    </form>
</body>
</html>

Step 4
To Upload and File and Image we need to set the Upload Folder path to store the file on server

Web.Config file add Add app setting variables.


<?xml version="1.0"?>

<!--
  For more information on how to configure your ASP.NET application, please visit
  http://go.microsoft.com/fwlink/?LinkId=169433
  -->

<configuration>
  <appSettings>
    <add key="ImageRoot" value="~/images/"/>
    <add key="FilesRoot" value="~/files/"/>
  </appSettings>
  <system.web>
    <compilation debug="false" targetFramework="4.0" />
   
  </system.web>
</configuration>


Output


Happy Programming









Comments

Anonymous said…
A big thank you for writing this post, spend half the day researching on why it is not working then the webconfig part was only mentioned here not even on their website. tx. again