More in this section

Forums / General Discussions / Adding JavaScript to Content Editor

Adding JavaScript to Content Editor

3 posts, 0 answered
  1. JOhn
    JOhn avatar
    1 posts
    Registered:
    20 Oct 2011
    16 Dec 2011
    Link to this post
    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!
  2. Jen Peleva
    Jen Peleva avatar
    568 posts
    Registered:
    10 Nov 2016
    19 Dec 2011
    Link to this post
    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
  3. Dan Sorensen
    Dan Sorensen avatar
    256 posts
    Registered:
    13 Aug 2010
    19 Dec 2011
    Link to this post
    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)
3 posts, 0 answered