Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Thanks for the comment. I actually saw that answer, and even tried to use code from it. The new part in my question is about how to identify what type of block I have. And honestly, I might have a type instead of an actual block. I really do need help figuring out how to bridge between what I have and what's available in that answer.
Got your edit. Thanks! Here's my edited example for anyone who needs it. $newBodyValueHtml = drupal_render($newBodyValueRenderArray); becomes $render_service = \Drupal::service('renderer'); $newBodyValueHtml = $render_service->renderPlain($newBodyValueRenderArray);