Adding JavaScript to Content Editor

Posted by Community Admin on 03-Aug-2018 16:19

Adding JavaScript to Content Editor

All Replies

Posted by Community Admin on 16-Dec-2011 00:00

I will start out with I am very new to SiteFinity. We are using version 4.2 of the software package. I am trying to move a website over to SiteFinity. The page I am moving has JavaScript in the Head and also in a table in the body. I found out how to put the javascript in the head using the javascript control but everytime I try to add javascript to the HTML editor for the Content section of the template it wipes it out. 

How can I get the javascript in that specific section of the table?

Thanks!

Posted by Community Admin on 19-Dec-2011 00:00

Hi John,

Actually, this is expected behavior, since JavaScript in our editor is not supported. What you could do to fulfill your scenario is to create a template, based on a master page and then assign it to your pages. In the master page you will be able to reference your JavaScript files or include your script in a script tag.

Kind Regards,
Jen Peleva
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 19-Dec-2011 00:00

In a pinch, you could also drag the Javascript widget to your page and include the Javascript there. We have done this on pages that have Javascript unique to a page. (whereas we use the Master Page Javascript links for sitewide needs)

This thread is closed