Introduction
This blog explains how to
create an Text editor in ASP.Net.
Requirement
- Two dll : CkEditor.dll and
CKEditor.NET.dll.
- CKEditor folder containing all js, css
and images.
Code.aspx
When you are sure about the
dlls and CKEditor folder in to your solution explorer then write the below line
under page directive line :
<%@
Register
Assembly="CKEditor.NET"
Namespace="CKEditor.NET"
TagPrefix="CKEditor"
%>
In your page place CKEditar
control wherever you want like below:
<div>
<CKEditor:CKEditorControl
ID="CKEditor1"
BasePath="/ckeditor/"
runat="server">
</CKEditor:CKEditorControl>
</div>
Finally I design a page for
demo with below code lines:
<asp:Panel
ID="Panel1"
runat="server"
Visible="false">
<asp:Label
ID="lblpre"
runat="server"
Text=""
></asp:Label>
</asp:Panel>
<br
/>
<asp:Button
ID="Button1"
runat="server"
Text="Submit"
OnClick="Button1_Click"
/>
Here I have taken a CKeditor
control then a label in a panel and then a button.
Code.cs
When you finish with design
you can see the CKEditor on your page at the desired location but to view the
content or text of CKEditor I have taken here a label .On button click below is
the code to show text in label:
protected
void
Button1_Click(object
sender,
EventArgs
e)
{
string
str = CKEditor1.Text;
string
str1 = Server.HtmlEncode(str);
lblpre.Text = str1;
}
This is enough to work here, find the source code file here and check it at your
side it ll work fine.
srinivas prabhuPosted Aug 14, 2025, 7:10 AM
A potentially dangerous Request.Form value was detected from the client (txtQPP="<ol><li> Appli...").
JosephsPosted Nov 30, 2017, 1:10 AM
But here we canot justify paragraph how to fix it?
sharath hegdePosted Jan 11, 2016, 11:31 PM
I have integrated Ckeditor to web page. It is working fine in local. But after deploying editor not appearing. Any idea about this?
Manishkumar ChaudhariPosted Aug 7, 2015, 2:23 AM
application running on chrome browser is there any setting for copy paste or any configuration require ???
Manishkumar ChaudhariPosted Aug 7, 2015, 2:21 AM
have implemented ckeditor but while copy and past to editor copy content formatting is not display same as source word.
Manishkumar ChaudhariPosted Aug 7, 2015, 2:20 AM
Hi Neha,
Abhisek DasPosted May 7, 2015, 5:04 AM
How Prevent first <p> tags in CKeditor ?
Keyur PatelPosted May 30, 2013, 1:02 AM
I%20am%20not%20sure%20but%20CKeditor%20is%20faster%20than%20ajax%20HtmlExtenderEditor.%20We%20don%27t%20know%20internally%20how%20Ajax%20HtmlExtenderEditor%20work%20but%20Ckeditor%20is%20use%20more%20javascript.%20I%20don%27t%20have%20concrete%20reason%20but%20as%20per%20the%20code%20in%20editor%20Ckeditor%20is%20faster.
Sandeep Singh ShekhawatPosted May 29, 2013, 1:03 PM
What%20should%20I%20prefer%20CKeditor%20or%20ajax%20HtmlExtenderEditor%20as%20performance%20wise%3F