61 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
			
		
		
	
	
			61 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
| <%@ CODEPAGE=65001 %>
 | |
| <%
 | |
| Option Explicit
 | |
| Response.CodePage=65001
 | |
| Response.Charset="UTF-8"
 | |
| 
 | |
| Dim htmlData
 | |
| 
 | |
| htmlData = Request.Form("content1")
 | |
| 
 | |
| Function htmlspecialchars(str)
 | |
| 	str = Replace(str, "&", "&")
 | |
| 	str = Replace(str, "<", "<")
 | |
| 	str = Replace(str, ">", ">")
 | |
| 	str = Replace(str, """", """)
 | |
| 	htmlspecialchars = str
 | |
| End Function
 | |
| %>
 | |
| <!doctype html>
 | |
| <html>
 | |
| <head>
 | |
| 	<meta charset="utf-8" />
 | |
| 	<title>KindEditor ASP</title>
 | |
| 	<link rel="stylesheet" href="../themes/default/default.css" />
 | |
| 	<link rel="stylesheet" href="../plugins/code/prettify.css" />
 | |
| 	<script charset="utf-8" src="../kindeditor.js"></script>
 | |
| 	<script charset="utf-8" src="../lang/zh-CN.js"></script>
 | |
| 	<script charset="utf-8" src="../plugins/code/prettify.js"></script>
 | |
| 	<script>
 | |
| 		KindEditor.ready(function(K) {
 | |
| 			var editor1 = K.create('textarea[name="content1"]', {
 | |
| 				cssPath : '../plugins/code/prettify.css',
 | |
| 				uploadJson : '../asp/upload_json.asp',
 | |
| 				fileManagerJson : '../asp/file_manager_json.asp',
 | |
| 				allowFileManager : true,
 | |
| 				afterCreate : function() {
 | |
| 					var self = this;
 | |
| 					K.ctrl(document, 13, function() {
 | |
| 						self.sync();
 | |
| 						K('form[name=example]')[0].submit();
 | |
| 					});
 | |
| 					K.ctrl(self.edit.doc, 13, function() {
 | |
| 						self.sync();
 | |
| 						K('form[name=example]')[0].submit();
 | |
| 					});
 | |
| 				}
 | |
| 			});
 | |
| 			prettyPrint();
 | |
| 		});
 | |
| 	</script>
 | |
| </head>
 | |
| <body>
 | |
| 	<%=htmlData%>
 | |
| 	<form name="example" method="post" action="demo.asp">
 | |
| 		<textarea name="content1" style="width:700px;height:200px;visibility:hidden;"><%=htmlspecialchars(htmlData)%></textarea>
 | |
| 		<br />
 | |
| 		<input type="submit" name="button" value="提交内容" /> (提交快捷键: Ctrl + Enter)
 | |
| 	</form>
 | |
| </body>
 | |
| </html>
 |