node-quill-converter
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 --save
# Via Yarn
yarn add node-quill-converter
Getting Started
Convert a plain text string to a Quill delta:
const convertTextToDelta = ; let text = 'hello, world';let delta = ; console; // {"ops":[{"insert":"hello, world\n"}]}
Convert a HTML string to a Quill delta:
const convertHtmlToDelta = ; let htmlString = '<p>hello, <strong>world</strong></p>';let delta = ; console
Convert a Quill delta to an HTML string:
const convertDeltaToHtml = ; let html = ; console ; // '<p>hello, <strong>world</strong></p>'
License
MIT License Copyright (c) 2018 Joel Colucci