Sha256: 399da0a94d0e6c97a58dc968035e75eb81981c93ebd5cf0b582da857c36e2005

Contents?: true

Size: 570 Bytes

Versions: 2

Compression:

Stored size: 570 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).on( 'ready page:load', window.init_redactor );

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
redactor-rails4-0.5.0 vendor/assets/javascripts/redactor-rails/config.js
redactor-rails-0.5.0 vendor/assets/javascripts/redactor-rails/config.js