quill
quill copied to clipboard
Uncaught ReferenceError: Delta is not defined (quill cdn)
"Delta" is unidentified when using quill from cdn,
you can even see so if you try in the quickstart interactive playground:
Thus making the documentation for "updateContents" impossible to follow:
quill.updateContents(new Delta()
.retain(6) // Keep 'Hello '
.delete(5) // 'World' is deleted
.insert('Quill')
.retain(1, { bold: true }) // Apply bold to exclamation mark
);
One can confirm this by searching the quill.js and finding no hits for "Delta" as its own word (yet "Quill" exists). Seems somebody forgot to turn off minification for Delta class.
Still ongoing. Cannot use Delta api anywhere :(
Cannot update custom embedded blot since new Delta doesnt work:
quill.updateContents(new Delta()
.retain(index)
.delete(1)
.insert(value));
You can import Delta in your script using this line:
const Delta = Quill.import('delta');