A script or widget allows you to insert HTML or JavaScript code on your site by simply adding a code provided by an external service to your WebSelf site. You can easily insert a video, audio, a photo album, or any other code of your choice from a third-party site.
To add a Script, access the ‘Tools’ section on the left side of the editor, then drag & drop the Script icon to the desired location on your page.
You can write or copy your HTML or JavaScript code into the fields provided for this purpose:
- The first field is for adding a general code;
- The second field is for adding a code between the <head>; and </head> tags;
- The third field is for adding a code between the <body> and </body> tags.
Note:
To paste your code, the right-click is not accepted, please use the keyboard shortcut Ctrl + V.
For developers
To make your code more legible and ensure your experience is user-friendly, the
tags, attributes, and classes are displayed in different color.
We offer you a list of practical widgets for your site such as weather, audio
player, animations, an online booking system, etc. Simply click on ‘Suggested widgets’ to access these features.
Note:
Some external scripts can contain code incompatible with some browsers, which
can generate display issues. Some scripts can also generate pop-up ads. The only solution to this issue is to remove the script.
Example of inserting a Widget using a Script module
Example of code received:
<div class="aventri-widget" data-type="AgendaWidget" data-widgetid="198399" data-accountid="10712" data-language="eng"></div>
<script src=https://na-admin.eventscloud.com/widgets/static/embed/embed-0.0.1.min.js></script>
Here's how to insert it into your site with a Script module:
- Add a Script module:
- Paste the 1st line of the code in the "Code content" window:
<div class="aventri-widget" data-type="AgendaWidget" data-widgetid="198399" data-accountid="10712" data-language="eng"></div>
Click Update.
- Scroll down until you find the "Code content between <body> and </body> tags" window.
- Paste the second line of the code in the window and click Update.
<script src=https://na-admin.eventscloud.com/widgets/static/embed/embed-0.0.1.min.js></script>
- Cliquez Save.
- Your widget is displayed.