Hi guy,
Is there a way to implement a simple javascript function (button reset and onClick) to reset and refield with new value in FCK (IE5.5 compatible if possible) ?
I'm programming in PHP and I've created a simple FCK editor instance for example :
function createFCK($field, $value) { $oFCKeditor = new FCKeditor($field) ; $oFCKeditor->BasePath = "/TEST/fckeditor/"; $oFCKeditor->Value = $value; return $oFCKeditor->CreateHtml(); }
I would like to write like this :
<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>
I've search for a solution in this forum but I've found no answer...
How to code the function resetFCK, it may be a worthful tool for FCKeditor. thanks for the contribution .
Re: Reset button to field with new value in FCKeditor ?
Otherwise any ideas please