Search code examples
ckeditormodxmodx-revolution

ModX Revo Relative Path Images in Resource Editor


I have a site in ModX Revolution that I am having an issue with. Well... ok, it's not an issue for me, but for my client it will definately be an issue.

The issue is, I am finding that when adding an image to a resource using the CKEditor plugin, the paths to the images are not site relative(they are being put in as assets/images/image.png, when it should be /assets/images/image.png). Which of course will cause them to fail to load in when /page/YXZ is rendered.

I have searched all around, and I cannot find the answer to this seemingly impossible task...

How can I ensure that all files are relative to the site, without having to revert to <base href="" /> tags?

Note:

I cannot use <base href>, due to #identifier links throughout the site.


Solution

  • I have "fixed" the issue by going with TinyMCE instead of CKEditor for this. There are special settings in TinyMCE that allow me to set rootrelative links for images and files.