Hi there,
this is more a consequence of either ACF, WordPress or the TinyMCE editor. So debugging that can be a pain.
In ACF the_field
function has 2 additional params:
https://www.advancedcustomfields.com/resources/the_field/
Including the $format
which says whether or not to show the HTML format.
Try setting that param to true in the shortcode eg.:
add_shortcode('show_wysiwyg', function(){
ob_start();
if( get_field('your_field') ):
the_field('your_field', false, true );
endif;
return ob_get_clean();
});
If that doesn’t work then do you have the TinyMCE plugin installed as that may be interfering with what it returns?