View Full Version : WYSIWYG link target

10-17-2011, 01:22 PM
1) Script Title: openWYSIWYG 1.01 beta (Rich textarea replacement)

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex16/openwysiwyg/index.htm

3) Describe problem:


I'm playing around with this great WYSIWYG script for my textareas.
I wanna make the links target to "_blank" instead of the current, default "_self".

I simply can't find a place to ad the "_blank" line.

Any ideas??

10-18-2011, 12:21 AM
The script doesn't have an option for this. And I can't find where you would edit it in the code. You need to track down where the links are inserted and change the code. Do you need this enough that you will want to modify the script?
And you will also need to add a new interface to the link edit window if you want to have individual control over the links. If not, you could hard-code that into the Javascript to always be _blank.

Alternatively if you are storing this information somewhere (such as a database) you could use a serverside language to go through and change each link either when storing the text or when you load it into a page.

You can also potentially edit the page on which you will display the HTML by setting all links to open in a new window (such as through Javascript, or maybe a meta tag that sets a default target-- not sure if that exists, though it does for a link's base path).