Hello,
I've just included the editor into a website to save text in a MySQL Database.
Formating of the text works fine, but the moment I insert a line break - whether it's
Any idea???
I've just included the editor into a website to save text in a MySQL Database.
Formating of the text works fine, but the moment I insert a line break - whether it's
<p>or
<br>- and send off the form, the whole textarea including toolbar disappears. Without line breaks the text is send to the database without problems. When I send off the form again, the editor is back.
Any idea???

Re: Editor disappears - very strange
Re: Editor disappears - very strange
Re: Editor disappears - very strange
I did solved this issue by using the php fckeditor creation method.
I created a function to easily use the code (see below).
I think the solution here is to strip all line braks and print all-in-a-row content.
If you do not use php, or want to use a plain html file, just read through the code of php, asp, python other langs to see how all-in-a-row content is created.
Here's my function:
function createEditor($content, $fieldname = 'content', $toolbar = 'Basic'){ include_once("js/fckeditor/fckeditor.php") ; // check your path // widen text windows if toolbar is taller $heights = array( 'Basic'=>'100', 'Default'=>'400', ); $sBasePath = '/js/fckeditor/'; $oFCKeditor = new FCKeditor($fieldname) ; $oFCKeditor->ToolbarSet = $toolbar; $oFCKeditor->Height = 300 + intval($heights[$toolbar]); $oFCKeditor->BasePath = $sBasePath ; $oFCKeditor->Value = $content; return $oFCKeditor->CreateHtml() ; }In the php code I then use:
<? if(!isAdmin()){ $toolbar = 'Basic'; } else { $toolbar = 'Default'; } ?> Edit your text here <?php echo createEditor($content_from_db); ?> // end of code