Hi all i have a probleme with FCK and PHP,JAVA
i create all html Content via php variable
like this
$msg1 = "<table width=\"100%\" border=\"0\" bordercolor=\"#0000FF\" cellspacing=\"3\" cellpadding=\"0\">";
$msg1 .= "<tr>";
$msg1 .= "<td width=\"5\"> </td>";
$msg1 .= "<td>";
Include("mypath" . "/fckeditor.php") ;
$msg1 .= "<SCRIPT language=\"javascript\">";
$msg1 .= "var oFCKeditor;";
$msg1 .= "oFCKeditor = new FCKeditor('MyEditBox', '100%', 300) ;";
$msg1 .= "oFCKeditor.Value = '" . $text . "' ;";
$msg1 .= "oFCKeditor.Create() ;";
$msg1 .= "</SCRIPT>";
$msg1 .= "</td>";
$msg1 .= "<td width=\"5\"> </td>";
$msg1 .= "</tr>";
$msg1 .= "</table>";
And the variable text exacly like this in my mysql database
$text = "
<TABLE cellSpacing=0 cellPadding=0 width=749 border=0>
<TBODY>
<TR>
<TD vAlign=top>
<TABLE cellSpacing=5 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD class=Session align=right>Features</TD></TR></TBODY></TABLE></TD>
<TD>
<TABLE cellSpacing=5 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD align=left>The editor provides many HTML editing feature like:
<UL>
<LI><STRONG>XHTML</STRONG> support
<LI><STRONG>Font formatting</STRONG>: type, size, color, style, bold, italic, etc
<LI><STRONG>Text formatting</STRONG>: alignment, indentation, bullets list, etc
<LI>Cut, Paste and Past as Plain Text, Undo and Redo
<LI>Paste from <STRONG>Word</STRONG> cleanup with auto detection
<LI>Link creation
<LI>Image insertion, with <STRONG>upload</STRONG> and <STRONG>server browsing</STRONG> support
<LI>Table creation and editing (add, delete rows, etc)
<LI>Table cells editing (size, colors, etc)
<LI>Right click <STRONG>context menus</STRONG> support
<LI>Complete <STRONG>toolbar customization</STRONG>
<LI><STRONG>CSS</STRONG> support for a better integration in your web site
<LI><STRONG>Multi-language</STRONG> support with <STRONG>automatic</STRONG> client language <STRONG>detection</STRONG>.
<LI>Lightweight and fast
<LI>Compatible with <STRONG>Internet Explorer 5+</STRONG>
<LI>Automatic <STRONG>browser detection</STRONG> and customization
<LI>Integration with <STRONG>ASP, ASP.NET, ColdFusion, PHP, Javascript</STRONG> and <STRONG>IE Behaviours</STRONG>
<LI>Image and file <STRONG>links upload</STRONG> and server repository browser.
<LI>For web developer it is easy to install and customize
<LI>For web users its simply easy to use! </LI></UL></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE> ";
i Realy dont know why but i can edit this variable $text , Most exacly the FCKeditor dont show with no error trouble
PS i can edit other text like this
goodmsg = "<P align=center><FONT face=Verdana color=#0000ff size=7>Woow this sux</FONT></P>";
And finaly i can use this way for creating myeditbox
$oFCKeditor = new FCKeditor ;
$oFCKeditor->Value = $text ;
$oFCKeditor->CanUpload = false ; // Overrides fck_config.js default configuration
$oFCKeditor->CanBrowse = false ; // Overrides fck_config.js default configuration
$oFCKeditor->CreateFCKeditor( 'et_desdoc_" . $language_present[$i] . "', '100%', 500 ) ;
because it place the editor when i call CreateFCKeditor
Plz help me !
i create all html Content via php variable
like this
$msg1 = "<table width=\"100%\" border=\"0\" bordercolor=\"#0000FF\" cellspacing=\"3\" cellpadding=\"0\">";
$msg1 .= "<tr>";
$msg1 .= "<td width=\"5\"> </td>";
$msg1 .= "<td>";
Include("mypath" . "/fckeditor.php") ;
$msg1 .= "<SCRIPT language=\"javascript\">";
$msg1 .= "var oFCKeditor;";
$msg1 .= "oFCKeditor = new FCKeditor('MyEditBox', '100%', 300) ;";
$msg1 .= "oFCKeditor.Value = '" . $text . "' ;";
$msg1 .= "oFCKeditor.Create() ;";
$msg1 .= "</SCRIPT>";
$msg1 .= "</td>";
$msg1 .= "<td width=\"5\"> </td>";
$msg1 .= "</tr>";
$msg1 .= "</table>";
And the variable text exacly like this in my mysql database
$text = "
<TABLE cellSpacing=0 cellPadding=0 width=749 border=0>
<TBODY>
<TR>
<TD vAlign=top>
<TABLE cellSpacing=5 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD class=Session align=right>Features</TD></TR></TBODY></TABLE></TD>
<TD>
<TABLE cellSpacing=5 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD align=left>The editor provides many HTML editing feature like:
<UL>
<LI><STRONG>XHTML</STRONG> support
<LI><STRONG>Font formatting</STRONG>: type, size, color, style, bold, italic, etc
<LI><STRONG>Text formatting</STRONG>: alignment, indentation, bullets list, etc
<LI>Cut, Paste and Past as Plain Text, Undo and Redo
<LI>Paste from <STRONG>Word</STRONG> cleanup with auto detection
<LI>Link creation
<LI>Image insertion, with <STRONG>upload</STRONG> and <STRONG>server browsing</STRONG> support
<LI>Table creation and editing (add, delete rows, etc)
<LI>Table cells editing (size, colors, etc)
<LI>Right click <STRONG>context menus</STRONG> support
<LI>Complete <STRONG>toolbar customization</STRONG>
<LI><STRONG>CSS</STRONG> support for a better integration in your web site
<LI><STRONG>Multi-language</STRONG> support with <STRONG>automatic</STRONG> client language <STRONG>detection</STRONG>.
<LI>Lightweight and fast
<LI>Compatible with <STRONG>Internet Explorer 5+</STRONG>
<LI>Automatic <STRONG>browser detection</STRONG> and customization
<LI>Integration with <STRONG>ASP, ASP.NET, ColdFusion, PHP, Javascript</STRONG> and <STRONG>IE Behaviours</STRONG>
<LI>Image and file <STRONG>links upload</STRONG> and server repository browser.
<LI>For web developer it is easy to install and customize
<LI>For web users its simply easy to use! </LI></UL></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE> ";
i Realy dont know why but i can edit this variable $text , Most exacly the FCKeditor dont show with no error trouble
PS i can edit other text like this
goodmsg = "<P align=center><FONT face=Verdana color=#0000ff size=7>Woow this sux</FONT></P>";
And finaly i can use this way for creating myeditbox
$oFCKeditor = new FCKeditor ;
$oFCKeditor->Value = $text ;
$oFCKeditor->CanUpload = false ; // Overrides fck_config.js default configuration
$oFCKeditor->CanBrowse = false ; // Overrides fck_config.js default configuration
$oFCKeditor->CreateFCKeditor( 'et_desdoc_" . $language_present[$i] . "', '100%', 500 ) ;
because it place the editor when i call CreateFCKeditor
Plz help me !

