title: Post CKEDITOR value to action in Asp.net Core
body: <p>Im using CKEditor 4 and Im going to post ckeditor html value to Action. but when i click on submit buttom and model post to action the ckeditor value posted null value.</p>
  
  <p><strong>View :</strong></p>
  
  <pre><code>&lt;form asp-controller="Book" asp-action="AddEditBook" id="addeditbook" data-ajax="true" 
    data-ajax-method="POST" data-ajax-update="#addeditbook" data-ajax-mode="replace"&gt;
  
  
  &lt;div class="modal-body form-horizontal"&gt;
      &lt;div class="row"&gt;
  
          &lt;div class="form-group"&gt;
              &lt;label asp-for="BookName" class="col-lg-2 col-sm-2 control-label"&gt;&lt;/label&gt;
              &lt;div class="col-lg-6"&gt;
                  &lt;input asp-for="BookName" class="form-control" /&gt;
                  &lt;span asp-validation-for="BookName" class="text-danger"&gt;&lt;/span&gt;
              &lt;/div&gt;
          &lt;/div&gt;
  
          &lt;div class="form-group"&gt;
              &lt;label asp-for="BookDescription" class="col-lg-2 col-sm-2 control-label"&gt;&lt;/label&gt;
              &lt;div class="col-lg-9"&gt;
                  &lt;textarea id="editor1" name="editor1" asp-for="BookDescription" class="form-control"&gt;&lt;/textarea&gt;
                  &lt;span asp-validation-for="BookDescription" class="text-danger"&gt;&lt;/span&gt;
              &lt;/div&gt;
  
              &lt;script type="text/javascript"&gt;
                  CKEDITOR.replace('editor1');
              &lt;/script&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  
  
  &lt;input type="submit" value="submit"/&gt;
  
  }
  </code></pre>
  
  <p></p>
  
  <p><strong>Model:</strong></p>
  
  <pre><code> public class AddEditBookViewModel
  {
      [Key]
      public int BookId { get; set; }
  
      [Display(Name = "Book Name:")]
      [Required(ErrorMessage = "Enter Book Name")]
      public string BookName { get; set; }
  
      [Display(Name = "Book Description:")]
      [Required(ErrorMessage = "Enter Book Description")]
      public string BookDescription { get; set; }
  }
  </code></pre>
  
  <p><strong>Controller :</strong></p>
  
  <pre><code>   [HttpPost]
      public IActionResult AddEditBook(AddEditBookViewModel model)
      {
          if (ModelState.IsValid)
          {
                  using (var db = _iServiceProvider.GetRequiredService&lt;ApplicationDbContext&gt;())
                  {
                      Book bookModel = Mapper.Map&lt;AddEditBookViewModel, Book&gt;(model);
                      db.books.Add(bookModel);
                      db.SaveChanges();
                  }
                  return view("index");
          }
  }
  </code></pre>
  
  <p>How can i post ckeditor html value to action to save or edit?</p>