Forum closed. New forum available at http://community.wymeditor.org/

Target = _blank / New Window ?

Support forum for WYMeditor.

Target = _blank / New Window ?

Postby lupker on Tue Jun 02, 2009 3:18 pm

Hi all,

Love this editor, because it is just so very basic and the code is clean. Very nice.

Because I am no programmer, I would like to ask your help to add an extra field to the dialog windows Link and Image.
This field contains a radio button with "show in a new window". That's it... Can anyone help with this?

Second question: how to you style the dialog windows in css ?

Again: nice work !!!

Gr,
Mark
lupker
 
Posts: 2
Joined: Tue Jun 02, 2009 3:09 pm

Re: Target = _blank / New Window ?

Postby mr_lundis on Wed Jun 03, 2009 6:26 pm

Hi Mark, and welcome to the WYMeditor forum!

First question:
The target attribute isn't included in the (X)HTML Strict specification, as it's considered a frame feature. Therefore there's no option for this in WYMeditor either. Besides a lot of people find it annoying when links open in an new window/tab without them choosing so.

I'd encourage you not to force links to open in new windows/tabs as it's a bad practice anyway, but If you really need to open links in new windows there are ways to do do. The most common approach is to use JavaScript so make links with a special attribute or class open in a new widow.

Second question:
Take a look at the skin.css-file (wymeditor/skins/<skin name>/skin.css).

Cheers! ;)
Jonatan Lundin - designer, developer and forum moderator. You should follow me on Twitter!
mr_lundis
 
Posts: 335
Joined: Sun Dec 02, 2007 10:59 am
Location: Sweden

Re: Target = _blank / New Window ?

Postby lupker on Thu Jun 04, 2009 1:09 am

Hi mr Lundis,

Thanks for your reply. You are right the target element isn't xhtml strict. Although I my case, the editor is used for a profile website.
So all links inside the users profile should go to a new window. Guess I would go for the javascript with the special attributre. Any help with this would be appreaciated !

A the skin.css, i will give it a better look ;-)

Thanks again and good luck with this great piece of software !

Gr,
Mark
lupker
 
Posts: 2
Joined: Tue Jun 02, 2009 3:09 pm

Re: Target = _blank / New Window ?

Postby mr_lundis on Thu Jun 04, 2009 8:52 am

Hi!

Here is one possible solution:
http://www.sitepoint.com/article/standa ... t-world/3/

Or using jQuery:
Code: Select all
$("a[rel='external']").click(function(){this.target = "_blank";});


Both of these requires you to add rel="external" to the links you want to open in a new window.
Jonatan Lundin - designer, developer and forum moderator. You should follow me on Twitter!
mr_lundis
 
Posts: 335
Joined: Sun Dec 02, 2007 10:59 am
Location: Sweden

Re: Target = _blank / New Window ?

Postby BillyRayPreachersSon on Sat Aug 21, 2010 1:01 pm

I've posted a new thread here with details of how to add this as an option in WYMeditor v0.5 RC 2.

Dan
BillyRayPreachersSon
 
Posts: 3
Joined: Sat Aug 21, 2010 12:38 pm

Re: Target = _blank / New Window ?

Postby Nicole34 on Tue Sep 14, 2010 1:34 am

Thanks for the details...
It is very appreciated.
Godspeed..make money online
Nicole34
 
Posts: 1
Joined: Tue Sep 14, 2010 1:27 am


Return to Support

Who is online

Users browsing this forum: No registered users and 3 guests