quill-delta-converter
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

quill-delta-converter

Convert quill data delta to html and markdown without using dom

install

yarn add quill-delta-converter
# or
npm install quill-delta-converter

how to use

import { DeltaConverter } from 'quill-delta-converter'

function delta2html() {
  const converter = new DeltaConverter()
  return converter.toHtml(deltaData)
}

function delta2htmlWithConfig() {
  const config = {
    html: {
      formats: {
        bold(content, attributes) {
          return { tagName: 'b', classNames: 'my-bold' }
        }
        // ...
      }
    }
  }
  const converter = new DeltaConverter(config)
  return converter.toHtml(deltaData)
}

scripts

# build
yarn build
# test
yarn test
# debug test
yarn test debug --break test/test-file-path/filename.spec.ts

Todos

  • [ ] markdown
  • [ ] support table
  • [ ] detailed documentation

Package Sidebar

Install

npm i quill-delta-converter

Weekly Downloads

285

Version

0.0.4

License

MIT

Unpacked Size

75.4 kB

Total Files

56

Last publish

Collaborators

  • zhipengyan