1.0.2 • Published 11 months ago

@samuelluo/markdown-img-ready v1.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
11 months ago

markdown-img-ready

用于检测 markdown 中图片加载是否完成

Usage

import Markdown from "react-markdown";
import { useImgReady } from "@samuelluo/markdown-img-ready";

export default () => {
	const content = "";
	const { ready, component: ImgComponent } = useImgReady(content);

	return (
		<Markdown
			components={{
				img: ImgComponent,
			}}
		>
			{content}
		</Markdown>
	);
};
1.0.2

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago