mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-30 08:39:58 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@529 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
9d2d89c569
commit
e9bf219b7c
5 changed files with 195 additions and 0 deletions
30
modules/editor/components/multimedia_link/tpl/popup.js
Normal file
30
modules/editor/components/multimedia_link/tpl/popup.js
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
function insertImage(obj) {
|
||||
if(typeof(opener)=="undefined") return;
|
||||
|
||||
var url = xGetElementById("image_url").value;
|
||||
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";
|
||||
|
||||
if(!url) {
|
||||
window.close();
|
||||
return;
|
||||
}
|
||||
|
||||
var text = "<img src=\""+url+"\" border=\"0\"";
|
||||
if(alt) text+= " alt=\""+alt+"\"";
|
||||
if(align) text+= " align=\""+align+"\" ";
|
||||
text+= " />";
|
||||
|
||||
opener.editorFocus(opener.editorPrevSrl);
|
||||
|
||||
var iframe_obj = opener.editorGetIFrame(opener.editorPrevSrl)
|
||||
|
||||
opener.editorReplaceHTML(iframe_obj, text);
|
||||
opener.editorFocus(opener.editorPrevSrl);
|
||||
|
||||
window.close();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue