Customize a href tag

Last post 11-20-2008, 3:38 PM by B284. 5 replies.
Sort Posts: Previous Next
  •  11-18-2008, 2:34 PM 45925

    Customize a href tag

    Is there a way to customize the a href tag, so that instead of writing out "<a href='http://www.google.com'>Google</a>" it would right out "<a href='http://www.google.com' onclick="window.open('http://www.google.com');">Google</a>"? This would allow our users to click in the Normal editor window and have the hyperlink go to the linked page. Thanks.
  •  11-18-2008, 3:16 PM 45926 in reply to 45925

    Re: Customize a href tag

    I've somewhat figured it out. I added element.setAttribute(OxO7ae6[0x27], "window.open('" + inp_src.value + "');") ; in the Dialog_Tag_A.js file at this point:
    SyncTo=function SyncTo_A(element){if(inp_src[OxO7ae6[0x28]]){ element[OxO7ae6[0x3a]]=inp_src[OxO7ae6[0x28]] ; HERE. I have EnableStripScriptTags="false" and that is working great. My only issue is that you have to switch to html or preview mode for the link to become active in normal mode. Is there a way to do this programmatically, as I will have ShowBottomBar="false" so the end user won't be able to switch views.
  •  11-19-2008, 9:38 AM 45941 in reply to 45926

    Re: Customize a href tag

    Can you check this property?
     

    Editor.HyperlinkTarget Property

    Specifies where the linked document will be opened when the user follows a link.


    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  11-19-2008, 3:55 PM 45960 in reply to 45941

    Re: Customize a href tag

    The HyperlinkTarget property is fine because the window is opening how I want after I save. However, I would like the link to become active before I save. Here is what I would like to happen:
    1. The user highlights some text (we'll say "Search page") in the Normal editor window and clicks the Insert Hyperlink button.
    2. They set the hyperlink to http://www.google.com
    3. Once they come back to the normal editor window from the dialog box, I would like the link to be active, so they could click "Search page" at this point and it would open a new window and go to google.

    I have everything working how I want based on my previous message, except the fact that the link only becomes active after I save. Is there an internal refresh or anything I can make it do to make it active as soon as the Insert Hyperlink dialog box closes? Again, I don't have the bottom bar active, so HTML and Preview are not available.

  •  11-20-2008, 9:13 AM 46026 in reply to 45960

    Re: Customize a href tag

    Any thoughts? This is our only sticking point keeping us from purchasing licenses. :(
  •  11-20-2008, 3:38 PM 46039 in reply to 46026

    Re: Customize a href tag

    Does the lack of a response mean it can't be done?
View as RSS news feed in XML