Sha256: 2948609ff2db2a09c65613986c0736dc52aa45f08b8bcae65465b2615bc2dddd

Contents?: true

Size: 607 Bytes

Versions: 4

Compression:

Stored size: 607 Bytes

Contents

window.init_redactor = function(){
  var csrf_token = $('meta[name=csrf-token]').attr('content');
  var csrf_param = $('meta[name=csrf-param]').attr('content');
  var params;
  if (csrf_param !== undefined && csrf_token !== undefined) {
    params = csrf_param + "=" + encodeURIComponent(csrf_token);
  }
  $('.redactor').redactor(
    { "imageUpload":"/redactor_rails/pictures?" + params,
      "imageGetJson":"/redactor_rails/pictures",
      "path":"/assets/redactor-rails",
      "css":"style.css"}
  );
}

$(document).ready( window.init_redactor );
$(window).bind('page:change', window.init_redactor);

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
redactor-rails-0.4.5 vendor/assets/javascripts/redactor-rails/config.js
redactor-rails-0.4.4 vendor/assets/javascripts/redactor-rails/config.js
redactor-rails-0.4.3 vendor/assets/javascripts/redactor-rails/config.js
redactor-rails-0.4.2 vendor/assets/javascripts/redactor-rails/config.js