Skip to content

Latest commit

 

History

History
45 lines (37 loc) · 721 Bytes

README.md

File metadata and controls

45 lines (37 loc) · 721 Bytes

render-quill Build Status

render quill delta to html string on server

Example

using callback:

var render = require('render-quill')

var delta = {
  ops: [{
    insert: 'Hello',
    attributes: {
      bold: true
    }
  }, {
    insert: ' world!!'
  }]
}

render(delta, (err, output) => {
  console.log("callback: " + output)
})

using promises:

var render = require('./index.js')

var delta = {
  ops: [{
    insert: 'Hello',
    attributes: {
      bold: true
    }
  }, {
    insert: ' world!!'
  }]
}

render(delta).then(output => {
  console.log("promise: " + output)
})