Hello,
I have updated the editor of my site from FCKEditor to CKEditor . Everything seems to be fine , but when i want to edit an article or something from my site , the ckeditor don't shows me the initial content. Why ? Thanks
I have updated the editor of my site from FCKEditor to CKEditor . Everything seems to be fine , but when i want to edit an article or something from my site , the ckeditor don't shows me the initial content. Why ? Thanks

Re: Show the initial textarea
Re: Show the initial textarea
Re: Show the initial textarea
Re: Show the initial textarea
So .. I call the CKEditor through a function ... In that function i have a case syntax and for CKEditor it looks like that:
case "textarea": if( $webeditor ){ include_once($GLOBALS['p_disk_admin'] . "/js/ckeditor/ckeditor/ckeditor.php"); $oFCKeditor = new CKeditor( $name ) ; $oFCKeditor->BasePath = $GLOBALS['p_web_admin'] . '/js/ckeditor/ckeditor/'; $oFCKeditor->Value = $_POST[$name]; if( strlen( $validation ) ) $oFCKeditor->Validation = 'validation="' . $validation . '"'; $oFCKeditor->editor($name); } else{ echo '<textarea name="' . $name . '" rows="3" cols="20" id="' . $name . '"'; echo $commonAttributesText; echo '>';//close the tag echo htmlspecialchars( $_POST[$name] ); echo '</textarea>'; } break;Where am I wrong ?
Re: Show the initial textarea
Re: Show the initial textarea
<textarea name = "tab_content" id = "tab_content"><?=stripslashes($db_info->tab_content);?></textarea> <script> var editor = CKEDITOR.replace( 'tab_content', { uiColor : '#ff0000', filebrowserBrowseUrl : 'ckfinder/ckfinder.html', filebrowserImageBrowseUrl : 'ckfinder/ckfinder.html?Type=Images', filebrowserFlashBrowseUrl : 'ckfinder/ckfinder.html?Type=Flash', filebrowserUploadUrl : 'ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files', filebrowserImageUploadUrl : 'ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images', filebrowserFlashUploadUrl : 'ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash' } ); </script>The $db_info->tab_content is the information I parsed from my database which is parsed prior to the HTML output. If you're spitting out everything with just straight PHP it won't be hard at all to use what I showed right there to your advantage.
Did that help you any? Or are you looking for something different?
PS: Keep in mind you need to make the call to the CKEDITOR.replace AFTER you initialize your textarea.
Re: Show the initial textarea
I've found the error ! This code works perfectly :
case "textarea": if( $webeditor ){ include_once($GLOBALS['admin'] . "/js/ckeditor/ckeditor.php"); $oFCKeditor = new CKeditor( $name ) ; $oFCKeditor->BasePath = $GLOBALS['admin'] . '/js/ckeditor/'; [i] [b] $initialValue=$oFCKeditor->Value = $_POST[$name]; $oFCKeditor->editor($name,$initialValue); [/b][/i] } break;