<?php

	$htmlData = '';
	if (!empty($_POST['content1'])) {
		if (get_magic_quotes_gpc()) {
			$htmlData = stripslashes($_POST['content1']);
		} else {
			$htmlData = $_POST['content1'];
		}
	}
;echo '<!doctype html>
<html>
<head>
	<meta charset="utf-8" />
	<title>KindEditor PHP</title>
	<link rel="stylesheet" href="../examples/index.css" />
	<script charset="utf-8" src="../kindeditor.js"></script>
	<script>
		KE.show({
			id : \'content1\',
			imageUploadJson : \'../../php/upload_json.php\',
			fileManagerJson : \'../../php/file_manager_json.php\',
			allowFileManager : true,
			afterCreate : function(id) {
				KE.event.ctrl(document, 13, function() {
					KE.util.setData(id);
					document.forms[\'example\'].submit();
				});
				KE.event.ctrl(KE.g[id].iframeDoc, 13, function() {
					KE.util.setData(id);
					document.forms[\'example\'].submit();
				});
			}
		});
	</script>
</head>
<body class="ke-content">
	'; echo $htmlData; ;echo '	<form name="example" method="post" action="demo.php">
		<textarea id="content1" name="content1" cols="100" rows="8" style="width:700px;height:200px;visibility:hidden;">'; echo htmlspecialchars($htmlData); ;echo '</textarea>
		<br />
		<input type="submit" name="button" value="提交内容" /> (提交快捷键: Ctrl + Enter)
	</form>
</body>
</html>

';?>
