render quill delta to html string on server
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)
})