Hello everyone,
I am using the FCKEditor in a CMS that I have made. I have a slight problem. The page on which the editor resides is in a different directory than where the edited HTML page resides.
This means that the path of the image is different when viewing the page inside editor from the actual page. As a result the image is displayed correctly on the actual page, but not in the editor.
This seems like such a common problem, yet I can't get it to work. I've juggled with the paths (I'd like to keep them relative to the document) but nothing seems to work.
Is there an easy way out of this?
Thanks very much for your help!
Maurits
I am using the FCKEditor in a CMS that I have made. I have a slight problem. The page on which the editor resides is in a different directory than where the edited HTML page resides.
This means that the path of the image is different when viewing the page inside editor from the actual page. As a result the image is displayed correctly on the actual page, but not in the editor.
This seems like such a common problem, yet I can't get it to work. I've juggled with the paths (I'd like to keep them relative to the document) but nothing seems to work.
Is there an easy way out of this?
Thanks very much for your help!
Maurits
Re: Image not showing in editor
I've got exactly the same trouble. I can't get images displayed properly in the editor. Howerver, they are displayed well in the internet page created with the editor... I don't understant, anyhelp is very welcome !
Swann
Re: Image not showing in editor
Hello,
I assume that what are you trying to do is similar to that sample situation:
editor is located in:
/path/to/www/fckeditor/
and you call it from:
/path/to/www/fckeditor/edit_page.php
but your site files are located in:
/path/to/www/other/directory/
e.g.
/path/to/www/other/directory/page.html
/path/to/www/other/directory/img.jpg
In page.html images are being displayed using relative path:
so when you pass content of file to FCKeditor :
FCKeditor doesn't display your images, right?
Please check our Wiki: http://wiki.fckeditor.net/Developer's_Guide/Configuration/Configurations_Settings and search for BaseHref.
Setting something similar to this in fckconfig.js should help:
Wiktor Walc
CTO, CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
Re: Image not showing in editor
Okay, that was exactly this configuration I mist all the time. I tought I would finish crazy.
Only one thing: I LOVE YOU
FCKConfig.BaseHref = 'http://127.0.0.1:81/aafx/' ; is what was missing.
Congratz, and thank you.
Swann