Is there a way to return different domain for ckeditor when you click "Insert file" button. For example:
http://static.example.com/zzz/xxx/ instead of http://example.com/sites/default/files/zzz/xxx/

zzz/xxx format will always be month/year (ex. 01/2010, 02/2010, 03/2010 etc) if that make any differece.

Comments

ufku’s picture

You can do it by overriding imce.getURL() method in your theme's script.js.
The below code prepends a domain name to the file URL.

(function($) {
  if (window.imce) {
    var func = imce.getURL;
    imce.getURL = function() {
      var url = func.apply(this, arguments);
      return 'http://example.com' + url;
    };
  }
})(jQuery);
ufku’s picture

Status: Active » Closed (fixed)