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
Larry SontagLarry 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? 

code line with script is flagged with red X

Review your content. The markup includes unsupported tags or attributes. Remove them and try again.
Best Answer chosen by Larry Sontag
vishal-negandhivishal-negandhi

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

vishal-negandhivishal-negandhi

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

This was selected as the best answer
Larry SontagLarry Sontag
Hi 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
 
jisn mosejisn mose
Can you please share the salefroce service scropt for finance project? I want to use it for general liability (https://generalliabilityinsure.com/) page of my website.
edward jonieedward jonie
I want to make a simpler report of my saleforce program. Can anyone help me with this? I want to integrate it with my website (https://usakiltstore.com/custom-tartan-kilt).