function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Missy LewisMissy Lewis 

Embedding Calendly code/creating widget into Salesforce Experience Site

 
 
Melissa Lewis (ez) asked a question.
 
I figured out that I can't use the HTML editor because it does not support javascript. From what I've read I need to create an aura so that I can embed the code there and then drag onto my page. I got to where I enter the code and I'm getting an error. Here is the code I'm using:
<aura:component><!-- Calendly inline widget begin -->
<div class="calendly-inline-widget" data-url="https://calendly.com/ezanchorpuller-melissa-lewis/interview" style="min-width:320px;height:630px;"></div>
<script type="text/javascript" src="https://assets.calendly.com/assets/external/widget.js"></script>
<!-- Calendly inline widget end --></aura:component>

and here is the error:

Failed to save Calendlys.cmp: script tags only allowed in templates: Source

any help?
SwethaSwetha (Salesforce Developers) 
HI Missy,

script tag is not supported into in lightning component so you need to use ltng:require to include script from static resource in following way

<ltng:require scripts='/resource/path/to/js1.js,/resource/path/to/js2.js'/>

Note: SFDC don't allow to put inline script tag so only option is to move javascript code insdie controller.js or load from external javascript as shown above.

Ref: https://salesforce.stackexchange.com/questions/98212/script-tag-error-aura-lightning-component

Similar: https://developer.salesforce.com/forums/?id=9062I000000IPfcQAG

If this information helps, please mark the answer as best. Thank you
simply buzzes 9simply buzzes 9
Hi salesforce family, i hope everything is ok on your side. could you please have a look on my site (https://trendywebz.com/) and recommend me with your best setting please?