1.0.2 • Published 12 months ago

@samuelluo/markdown-img-ready v1.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
12 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

12 months ago

1.0.1

1 year ago

1.0.0

1 year ago