The Big Spring Sale! Up to 50% off!

How to include .js script files ?

Peter Ritter
2 Posts
Peter Ritter posted this 13 April 2023
Ask a Question

I need to run some javascript code on my page (code syntax highlighter). This code is in a couple .js files as well as one .css. Can I include these files in the project as a ressource? Is there a 'scripts' and/or 'styles' directory where I can save these files to? Or do I have to host these files independently?

<script src="scripts/shCore.js" type="text/javascript"></script>

I have included this in the site settings as 'Additional header HTML' but the files are not accessible at these paths yet.

Thanks for the help!

I need to run some javascript code on my page (code syntax highlighter). This code is in a couple .js files as well as one .css. Can I include these files in the project as a ressource? Is there a 'scripts' and/or 'styles' directory where I can save these files to? Or do I have to host these files independently? <script src="scripts/shCore.js" type="text/javascript"></script> I have included this in the site settings as 'Additional header HTML' but the files are not accessible at these paths yet. Thanks for the help!

Last edited 13 April 2023 by Peter Ritter

Vote to pay developers attention to this features or issue.
3 Replies
Order By: Standard | Newest
Support Team
Support Team posted this 13 April 2023

Hi, Peter,

You can manually add these files to a site folder after the HTML export. Alternatively, you can try to host these files somewhere and specify them in your code.

Unfortunately, it is not possible to upload .js or .css files directly in the Nicepage editor.

Let us know if you need our further help!
...................................................
Sincerely,
Paul C.
Nicepage Support Team

Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1
Follow us on Facebook: http://facebook.com/nicepageapp

Hi, Peter, You can manually add these files to a site folder after the HTML export. Alternatively, you can try to host these files somewhere and specify them in your code. Unfortunately, it is not possible to upload *.js* or *.css* files directly in the Nicepage editor. Let us know if you need our further help! ................................................... Sincerely, Paul C. Nicepage Support Team Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1 Follow us on Facebook: http://facebook.com/nicepageapp
jinyistudio
2 Posts
jinyistudio posted this 14 July 2023

Hi,
my website export to nicepage free space now. Could i manually add some .js or .css to nicepage space ?

Hi, my website export to nicepage free space now. Could i manually add some .js or .css to nicepage space ?
Support Team
Support Team posted this 14 July 2023

Hi, jinyistudio,

Unfortunately, it is not possible to upload .js and .css files directly to the editor. You can only add them to a site folder after the HTML export.
...................................................
Sincerely,
Paul C.
Nicepage Support Team

Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1
Follow us on Facebook: http://facebook.com/nicepageapp

Hi, *jinyistudio*, Unfortunately, it is not possible to upload .js and .css files directly to the editor. You can only add them to a site folder after the HTML export. ................................................... Sincerely, Paul C. Nicepage Support Team Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1 Follow us on Facebook: http://facebook.com/nicepageapp
You must log in or register to leave comments