question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to add a <script> tag?

See original GitHub issue

react-prism recommends to add a script tag directly in the HTML:

<script src="path/to/your/prism.js" ></script>

Is there a way to do this?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

19reactions
helloncanellacommented, Mar 1, 2019

updating the answer: add a preview-head.html to the folder .storybook.

15reactions
jeef3commented, May 4, 2016

Yes, there is, but I don’t think there’s any docs on it yet. See #77.

Basically, create a head.html in your .storybook. That will get included.

Note: This will add it to <head>

Read more comments on GitHub >

github_iconTop Results From Across the Web

JavaScript Where To - W3Schools
You can place an external script reference in <head> or <body> as you like. The script will behave as if it was located...
Read more >
How To Add JavaScript to HTML | DigitalOcean
You can add JavaScript code in an HTML document by employing the dedicated HTML tag <script> that wraps around JavaScript code.
Read more >
Dynamically add script tag with src that may include document ...
You can use the following code to load the script dynamically: var scriptElm = document.createElement('script'); scriptElm.src = 'source ...
Read more >
The Script element - HTML: HyperText Markup Language
These examples show how to import (an external) script using the <script> element. <script src="javascript.js"> ...
Read more >
An Essential Guide on How to Add JavaScript to HTML - Linode
In order to use JavaScript on an HTML web page, you must use the <script> tag to either write your JavaScript code directly...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found