@yozora/html-text
TypeScript icon, indicating that this package has built-in type declarations

2.0.0-alpha.2 • Public • Published

@yozora/html-text


This component is for rendering the Yozora Markdown AST node IText produced by @yozora/tokenizer-text into HTML string.

This component has been built into [@yozora/html-markdown][], you can use it directly.

Install

  • npm

    npm install --save @yozora/html-text
  • yarn

    yarn add @yozora/html-text

Usage

  • Basic:

    import type { IText } from '@yozora/ast'
    import renderText from '@yozora/html-text'
    
    const text: IText = { "type": "text", "value": "literal content." }
    renderText(text)
    // => <span class="yozora-text">literal content.</span>

Related

Package Sidebar

Install

npm i @yozora/html-text

Weekly Downloads

1

Version

2.0.0-alpha.2

License

MIT

Unpacked Size

6.05 kB

Total Files

6

Last publish

Collaborators

  • lemonclown