How to add ckeditor in asp.net mvc
Microsoft Net Framework

How to add ckeditor in asp.net mvc?

Solution

1) Copy CkEditorFolder

2) Add refrence of Js file
 <script src="../../ckeditor/ckeditor.js"></script>

3) in html view add control e.g

 <textarea class="form-control" name="BriefDescription" id="BriefDescription" rows="3" placeholder="Brief Description">@Model.BriefDescription</textarea>

4) Add js function that will convert  input control to editbox

   <script>
                            // Replace the <textarea id="editor1"> with a CKEditor
                            // instance, using default configuration.
                            CKEDITOR.replace('BriefDescription');
                          
   </script>

5 ) in mvc controller post action

Set input validate false

ValidateInput(false) vs AllowHtml

Share This with your friend by choosing any social account


Upcoming Articles
You may also read following recent Post
Copyright Future Minutes © 2015- 2024 All Rights Reserved.   Terms of Service  |   Privacy Policy |  Contact US|  Pages|  Whats new?
Update on: Dec 20 2023 05:10 PM