<commit_before># Spree Editor

[![Build Status](https://travis-ci.org/spree-contrib/spree_editor.svg?branch=master)](https://travis-ci.org/spree-contrib/spree_editor)
[![Code Climate](https://codeclimate.com/github/spree-contrib/spree_editor/badges/gpa.svg)](https://codeclimate.com/github/spree-contrib/spree_editor)

This extension provides an inline rich-text editor for Spree. It implements different types of editors:

- [CKEditor][1]
- [TinyMCE][2]

---

## Installation

1. Add the Spree Editor gem to your `Gemfile`:
  ```ruby
  gem 'spree_editor', github: 'spree-contrib/spree_editor', branch: 'master'
  ```

2. Run:
  ```sh
  $ bundle install
  $ rails g spree_editor:install
  ```

3. If using CKEditor, and would like to enable file uploads run the ckeditor generator:
  ```sh
  $ rails g ckeditor:install --orm=active_record --backend=paperclip && rake db:migrate
  ```

4. In order to secure your file uploads to only be accessed by admins you will also need to configure config/initializers/ckeditor.rb:
  ```ruby
  config.authorize_with :cancan, Spree::Ability
  ```

---
<commit_msg>improved README.md adding precompile ckeditor in assets.rb<commit_after># Spree Editor

[![Build Status](https://travis-ci.org/spree-contrib/spree_editor.svg?branch=master)](https://travis-ci.org/spree-contrib/spree_editor)
[![Code Climate](https://codeclimate.com/github/spree-contrib/spree_editor/badges/gpa.svg)](https://codeclimate.com/github/spree-contrib/spree_editor)

This extension provides an inline rich-text editor for Spree. It implements different types of editors:

- [CKEditor][1]
- [TinyMCE][2]

---

## Installation

1. Add the Spree Editor gem to your `Gemfile`:
  ```ruby
  gem 'spree_editor', github: 'spree-contrib/spree_editor', branch: 'master'
  ```

2. Run:
  ```sh
  $ bundle install
  $ rails g spree_editor:install
  ```

3. If using CKEditor, and would like to enable file uploads run the ckeditor generator:
  ```sh
  $ rails g ckeditor:install --orm=active_record --backend=paperclip && rake db:migrate
  ```

4. In order to secure your file uploads to only be accessed by admins you will also need to configure config/initializers/ckeditor.rb:
  ```ruby
  config.authorize_with :cancan, Spree::Ability
  ```

5. In order to precompile CKEditor's generated assets, you will need to add a line in config/initializers/assets.rb:
  ```ruby
  Rails.application.config.assets.precompile += %w( ckeditor/*)
  ```
---

{'fraction_non_alphanumeric': 0.13338788870703763, 'fraction_numerical': 0.005319148936170213, 'mean_word_length': 4.421286031042128, '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': '4834148', 'n_tokens_mistral': 840, 'n_tokens_neox': 819, 'n_words': 221}