Convert quill data delta to html and markdown without using dom
yarn add quill-delta-converter
# or
npm install quill-delta-converter
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)
}
# build
yarn build
# test
yarn test
# debug test
yarn test debug --break test/test-file-path/filename.spec.ts
- markdown
- support table
- detailed documentation