Forum Discussion

mbp998's avatar
mbp998
Contributor
14 years ago

JavaScript in custom components

Hi all-

 

I need the ability to include third party JavaScript files and to write my own JavaScript functionality inline, but am not sure how to do this.  Lithium seems to be frowning upon this, turning my < > into html entitities:

 

<script>alert('hello')</script>

 

into

 

&lt;script&gt;
alert('hello');
&lt;/script&gt;

 

How can I get around this?

  • Hi mbp998,

     

    An upgrade will be required to fix the issue that you're seeing. We'll follow-up with you over private message for further detail.

     

    Thanks!

  • KaelaC's avatar
    KaelaC
    Lithium Alumni (Retired)
    That shouldn't be happening.... just to be sure - you are talking about custom components in Studio, not custom content in the Admin panel, right?
    • mbp998's avatar
      mbp998
      Contributor

      Correct- in Studio, creating a new custom component and that's all the content that's in it. 

       

      I'm new to Lithium and am not clear if I'm looking at the basic studio or advanced studio, if that matters. 

      • JeffS's avatar
        JeffS
        Lithium Alumni (Retired)

        Hi mbp998,

         

        An upgrade will be required to fix the issue that you're seeing. We'll follow-up with you over private message for further detail.

         

        Thanks!