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
PamSalesforcePamSalesforce 

CMSForce: Javascript in pageitem

Hi,

 

I have recenlty installed CMSForce and was trying to add some DHTML component as PageItem.

The preview of pageItem works fine but as I save it the it changes every thing as text and the complete javascript and html part (ie. source) is shown as the source.

 

Also, is it possible to use static resource in pageItem. If yes, can you let me know how?

Can someone help me with this.

 

Cheers,

Pushpi.

David VPDavid VP

The WYSIWYG editor is meant to input rich text/HTML content (it will for example strip out any javascript).

 

If you want to use DHTML, Javascript, static resources etc ... you'll have to define them in the underlying template (VisualForce page)

ShwetaSShwetaS

Hi,

 

Yes we can use Static Resource in CMS Force and the syntax is $Resource..<resource_name>

 

Shweta
Salesforce Developer Support

If my answer solved your question, please mark it solved so I can help as many community members as possible!