The forum operates in read-only mode. Please head to StackOverflow for support.
oFCKeditor.Value = "some texte" works very fine for me. Please check the value of "$text" in a separate line like <?php echo $text ?> or something...
<html> <head> <title>Test | Edit</title> <META HTTP-EQUIV="expires" CONTENT="0"> <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> <link rel="stylesheet" type="text/css" href="style.css"> <script language="JavaScript" type="text/JavaScript" src="format.js"></script> <script> <!-- function wait(delay){ string="pauseforalert("+delay+");"; setTimeout(string,delay); } function pauseforalert(delay){ this.window.close(); opener.location='test_editor.php'; } // --> </script> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head> <body link="#FFFFFF" vlink="#FFFFFF" alink="#FFFFFF" > <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td class="poptop" height="15"><img src="images/spacer.gif" width="3" height="3"></td> </tr> <tr> <td class="hrz_line"><img src="images/spacer.gif" width="1" height="1"></td> </tr> <tr> <td style="background: #ffffff; padding: 5px" valign="middle"><h1 style="margin-top: 0; margin-bottom: 0">Test | Bearbeiten</h1></td> </tr> <tr> <td class="hrz_line"><img src="images/spacer.gif" width="1" height="1"></td> </tr> <tr> <td valign="top" style="padding: 1em" class="maincontent" height="295"> <form action="/sec/test_editor_edit.php" method="post" name="formular" enctype="multipart/form-data"> <input type="hidden" name="yes" value="true"> <input type="hidden" name="editor_id" value="5"> <p>Hier können Sie die gewünschten Änderungen vornehmen.</p> <table width="100%" border="0" cellpadding="7" cellspacing="1" class="tablehead"> <tr> <td class="rowA"><strong>Titel</strong></td> <td class="rowB"><input type="text" class="textfield" name="title" size="40" maxlength="53"value="Test"></td> </tr> <tr> <td class="rowA"><strong>Untertitel</strong></td> <td class="rowB"><input type="text" class="textfield" name="subtitle" size="40" value="Test"></td> </tr> </table> <table width="100%" border="0" cellpadding="7" cellspacing="1" class="tablehead"> <tr> <td class="rowA" width="100%"><strong>Text</strong></td> </tr> <tr> <td class="rowB" width="100%"> <script type="text/javascript"> var sBasePath = "..../***/FCKeditor/"; var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ; oFCKeditor.BasePath = sBasePath ; oFCKeditor.Height = 300 ; oFCKeditor.Value = '<p>This is a <strong>Test</strong></p>' ; oFCKeditor.ToolbarSet = 'SZSV' ; oFCKeditor.Create() ; </script> </td> </tr> </table> <table width="100%" border="0" cellpadding="7" cellspacing="1" class="tablehead"> <tr> <td class="rowA" width="20%"><strong>Anzeigen</strong></td> <td class="rowB"><select name="anzeigen" size="1" id="art"> <option>News</option> <option>Archiv</option> </select> </td> </tr> </table> <p>This is a <strong>Test</strong></p><br><input type="submit" name="submit" value="Veröffentlichen" class="submit"> <input type="submit" name="cancel" value="Verwerfen" class="submit" onclick="self.close()"> </td> </tr> <tr> <td class="hrz_line"><img src="images/spacer.gif" width="1" height="1"></td> </tr> <tr> <td height="20" class="popbot"><a href="javascript:window.close()">Fenster schließen</a></td> </tr> </table> </body> </html>
RE: Insert Text from Database
oFCKeditor.Value = "some texte" works very fine for me. Please check the value of "$text" in a separate line like <?php echo $text ?> or something...Y.Chaouche
RE: Insert Text from Database
Could it be because i integrated the editor via JavaScript and not via php ? So that the Script doesn't know what it shall do with the php variable?
RE: Insert Text from Database
Y.Chaouche
RE: Insert Text from Database
http://www.***.com/abc/FCKeditor/
RE: Insert Text from Database
RE: Insert Text from Database
<html> <head> <title>Test | Edit</title> <META HTTP-EQUIV="expires" CONTENT="0"> <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> <link rel="stylesheet" type="text/css" href="style.css"> <script language="JavaScript" type="text/JavaScript" src="format.js"></script> <script> <!-- function wait(delay){ string="pauseforalert("+delay+");"; setTimeout(string,delay); } function pauseforalert(delay){ this.window.close(); opener.location='test_editor.php'; } // --> </script> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head> <body link="#FFFFFF" vlink="#FFFFFF" alink="#FFFFFF" > <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td class="poptop" height="15"><img src="images/spacer.gif" width="3" height="3"></td> </tr> <tr> <td class="hrz_line"><img src="images/spacer.gif" width="1" height="1"></td> </tr> <tr> <td style="background: #ffffff; padding: 5px" valign="middle"><h1 style="margin-top: 0; margin-bottom: 0">Test | Bearbeiten</h1></td> </tr> <tr> <td class="hrz_line"><img src="images/spacer.gif" width="1" height="1"></td> </tr> <tr> <td valign="top" style="padding: 1em" class="maincontent" height="295"> <form action="/sec/test_editor_edit.php" method="post" name="formular" enctype="multipart/form-data"> <input type="hidden" name="yes" value="true"> <input type="hidden" name="editor_id" value="5"> <p>Hier können Sie die gewünschten Änderungen vornehmen.</p> <table width="100%" border="0" cellpadding="7" cellspacing="1" class="tablehead"> <tr> <td class="rowA"><strong>Titel</strong></td> <td class="rowB"><input type="text" class="textfield" name="title" size="40" maxlength="53"value="Test"></td> </tr> <tr> <td class="rowA"><strong>Untertitel</strong></td> <td class="rowB"><input type="text" class="textfield" name="subtitle" size="40" value="Test"></td> </tr> </table> <table width="100%" border="0" cellpadding="7" cellspacing="1" class="tablehead"> <tr> <td class="rowA" width="100%"><strong>Text</strong></td> </tr> <tr> <td class="rowB" width="100%"> <script type="text/javascript"> var sBasePath = "..../***/FCKeditor/"; var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ; oFCKeditor.BasePath = sBasePath ; oFCKeditor.Height = 300 ; oFCKeditor.Value = '<p>This is a <strong>Test</strong></p>' ; oFCKeditor.ToolbarSet = 'SZSV' ; oFCKeditor.Create() ; </script> </td> </tr> </table> <table width="100%" border="0" cellpadding="7" cellspacing="1" class="tablehead"> <tr> <td class="rowA" width="20%"><strong>Anzeigen</strong></td> <td class="rowB"><select name="anzeigen" size="1" id="art"> <option>News</option> <option>Archiv</option> </select> </td> </tr> </table> <p>This is a <strong>Test</strong></p><br><input type="submit" name="submit" value="Veröffentlichen" class="submit"> <input type="submit" name="cancel" value="Verwerfen" class="submit" onclick="self.close()"> </td> </tr> <tr> <td class="hrz_line"><img src="images/spacer.gif" width="1" height="1"></td> </tr> <tr> <td height="20" class="popbot"><a href="javascript:window.close()">Fenster schließen</a></td> </tr> </table> </body> </html>RE: Insert Text from Database