mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-27 23:29:57 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@541 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
318b5f1f56
commit
87a8bc09ca
3 changed files with 76 additions and 22 deletions
|
|
@ -1,3 +1,37 @@
|
|||
/**
|
||||
* popup으로 열렸을 경우 부모창의 위지윅에디터에 select된 이미지가 있는지 체크하여
|
||||
* 있으면 가져와서 원하는 곳에 삽입
|
||||
**/
|
||||
function getImage() {
|
||||
// 부모 위지윅 에디터에서 선택된 영역이 있는지 확인
|
||||
if(typeof(opener)=="undefined") return;
|
||||
|
||||
var node = opener.editorPrevNode;
|
||||
if(!node || node.nodeName != "IMG") return;
|
||||
var src = node.getAttribute("src");
|
||||
var border = node.getAttribute("border");
|
||||
var align = node.getAttribute("align");
|
||||
var alt = node.getAttribute("alt");
|
||||
var width = node.getAttribute("width");
|
||||
var height = node.getAttribute("height");
|
||||
|
||||
xGetElementById("image_url").value = src;
|
||||
xGetElementById("image_alt").value = alt;
|
||||
|
||||
switch(align) {
|
||||
case 'left' : xGetElementById("align_left").checked = true; break;
|
||||
case 'middle' : xGetElementById("align_middle").checked = true; break;
|
||||
case 'right' : xGetElementById("align_right").checked = true; break;
|
||||
default : xGetElementById("align_normal").checked = true; break;
|
||||
}
|
||||
|
||||
xGetElementById("image_border").value = border;
|
||||
|
||||
xGetElementById("width").value = width;
|
||||
xGetElementById("height").value = height;
|
||||
|
||||
}
|
||||
|
||||
function getImageScale() {
|
||||
var url = xGetElementById("image_url").value;
|
||||
if(!url) return;
|
||||
|
|
@ -45,3 +79,5 @@ function insertImage(obj) {
|
|||
|
||||
window.close();
|
||||
}
|
||||
|
||||
xAddEventListener(window, "load", getImage);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue