Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

links automatically created in WYSIWYG

Options
  • 16-01-2006 11:23am
    #1
    Registered Users Posts: 872 ✭✭✭


    Hi,

    I have a simple Javascript WYSIWYG editor for managing pages in a website.

    if you type in www.website.com it automatically creates a link and i cant set the link to open in a new window. If i press backspace after the link it removes the link but when i highlight it again it makes the link again :mad:

    Does anyone know how to overcome this issue ?

    Thakns


Comments

  • Registered Users Posts: 2,157 ✭✭✭Serbian


    You might be better off integrating one of the prebuilt JavaScript WYSIWYG editors:

    FCK Editor
    TinyMCE


  • Registered Users Posts: 21,257 ✭✭✭✭Eoin


    Should all links open in a new window?

    If so, would putting
    <base target="_blank">
    
    in the head tag work for you?


  • Registered Users Posts: 872 ✭✭✭grahamor


    thanks for the replys,

    im using a prebuilt wysiwyg. it is quite a basic one but very simple to integrate.

    could i use <base target="_blank"> just for a certain section of the page ? as i dont want all links to appear in a new window just certain ones in a selected paragraph or layer.

    thanks


  • Registered Users Posts: 872 ✭✭✭grahamor


    that worked perfect, thanks a million eoin_s


  • Registered Users Posts: 21,257 ✭✭✭✭Eoin


    That's great, there's no problems with links you don't want opened in a new window?


  • Advertisement
  • Registered Users Posts: 872 ✭✭✭grahamor


    no, i just put the base back to _self after the section where i wanted popups.
    (its not ideal but it works)


  • Registered Users Posts: 21,257 ✭✭✭✭Eoin


    Cool.

    Though, if you have access to the content created by the WYSIWYG editor either upon submission of the content or when it is being displayed, maybe you could add a search and replace routine that would add the "target" attribute to any links.

    Not much use now, but CSS3 will allow you to specify the target of a link in a CSS class / style, so keep your eyes peeled!


Advertisement