how to open a link in new tab

snicers - October 30, 2009 - 09:45
Project:BUEditor
Version:6.x-1.4
Component:Documentation
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

Hi there, thanks for this tiny but powerful editor! I'm trying to get the link button to open links in a new tab automatically. I'm wondering where to add target="_blank" ?? thanks

#1

ufku - October 30, 2009 - 13:28

You can add target attribute to the link form.

This will add it as a selectbox which can be extended to include other options

var form = [
{name: 'href', title: 'Link URL'},
{name: 'html', title: 'Link text'},
{name: 'title', title: 'Link title'},
{name: 'target', 'title': 'Open in', type: 'select', options: {'_blank': 'New window'}}
];

And this will add it as a hidden value

var form = [
{name: 'href', title: 'Link URL'},
{name: 'html', title: 'Link text'},
{name: 'title', title: 'Link title'},
{name: 'target', 'title': '', value: '_blank', attributes: {type: 'hidden'}}
];

#2

snicers - November 2, 2009 - 19:39

perfect :) thank you!

#3

ufku - November 3, 2009 - 22:33
Status:active» fixed

#4

System Message - November 17, 2009 - 22:40
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.