Reset button to field with new value in FCKeditor ?
function createFCK($field, $value)
{
$oFCKeditor = new FCKeditor($field) ;
$oFCKeditor->BasePath = "/TEST/fckeditor/";
$oFCKeditor->Value = $value;
return $oFCKeditor->CreateHtml();
}
<html>
<head>
<title>test</title>
</head>
<script type="text/javascript" src="/TEST/prototype-1.6.0.3.js"></script>
<body>
<script language"javascript">
function resetFCK(field, value)
{
// CODE RESETTING FCK HERE
}
</script>
<form name="f" id="f" method="post">
<?php echo createFCK("field1", "<b>my fool1</b>") ?>
<a href="#" onClick="resetFCK('field1', '<p>new foo3</p>')">reset this</a>
<?php echo createFCK("field2", "<i>my fool2</i>") ?>
<a href="#" onClick="resetFCK('field2', '<h2>new foo4</h2>')">reset this</a>
</form>
</body>
</html>
Re: Reset button to field with new value in FCKeditor ?