Skip to content

Instantly share code, notes, and snippets.

@JKring
Created February 19, 2013 22:20
Show Gist options
  • Save JKring/4990710 to your computer and use it in GitHub Desktop.
Save JKring/4990710 to your computer and use it in GitHub Desktop.
this should do it
$(".content-editor").bind('paste', function(e) {
var el = $(this);
setTimeout(function() {
var strippedContent = $(el).html().replace(/(\r\n|\n|\r)/gm," ");
$(el).html(strippedContent);
}, 0);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment