How can I customize the_content(); output? [closed]

You can add a filter to the content directly on functions.php and use str_replace or perhaps some preg_replace (regex) to change the output of the content. Not tested. Try something like this:

function add_class_to_img_and_p_in_content($content) {

   $pattern ="/<img(.*?)class=\"(.*?)\"(.*?)>/i";
   $replacement="<img$1class="$2 newclass newclasstwo"$3>";

   $content = preg_replace($pattern, $replacement, $content);

   $pattern ="/<p(.*?)class=\"(.*?)\"(.*?)>/i";
   $replacement="<p$1class="$2 newclass newclasstwo"$3>";

   $content = preg_replace($pattern, $replacement, $content);


   return $content;
}
add_filter('the_content', 'add_class_to_img_and_p_in_content',11);

If your p and img tags do not already have a class attribute you can simply do:

function new_content($content) {

    $content = str_replace('<img','<img class="newImgclass"', $content);
    $content = str_replace('<p>','<p class="newPclass">', $content);

    return $content;
}

add_filter('the_content','new_content');