Use `createNodesFromMarkup`

Pulled out markup rendering logic for better reuse.