📄 insertcode.aspx
字号:
<%@ Page Language="C#" EnableViewState="true" ValidateRequest="false" CodeBehind="InsertCode.aspx.cs" Inherits="Web.fckeditor.editor.dialog.InsertCode" %>
<%@ Register TagPrefix="CH" Namespace="ActiproSoftware.CodeHighlighter" Assembly="ActiproSoftware.CodeHighlighter.Net20" %>
<!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 id="Head1" runat="server">
<title>插入代码</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="../../dialog/common/fck_dialog_common.js" type="text/javascript"></script>
<script type="text/javascript">
var oEditor = window.parent.InnerDialogLoaded();
function Ok()
{
if(GetE('txtCode').value == '')
{
alert("代码内容不能为空!");
return false;
}
oEditor.FCK.InsertHtml(GetE("lblCode").innerHTML ) ;
return true ;
}
</script>
<style type="text/css">
body{margin:0px;padding:0px;}
.langType
{
padding-bottom:5px;
}
.btnRun
{
padding-top:5px;
text-align:right;
}
PRE {
background-color: #FFFEF8;
border-style: solid;
border-width: 1px;
border-color: #C0C0C0;
font-family: Courier New, monospace;
font-size: 10pt;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<div class="langType">
语言类型:<asp:DropDownList ID="ddlLangType" runat="server">
</asp:DropDownList></div>
<div class="textCode">
<asp:TextBox ID="txtCode" runat="server" TextMode="multiline" Width="660px" Height="440px"></asp:TextBox>
</div>
<div class="btnRun">
<asp:CheckBox ID="chkOutLining" Text="折叠代码" runat="server" />
<asp:CheckBox ID="chkLineNum" Text="允许行号" runat="server" />
<asp:Button ID="btnSubmit" runat="server" Text=" 转 换 " OnClick="btnSubmit_Click" />
<pre id="pre1" style="display: none;">
<CH:CodeHighlighter runat="server" ID="Highlighter" OnPostRender="Highlighter_PostRender" /></pre>
<asp:Label ID="lblCode" style="display:none;" runat="server"></asp:Label>
</div>
</div>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -