How to implement CKEditor in MVC 4 Razor application.

At present may editors are available in market. Here let we discuss about how to implementย  simple CKEditor in mvc application

Step : 1

Create simple MVC Razor project

Step :2

Go to http://ckeditor.com/download link and download latest version and place in the project

CKEditor 1

Step : 3

Then make reference of ckeditor.js in the folder to view as show below

@{
ViewBag.Title = “Index”;
}
<script src=”~/ckeditor/ckeditor.js”></script>
<h2>Index</h2>
<div>@Html.TextArea(“editor”, new {@class = “ckeditor”, @id = “sampleEditor”})</div>

Step 4 :

Run the application

Editor 2

Note :

I have to added class โ€œckeditorโ€ toย  textarea . If we delete ,then it will shows as simple textbox not like editor