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



xhEditor Demo : Modify page , php HTML 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">

<?php
$text="<p>&nbsp;asdfa<strong>sdf as</strong>d asd<u> asd a</u>sdf<em> asdf </em>dsa&nbsp;</p>";
$text=htmlspecialchars( $text );
?>

<form id="frmDemo" method="post" action="xheditor_modify2.php">
<textarea id="elm1" name="elm1" rows="12" cols="80" style="width: 80%"><?php echo $text;?></textarea><br>
<input type="hidden" name="do" value="up" />
<input type="submit" name="Submit" value="Modify">
</form>


 

</body>
</html>