effective_form_inputs 0.8.13 → 0.8.14
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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 85e30970f11deb1ad9dc739abe12b1fce6b77454
|
4
|
+
data.tar.gz: 95488861713f9e55c22d096b842143cdb0d6dd69
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 87fe2f389f73985e0ada2e9d63ca63b84ed36d82e5599a7139b6e583e9ae68dc90c4840e93a8c42dcb6e3c1c7478d437b7c979390ac8fcd4b0dce032a72af066
|
7
|
+
data.tar.gz: f46868f6981c758b5d827976b88462b379333e065a504b98cabe9e9f42c890680145ddf03a5e88d19a29cd808402eae39e00cf98735c3a3b319ae5a312b56d79
|
data/README.md
CHANGED
@@ -538,7 +538,7 @@ As a SimpleForm input:
|
|
538
538
|
|
539
539
|
### Options
|
540
540
|
|
541
|
-
You can specify the `toolbar` as `'full'` or `'simple'
|
541
|
+
You can specify the `toolbar` as `'full'` or `'simple'`:
|
542
542
|
|
543
543
|
The full toolbar includes Image, oEmbed and Assets, wheras simple does not.
|
544
544
|
|
@@ -547,6 +547,21 @@ The full toolbar includes Image, oEmbed and Assets, wheras simple does not.
|
|
547
547
|
= f.input :body, :as => :effective_ckeditor_text_area, :toolbar => 'simple'
|
548
548
|
```
|
549
549
|
|
550
|
+
You can specify the `height` and `width`:
|
551
|
+
|
552
|
+
```ruby
|
553
|
+
= f.input :body, :as => :effective_ckeditor_text_area, :height => '400px;', :width => '200px;'
|
554
|
+
```
|
555
|
+
|
556
|
+
And you can specify a `contentsCss` stylesheet:
|
557
|
+
|
558
|
+
By default, this loads a CDN hosted bootstrap 3.3.6 stylesheet. This value can be an array of urls.
|
559
|
+
|
560
|
+
```ruby
|
561
|
+
= f.input :body, :as => :effective_ckeditor_text_area, :contentsCss => asset_path('application.css')
|
562
|
+
```
|
563
|
+
|
564
|
+
|
550
565
|
## License
|
551
566
|
|
552
567
|
MIT License. Copyright [Code and Effect Inc.](http://www.codeandeffect.com/)
|
@@ -80,7 +80,12 @@ initCkeditor = (textarea) ->
|
|
80
80
|
|
81
81
|
options[k] = v for k, v of (textarea.data('input-js-options') || {})
|
82
82
|
|
83
|
-
CKEDITOR.replace(textarea.attr('id'), options)
|
83
|
+
ckeditor = CKEDITOR.replace(textarea.attr('id'), options)
|
84
|
+
|
85
|
+
ckeditor.on 'insertElement', (event) ->
|
86
|
+
element = $(event.data.$)
|
87
|
+
if element.is('table')
|
88
|
+
element.removeAttr('style').addClass('table')
|
84
89
|
|
85
90
|
$ -> initialize()
|
86
91
|
$(document).on 'page:change', -> initialize()
|
@@ -8,6 +8,7 @@ module Inputs
|
|
8
8
|
effective_assets: defined?(EffectiveAssets).present?,
|
9
9
|
effective_ckeditor_js_path: asset_path('effective_ckeditor.js'),
|
10
10
|
effective_ckeditor_css_path: asset_path('effective_ckeditor.css'),
|
11
|
+
contentsCss: (options[:contentCss] || "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"),
|
11
12
|
toolbar: options[:toolbar],
|
12
13
|
height: options[:height],
|
13
14
|
width: options[:width]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
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.14
|
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-03-
|
11
|
+
date: 2016-03-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|