Strip invisible trash commonly left by less precise users.
First implemented on and copied from poslawsky.nl/bio/.
exec: function (editor) {
var pagename = window.location.pathname;
var body = editor.getData();
+ // trim trailing whitespace in non-empty paragraphs
+ body = body.replace(/((?!<p>).{3})(?:\s|\u200B)+(?=<\/p>)/g, '$1');
// empty line is equivalent to a paragraph break
body = body.replace(/<br \/>\s*<br \/>/g, '<p>');
// wrap long line after each sentence