This will manually open links in a new tab
<div
dangerouslySetInnerHTML={{ __html: htmlData }}
onClick={(event) => {
const targetLink = event.target;
if (targetLink instanceof Element) {
const anchor = targetLink .closest('a');
if (anchor && anchor.href) {
event.preventDefault();
window.open(anchor.href, '_blank', 'noopener,noreferrer');
}
}
}}
/>