Hi,
I have used the FCKeditor to use in my news page admin. The adding a new news item works fine but when i have added a nes item i have added an edit link which take the user to an edit news page.
I used to have a simple text box which i would add
Does anyone know how i can return the value in the editing box??
cheers in advance
craig
I have used the FCKeditor to use in my news page admin. The adding a new news item works fine but when i have added a nes item i have added an edit link which take the user to an edit news page.
I used to have a simple text box which i would add
value="<?php echo $row_News['desc']; ?>"and this would return the news description so that the user can make changes but i am stuck on how to do this with the FCKeditor?
Does anyone know how i can return the value in the editing box??
cheers in advance
craig

Re: How to echo something in the FCKeditor
as far as i know you dont have to make a text field for the php editor. (i'm rebuilding an asp system using fck, i see an field there, so i think its php specific that you dont need it?).
i'm using this:
<?php include("./fckeditor/fckeditor.php") ; ?> <tr> <td width="20%" class="menu">Bestandsnaam:</td> <td width="80%"><input name="bestandsnaam" type="text" class="menu" id="bestandsnaam" style="width:200" value="<?php echo $row_showcontent['naam']; ?>" maxlength="20"> <span class="menu">max. 20 leestekens ! </span> </td> </tr> <tr> <td colspan="2" class="menu"> <div align="center" style="margin-top: 10px; margin-bottom: 10px;"> <table width="100%" cellpadding="0" cellspacing="0" id="editortable"> <tr> <td><?php // Automatically calculates the editor base path based on the _samples directory. // This is usefull only for these samples. A real application should use something like this: // $oFCKeditor->BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value. $oFCKeditor = new FCKeditor('FCKeditor1') ; $oFCKeditor->BasePath = 'fckeditor/'; $oFCKeditor->Value = $row_showcontent['content']; $oFCKeditor->Create() ; ?> </td> </tr> </table> </div> </td> </tr>as you can see my content value is $row_showcontent['content']; without an echo and not in an text field.
in you case it would be something like this:
html form field1: []<br /> <?php // Automatically calculates the editor base path based on the _samples directory. // This is usefull only for these samples. A real application should use something like this: // $oFCKeditor->BasePath = '/fckeditor/' ; // '/fckeditor/' is the default value. $oFCKeditor = new FCKeditor('FCKeditor1') ; $oFCKeditor->BasePath = 'fckeditor/'; $oFCKeditor->Value = $row_News['desc']; $oFCKeditor->Create() ; ?> <br /> html form field2: []<br />this will add the editor. bevouse you dont have an text field with a name now, you couldnt see what post variable you could use when processing. This is "FCKeditor1".
so when processing you use
$_POST['field1'];
$_POST['FCKeditor1'];
$_POST['field2']