html-to-draftjs icon indicating copy to clipboard operation
html-to-draftjs copied to clipboard

htmlToDraft issue with images as links

Open KyriacosP opened this issue 3 years ago • 0 comments

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?

KyriacosP avatar May 13 '21 14:05 KyriacosP