quill icon indicating copy to clipboard operation
quill copied to clipboard

Uncaught ReferenceError: Delta is not defined (quill cdn)

Open lukakostic opened this issue 1 year ago • 2 comments

"Delta" is unidentified when using quill from cdn,
you can even see so if you try in the quickstart interactive playground:

Image

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.

lukakostic avatar Feb 26 '25 00:02 lukakostic

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));

lukakostic avatar Aug 06 '25 21:08 lukakostic

You can import Delta in your script using this line:

const Delta = Quill.import('delta');

helgeFox avatar Aug 07 '25 06:08 helgeFox