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

📄 editor.asp

📁 个人网站比较简短
💻 ASP
📖 第 1 页 / 共 5 页
字号:
        Select Case arrButtonOption(0)
        Case "yToolbar"
            Response.Write "<div class='yToolbar'>" & vbCrLf
        Case "/yToolbar"
            Response.Write "</div>" & vbCrLf
        Case "TBHandle"
            Response.Write "  <div class='TBHandle'></div>" & vbCrLf
        Case "Btn"
            Response.Write "  <div class='Btn' TITLE='" & arrButtonOption(1) & "' LANGUAGE='javascript' onclick=""" & arrButtonOption(2) & """><img class='Ico' src='editor/images/" & arrButtonOption(3) & "' WIDTH='18' HEIGHT='18'></div>" & vbCrLf
        Case "BtnMenu"
            Response.Write "  <div class='BtnMenu' TITLE='" & arrButtonOption(1) & "' LANGUAGE='javascript' onclick=""" & arrButtonOption(2) & """><img class='Ico' src='editor/images/" & arrButtonOption(3) & "' WIDTH='5' HEIGHT='18'></div>" & vbCrLf
        Case "TBSep"
            Response.Write "  <div class='TBSep'></div>" & vbCrLf
        Case "TBGen"
            Response.Write "<select ID=""formatSelect"" class=""TBGen"" "
            Response.Write "onchange=""format('FormatBlock',this[this.selectedIndex].value);this.selectedIndex=0"">"
            Response.Write "  <option selected>段落格式</option>"
            Response.Write "  <option VALUE=""&lt;P&gt;"">普通</option>"
            Response.Write "  <option VALUE=""&lt;PRE&gt;"">已编排格式</option>"
            Response.Write "  <option VALUE=""&lt;H1&gt;"">标题一</option>"
            Response.Write "  <option VALUE=""&lt;H2&gt;"">标题二</option>"
            Response.Write "  <option VALUE=""&lt;H3&gt;"">标题三</option>"
            Response.Write "  <option VALUE=""&lt;H4&gt;"">标题四</option>"
            Response.Write "  <option VALUE=""&lt;H5&gt;"">标题五</option>"
            Response.Write "  <option VALUE=""&lt;H6&gt;"">标题六</option>"
            Response.Write "  <option VALUE=""&lt;H7&gt;"">标题七</option>"
            Response.Write "</select>"
        Case "TBGen2"
            Response.Write "<select id=""FontName"" class=""TBGen"" onchange=""format('fontname',this[this.selectedIndex].value);this.selectedIndex=0"">"
            Response.Write "  <option selected>字体</option>"
            Response.Write "  <option value=""宋体"">宋体</option>"
            Response.Write "  <option value=""黑体"">黑体</option>"
            Response.Write "  <option value=""楷体_GB2312"">楷体</option>"
            Response.Write "  <option value=""仿宋_GB2312"">仿宋</option>"
            Response.Write "  <option value=""隶书"">隶书</option>"
            Response.Write "  <option value=""幼圆"">幼圆</option>"
            Response.Write "  <option value=""Arial"">Arial</option>"
            Response.Write "  <option value=""Arial Black"">Arial Black</option>"
            Response.Write "  <option value=""Arial Narrow"">Arial Narrow</option>"
            Response.Write "  <option value=""Brush ScriptMT"">Brush Script MT</option>"
            Response.Write "  <option value=""Century Gothic"">Century Gothic</option>"
            Response.Write "  <option value=""Comic Sans MS"">Comic Sans MS</option>"
            Response.Write "  <option value=""Courier"">Courier</option>"
            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='1' MARGINWIDTH='1' style='width=100%; height=100%;' scrolling='yes' ></iframe>"
Response.Write "     </td></tr>"
Response.Write "     </table>"
Response.Write "   </td>"
Response.Write "  </tr>"
Response.Write "  <tr>"
Response.Write "   <td valign='top' height='25'>"
Response.Write "     <table border='0' cellpadding='0' cellspacing='0' width='100%' height='20' align='center'>"
Response.Write "      <tr>"
If ShowType <> 1 Then
    Response.Write "       <td valign='top' width='265' >"
    Response.Write "         <img id=setMode0 src='Editor/images/Editor2.gif' width='59' height='20' onclick=""setMode('EDIT')"">"
    Response.Write "         <img id=setMode1 src='Editor/images/html.gif' width='59' height='20' onclick=""setMode('CODE')"">"
    Response.Write "         <img id=setMode2 src='Editor/images/browse.gif' width='59' height='20' onclick=""setMode('VIEW')"">"
    Response.Write "         <img id=setMode3 src='Editor/images/text.gif' width='59' height='20' onclick=""setMode('TEXT')"">"
    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>"
Else
    Response.Write "       <td id='ShowObject' width='90%'></td>"
End If
Response.Write "       <td valign='top' align='right'>"
Response.Write "         <img  src='Editor/images/sizeplus.gif' width='20' height='20' onclick='sizeChange(200)'>"
Response.Write "         <img  src='Editor/images/sizeminus.gif' width='20' height='20' onclick='sizeChange(-200)'>"
Response.Write "       </td>"
Response.Write "       <td width='30'></td>"
Response.Write "     </tr>"
Response.Write "     </table>"
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
'==================================================
'函数名:ScriptHtml
'作  用:过滤html标记
'参  数:ConStr  ------ 要过滤的字符串
'参  数:TagName ------ 字符串种型
'参  数:FType   ------ 过滤的类型
'参  数:FontFilterText   ------ 过滤含有制定字符的标记
'==================================================
Function ScriptHtml(ByVal ConStr,ByVal TagName,ByVal FType,ByVal FontFilterText)
    Dim regEx, Match, Matches
    Set regEx = New RegExp
    regEx.IgnoreCase = True
    regEx.Global = True
    Select Case FType
        Case 1
            regEx.Pattern = "<" & TagName & "([^>])*>"
            ConStr = regEx.Replace(ConStr, "")
        Case 2
            regEx.Pattern = "<" & TagName & "([^>])*>.*?</" & TagName & "([^>])*>"
            ConStr = regEx.Replace(ConStr, "")
        Case 3
            regEx.Pattern = "<" & TagName & "([^>])*>"
            ConStr = regEx.Replace(ConStr, "")
            regEx.Pattern = "</" & TagName & "([^>])*>"
            ConStr = regEx.Replace(ConStr, "")
        Case 4
            regEx.Pattern =  "<" & TagName & "([^>])*>.*?</" & TagName & "([^>])*>"
            Set Matches = regEx.Execute(ConStr)
            For Each Match In Matches
                If InStr(Match.Value, FontFilterText) > 0 Then
                    ConStr = Replace(ConStr, Match.Value, "")
                End If
            Next
    End Select
    ScriptHtml = ConStr
    Set regEx = Nothing
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';

⌨️ 快捷键说明

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