I'm moving from FCKeditor to CKeditor now that 3.0 is out. I've been playing around with it all day and I've made some good progress, but I'm still having problems showing images that have a path relative to the directory that I'm trying to access.
Back in FCKeditor each time I created an instance of the editor I customized the baseHref path dynamically depending on where the images are located. I used the following command:
$oFCKeditor->Config['BaseHref'] = $basehref_path ;
With CKeditor from what I gather I need to alter the baseHref in a custom config file (currently using config.js in the root directory for testing). I insert the following line into the config.js file located in the root install directory:
config.baseHref = 'http://localhost/projects/sampledirectory/';
This does not seem to be telling the editor instance that the images within the given text area have a relative base path. It just shows a broken link. I tried other config options in this custom config file and those worked fine (changing the default language works).
Is my problem because I'm working from localhost? Is there a security setting I'm not changing correctly?
Sun, 08/23/2009 - 05:18
#1
Re: config.baseHref not affecting relative images locations
According to http://dev.fckeditor.net/wiki/v3_status it will be ready in 3.1
Re: config.baseHref not affecting relative images locations
Re: config.baseHref not affecting relative images locations
Re: config.baseHref not affecting relative images locations
To have baseHref you can modify the ckeditor.js in this place:
Re: config.baseHref not affecting relative images locations
Before:
After
Re: config.baseHref not affecting relative images locations
Ufff... it dont not works really good... i will wait the oficial baseJref support