Skip to content

Commit

Permalink
Configure ckeditor base path in ckeditor/init.js
Browse files Browse the repository at this point in the history
  • Loading branch information
galetahub committed Feb 23, 2012
1 parent 4bad5fe commit e5a4cec
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 10 deletions.
15 changes: 10 additions & 5 deletions README.rdoc
Expand Up @@ -5,7 +5,7 @@ the results users have when publishing it. It brings to the web common editing f


== Features == Features


* Rails 3.1 integration * Rails 3.2 integration
* Files browser * Files browser
* HTML5 files uploader * HTML5 files uploader
* Hooks for formtastic and simple_form forms generators * Hooks for formtastic and simple_form forms generators
Expand All @@ -14,9 +14,9 @@ the results users have when publishing it. It brings to the web common editing f


== Install == Install


Rails 3.1: Rails 3.2:


gem "ckeditor", "3.7.0.rc2" gem "ckeditor", "3.7.0.rc3"


Rails <= 3.0: Rails <= 3.0:


Expand Down Expand Up @@ -64,9 +64,14 @@ Autoload ckeditor models folder (application.rb):


== Usage == Usage


Include ckeditor javascripts rails 3.1: Include ckeditor javascripts rails 3.2:

//= require ckeditor/init

or

<%= javascript_include_tag "ckeditor/init" %>


//= require ckeditor/ckeditor


Rails <= 3.0: Rails <= 3.0:


Expand Down
8 changes: 8 additions & 0 deletions app/assets/javascripts/ckeditor/init.js
@@ -0,0 +1,8 @@
//= require_self
//= require ckeditor/ckeditor

(function() {
if (typeof window['CKEDITOR_BASEPATH'] === "undefined" || window['CKEDITOR_BASEPATH'] === null) {
window['CKEDITOR_BASEPATH'] = "/assets/ckeditor/";
}
}).call(this);
2 changes: 1 addition & 1 deletion test/dummy/app/assets/javascripts/application.js
Expand Up @@ -8,4 +8,4 @@
//= require jquery_ujs //= require jquery_ujs
//= require_tree . //= require_tree .


//= require ckeditor/ckeditor //= require ckeditor/init
4 changes: 0 additions & 4 deletions vendor/assets/javascripts/ckeditor/ckeditor.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e5a4cec

Please sign in to comment.