Oh! HTML の生成方法を完全に誤解していました。ユーザーが HTML を事前に生成している場合、ドメインがホワイトリストに登録されている外部サイトから iframe で読み込むことができます。
例えば、デフォルトで許可されるはずの codepen です。
<iframe height="300" width="800" style="width: 100%;" scrolling="no" title="mplD3 example, actually working" src="https://codepen.io/gully/embed/BawMGr?default-tab=result" frameborder="no" loading="lazy" allowtransparency="true" allowfullscreen="true">
See the Pen <a href="https://codepen.io/gully/pen/BawMGr">
mplD3 example, actually working</a> by gully (<a href="https://codepen.io/gully">@gully</a>)
on <a href="https://codepen.io">CodePen</a>.
</iframe>