You need to sign in to do that
Don't have an account?
Missy Lewis
Embedding Calendly code/creating widget into Salesforce Experience Site
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? |
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