var body = editor.getData();
// empty line is equivalent to a paragraph break
body = body.replace(/<br \/>\s*<br \/>/g, '<p>');
var body = editor.getData();
// empty line is equivalent to a paragraph break
body = body.replace(/<br \/>\s*<br \/>/g, '<p>');