Strange behavior with 3rd party JS library served from CDN

I am creating a custom HTML component to house the [Quill Rich Text Editor].(https://quilljs.com/docs/quickstart/)

In the preview mode, the text editor appears as expected, but when I press ‘run’ i get an error: “Uncaught ReferenceError: Quill is not defined”

https://anvil.works/build#clone:FBUDGJ2ALPV4WS65=DOKD5LLCPH5PUHBPS3SULYUV

Anyone have any ideas how to tackle this type of error?

Hi @joinlook ,

I can get it working by putting the <script> and <style> tags in Native Libraries. Anything you put in there will go into the <head> of your app, so it loads before everything else.

This is a nice library!

Here’s a clone link for that version:

https://anvil.works/build#clone:PN36FXDXJF4YXIUO=Q4SFH4UYMYMGX3GWDSLL4FSH

1 Like

you all are on it

thank you so much!

1 Like