image
image copied to clipboard
should not use `div` wrapper
When i use the component in markdown or mdx, the generated codes a bit like:
<p>
<div class="rc-image" style="width: 200px;">
<img class="rc-image-img" src="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png" />
</div>
</p>
However, the P element represents a paragraph. It cannot contain block-level elements (including P itself).
another downside of the current wrapper handling is that the classnames are trapped on the <img>
instead of transferred to the wrapper, so the styling is difficult - especially if you use tailwindcss, you'll need to add another wrapper yourself
How about adding a component="div"
for customization?