We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4513
    • 16 Posts
    hi All,
    I have a big problem with tinymce when I try to add text like following:
    <script type="text/javascript">// <![CDATA[
    //[CDATA[/ />
    var gemius_identifier = new String('zPc7W_e.sFpIpG7y33X9uacUfSWs.7uvSj2OaNWi7gT.O7');
    //<!
    // </mce:script>
    <mce:script type="text/javascript" mce_src="http://std1.hit.gemius.pl/gemius.js"></mce:script>]]></script>

    Of course it should be in a such form:
    <!-- (C)2000-2010 Gemius SA - gemiusTraffic / ver 11.1 / TMG_MAIN -->
    <script type="text/javascript">
    <!--//--><![CDATA[//><!--
    var gemius_identifier = new String('zPc7W_e.sFpIpG7y33X9uacUfSWs.7uvSj2OaNWi7gT.O7');
    //--><!]]>
    </script>
    <script type="text/javascript" src="http://std1.hit.gemius.pl/gemius.js"></script>

    Does anybody know how can I fix it?

      • 28042 ☆ A M B ☆
      • 24,524 Posts
      1. Break the javascript out to an external file and use <script type="text/javascript" src="..." ></script> tags to include the file.

      2. Put the javascript in a chunk and include the chunk.

      3. Don’t use the Rich Text editor for that resource.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 4513
        • 16 Posts
        thank You very much!
        I have a such issue: when I call snippet in "TinyMCE" field, which returns the proper text,
        I get almost everything correctly except one i.e. mce_scr="....",
        but the rest is ok, <script> tags , etc.
        I think I’ll use a tv as a normal input text.