Sha256: 5b075f87b4536bc2851547c990a0f5afd0d17e26ee850d97946bd8b30021bc68
Contents?: true
Size: 1006 Bytes
Versions: 2
Compression:
Stored size: 1006 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({ // You can specify, which ones plugins you need. // If you want to use plugins, you have add plugins to your // application.js and application.css files and uncomment the line below: // "plugins": ['fontsize', 'fontcolor', 'fontfamily', 'fullscreen', 'textdirection', 'clips'], "imageUpload":"/redactor_rails/pictures?" + params, "imageGetJson":"/redactor_rails/pictures", "fileUpload":"/redactor_rails/documents?" + params, "fileGetJson":"/redactor_rails/documents", "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 | lib/generators/redactor/templates/config.js |
redactor-rails-0.5.0 | lib/generators/redactor/templates/config.js |