InsertQuote.html
2.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>引用</title>
<head>
</head>
<body>
<script src="../common/fck_dialog_common.js" type="text/javascript"></script>
<script type="text/javascript">
var dialog = window.parent ;
var oEditor = dialog.InnerDialogLoaded() ;
var dialogArguments = dialog.Args() ;
// Gets the document DOM
var oDOM = oEditor.FCK.EditorDocument ;
window.onload = function(){
dialog.SetOkButton( true ) ;
dialog.SetAutoSize( true ) ;
}
function Ok(){
var bordercolor=document.insertpic.bordercolor.value;
var bgcolor=document.insertpic.bgcolor.value;
var codetext=" ";
var imgstr="";
imgstr="<table border=0 width='100%' cellspacing=1 cellpadding=10 bgcolor='"+bgcolor+"'><tr><td width='100%' bgcolor='"+bordercolor+"' style='word-break:break-all;line-height:18px'>"+codetext+"</td></tr></table>";
oEditor.FCKUndo.SaveUndoStep();
oEditor.FCK.InsertHtml(imgstr);
window.parent.Cancel();
}
//格式化html
function RepHtml(str)
{
str=str.replace("<","<");
str=str.replace(">",">");
str=str.replace("&","&");
str=str.replace("\"",""");
str=str.replace("\n","<br>");
str=str.replace(" "," ");
return str;
}
function foreColor(formobj)
{
if (!Error()) return;
var arr = showModalDialog("selcolor.html", "", "dialogWidth:18.5em; dialogHeight:17.5em; status:0");
if (arr != null) {
if(formobj==0){
document.insertpic.bgcolor.value=arr;
}
else{
document.insertpic.bordercolor.value=arr;
}
}
else {
if(formobj==0){
document.insertpic.bgcolor.focus();
}
else{
document.insertpic.bordercolor.focus();
}
}
}
</script>
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1">
<form name="insertpic" method="post" action="">
<tr>
<td height="25"> <div align="left">背景顏色:
<input name="bordercolor" type=text id="bordercolor" value="#DDEDFB" size="8">
<a onclick="foreColor(1);"><img src="images/color.gif" width="21" height="21" align="absbottom"></a></div></td>
</tr>
<tr>
<td height="25"> 邊框顏色:
<input name="bgcolor" type=text id="bgcolor" value="#0099CC" size="8">
<a onclick="foreColor(0);"><img src="images/color.gif" width="21" height="21" align="absbottom"></a></td>
</tr>
</form>
</table>
</body>
</html>