effective_form_inputs 0.8.11 → 0.8.12
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 172bee6eafd010a5aaa58925e69b0a949e24b94c
|
4
|
+
data.tar.gz: ba0fdd250bc6bab098d5a3cdb25494db1d3d85ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8cef188c31fe49dd35725fbc373ed8030ad7b720a71a5a10338b8f57942763e307783fc39bd725b9210f67217cf1613290b60e05ac19c5165e0879c9a5ac693f
|
7
|
+
data.tar.gz: 04c95b05ff737f172dea75d447eba6719c569e202a6487fc0dec6aa2e0a37da2cddc4e6e54bf1a4ccadb21aa6ec72aaabe62037c702f3287f6c8c85308edb305
|
data/README.md
CHANGED
@@ -536,6 +536,17 @@ As a SimpleForm input:
|
|
536
536
|
= f.input :body, :as => :effective_ckeditor_text_area
|
537
537
|
```
|
538
538
|
|
539
|
+
### Options
|
540
|
+
|
541
|
+
You can specify the `toolbar` as `'full'` or `'simple'`.
|
542
|
+
|
543
|
+
The full toolbar includes Image, oEmbed and Assets, wheras simple does not.
|
544
|
+
|
545
|
+
```ruby
|
546
|
+
= f.input :body, :as => :effective_ckeditor_text_area, :toolbar => 'full'
|
547
|
+
= f.input :body, :as => :effective_ckeditor_text_area, :toolbar => 'simple'
|
548
|
+
```
|
549
|
+
|
539
550
|
## License
|
540
551
|
|
541
552
|
MIT License. Copyright [Code and Effect Inc.](http://www.codeandeffect.com/)
|
@@ -42,8 +42,12 @@ setupCkeditor = ($inputs) ->
|
|
42
42
|
");
|
43
43
|
|
44
44
|
initCkeditor = (textarea) ->
|
45
|
+
console.log textarea
|
46
|
+
console.log textarea.data('input-js-options')
|
47
|
+
console.log textarea.data('input-js-options')['toolbar']
|
48
|
+
|
45
49
|
CKEDITOR.replace(textarea.attr('id'),
|
46
|
-
toolbar: 'full'
|
50
|
+
toolbar: ((textarea.data('input-js-options') || {})['toolbar'] || 'full')
|
47
51
|
effectiveRegionType: 'full'
|
48
52
|
customConfig: ''
|
49
53
|
enterMode: CKEDITOR.ENTER_P
|
@@ -68,6 +72,14 @@ initCkeditor = (textarea) ->
|
|
68
72
|
{ name: 'basicstyles', items: ['Bold', 'Italic', 'Underline'] },
|
69
73
|
{ name: 'insert', items: ['Link', 'Table', '-', 'Image', 'oembed', 'EffectiveAssets'] },
|
70
74
|
{ name: 'lists', items: ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent'] },
|
75
|
+
],
|
76
|
+
toolbar_simple: [
|
77
|
+
{ name: 'definedstyles', items: ['Format'] },
|
78
|
+
{ name: 'html', items: ['ShowBlocks'] },
|
79
|
+
{ name: 'justify', items: ['JustifyLeft', 'JustifyCenter', 'JustifyRight']}
|
80
|
+
{ name: 'basicstyles', items: ['Bold', 'Italic', 'Underline'] },
|
81
|
+
{ name: 'insert', items: ['Link', 'Table'] },
|
82
|
+
{ name: 'lists', items: ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent'] },
|
71
83
|
]
|
72
84
|
)
|
73
85
|
|
@@ -7,7 +7,8 @@ module Inputs
|
|
7
7
|
{
|
8
8
|
effective_assets: defined?(EffectiveAssets).present?,
|
9
9
|
effective_ckeditor_js_path: asset_path('effective_ckeditor.js'),
|
10
|
-
effective_ckeditor_css_path: asset_path('effective_ckeditor.css')
|
10
|
+
effective_ckeditor_css_path: asset_path('effective_ckeditor.css'),
|
11
|
+
toolbar: (options[:toolbar] || 'full')
|
11
12
|
}
|
12
13
|
end
|
13
14
|
|
metadata
CHANGED
@@ -1,41 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_form_inputs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-03-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 3.2.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 3.2.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: simple_form
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 3.1.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 3.1.0
|
41
41
|
description: Collection of Form Inputs
|
@@ -107,17 +107,17 @@ require_paths:
|
|
107
107
|
- lib
|
108
108
|
required_ruby_version: !ruby/object:Gem::Requirement
|
109
109
|
requirements:
|
110
|
-
- -
|
110
|
+
- - ">="
|
111
111
|
- !ruby/object:Gem::Version
|
112
112
|
version: '0'
|
113
113
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- -
|
115
|
+
- - ">="
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: '0'
|
118
118
|
requirements: []
|
119
119
|
rubyforge_project:
|
120
|
-
rubygems_version: 2.4.
|
120
|
+
rubygems_version: 2.4.5.1
|
121
121
|
signing_key:
|
122
122
|
specification_version: 4
|
123
123
|
summary: Collection of Form Inputs
|