Copied to clipboard

Flag this post as spam?

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


  • Marko Eitel 5 posts 75 karma points
    May 22, 2018 @ 20:24
    Marko Eitel
    0

    Javascript Button in TinyMce

    Hello,

    i have insert a JavaScript-Button in a TinyMce-Field for Google Analytics Opt-Out.

    This is the Button-Code:

    <a href=”javascript:gaOptout()” onclick=”alert(‘Google Analytics wurde deaktiviert’);”>Erfassung von Daten von Google Analytics für diese Webseite deaktivieren</a>
    

    In the tinyMceConfig.config I added this:

    <customConfig>   
        <config key="allow_script_urls">true</config>
    </customConfig>
    

    But after saving the Button-Code looks like this:

    <a href="/”javascript:gaOptout()”" onclick="”alert(‘Google">Erfassung von Daten von Google Analytics für diese Webseite deaktivieren</a>
    

    I use Umbraco 7.5.

    Can anyone help?

    Greetings from Berlin

    Marko

  • pranjal 75 posts 188 karma points
    May 23, 2018 @ 08:04
    pranjal
    0

    Because any addition of link or anything will be render under

    tag so due to that may be editor doesnt understand link or button

    solution:- You have to write full html code for button and write Js functions from there it will work fine.

Please Sign in or register to post replies

Write your reply to:

Draft