<commit_before># Ckeditor

[![Build Status](https://semaphoreci.com/api/v1/projects/9c3e4e36-9716-4362-aaa5-ef9644c72313/565007/badge.svg)](https://semaphoreci.com/igor-galeta/ckeditor)
[![Code Climate](https://codeclimate.com/github/galetahub/ckeditor/badges/gpa.svg)](https://codeclimate.com/github/galetahub/ckeditor)

CKEditor is a WYSIWYG text editor designed to simplify web content creation. It brings common word processing features directly to your web pages. Enhance your website experience with our community maintained editor.
[ckeditor.com](http://ckeditor.com/)

## Features

* Ckeditor version 4.5.6 (9 Dec 2015)
* Rails 4 integration
* Files browser
* HTML5 file uploader
* Hooks for formtastic and simple_form forms generators
* Integrated with authorization framework CanCan and Pundit

## Installation

For basic usage just include the ckeditor gem:

```
gem 'ckeditor'
```

or if you'd like to use the latest version from Github:

```
gem 'ckeditor', github: 'galetahub/ckeditor'
```

For file upload support, you must generate the necessary file storage models.
The currently supported backends are:

* ActiveRecord (paperclip, carrierwave, dragonfly)
* Mongoid (paperclip, carrierwave, dragonfly)

### How to generate models to store uploaded files

#### ActiveRecord + paperclip

To use the active_record orm with paperclip (i.e. the default settings):

```
gem 'paperclip'

rails generate ckeditor:install --orm=active_record --backend=paperclip
```<commit_msg>Add refile option on ActiveRecord to README.md<commit_after># Ckeditor

[![Build Status](https://semaphoreci.com/api/v1/projects/9c3e4e36-9716-4362-aaa5-ef9644c72313/565007/badge.svg)](https://semaphoreci.com/igor-galeta/ckeditor)
[![Code Climate](https://codeclimate.com/github/galetahub/ckeditor/badges/gpa.svg)](https://codeclimate.com/github/galetahub/ckeditor)

CKEditor is a WYSIWYG text editor designed to simplify web content creation. It brings common word processing features directly to your web pages. Enhance your website experience with our community maintained editor.
[ckeditor.com](http://ckeditor.com/)

## Features

* Ckeditor version 4.5.6 (9 Dec 2015)
* Rails 4 integration
* Files browser
* HTML5 file uploader
* Hooks for formtastic and simple_form forms generators
* Integrated with authorization framework CanCan and Pundit

## Installation

For basic usage just include the ckeditor gem:

```
gem 'ckeditor'
```

or if you'd like to use the latest version from Github:

```
gem 'ckeditor', github: 'galetahub/ckeditor'
```

For file upload support, you must generate the necessary file storage models.
The currently supported backends are:

* ActiveRecord (paperclip, carrierwave, dragonfly, refile)
* Mongoid (paperclip, carrierwave, dragonfly)

### How to generate models to store uploaded files

#### ActiveRecord + paperclip

To use the active_record orm with paperclip (i.e. the default settings):

```
gem 'paperclip'

rails generate ckeditor:install --orm=active_record --backend=paperclip
```
{'fraction_non_alphanumeric': 0.10229159747592162, 'fraction_numerical': 0.02656924609764198, 'mean_word_length': 5.314465408805032, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6550420', 'n_tokens_mistral': 995, 'n_tokens_neox': 916, 'n_words': 301}