redactor-rails 0.2.1 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -31,6 +31,17 @@ Create a `config/redactor.yml` file with your global configuration options:
31
31
  lang: 'zh_tw'
32
32
  autoresize: true
33
33
 
34
+ If You Want To setup a new language in Redactor you should do two things:
35
+
36
+ In you global configuration `config/redactor.yml` set option
37
+
38
+ lang: 'zh_tw'
39
+ and
40
+
41
+ Add to your layout
42
+
43
+ <%= redactor_lang('zh_tw') %>
44
+
34
45
  See the [Redactor Documentation](http://redactorjs.com/docs/settings/) for a full list of configuration options.
35
46
 
36
47
  ### Include the Redactor assets
@@ -78,4 +89,4 @@ the `redactor-rails` project is MIT-LICENSE.
78
89
  You may use `Redactor` for non-commercial websites for free, however, we do not guarantee any technical support.
79
90
 
80
91
  Redactor has [3 different licenses](http://redactorjs.com/download/) for commercial use.
81
- For details please see [License Agreement](http://redactorjs.com/download/).
92
+ For details please see [License Agreement](http://redactorjs.com/download/).
@@ -9,5 +9,9 @@ module RedactorRails
9
9
  configuration = RedactorRails.configuration.merge(options)
10
10
  "$(document).ready(function(){$('.redactor').redactor(#{configuration.options_for_redactor.to_json});});".html_safe
11
11
  end
12
+ # Setting Redactor Language
13
+ def redactor_lang(lang = 'en')
14
+ javascript_include_tag "redactor-rails/langs/#{lang}.js"
15
+ end
12
16
  end
13
17
  end
@@ -1,3 +1,3 @@
1
1
  module RedactorRails
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.3"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redactor-rails
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 17
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 1
10
- version: 0.2.1
9
+ - 3
10
+ version: 0.2.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Sammy