RE: FCK and JAVA + PHP Variable
This might help,
in your code:
$msg1 .= "<SCRIPT language=\"javascript\">";
$msg1 .= "var oFCKeditor;";
$msg1 .= "oFCKeditor = new FCKeditor('MyEditBox', '100%', 300) ;";
$msg1 .= "oFCKeditor.Value = '" . $text . "' ;";
$msg1 .= "oFCKeditor.Create() ;";
$msg1 .= "</SCRIPT>";
You might add some newline characters:
$msg1 .= "<SCRIPT language=\"javascript\">\n";
$msg1 .= "var oFCKeditor;\n";
$msg1 .= "oFCKeditor = new FCKeditor('MyEditBox', '100%', 300) ;\n";
$msg1 .= "oFCKeditor.Value = '" . $text . "' ;\n";
$msg1 .= "oFCKeditor.Create() ;\n";
$msg1 .= "</SCRIPT>\n";
That might at least make it easier to debug when you view source to see what it actually outputs.
I notice that your 'goodmsg' does not contain any quotes and the contents of $text does.
For the reading in and out of the database you might try addslahes() and stripslashes()
And again the results of 'view source' are always helpful.
-Jim
RE: FCK and JAVA + PHP Variable
RE: FCK and JAVA + PHP Variable
RE: FCK and JAVA + PHP Variable
It is a problem with quotes.
In your example you use the javascript version of the editor.
It's content is loaded into a javascript tag. the tag uses single quotes. if there are any single quotes in the string loaded into this javascript tag, it terminates the string and causes an error.
The code that follows reflects this fix and it works.
(Adjust the FCKeditor path)
My question is (I hate it when other people ask me this, but at least I solved the original problem first...) why are you doing it this way? You are already using a php page, why not use the php version of the editor? It does not have this same sensitivty to quotes.
Hope I helped,
-Jim
RE: FCK and JAVA + PHP Variable
-Jim
RE: FCK and JAVA + PHP Variable
RE: FCK and JAVA + PHP Variable