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

Comments

ufku’s picture

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'}}
];
nchase’s picture

perfect :) thank you!

ufku’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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