Wondering how to check the content of an FCKEditor? You will love this simple code!!!
<?php
include("fckeditor/fckeditor.php") ;
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>FCKeditor - Sample</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="robots" content="noindex, nofollow">
<script>
function getRTEText(fckinst){
var oEditorHTML = FCKeditorAPI.GetInstance(fckinst).GetHTML();
alert(oEditorHTML);
}
</script>
</head>
<body>
<form action="request.php" method="post">
<?php
$oFCKeditor = new FCKeditor('content');
$oFCKeditor->BasePath = "fckeditor/";
$oFCKeditor->Value = $content['message'];
oFCKeditor->Config['UserFilesPath'];
$oFCKeditor->Height = "440";
$oFCKeditor->Create();
?>
<br>
<input type="button" onclick="javaScript:getRTEText('content');" value="check">
<input type="submit" value="Submit">
</form>
</body>
</html>

Recent Comments