Skip to content

rstr74/quilljs-delta-html-render

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

Render Quilljs Delta's to HTML on the server with node.js

  • Document insert-only deltas
  • Uses cheerio for dom manipulation
  • Quill v.1.1 Delta format
  • Not for production (yet)

Install:

npm install rstr74/quilljs-delta-html-render
npm i (in node_modules/quilljs-delta-html-render)

Test:

npm test

Usage:

var quillRender = require('quilljs-delta-html-render');
quillRender.renderDelta([{
        name: "strong and color",
        ops: [{
            insert: 'Gandalf',
            attributes: {
                bold: true
            }
        }, {
            insert: " the "
        }, {
            insert: 'Grey\n',
            attributes: {
                color: '#cccccc',
            }
        }]);

==> '<p><b>Gandalf</b> the <span style="color: rgb(204, 204, 204);">Grey</span></p>'

About

Render Quilljs Delta to HTML representation

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published