Skip to content

bandzoogle/rails-ckeditor

 
 

Repository files navigation

CKEditor Rails

CKEditor for Rails.

Usage

This gem vendors CKEditor 3.6.3 for Rails 3 and greater. The files will be added to the asset pipeline and available for you to use.

Include ckeditor-rails in your Gemfile:

gem 'ckeditor-rails'

Now you can include it on the asset pipeline:

//= require ckeditor

You can also use it standalone in your views:

<%= javascript_include_tag 'ckeditor/ckeditor' %>

Important: It's important you define the CKEDITOR_BASEPATH global variable before you include the ckeditor code. This will make ckeditor work with theasset pipeline on production, otherwise you'll see a white screen where CKEditor should be shown. More info here.

<script type="text/javascript">
    var CKEDITOR_BASEPATH = '/ckeditor/';
</script>
<%= javascript_include_tag 'ckeditor/ckeditor' %>

License

CKEditor license.

About

A gem to automate using CKEditor with Rails 3

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%