Copied to clipboard

Flag this post as spam?

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


  • Abdullah Anwar 36 posts 56 karma points
    Mar 17, 2015 @ 09:32
    Abdullah Anwar
    0

    Anchor Tag href Problem

    I am trying to use javascript in anchor tag href in rich text editor but its not accepting.

    Code that i am using

    <a href="javascript:;">Service</a>

    but it converts into

    <a >Service</a>

     

    Why its happening

    Could you please help me to solve?

  • Jan Skovgaard 11264 posts 23593 karma points MVP 9x admin c-trib
    Mar 17, 2015 @ 11:25
    Jan Skovgaard
    0

    Hi Abdullah

    What exact version of Umbraco are you using?

    In some versions tidy is being used to wipe out bad markup and inline javascript etc. - However it has been disabled in v6 and later by default. But I suspect that it still does some cleaning anyway.

    But you can try to configure /config/TinyMceConfig.config file to allow all elements by just having * where all the elements are currently defined.

    But why do you want to setup inline javascript on an anchor tag in the rich text editor? What is the scenario? Perhaps there is a better way around it so you don't mix content and code.

    /Jan

  • Abdullah Anwar 36 posts 56 karma points
    Mar 17, 2015 @ 11:33
    Abdullah Anwar
    0

    Thanks Jan :)

  • Jan Skovgaard 11264 posts 23593 karma points MVP 9x admin c-trib
    Mar 17, 2015 @ 11:38
    Jan Skovgaard
    0

    Hi Abdullah

    You're welcome - did it help any? :)

    /Jan

  • Abdullah Anwar 36 posts 56 karma points
    Mar 17, 2015 @ 12:11
    Abdullah Anwar
    0

    yes, it worked for me.

  • Jan Skovgaard 11264 posts 23593 karma points MVP 9x admin c-trib
    Mar 17, 2015 @ 12:27
    Jan Skovgaard
    0

    Ok, happy I could help - Could you please mark the issue as solved so other who may come across the same challenge can go straight to the solution? :)

    Happy coding!

    /Jan

Please Sign in or register to post replies

Write your reply to:

Draft