1

I am using CKEditor with JQuery AJAX and ASP.NET MVC.

I am trying to perform an AJAX POST with JQuery but it fails to submit because of the HTML in the textarea. The form submits fine if I just enter plain text in a textarea, but not as HTML.

The JQuery method I am using to get the HTML from the textarea is .val()

Can someone tell me how to fix this problem please?

2 Answers 2

2

You will have to use GetData and also make sure your controller action that accepts the post has this annotation applied [HttpPost, ValidateInput(false)]

Sign up to request clarification or add additional context in comments.

Comments

1

I did not succeed in that so if you are not required to use CKEditor you can switch to tinymce which you can add via NuGet (install-package TinyMCE.MVC) and this works fine with MVC

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.