git-svn-id: http://xe-core.googlecode.com/svn/trunk@507 201d5d3c-b55e-5fd7-737f-ddc643e51545

This commit is contained in:
zero 2007-03-16 08:36:59 +00:00
parent f7d06aa737
commit 601849c669

View file

@ -0,0 +1,22 @@
function setText() {
if(typeof(opener)=="undefined") return;
var text = opener.editorGetSelectedHtml(opener.editorPrevSrl);
var fo_obj = xGetElementById("fo");
if(fo_obj.text.value) return;
fo_obj.text.value = text;
self.focus();
}
function insertUrl() {
if(typeof(opener)=="undefined") return;
var fo_obj = xGetElementById("fo");
var text = fo_obj.text.value;
var url = fo_obj.url.value;
var link_type = fo_obj.link_type.options[fo_obj.link_type.selectedIndex].value;
if(fo_obj.bold.checked) link_type = "bold "+link_type;
if(text && url) opener.editorInsertUrl(text, url, link_type);
opener.focus();
self.close();
}
xAddEventListener(window, "load", setText);