0.1.3 • Published 9 months ago

node-quill-converter-xp v0.1.3

Weekly downloads
-
License
MIT
Repository
-
Last release
9 months ago

node-quill-converter-xp

Convert HTML to a Quill Delta or a Quill Delta to HTML

The purpose of this package is to assist in migrating to or from the Quill editor.

Installation

# Via NPM
npm install node-quill-converter-xp --save

# Via Yarn
yarn add node-quill-converter-xp

Getting Started

Convert a HTML string to a Quill delta:

const { convertHtmlToDelta } = require('node-quill-converter-xp');

let htmlString = '<p>hello, <strong>world</strong></p>';
let delta = convertHtmlToDelta(htmlString);

console.log(JSON.stringify(delta)); // {"ops":[{"insert":"hello, "},{"insert":"world","attributes":{"bold":true}}]}
0.1.3

9 months ago

0.1.1

9 months ago