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.
# Via NPM
npm install quill-converter-xp --save
# Via Yarn
yarn add quill-converter-xp
const { convertHtmlToDelta } = require('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}}]}