The problem was that html() in jquery doesn’t support line breaks and this is how I fixed it with PHP:
$original_post_content = get_the_content();
$breaks = array(“\r\n”, “\n”, “\r”);
$post_content = str_replace($breaks, “
“, $original_post_content);
It basically removes any line breaks and replaces them with
s