2.0.0-alpha.2 • Published 2 years ago
@yozora/html-image v2.0.0-alpha.2
This component is for rendering the Yozora Markdown AST node IImage
produced by @yozora/tokenizer-image into HTML string.
This component has been built into @yozora/html-markdown, you can use it directly.
Install
npm
npm install --save @yozora/html-image
yarn
yarn add @yozora/html-image
Usage
Basic:
import type { IImage } from '@yozora/ast' import renderImage from '@yozora/html-image' const image: IImage = { "type": "image", "url": "https://github.com/favicon.svg/", "alt": "github favicon", "title": "github favicon" } renderImage(image) // => <img class="yozora-image" alt="github favicon src="https://github.com/favicon.svg/" title="github favicon"
Related
2.0.0-alpha.0
2 years ago
2.0.0-alpha.1
2 years ago
2.0.0-alpha.2
2 years ago
1.0.0-alpha.4
3 years ago
1.0.0-alpha.3
3 years ago
1.0.0-alpha.2
3 years ago
1.0.0-alpha.1
3 years ago
1.0.0-alpha.0
3 years ago