<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>edit</title>
<meta http-equiv="Content-Type" content="text/html;charset=gb2312" />
<meta name="keywords" content="XH.WebV7.0.0-Blog">
<meta http-equiv="pragma" content="no-cache">
<style>
Body {font-size:12px;margin:0px;font-family:宋体;height:100%}
.BodyTab {width:100%;border:1px #cccccc solid;height:100%}
.AllTab {border:0px;width:100%;height:100%}
#BodyFoot {padding:5px}
#BodyContent {border:1px #cccccc solid;height:100%;overflow:hidden}
.MenuLine {font-size:0px;width:2px;background:url(ico.gif) 0px -83px}
#BodyTop {height:56px;border-bottom:1px #cccccc solid;background:#F7F5F4}
#BodyTop td {height:50%}
#BodyTop div {float:left;overflow:hidden}
#BodyTop img {cursor:hand;border:0px;width:100%;height:100%}
.MSpanL {word-break:break-all;padding:3px 0px 0px 4px;width:42px;height:13px;float:left;overflow:hidden}
.MSpanR {margin-left:1px;width:14px;height:18px;float:left;overflow:hidden}
#DivNone {text-align:center;padding:3px;position:absolute;z-index:10;width:10px;height:10px;border:1px #2EA7FB solid;left:10px;top:52px;background:#ffffff;overflow:hidden}
#DivNone a {text-decoration:none;color:#666666;border:1px #9CD2FD solid}
#DivNone a:hover {text-decoration:none;color:#ff0000;background:#FFECEC;border:1px #FF7800 solid}
.button {color:#0D6598;width:80px;height:20px;background:url(ico.gif);border:0px}
.SizeDiv {word-break:break-all;cursor:default;line-height:17px;padding-left:2px;height:18px;text-align:left;overflow:hidden}
#FileText {padding-top:15px;height:30px}
.ColorGif {width:15px;height:15px;}
.ColorGifOn {width:15px;height:15px;background:url(ico.gif) -276px -26px}
.M1 {height:18px;border:1px #F7F5F4 solid}
.M1on {height:18px;border:1px #2EA7FB solid;background:#DDF0FF}
.M1down {height:17px;padding-top:1px;border:1px #0078FF solid;background:#CBE7FD}
.M2 {height:20px;background:url(ico.gif) -0px -0px}
.M2on {height:20px;background:url(ico.gif) -0px -20px}
.M2down {height:20px;background:url(ico.gif) -0px -40px}
.M3 {width:61px;margin-left:5px;letter-spacing:1px;color:#666666;padding:1px;height:19px;background:url(ico.gif) -0px -61px}
.M3on {width:61px;margin-left:5px;letter-spacing:1px;color:#666666;padding:1px;height:19px;background:url(ico.gif) -64px -61px}
.M3down {width:61px;margin-left:5px;letter-spacing:1px;color:#666666;padding:2px 1px 0px 1px;height:18px;background:url(ico.gif) -128px -61px}
.M4 {margin-left:1px;height:46px;border:1px #F7F5F4 solid}
.M4on {margin-left:1px;height:46px;border:1px #2EA7FB solid;background:#DDF0FF}
.M4down {margin-left:1px;height:45px;padding-top:1px;border:1px #0078FF solid;background:#CBE7FD}
.FaceOn {background:#2EA7FB}
</style>
<script type="text/javascript" language="javascript">
//表情图片所在路径 默认共135个 从0.gif - 134.gif,可自行修改
var FaceUrl = "images/face/";
//信纸图片所在路径,默认10张 从 1.jpg - 10.jpg,可自行修改
var BgUrl = "images/bg/"
function $(sID) {return document.getElementById(sID)}
var OnMenu=null;
var FullWin=0,OldWinW,OldWinH,OldWinBg;
function GetMenu(Num) {
HtmlEditor.focus();
var R = self['HtmlEditor'].document.selection.createRange().duplicate();
Ebody=E.document.getElementsByTagName("BODY")[0];
var _Text=R.htmlText;
switch (Num) {
case 1: E.document.execCommand("Bold");break;
case 2: E.document.execCommand("Italic");break;
case 3: E.document.execCommand("Underline");break;
case 6: var _Text=RemoveHTML(_Text);
_Text=window.prompt('请先输入要加入发光效果的文字:',_Text);
if (_Text!=null) R.pasteHTML("<span class='ShowText'>"+_Text+"</span>");
break;
case 7: E.document.execCommand('CreateLink',true,'true')
break;
case 8: if(_Text!='') {
var _CText=RemoveHTML(_Text);
Ebody.innerHTML=Ebody.innerHTML.replace(_Text,_CText);
}else{
if(confirm('没有选择清除对象,是要清除全部格式,仅保留基本文字?')){
Ebody.innerText=Ebody.innerText
}
}
break;
case 12: E.document.execCommand('Justifyleft');break;
case 13: E.document.execCommand('Justifycenter');break;
case 14: E.document.execCommand('Justifyright');break;
case 15: E.document.execCommand('justifyfull');break;
//调试
case 22: var _Obj=parent.document.getElementById("ContentWin");
if(FullWin==0){
FullWin=1;
OldWinW=_Obj.style.width;
OldWinH=_Obj.style.height;
OldWinBg=_Obj.style.background;
_Obj.style.position="absolute"
_Obj.style.background="#ffffff";
_Obj.style.zIndex=9999;
_Obj.style.width="100%";
_Obj.style.height="100%";
_Obj.style.left="0px";
_Obj.style.top="0px";
$("FullWinImg").style.background='url(ico.gif) -157px -143px';
}else{
FullWin=0;
_Obj.style.position="";
_Obj.style.width=OldWinW;
_Obj.style.height=OldWinH;
_Obj.style.background=OldWinBg;
$("FullWinImg").style.background='url(ico.gif) -109px -143px';
}
$("BodyFoot").style.height=(document.documentElement.clientHeight-71)+"px";
break;
}
}
//插入
var ColorSNum=0,xh_bgvalue="";
function InfoHtml(Value,Types,Text) {
HtmlEditor.focus();
var R = self['HtmlEditor'].document.selection.createRange().duplicate();
switch (Types) {
case "img":
R.pasteHTML("<img src='"+Value+"'>");
break;
case "textcolor":
if(ColorSNum==0) {E.document.execCommand('ForeColor',false,Value)}else{E.document.execCommand('BackColor',false,Value)}
break;
case "fontsize":
$("S26_T").innerHTML=Text;
E.document.execCommand('fontsize',false,Value);
break;
case "FontName":
$("S25_T").innerHTML=Text;
document.execCommand('FontName',false,Value)
break;
case "Bg":
$("S24_T").innerHTML=Text;
if(Value==0) {
xh_bgvalue="";
E.document.body.style.background="";
}else{
xh_bgvalue=Value;
E.document.body.style.background="url("+Value+")";
}
break;
}
MenuType(0);
return false
}
//清除HTML
function RemoveHTML(strText){
var regEx = /<[^>]*>/g;
return strText.replace(regEx, "");
}
var FileName,FileAlign=null;
function InfoFile(TypeName){
if (TypeName==0) {
var Value=$("FileUrl").value;
if (Value==""||Value=="http://") {$("FileText").innerHTML="<font color=red>请输入文件路径!</font>";return;}
HtmlEditor.focus();
var R = self['HtmlEditor'].document.selection.createRange();
var _Content;
if (FileName=="图片"){
_Content="<img src='"+Value+"'>";
if(FileAlign=="center"){_Content="<p align='"+FileAlign+"'><img src='"+Value+"'></p>"}else if(FileAlign!=null){_Content="<img src='"+Value+"' align='"+FileAlign+"'>"}
}else{
_Content=InfoFile(2);
if(FileAlign!==null){_Content="<p align='"+FileAlign+"'>"+_Content+"</p>"}
}
R.pasteHTML(_Content);
$("FileView").innerHTML="";
MenuType(0);
return
}
if (TypeName==1) {
var Value=$("FileUrl").value;
if (Value==""||Value=="http://") {$("FileText").innerHTML="<font color=red>请输入文件路径!</font>";return;}
switch (FileName){
case "图片": $("FileView").innerHTML="<img src='"+Value+"' onerror=\"$('FileView').innerHTML='<p><br><br><font color=red>图片地址错误</font></p>'\">";break;
case "FLASH动画": $("FileView").innerHTML=InfoFile(2);break;
case "MP3/WMA音乐": $("FileView").innerHTML=InfoFile(2);break;
case "WMV视频": $("FileView").innerHTML=InfoFile(2);break;
}
return
}
if (TypeName==2) {
var Value=$("FileUrl").value,_ObjHtml;
switch (FileName){
case "FLASH动画": _ObjHtml="<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' width='195' height='205'><param name='movie' value='"+Value+"'><param name='quality' value='high'><param name='menu' value='false'><param name='wmode' value='transparent'><embed src='"+Value+"' width='195' height='205' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' menu='false' wmode='transparent'></embed></o
- 1
- 2
前往页