html-to-draftjs
html-to-draftjs copied to clipboard
htmlToDraft issue with images as links
I'm trying to add the following html to react-draft-wysiwyg Editor using the method described here https://jpuri.github.io/react-draft-wysiwyg/#/docs in the HTML section
<p><a href="link"><img src="image_source" alt="image_alt"/></a></p>
but the a tag gets removed by the htmlToDraft function. Resulting in this html:
<p></p>
<img src="image_source" alt="image_alt" style="height: ;width: "/>
is there a way to get around this issue?