Copied to clipboard

Flag this post as spam?

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


  • Chau 66 posts 97 karma points
    Oct 06, 2009 @ 02:59
    Chau
    0

    autolinking

    When I'm using the tinymce editor it automatically creates links such as www.google.com. I know that IE has this feature and you can't turn it off. What I would like to be able to do is have an xslt that looks through the field, such as bodyText, and replaces all of a certain word into a link. In effect, the word baseball would automatically be changed into a link to www.mlb.com but still say baseball.

    Is this possible using xslt, or would using a c# usercontrol be a better method. I have no experience with c#....

    Maybe there is a easy way to simply edit tinymce??

    Thanks,

    Chau

  • dandrayne 1138 posts 2262 karma points
    Oct 06, 2009 @ 10:39
    dandrayne
    0

    In xslt, you could potentially look at the umbraco library replace method

    <xsl:value-of select="umbraco.library:Replace('$contentToSearch', 'baseball', '<a href="http://www.mlb.com">baseball</a>')"/>

    This is untested - I can imagine the quotes inside the link giving some trouble, but it may do the job!

    Dan

Please Sign in or register to post replies

Write your reply to:

Draft