What is CKEditor?
CKEditor is an open source WYSIWYG (hand-made - seen) text editor from CKSource. This program can be integrated into websites without installation. The first version was released in 2003 and is now used by many people.
Today, we will guide you how to integrate the CKEditor editor into your ASP.NET MVC project. Let's get started.
Integrate the CKEditor editor into an ASP.NET MVC project
Step 1: Create an application named CKEditorDemo
Step 2: Create a Model name it CKEditor.cs
Step 3: Create Controller name it CKEditorContronller.cs
Step 4: Create View for ActionResult Create()
Step 5:Download CKEditor at https://ckeditor.com/ckeditor-4/download/
There are many versions and the number of features depends on the version you choose (Basic Package, Standard Package, Full Package) or you can customize the features you want by selecting Customize. Or you can integrate CKEditor by inserting the script into your ASP.NET MVC project without downloading anything.
Step 5:Unzip the downloaded file and copy the entire extracted file into your project.

Step 5: Add the path of the ckeditor.js file to the View of the Create.cshtml page

Step 6: Use the script below to replace TextArea with CKEditor.
Note: Insert script below TextArea
“description” is the id attribute of TextArea.
@Html.LabelFor(model => model.description, htmlAttributes: new { @class = "control-label col-md-2" })
@Html.TextAreaFor(model => model.description, new { htmlAttributes = new { @class = "form-control" } })
@Html.ValidationMessageFor(model => model.description, "", new { @class = "text-danger" })
You can check the id by examining the element in your web browser.

Step 5: Save changes and run your application to see the results.
Summary
We already know how to integrate the CKEditor editor into our ASP.NET MVC project. Through this article, I hope to help some of you who are new to programming. Wishing you success.
Did you find this article helpful?
Support the author so they can write more quality articles!

