Uncaught TypeError: QuillDeltaToHtmlConverter is not a constructor
alexjustesen opened this issue · 3 comments
alexjustesen commented
Having the following issue loading through require.
####Error
Uncaught TypeError: QuillDeltaToHtmlConverter is not a constructor
####Code Sample
require(['quill-delta-to-html'], function( QuillDeltaToHtmlConverter ) {
// Get quill contents
var delta = JSON.parse( $('input[name=league_description]').val() );
// Log contents delta ops to console
console.log( delta.ops );
console.log( window.opts_ );
// Convert quill ops delta to html
var converter = new QuillDeltaToHtmlConverter( delta.ops, window.opts_ );
var html = converter.convert();
// Log html to console
console.log(html);
// Update converted view
document.getElementById('league-description-view').innerHTML = html;
});
Thanks in advance for the help.
nozer commented
require(['quill-delta-to-html'], function( QuillDeltaToHtmlConverter... In here, constructor is available as QuillDeltaToHtmlConverter.QuillDeltaToHtmlConverter
alexjustesen commented
I'll give that a go tonight, makes sense now that I'm looking at it again.
nozer commented
I am closing this for now; you can reopen if issue persists