Home -> xhEditor -> xhEditor Demo (Add page):



xhEditor Demo : Add page , php Code:

<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="xheditor-1.2.1/jquery/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="xheditor-1.2.1/xheditor-1.2.1.min.js"></script>
<script type="text/javascript" src="xheditor-1.2.1/xheditor_lang/en.js"></script>
<script type="text/javascript">
$(pageInit);
function pageInit()
{
$.extend(XHEDITOR.settings,{shortcuts:{'ctrl+enter':submitForm}});
$('#elm1').xheditor({upLinkUrl:"xheditor-1.2.1/demos/upload.php",upLinkExt:"zip,rar,txt",upImgUrl:"xheditor-1.2.1/demos/upload.php",upImgExt:"jpg,jpeg,gif,png",upFlashUrl:"xheditor-1.2.1/demos/upload.php",upFlashExt:"swf",upMediaUrl:"xheditor-1.2.1/demos/upload.php",upMediaExt:"wmv,avi,wma,mp3,mid"});
}
function insertUpload(arrMsg)
{console.log(arrMsg)
var i,msg;
for(i=0;i<arrMsg.length;i++)
{
msg=arrMsg[i];
$("#uploadList").append('<option value="'+msg.id+'">'+msg.localname+'</option>');
}
}
function submitForm(){$('#frmDemo').submit();}
</script>
</head>

<body id="firstpage">

 

<form id="frmDemo" method="post" action="xheditor_add2.php">
<textarea id="elm1" name="elm1" rows="12" cols="80" style="width: 80%"></textarea><br>
<input type="hidden" name="do" value="add" />
<input type="submit" name="Submit" value="Submit">
</form>

 


 

</body>
</html>