Sha256: 5bad342f40fe6472e30e3d6208c224181716e15b310c99e6488ec5b5714ffb26

Contents?: true

Size: 962 Bytes

Versions: 8

Compression:

Stored size: 962 Bytes

Contents

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

window.CKEDITOR_ASSETS_MAPPING = {
<% (Rails.application.assets || environment).each_logical_path(->(path, _) { (path.include?('ckeditor/plugins/') || path.include?('ckeditor/skins/') || path.include?('effective/snippets/') || path.include?('effective/templates/') || path.include?('ckeditor/contents.css')) && !path.include?('effective_ckeditor')}) 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 = (CKEDITOR_ASSETS_MAPPING[url[2]] || '/assets/' + url[2]);
  }

  return resource;
}

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
effective_ckeditor-1.8.3 app/assets/javascripts/effective_ckeditor/before_init.js.erb
effective_ckeditor-1.8.2 app/assets/javascripts/effective_ckeditor/before_init.js.erb
effective_ckeditor-1.8.1 app/assets/javascripts/effective_ckeditor/before_init.js.erb
effective_ckeditor-1.8.0 app/assets/javascripts/effective_ckeditor/before_init.js.erb
effective_ckeditor-1.7.13 app/assets/javascripts/effective_ckeditor/before_init.js.erb
effective_ckeditor-1.7.12 app/assets/javascripts/effective_ckeditor/before_init.js.erb
effective_ckeditor-1.7.11 app/assets/javascripts/effective_ckeditor/before_init.js.erb
effective_ckeditor-1.7.10 app/assets/javascripts/effective_ckeditor/before_init.js.erb