A small source script. I have no test this with a current WP version, was a older solution for a customer.
Add this source via plugin and enhance the markup. The function check for the html-tag <pre
and if exists, then will be replace with markup.
add_filter( 'tiny_mce_before_init', 'fb_correction_content_tiny_mce' );
function fb_correction_content_tiny_mce( $init ) {
$init['setup'] = "function(ed) {
ed.onBeforeSetContent.add( function(ed, o) {
if ( o.content.indexOf('<pre') != -1 ) {
o.content = o.content.replace(
/<pre[^>]*>[\\s\\S]+?<\\/pre>/g,
function(a) {
return a.replace(/(\\r\\n|\\n)/g, '<br />');
}
);
}
} );
}";
return $init;
}