1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
4 <html xmlns="http://www.w3.org/1999/xhtml">
5 <head>
6 <title>火输文本编辑器 - 颜色板</title>
7 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
8 <script type="text/javascript">
9 function selectColor(color)
10 {
11 var command = parent.document.getElementById("colorpalette").getAttribute("command");
12 parent.document.getElementById("fireinputEditor").contentDocument.execCommand(command, false, color);
13 parent.document.getElementById("colorpalette").style.display="none";
14 parent.document.getElementById("fireinputEditor").contentWindow.focus();
15 }
16
17 function InitColorPalette()
18 {
19 var x;
20 if (document.getElementsByTagName)
21 x = document.getElementsByTagName('TD');
22 else if (document.all)
23 x = document.all.tags('TD');
24 for (var i=0;i<x.length;i++)
25 {
26 x[i].onmouseover = over;
27 x[i].onmouseout = out;
28 x[i].onclick = click;
29 }
30 }
31
32 function over()
33 {
34 if(this.id == "#FFFFFF")
35 this.style.border='2px dotted black';
36 else
37 this.style.border='2px dotted white';
38
39 document.getElementById("colorid").innerHTML = this.id;
40 }
41
42 function out()
43 {
44 this.style.border='1px solid gray';
45 }
46
47 function click()
48 {
49 selectColor(this.id);
50 }
51 </script>
52 </head>
53 <body bgcolor="white" onLoad="InitColorPalette()">
54 <TABLE border="1" cellpadding="1" cellspacing="1">
55 <TR>
56 <TD id="#FFFFFF" bgcolor="#FFFFFF" width="20" height="20"><img width="1" height="1"></TD>
57 <TD id="#FFCCCC" bgcolor="#FFCCCC" width="20" height="20"><img width="1" height="1"></TD>
58 <TD id="#FFCC99" bgcolor="#FFCC99" width="20" height="20"><img width="1" height="1"></TD>
59 <TD id="#FFFF99" bgcolor="#FFFF99" width="20" height="20"><img width="1" height="1"></TD>
60 <TD id="#FFFFCC" bgcolor="#FFFFCC" width="20" height="20"><img width="1" height="1"></TD>
61 <TD id="#99FF99" bgcolor="#99FF99" width="20" height="20"><img width="1" height="1"></TD>
62 <TD id="#99FFFF" bgcolor="#99FFFF" width="20" height="20"><img width="1" height="1"></TD>
63
64 <TD id="#CCFFFF" bgcolor="#CCFFFF" width="20" height="20"><img width="1" height="1"></TD>
65 <TD id="#CCCCFF" bgcolor="#CCCCFF" width="20" height="20"><img width="1" height="1"></TD>
66 <TD id="#FFCCFF" bgcolor="#FFCCFF" width="20" height="20"><img width="1" height="1"></TD>
67 </TR>
68 <TR>
69 <TD id="#CCCCCC" bgcolor="#CCCCCC" width="20" height="20"><img width="1" height="1"></TD>
70 <TD id="#FF6666" bgcolor="#FF6666" width="20" height="20"><img width="1" height="1"></TD>
71 <TD id="#FF9966" bgcolor="#FF9966" width="20" height="20"><img width="1" height="1"></TD>
72 <TD id="#FFFF66" bgcolor="#FFFF66" width="20" height="20"><img width="1" height="1"></TD>
73 <TD id="#FFFF33" bgcolor="#FFFF33" width="20" height="20"><img width="1" height="1"></TD>
74 <TD id="#66FF99" bgcolor="#66FF99" width="20" height="20"><img width="1" height="1"></TD>
75 <TD id="#33FFFF" bgcolor="#33FFFF" width="20" height="20"><img width="1" height="1"></TD>
76 <TD id="#66FFFF" bgcolor="#66FFFF" width="20" height="20"><img width="1" height="1"></TD>
77 <TD id="#9999FF" bgcolor="#9999FF" width="20" height="20"><img width="1" height="1"></TD>
78 <TD id="#FF99FF" bgcolor="#FF99FF" width="20" height="20"><img width="1" height="1"></TD>
79 </TR>
80 <TR>
81
82 <TD id="#C0C0C0" bgcolor="#C0C0C0" width="20" height="20"><img width="1" height="1"></TD>
83 <TD id="#FF0000" bgcolor="#FF0000" width="20" height="20"><img width="1" height="1"></TD>
84 <TD id="#FF9900" bgcolor="#FF9900" width="20" height="20"><img width="1" height="1"></TD>
85 <TD id="#FFCC66" bgcolor="#FFCC66" width="20" height="20"><img width="1" height="1"></TD>
86 <TD id="#FFFF00" bgcolor="#FFFF00" width="20" height="20"><img width="1" height="1"></TD>
87 <TD id="#33FF33" bgcolor="#33FF33" width="20" height="20"><img width="1" height="1"></TD>
88 <TD id="#66CCCC" bgcolor="#66CCCC" width="20" height="20"><img width="1" height="1"></TD>
89 <TD id="#33CCFF" bgcolor="#33CCFF" width="20" height="20"><img width="1" height="1"></TD>
90 <TD id="#6666CC" bgcolor="#6666CC" width="20" height="20"><img width="1" height="1"></TD>
91 <TD id="#CC66CC" bgcolor="#CC66CC" width="20" height="20"><img width="1" height="1"></TD>
92 </TR>
93 <TR>
94 <TD id="#999999" bgcolor="#999999" width="20" height="20"><img width="1" height="1"></TD>
95 <TD id="#CC0000" bgcolor="#CC0000" width="20" height="20"><img width="1" height="1"></TD>
96 <TD id="#FF6600" bgcolor="#FF6600" width="20" height="20"><img width="1" height="1"></TD>
97 <TD id="#FFCC33" bgcolor="#FFCC33" width="20" height="20"><img width="1" height="1"></TD>
98 <TD id="#FFCC00" bgcolor="#FFCC00" width="20" height="20"><img width="1" height="1"></TD>
99
100 <TD id="#33CC00" bgcolor="#33CC00" width="20" height="20"><img width="1" height="1"></TD>
101 <TD id="#00CCCC" bgcolor="#00CCCC" width="20" height="20"><img width="1" height="1"></TD>
102 <TD id="#3366FF" bgcolor="#3366FF" width="20" height="20"><img width="1" height="1"></TD>
103 <TD id="#6633FF" bgcolor="#6633FF" width="20" height="20"><img width="1" height="1"></TD>
104 <TD id="#CC33CC" bgcolor="#CC33CC" width="20" height="20"><img width="1" height="1"></TD>
105 </TR>
106 <TR>
107 <TD id="#666666" bgcolor="#666666" width="20" height="20"><img width="1" height="1"></TD>
108 <TD id="#990000" bgcolor="#990000" width="20" height="20"><img width="1" height="1"></TD>
109 <TD id="#CC6600" bgcolor="#CC6600" width="20" height="20"><img width="1" height="1"></TD>
110 <TD id="#CC9933" bgcolor="#CC9933" width="20" height="20"><img width="1" height="1"></TD>
111 <TD id="#999900" bgcolor="#999900" width="20" height="20"><img width="1" height="1"></TD>
112 <TD id="#009900" bgcolor="#009900" width="20" height="20"><img width="1" height="1"></TD>
113 <TD id="#339999" bgcolor="#339999" width="20" height="20"><img width="1" height="1"></TD>
114 <TD id="#3333FF" bgcolor="#3333FF" width="20" height="20"><img width="1" height="1"></TD>
115 <TD id="#6600CC" bgcolor="#6600CC" width="20" height="20"><img width="1" height="1"></TD>
116 <TD id="#993399" bgcolor="#993399" width="20" height="20"><img width="1" height="1"></TD>
117
118 </TR>
119 <TR>
120 <TD id="#333333" bgcolor="#333333" width="20" height="20"><img width="1" height="1"></TD>
121 <TD id="#660000" bgcolor="#660000" width="20" height="20"><img width="1" height="1"></TD>
122 <TD id="#993300" bgcolor="#993300" width="20" height="20"><img width="1" height="1"></TD>
123 <TD id="#996633" bgcolor="#996633" width="20" height="20"><img width="1" height="1"></TD>
124 <TD id="#666600" bgcolor="#666600" width="20" height="20"><img width="1" height="1"></TD>
125 <TD id="#006600" bgcolor="#006600" width="20" height="20"><img width="1" height="1"></TD>
126 <TD id="#336666" bgcolor="#336666" width="20" height="20"><img width="1" height="1"></TD>
127 <TD id="#000099" bgcolor="#000099" width="20" height="20"><img width="1" height="1"></TD>
128 <TD id="#333399" bgcolor="#333399" width="20" height="20"><img width="1" height="1"></TD>
129 <TD id="#663366" bgcolor="#663366" width="20" height="20"><img width="1" height="1"></TD>
130 </TR>
131 <tr>
132 <TD id="#000000" bgcolor="#000000" width="20" height="20"><img width="1" height="1"></TD>
133 <TD id="#330000" bgcolor="#330000" width="20" height="20"><img width="1" height="1"></TD>
134 <TD id="#663300" bgcolor="#663300" width="20" height="20"><img width="1" height="1"></TD>
135
136 <TD id="#663333" bgcolor="#663333" width="20" height="20"><img width="1" height="1"></TD>
137 <TD id="#333300" bgcolor="#333300" width="20" height="20"><img width="1" height="1"></TD>
138 <TD id="#003300" bgcolor="#003300" width="20" height="20"><img width="1" height="1"></TD>
139 <TD id="#003333" bgcolor="#003333" width="20" height="20"><img width="1" height="1"></TD>
140 <TD id="#000066" bgcolor="#000066" width="20" height="20"><img width="1" height="1"></TD>
141 <TD id="#330099" bgcolor="#330099" width="20" height="20"><img width="1" height="1"></TD>
142 <TD id="#330033" bgcolor="#330033" width="20" height="20"><img width="1" height="1"></TD>
143 </tr>
144 </TABLE>
145 <div id="colorid" style="height:10px; margin: 5px 0px;"></div>
146 </BODY>
147 </HTML>
syntax highlighted by Code2HTML, v. 0.9.1