# Add Libraries to p5.js Web Editor

**URL:** <https://discourse.processing.org/t/add-libraries-to-p5-js-web-editor/9756>\
**Category:** Libraries\
**Created:** [March 29, 2019, 1:00pm UTC](https://discourse.processing.org/t/add-libraries-to-p5-js-web-editor/9756 "2019-03-29T13:00:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ChipAnyanwu](https://avatars.discourse-cdn.com/v4/letter/c/9d8465/32.png) [@ChipAnyanwu](https://discourse.processing.org/u/ChipAnyanwu)\
**Post date:** [March 29, 2019, 1:00pm UTC](https://discourse.processing.org/t/add-libraries-to-p5-js-web-editor/9756/1 "2019-03-29T13:00:44Z")

</div>

Hello Everyone!

I have a quick question about the p5.js web editor. I’m trying to make a project that utilizes the [p5.play](http://molleindustria.github.io/p5.play/) library and I wanted to use the p5 web editor to do so. I imported the library file and referenced it in the html code, but I was unable to use the library.

Is there any official way to add libraries that I’m not aware about or is adding libraries just not supported in the web editor?

I’m a novice at p5.js, so go easy on me 🙂

---

<div class="post-metadata">

**Author:** ![TheWizardBear](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/thewizardbear/32/3552_2.png) [@TheWizardBear](https://discourse.processing.org/u/TheWizardBear)\
**Post date:** [March 29, 2019, 1:34pm UTC](https://discourse.processing.org/t/add-libraries-to-p5-js-web-editor/9756/2 "2019-03-29T13:34:14Z")

</div>

Hi @ChipAnyanwu.

In the `index.html` file, add a script tag, with a link to the source code for the library.  
e.g. This is the one for the p5.js sound library:  
`<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.7.3/addons/p5.sound.min.js"></script>`  
The link can be a local one or it can be from somewhere else on the internet. I would just recommend using `https://raw.githubusercontent.com/molleindustria/p5.play/master/lib/p5.play.js` for the p5.js play library.

---

<div class="post-metadata">

**Author:** ![ChipAnyanwu](https://avatars.discourse-cdn.com/v4/letter/c/9d8465/32.png) [@ChipAnyanwu](https://discourse.processing.org/u/ChipAnyanwu)\
**Post date:** [March 29, 2019, 1:52pm UTC](https://discourse.processing.org/t/add-libraries-to-p5-js-web-editor/9756/4 "2019-03-29T13:52:16Z")

</div>

I added a script tag, and since I uploaded the library into the editor, referenced the path of the p5.play library. Does using the GitHub link for the file have a different effect?

---

<div class="post-metadata">

**Author:** ![TheWizardBear](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/thewizardbear/32/3552_2.png) [@TheWizardBear](https://discourse.processing.org/u/TheWizardBear)\
**Post date:** [March 29, 2019, 2:04pm UTC](https://discourse.processing.org/t/add-libraries-to-p5-js-web-editor/9756/5 "2019-03-29T14:04:27Z")

</div>

No. It is just another way to link to the raw javascript of the library.
