Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Matt 1 post 81 karma points
    Mar 29, 2018 @ 14:37
    Matt
    0

    Enabling javascript tags

    Hello,

    I am new to umbraco. I am trying to do something quite simple but can't seem to find any solution or find any forum to provide with this information.

    I am trying to enable the javascript tags in the rich text editor as I need to add some external javascript coming from another website and this is only a content page so I would like to just place the javascript tag inside the rich text editor.

    Any solution for this ? I have found on google that I have to change some settings with TinyMCE but still there isn't any information about it.

    Thanks in advance, Matt

  • Nik 1612 posts 7258 karma points MVP 7x c-trib
    Mar 29, 2018 @ 16:32
    Nik
    100

    Hi Matt,

    By default Umbraco has configured the RTE to not allow script tags. This is, I suspect, to prevent malicious scripts being added. They also prevent all sorts of other HMTL elements and attributes as well.

    You can, however, allow your own. This is done by editing the tinyMceConfig.config file found in the config folder. In there, there is an XML element called validElements. Here you could add ,script[] just after the iframe[*] entry.

    My advice though is to be cautious.

    Thanks,

    Nik

Please Sign in or register to post replies

Write your reply to:

Draft