Skip to content

Rich text editor for Spree with Image and File uploading in-place

License

Notifications You must be signed in to change notification settings

formrausch/spree_editor

 
 

Repository files navigation

Spree Editor

Build Status Code Climate

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

Installation

  1. Add the Spree Editor gem to your Gemfile:
gem 'spree_editor', github: 'spree/spree_editor'
  1. Run:
$ bundle install
$ rails g spree_editor:install
  1. 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
  1. 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

Configuration

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'
end

Language-Support

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.

Contributing

In the spirit of free software, everyone is encouraged to help improve this project.

Here are some ways you can contribute:

  • by using prerelease versions
  • by reporting bugs
  • by suggesting new features
  • by writing translations
  • by writing or editing documentation
  • by writing specifications
  • by writing code (no patch is too small: fix typos, add comments, clean up inconsistent whitespace)
  • by refactoring code
  • by resolving issues
  • by reviewing patches

Starting point:

  • Fork the repo
  • Clone your repo
  • Run bundle install
  • Run bundle exec rake test_app to create the test application in spec/test_app
  • Make your changes
  • Ensure specs pass by running bundle exec rspec spec
  • Submit your pull request

Copyright (c) 2014 divineforest and other contributors, released under the New BSD License

About

Rich text editor for Spree with Image and File uploading in-place

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 98.8%
  • Other 1.2%