Hi
We have changed the default target for the link dialog (CKEditor 4.X) to be _blank. We do it as follows:
CKEDITOR.on('dialogDefinition', function (ev) {
try {
// dialog name
var dialogName = ev.data.name;
var dialogDefinition = ev.data.definition;
if (dialogName == 'link') {
// tab
var infoTab = dialogDefinition.getContents('target');
// default-Wert setzen (Links per default in neuem Window)
var urlField = infoTab.get('linkTargetType');
urlField['default'] = '_blank';
}
}catch (e) {
alert('error ' + e.message);
}
});
See also: http://docs.ckeditor.com/#!/guide/dev_howtos_dialog_windows
This works fine as long as the link type is url. When the url value is email, the default value "_blank" is also rendered into the link, which makes the link unusable in all browsers that I have tested (IE, FF).
What can I do to make email (and anchors) work again? In my opinion it is a bug. I have tested this with the latest CKEditor version 4.2.1 (as well as 4.1). I haven't found a hint for an event where a can change this behaviour.
Thanks in advance for any answers
Anyone?
Can anybody help me?
I see 3 possible ways:
1. Maybe there are change events that are triggered when the dialog select control has changed (in this case the url type), and within that event I could adapt the default value. I don't see how I could do this
2. When the dialog is closed, I might have the chance to adapt the values
3. When the link is saved (rendered) I might be abled to change the html-output.
I haven't found any solution up to know :-(
I hope there is a solution for my problem.
Greetings