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 +12 -1
- data/lib/redactor-rails/helper.rb +4 -0
- data/lib/redactor-rails/version.rb +1 -1
- metadata +3 -3
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
|
metadata
CHANGED