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 |
Jump to:
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
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
perfect :) thank you!
#3
#4
Automatically closed -- issue fixed for 2 weeks with no activity.