Edit this page

Post-Processing Content

If the Editor is within a <form> element, the convenient moment to post-process its content is right before the <form> is posted to the server in the submit event.

The following example demonstrates how to remove all paragraphs before posting the content to the server.

  <textarea id="comments"></textarea>

  <button type="submit">Submit</button>

var comments = $("#comments");

comments.kendoEditor({ encoded: false });

$("form").on("submit", function() {
  var value = comments.data("kendoEditor").value();

  // strip all paragraphs
  value = value
    .replace(/<p[^>]*>/g, "")
    .replace(/<\/p>/g, "<br />");


See Also

Other articles on the Kendo UI Editor:

For how-to examples on the Kendo UI Editor widget, browse its How To documentation folder.

Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article