mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-29 08:09:58 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@508 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
601849c669
commit
b0dbe0efa7
5 changed files with 50 additions and 59 deletions
|
|
@ -1,22 +1,35 @@
|
|||
function setText() {
|
||||
/**
|
||||
* popup으로 열렸을 경우 부모창의 위지윅에디터에 select된 block이 있는지 체크하여
|
||||
* 있으면 가져와서 원하는 곳에 삽입
|
||||
**/
|
||||
function getText() {
|
||||
if(typeof(opener)=="undefined") return;
|
||||
var text = opener.editorGetSelectedHtml(opener.editorPrevSrl);
|
||||
var fo_obj = xGetElementById("fo");
|
||||
var fo_obj = xGetElementById("fo_component");
|
||||
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");
|
||||
/**
|
||||
* 부모창의 위지윅에디터에 데이터를 삽입
|
||||
**/
|
||||
function setText() {
|
||||
if(typeof(opener)=="undefined") return;
|
||||
|
||||
var fo_obj = xGetElementById("fo_component");
|
||||
|
||||
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);
|
||||
|
||||
var link = text;
|
||||
if(url) link = "<a href=\""+url+"\" target=\"_blank\">"+text+"</a>";
|
||||
|
||||
var iframe_obj = opener.editorGetIFrame(opener.editorPrevSrl)
|
||||
opener.editorReplaceHTML(iframe_obj, link);
|
||||
|
||||
opener.focus();
|
||||
self.close();
|
||||
}
|
||||
xAddEventListener(window, "load", setText);
|
||||
|
||||
xAddEventListener(window, "load", getText);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue