mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-27 14:22:54 +09:00
1) 이미지 설정시 img 태그의 align, border 속성 대신 inline style을 사용하도록 함(#465)
2) align_left의 잘못된 그림 바로잡음 git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4161 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
602bbe80e8
commit
d32060a57c
2 changed files with 16 additions and 7 deletions
Binary file not shown.
|
Before Width: | Height: | Size: 379 B After Width: | Height: | Size: 359 B |
|
|
@ -21,8 +21,12 @@ function getImage() {
|
|||
return;
|
||||
}
|
||||
var src = node.getAttribute("src");
|
||||
var border = node.getAttribute("border");
|
||||
var align = node.getAttribute("align");
|
||||
var border = node.style.borderWidth ?
|
||||
node.style.borderWidth.match("[0-9]+") : node.getAttribute("border");
|
||||
var align = node.style.cssFloat ?
|
||||
node.style.cssFloat : node.style.styleFloat;
|
||||
if(!align) align = node.style.verticalAlign?
|
||||
node.style.verticalAlign : node.getAttribute("align");
|
||||
var alt = node.getAttribute("alt");
|
||||
var width = xWidth(node);
|
||||
var height = xHeight(node);
|
||||
|
|
@ -79,9 +83,9 @@ function insertImage(obj) {
|
|||
var alt = xGetElementById("image_alt").value;
|
||||
var align = "";
|
||||
if(xGetElementById("align_normal").checked==true) align = "";
|
||||
else if(xGetElementById("align_left").checked==true) align = "left";
|
||||
else if(xGetElementById("align_middle").checked==true) align = "middle";
|
||||
else if(xGetElementById("align_right").checked==true) align = "right";
|
||||
else if(xGetElementById("align_left").checked==true) align = "float: left";
|
||||
else if(xGetElementById("align_middle").checked==true) align = "vertical-align: middle";
|
||||
else if(xGetElementById("align_right").checked==true) align = "float: right";
|
||||
var border = parseInt(xGetElementById("image_border").value,10);
|
||||
|
||||
var width = xGetElementById("width").value;
|
||||
|
|
@ -93,13 +97,18 @@ function insertImage(obj) {
|
|||
}
|
||||
|
||||
url = url.replace(request_uri,'');
|
||||
var text = "<img editor_component=\"image_link\" src=\""+url+"\" border=\""+border+"\" ";
|
||||
var text = "<img editor_component=\"image_link\" src=\""+url+"\" ";
|
||||
if(alt) text+= " alt=\""+alt+"\"";
|
||||
if(width) text+= " width=\""+width+"\" ";
|
||||
if(height) text+= " height=\""+height+"\" ";
|
||||
if(link_url) text+= " link_url=\""+link_url+"\" ";
|
||||
if(open_window=='Y') text+= " open_window=\"Y\" ";
|
||||
if(align) text+= " align=\""+align+"\" ";
|
||||
if(align || border){
|
||||
text+= " style=\"";
|
||||
if(align) text+= align+"; ";
|
||||
if(border) text+= "border: solid "+border+"px; ";
|
||||
text+= "\" ";
|
||||
}
|
||||
text+= " />";
|
||||
|
||||
opener.editorFocus(opener.editorPrevSrl);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue