mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-28 07:39:55 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@507 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
f7d06aa737
commit
601849c669
1 changed files with 22 additions and 0 deletions
22
modules/editor/components/urllink/tpl/urllink.js
Normal file
22
modules/editor/components/urllink/tpl/urllink.js
Normal 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);
|
||||
Loading…
Add table
Add a link
Reference in a new issue