mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-25 22:29:55 +09:00
22 lines
720 B
JavaScript
22 lines
720 B
JavaScript
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);
|