When i want to send html in ajax i do:
ob_start();
//here are echo that makes content
echo '<p>Test</p>'
$response = ob_get_clean();
wp_send_json($response);//die is included
When i want to send html in ajax i do:
ob_start();
//here are echo that makes content
echo '<p>Test</p>'
$response = ob_get_clean();
wp_send_json($response);//die is included