Skip to content

Commit

Permalink
Document CKEditor
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff Dutil committed Mar 25, 2013
1 parent 5a56690 commit 127be94
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 25 deletions.
57 changes: 39 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,51 @@
SpreeEditor
===========

# Summary #
# Summary

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

- [WYM Editor](http://www.wymeditor.org/)
- [CKEditor](http://ckeditor.com/)
- [TinyMCE](http://www.tinymce.com/)
- [YUI Rich Editor](http://developer.yahoo.com/yui/editor/) (N.B. not currently available in Spree 0.70.x and newer)

# Installation #
# Installation

1. Add the Spree Editor gem to your Gemfile:

`gem 'spree_editor', :github => "spree/spree_editor"`

`gem 'tinymce-rails', '>= 3.4.7.0.1'`
```ruby
gem 'spree_editor', :github => 'spree/spree_editor'
```

2. Select CKEditor or TinyMCE to use for an editor, and add the appropriate gem to your Gemfile:

```ruby
gem 'ckeditor'
```

or

```ruby
gem 'tinymce-rails', '>= 3.4.7.0.1'`
```

2. Install the gem:
3. Install the gems:

`bundle install`
```shell
bundle install
```

4. Install the assets:

3. Install the assets:
```shell
rails g spree_editor:install
```

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

```shell
rails generate ckeditor:install --orm=active_record --backend=paperclip
rake db:migrate
```

# Configuration

Expand All @@ -37,15 +59,14 @@ SpreeEditor::Config.tap do |config|
end
```

# Language-Support #
# Language-Support

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

`gem 'tinymce-rails-langs'`
```ruby
gem 'tinymce-rails-langs'
```

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


*NOTE:* currently YUI Rich Editor is not yet 3.1 asset ready.
The only editors currently working on Spree 0.70.x are WYMEditor and TinyMCE.

Copyright (c) 2010 [divineforest], released under the New BSD License
Copyright (c) 2010-2013 [divineforest], released under the New BSD License
1 change: 0 additions & 1 deletion app/views/shared/editor_engines/_ck_editor.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@
}
});
</script>

12 changes: 6 additions & 6 deletions spree_editor.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@ Gem::Specification.new do |s|
s.platform = Gem::Platform::RUBY
s.name = 'spree_editor'
s.version = '2.0.0'
s.summary = 'Adds support of several WYSIWYG editors to Spree'
s.description = 'Atm supported: YUIRichEditor, WYMEditor, TinyMCE'
s.summary = 'Adds support for WYSIWYG editors to Spree'
s.description = 'Currently Supported: CKEditor, TinyMCE'
s.required_ruby_version = '>= 1.8.7'

s.authors = ['Alexander Shuhin', 'Roman Smirnov', 'divineforest', 'Marc Lee']
s.authors = ['Alexander Shuhin', 'Roman Smirnov', 'divineforest', 'Marc Lee', 'Jeff Dutil']
s.homepage = 'http://github.com/spree/spree_editor'

s.files = `git ls-files`.split("\n")
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
s.require_path = 'lib'
s.requirements << 'none'

s.add_dependency('tinymce-rails', '>= 3.4.7.0.1')
s.add_dependency('spree_core', '>= 2.0.0.beta')
s.add_dependency('ckeditor')
s.add_dependency 'ckeditor'
s.add_dependency 'spree_core', '>= 2.0.0.beta'
s.add_dependency 'tinymce-rails', '>= 3.4.7.0.1'

s.add_development_dependency 'rspec-rails'
end

0 comments on commit 127be94

Please sign in to comment.