⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 editor.asp

📁 依蓝旅游网站管理系统Elan2008.SP2
💻 ASP
📖 第 1 页 / 共 5 页
字号:
            Response.Write "  <option value=""Courier New"">Courier New</option>"
            Response.Write "  <option value=""MS Sans Serif"">MS Sans Serif</option>"
            Response.Write "  <option value=""Script"">Script</option>"
            Response.Write "  <option value=""System"">System</option>"
            Response.Write "  <option value=""Times New Roman"">Times New Roman</option>"
            Response.Write "  <option value=""Verdana"">Verdana</option>"
            Response.Write "  <option value=""WideLatin"">Wide Latin</option>"
            Response.Write "  <option value=""Wingdings"">Wingdings</option>"
            Response.Write "</select>"
        Case "TBGen3"
            Response.Write "<select id=""FontSize"" class=""TBGen"" onchange=""format('fontsize',this[this.selectedIndex].value);this.selectedIndex=0"">"
            Response.Write "  <option selected>字号</option>"
            Response.Write "  <option value=""7"">一号</option>"
            Response.Write "  <option value=""6"">二号</option>"
            Response.Write "  <option value=""5"">三号</option>"
            Response.Write "  <option value=""4"">四号</option>"
            Response.Write "  <option value=""3"">五号</option>"
            Response.Write "  <option value=""2"">六号</option>"
            Response.Write "  <option value=""1"">七号</option>"
            Response.Write "</select>"
        End Select
    End If
Next

Response.Write "</td></tr>"
Response.Write "  <tr>"
Response.Write "   <td valign='top' height='100%'>"
Response.Write "     <table border=0 cellpadding=0 cellspacing=0 width='100%' height='100%'>"
Response.Write "     <tr><td height='100%'>"
Response.Write "       <iframe style='font-size:12px' ID='HtmlEdit'  MARGINHEIGHT='0' MARGINWIDTH='0' style='width=100%; height=100%;' scrolling='yes' frameborder=1></iframe>"
Response.Write "     </td></tr>"
Response.Write "     </table>"
Response.Write "   </td>"
Response.Write "  </tr>"
Response.Write "  <tr>"
Response.Write "   <td height='20' aling='left'>"

Response.Write "   <div style='padding:1px;border:1px solid #eeeeee;'>"
Response.Write "     <table border='0' cellpadding='0' width='99%' cellspacing='0'  height='20' align='center'>"
Response.Write "      <tr>"

'If ShowType <> 1 Then
    Response.Write "       <td width='265' >"
    Response.Write "         <div style='float:left;padding-right:1px;'><img id=setMode0 src='Editor/images/Editor2.gif' width='55' height='24' border=0 onclick=""setMode('EDIT')""></div>"
    Response.Write "         <div style='float:left;padding-right:1px;'><img id=setMode1 src='Editor/images/html.gif' width='55' height='24'border=0 onclick=""setMode('CODE')""></div>"
    Response.Write "         <div style='float:left;padding-right:1px;'><img id=setMode2 src='Editor/images/browse.gif' width='55' height='24'border=0 onclick=""setMode('VIEW')""></div>"
    Response.Write "         <div style='float:left;padding-right:1px;'><img id=setMode3 src='Editor/images/text.gif' width='55' height='24'border=0 onclick=""setMode('TEXT')""></div>"
    Response.Write "       </td>" 
    Response.Write "       <td width='20' align='left'>"
    Response.Write "       <select name='Zoomname' id='doZoomid' onchange='doZoom(this[this.selectedIndex].value)'>"
    Response.Write "         <option value='10'>10%</option>"
    Response.Write "         <option value='25'>25%</option>"
    Response.Write "         <option value='50'>50%</option>"
    Response.Write "         <option value='75'>75%</option>"
    Response.Write "         <option value='100' selected>100%</option>"
    Response.Write "         <option value='150'>150%</option>"
    Response.Write "         <option value='200'>200%</option>"
    Response.Write "         <option value='500'>500%</option>"
    Response.Write "       </select>"
    Response.Write "       </td>"
'End If
Response.Write "       <td valign='top' align='right'>"
Response.Write "         <img  src='Editor/images/sizeplus.gif' width='20' height='20' style='cursor:hand;' onclick='sizeChange(200)'>"
Response.Write "         <img  src='Editor/images/sizeminus.gif' width='20' height='20' style='cursor:hand;' onclick='sizeChange(-200)'>"
Response.Write "       </td>"
Response.Write "       <td width='30'></td>"
Response.Write "     </tr>"
Response.Write "     </table>"
Response.Write "   </div>"


