You need to sign in to do that
Don't have an account?
Larry Sontag
Problem adding javascript to a community page
Hi, I'm trying to add a registration form widget that uses javascript to one of our community pages using the HTML editor component. However, I get an error saying the markup inlcudes unsupported tags or attritbutes. Upon further investigation for supported HTML tags and attributes (https://help.salesforce.com/articleView?id=ideas_html_def.htm&type=5) I found the <script> in not supported.
Is there another way to accomplish embedding this widget on a community page?
Is there another way to accomplish embedding this widget on a community page?
Hi Larry,
As per the documentation here - https://help.salesforce.com/articleView?id=ideas_html_def.htm&type=5 - html editor does not support javascript and css.
The best way for you to add your widget would be to create a new lightning component (aura / web) which acts as a container to embed the widget and then place the component on your community page.
You can find the documentation for starters here - https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/components_config_for_builder.htm
Hope this helps.
Best,
Vishal
All Answers
Hi Larry,
As per the documentation here - https://help.salesforce.com/articleView?id=ideas_html_def.htm&type=5 - html editor does not support javascript and css.
The best way for you to add your widget would be to create a new lightning component (aura / web) which acts as a container to embed the widget and then place the component on your community page.
You can find the documentation for starters here - https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/components_config_for_builder.htm
Hope this helps.
Best,
Vishal
Thank you for the direction. That's very helpful. I need to get help from a colleague to complete and I'll let you know how we did.
Regards,
Larry