Rich text editor for Spree with Image and File uploading in-place.
Ruby HTML Other
Pull request Compare This branch is 183 commits ahead, 11 commits behind romul:master.
Latest commit 912a66e Jul 15, 2016 @damianlegawiec damianlegawiec committed on GitHub Merge pull request #122 from spree-contrib/update_spree_dependencies
Set spree_backend to >= 3.1.0 and < 4.0 versions

Spree Editor

Build Status Code Climate

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

Please not that this extension is just a simple integration of some pretty complex gems: ckeditor and tinymce-rails.

If you have issues, please check their issues trackers first.

  1. Add this extension to your Gemfile with this line:

    gem 'spree_editor', github: 'spree-contrib/spree_editor', branch: 'X-X-stable'

    The branch option is important: it must match the version of Spree you're using. For example, use 3-0-stable if you're using Spree 3-0-stable or any 3.0.x version.

  2. Install the gem using Bundler:

    bundle install
  3. Copy & run migrations

    bundle exec rails g spree_editor:install
  4. If using CKEditor, and would like to enable file uploads run the ckeditor generator:

    $ rails g ckeditor:install --orm=active_record --backend=paperclip && rake db:migrate
  5. In order to secure your file uploads to only be accessed by admins you will also need to configure config/initializers/ckeditor.rb:

    config.authorize_with :cancan, Spree::Ability
  6. In order to precompile CKEditor's generated assets, you will need to add a line in config/initializers/assets.rb:

    Rails.application.config.assets.precompile += %w( ckeditor/*)
  7. Restart your server

    If your server was running, restart it so that it can find the assets properly.


Preferences can be updated within the admin panel under "configuration" then "rich editor".

Or you may set them with an initializer within your application:

SpreeEditor::Config.tap do |config|
  config.ids = 'product_description page_body event_body'

  # change the editor to CKEditor
  config.current_editor = 'CKEditor'

The default preference is:

  enabled: true,
  current_editor: 'TinyMCE',
  ids: 'product_description page_body'


To obtain support for multiple languages with TinyMCE add tinymce-rails-langs to your Gemfile:

gem 'tinymce-rails-langs'

TinyMCE will not be loaded unless it finds a language package matching your Spree::Config.default_locale.


See corresponding guidelines

Copyright (c) 2010-2015 divineforest and other contributors, released under the New BSD License