Response.Write "        <div id='HtmlEdit_Temp_HTML' style='VISIBILITY: hidden; OVERFLOW: hidden; POSITION: absolute; WIDTH: 1px; HEIGHT: 1px'></div>"
Response.Write "       </td>"
Response.Write "      </tr>"
Response.Write "      <input type='hidden' ID='ContentEdit' value=''>"
Response.Write "      <input type='hidden' ID='ModeEdit' value=''>"
Response.Write "      <input type='hidden' ID='ContentLoad' value=''>"
Response.Write "      <input type='hidden' ID='ContentFlag' value='0'>"
Response.Write "     </table>"
Response.Write "    </td>"
Response.Write "   </tr>"
Response.Write "</table>"

%>
<script language="VBScript">

Function Resumeblank(ByVal Content)
    if Content="" then 
        Resumeblank=Content 
        Exit Function
    end if
    Dim strHtml, strHtml2, Num, Numtemp, Strtemp, i
    strHtml = Replace(Content, "<DIV", "<div")
    strHtml = Replace(strHtml, "</DIV>", "</div>")
    strHtml = Replace(strHtml, "<TABLE", "<table")
    strHtml = Replace(strHtml, "</TABLE>", vbCrLf & "</table>" & vbCrLf)
    strHtml = Replace(strHtml, "<TBODY>", "")
    strHtml = Replace(strHtml, "</TBODY>", "" & vbCrLf)
    strHtml = Replace(strHtml, "<TR", "<tr")
    strHtml = Replace(strHtml, "</TR>", vbCrLf & "</tr>" & vbCrLf)
    strHtml = Replace(strHtml, "<TD", "<td")
    strHtml = Replace(strHtml, "</TD>", "</td>")
    strHtml = Replace(strHtml, "<"&"!--", vbCrLf & "<"&"!--")
    strHtml = Replace(strHtml, "<SELECT", vbCrLf & "<Select")
    strHtml = Replace(strHtml, "</SELECT>", vbCrLf & "</Select>")
    strHtml = Replace(strHtml, "<OPTION", vbCrLf & "  <Option")
    strHtml = Replace(strHtml, "</OPTION>", "</Option>")
    strHtml = Replace(strHtml, "<INPUT", vbCrLf & "  <Input")
    strHtml = Replace(strHtml, "<" & "script", vbCrLf & "<"&"script")
    strHtml = Replace(strHtml, "&amp;", "&")
    strHtml = Replace(strHtml, "{$--", vbCrLf & "<"&"!--$")
    strHtml = Replace(strHtml, "--}", "$--"&">")
    arrContent = Split(strHtml, vbCrLf)
    For i = 0 To UBound(arrContent)
        Numtemp = False
        If InStr(arrContent(i), "<table") > 0 Then
            Numtemp = True
            If Strtemp <> "<table" And Strtemp <> "</table>" Then
                Num = Num + 2
            End If
            Strtemp = "<table"
        ElseIf InStr(arrContent(i), "<tr") > 0 Then
            Numtemp = True
            If Strtemp <> "<tr" And Strtemp <> "</tr>" Then
                Num = Num + 2
            End If
            Strtemp = "<tr"
        ElseIf InStr(arrContent(i), "<td") > 0 Then
            Numtemp = True
            If Strtemp <> "<td" And Strtemp <> "</td>" Then
                Num = Num + 2
            End If
            Strtemp = "<td"
        ElseIf InStr(arrContent(i), "</table>") > 0 Then
            Numtemp = True
            If Strtemp <> "</table>" And Strtemp <> "<table" Then
                Num = Num - 2
            End If
            Strtemp = "</table>"
        ElseIf InStr(arrContent(i), "</tr>") > 0 Then
            Numtemp = True
            If Strtemp <> "</tr>" And Strtemp <> "<tr" Then
                Num = Num - 2
            End If
            Strtemp = "</tr>"
        ElseIf InStr(arrContent(i), "</td>") > 0 Then
            Numtemp = True
            If Strtemp <> "</td>" And Strtemp <> "<td" Then
                Num = Num - 2
            End If
            Strtemp = "</td>"
        ElseIf InStr(arrContent(i), "<"&"!--") > 0 Then
            Numtemp = True
        End If

        If Num < 0 Then Num = 0
        If Trim(arrContent(i)) <> "" Then
            If i = 0 Then
                strHtml2 = String(Num, " ") & arrContent(i)
            ElseIf Numtemp = True Then
                strHtml2 = strHtml2 & vbCrLf & String(Num, " ") & arrContent(i)
            Else
                strHtml2 = strHtml2 & vbCrLf & arrContent(i)
            End If
        End If
    Next
    Resumeblank = strHtml2
