External Libraries

You can use external frontend libraries and node packages to enhance your app's functionality. The following sections lists some of the libraries that you can use and different methods to include external libraries within your app.

Frontend Libraries

In order to use an external library, you can include it from the corresponding CDN in the template.html file as shown in the examples below:

Example 1: jQuery
You can use jQuery libraries to build and manipulate UI elements. If you want to use a button within your app’s UI, you can follow the format as shown in the example below:
template.html

Copied Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script> $(document).ready(function(){ $("button").click(function(){ alert("This is an alert to quit!") }); }); </script> </head> <body> <button>Send Warning</button> </body> </html>
EXPAND ↓

Example 2: Bootstrap
Bootstrap is a powerful front-end framework for faster and easier web development. You can use it to quickly add UI elements such as buttons and textboxes in your app. You can follow the format as shown in the example below:

template.html

Copied Copy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<html> <head> <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css"/> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"> </script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"> </script> <script> $(document).ready(function(){ $("button").click(function(){ alert("This is an alert to quit!") }); }); </script> </head> <body> <button type="button" class="btn btn-default">Send Warning</button> </body> </html>
EXPAND ↓

Alternately, you can download the desired library to the app directory and reference it from the template.html file as shown in the sample below:

template.html

Copied Copy
1
<script src="library/handlebars.js"></script>
where handlebars.js is the downloaded library file in the app/library directory.

Log in with your Freshservice account

Enter your helpdesk URL to proceed to login

Proceed

By clicking "Proceed", you agree to our Terms of Use.