I started using FCKeditor today for a website project and it's a very powerful and good to use tool, but I am having some problems with it.
Problem 1 - Custom Config
I checked the forums already for a solution to my problem, too bad the fixes I found don't work. I am using the following code to get info from the database.
<?php $oFCKeditor = new FCKeditor('content') ; $oFCKeditor->BasePath = 'fckeditor/' ; $oFCKeditor->Value = $row_content['omschrijving'] ; $oFCKeditor->Config["CustomConfigurationsPath"] = "fckeditor/hofstede.js" ; $oFCKeditor->ToolbarSet = "Hofstede"; $oFCKeditor->Height = 300; $oFCKeditor->Create() ; ?>
The first problem occurs when I got the $oFCKeditor->ToolbarSet = "Hofstede"; line included. When I load the page with the editor on it I get prompted with the message Toolbar "Hofstede" doesn't excists. When I remove the line, the page loads without problems but doesn't take the custom config.
My custom config file looks like this:
FCKConfig.AutoDetectLanguage = false ; FCKConfig.DefaultLanguage = "ja" ; FCKConfig.ToolbarSets["Hofstede"] = [ ['Cut','Copy','Paste','PasteText','PasteWord','-','Print','SpellCheck'], ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'], '/', ['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'], ['OrderedList','UnorderedList','-','Outdent','Indent','Blockquote'], ['Link','Unlink','Anchor'], ['Image','Table','Rule','SpecialChar','PageBreak'], '/', ['Style','FontFormat','FontName','FontSize'], ['TextColor','BGColor'], ['FitWindow','ShowBlocks','-','About'] // No comma for the last row. ] ;
I added the Japanese language to see a quick result. Eventually this will become NL, for Dutch. I also tried load the custom config without overruling the language and setting the toolbarname to 'Default' without adding the additional line into the include.
As stated, my config file (hofstede.js) is located in the fckeditor folder. What am I doing wrong?
Problem 2 - Internal File Browser
The file browser is working fine, had some configuration problems (UserPaths etc.) but still have a slight problem with it. The editor doesn't show the images I have added into the text (while in the FCKEditor) nor in the preview (while uploading an image). It shows the image on the website and saves it without problems to the database. How can I solve this? I have uploaded a small screenshot so you can see what I mean. It would be useful, especially for the end-users of the website that they can see and verify the image they have added to the text without having to save first and check the website.
Thank you for you time.