Sha256: d5ad8b10907b5e7a344a5e9df2d4379aee35270f63ec88518708d3cbae0cce96

Contents?: true

Size: 768 Bytes

Versions: 3

Compression:

Stored size: 768 Bytes

Contents

window['CKEDITOR_BASEPATH'] = "/assets/ckeditor/";

window.CKEDITOR_ASSETS_MAPPING = {
<% Rails.application.assets.each_logical_path(->(path){ path =~ /ckeditor/ && path != 'ckeditor/override.js' }) do |asset| %>
  "<%= asset %>": "<%= asset_path(asset) %>",
<% end %>
}

window.CKEDITOR_GETURL = function( resource ) {
  // If this is not a full or absolute path.
  if ( resource.indexOf( ':/' ) == -1 && resource.indexOf( '/' ) !== 0 )
    resource = this.basePath + resource;

  // Add the timestamp, except for directories.
  if ( resource.charAt( resource.length - 1 ) != '/'  ){
    var url = resource.match( /^(.*?:\/\/[^\/]*)\/assets\/(.+)/ );
    if(url) resource = url[1] + (CKEDITOR_ASSETS_MAPPING[url[2]] || '/assets/' + url[2]);
  }

  return resource;
}

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
ckeditor-4.0.8 app/assets/javascripts/ckeditor/override.js.erb
base2_ckeditor-4.0.7 app/assets/javascripts/ckeditor/override.js.erb
ckeditor-4.0.7 app/assets/javascripts/ckeditor/override.js.erb