'
//url
'
'
''
'
'
//type
'
'
''
''
'
'
'
',
dialog = self.createdialog({
name : name,
width : 450,
title : self.lang(name),
body : html,
yesbtn : {
name : self.lang('yes'),
click : function(e) {
var url = k.trim(urlbox.val());
if (url == 'http://' || k.invalid) {
alert(self.lang('invalidurl'));
urlbox[0].focus();
return;
}
self.exec('createlink', url, typebox.val()).hidedialog().focus();
}
}
}),
div = dialog.div,
urlbox = k('input[name="url"]', div),
typebox = k('select[name="type"]', div);
urlbox.val('http://');
typebox[0].options[0] = new option(lang.newwindow, '_blank');
typebox[0].options[1] = new option(lang.selfwindow, '');
self.cmd.selection();
var a = self.plugin.getselectedlink();
if (a) {
self.cmd.range.selectnode(a[0]);
self.cmd.select();
urlbox.val(a.attr('data-ke-src'));
typebox.val(a.attr('target'));
}
urlbox[0].focus();
urlbox[0].select();
},
'delete' : function() {
self.exec('unlink', null);
}
};
self.clicktoolbar(name, self.plugin.link.edit);
});