End Function
</script>
<script type="text/javascript">
// 系统初试化 和系统运用 函数组开始
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    SEP_PADDING = 5;
    HANDLE_PADDING = 7;
    window.onerror = ResumeError;
    // 改变模式:代码、编辑、文本、预览
    var sCurrMode = 'EDIT';
    var bEditMode = true;
    var yanchicss= false;
    ModeEdit.value = 'EDIT';

    // 连接对象
    // 浏览器版本检测
    var BrowserInfo = new Object() ;
    BrowserInfo.MajorVer = navigator.appVersion.match(/MSIE (.)/)[1] ;
    BrowserInfo.MinorVer = navigator.appVersion.match(/MSIE .\.(.)/)[1] ;
    BrowserInfo.IsIE55OrMore = BrowserInfo.MajorVer >= 6 || ( BrowserInfo.MajorVer >= 5 && BrowserInfo.MinorVer >= 5 ) ;

    var yToolbars =   new Array();
    var YInitialized = false;
    var bLoad=false;
    var pureText=true;
    var EditMode=true;
    var SourceMode=false;
    var PreviewMode=false;
    var CurrentMode=0;

    var sLinkFieldName ="<%=tContentID%>";
    var edithead="<html><head><META http-equiv=Content-Type content=text/html; charset=gb2312><link href='<%=SystemDefaultSkin%>' rel='stylesheet' type='text/css'></head>";
    edithead=edithead+"<body leftmargin=0 topmargin=0 style='text-align:left; margin:0; padding:0;'>";


    var content
    //屏蔽错误
    function ResumeError() {
        return true;
    }
	
    //程序处始化
    function document.onreadystatechange(){
        if (YInitialized) return;
        YInitialized = true;
        var i, s, curr;
        for (i=0; i<document.body.all.length; i++){
            curr=document.body.all[i];
            if (curr.className == 'yToolbar'){
                InitTB(curr);
                yToolbars[yToolbars.length] = curr;
            }
        }
        DoTemplate();
        oLinkField = parent.document.getElementsByName(sLinkFieldName)[0];
        if (ContentFlag.value=="0") {
            ContentEdit.value = oLinkField.value;
            ContentLoad.value = oLinkField.value;
            ModeEdit.value = 'EDIT'
            ContentFlag.value = "1";
        }
        
        window.onresize = DoTemplate;
        content=edithead +ContentEdit.value;
      

        content = content.replace("[/textarea]", "</textarea>");
        
        HtmlEdit.document.open();
        HtmlEdit.document.write(content);
        HtmlEdit.document.close();  
        HtmlEdit.document.designMode='On';
        HtmlEdit.document.onkeydown = new Function('return onKeyDown(HtmlEdit.event);');
        HtmlEdit.document.oncontextmenu=new Function('return showContextMenu(HtmlEdit.event);');
    }

    function yToolbarsCss(){
        if (document.all){
            var i, s, curr;
            for (i=0; i<document.body.all.length; i++){
                curr=document.body.all[i];
                if (curr.className == 'yToolbar')
                {
                    InitTB(curr);
                    yToolbars[yToolbars.length] = curr;
                }
            }
            DoTemplate();
        }else{
            setTimeout("yToolbarsCss()",1000);
        }
    }
    function InitBtn(btn){
        btn.onmouseover = BtnMouseOver;
        btn.onmouseout = BtnMouseOut;
        btn.onmousedown = BtnMouseDown;
        btn.onmouseup = BtnMouseUp;
        btn.ondragstart = YCancelEvent;
        btn.onselectstart = YCancelEvent;
        btn.onselect = YCancelEvent;
        btn.YUSERONCLICK = btn.onclick;
        btn.onclick = YCancelEvent;
        btn.YINITIALIZED = true;
        return true;
    }
    function InitBtnMenu(BtnMenu){
        BtnMenu.onmouseover = BtnMenuMouseOver;
        BtnMenu.onmouseout = BtnMenuMouseOut;
        BtnMenu.onmousedown = BtnMenuMouseDown;
        BtnMenu.onmouseup = BtnMenuMouseUp;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -