effective_ckeditor 1.8.0 → 1.8.1

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: 07e9a7ddb5789d5a28fa0ccc50e93f2094ad294d
4
- data.tar.gz: 057d77cfab197982bdef32e0880fba3a7ac2f9c4
3
+ metadata.gz: ff984a7b8dc828b4ee04e764e19bd7988fcef60e
4
+ data.tar.gz: 26933fc9d02f8ec8f7225f8bcf47c3df29c015ab
5
5
  SHA512:
6
- metadata.gz: 50c88727024fcb625c7d93eb8e278d8ca5baefed23c28bf357ebfc4ed79b9cbf4fdea6381f7be99acccaef818acb0b53c77deb772f0aee70e0b0ac5285e821d5
7
- data.tar.gz: 20b1038245d0a0e67be0903af55455daed48f28fbe3a9554065ac794cafddb4169cd642ad2e8f444659f7a5a7b06b22285c69dd55c02a419ea81cffe2ee913de
6
+ metadata.gz: 88a0149f0d1c77e25b4902388e05e7ae3fe0232b606d0e43bbd71f698b90c75a6db33cd19cc962620f8ba3ed95ef7dd68da108cff2791ce5521cfa735254c034
7
+ data.tar.gz: b7d21f7d944a168a2c09208d885c42f6ed198a17a877c37d102335aa5ff8246a39cfd5ddf9236abafcc1298be1866be44302bbd5abb882c01b9ded8843cada4d
@@ -143,3 +143,23 @@ affixBootstrapMenu = (editor_div) ->
143
143
  dropdown.on 'click.bs.dropdown', (event) -> event.preventDefault()
144
144
  dropdown.on 'click', (event) ->
145
145
  $(this).removeClass('open') and event.stopPropagation() if $(this).hasClass('open')
146
+
147
+
148
+ # This removes the width and height attributes from being set on an image
149
+ # The attributes will come back if you drag & drop resize the image
150
+ CKEDITOR.on 'dialogDefinition', (ev) ->
151
+ dialogName = ev.data.name
152
+ dialogDefinition = ev.data.definition
153
+
154
+ if (dialogName == 'image2')
155
+ try
156
+ dialogDefinition.contents['0'].elements['2'].style = 'display: none;' # Hide width/height fields entirely
157
+
158
+ widthDefinition = dialogDefinition.contents['0'].elements['2'].children['0']
159
+ heightDefinition = dialogDefinition.contents['0'].elements['2'].children['1']
160
+
161
+ if widthDefinition['label'] == 'Width'
162
+ widthDefinition.commit = (widget) -> widget.setData('width', null)
163
+
164
+ if heightDefinition['label'] == 'Height'
165
+ heightDefinition.commit = (widget) -> widget.setData('height', null)
@@ -1,3 +1,3 @@
1
1
  module EffectiveCkeditor
2
- VERSION = '1.8.0'.freeze
2
+ VERSION = '1.8.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_ckeditor
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.0
4
+ version: 1.8.1
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-12-07 00:00:00.000000000 Z
11
+ date: 2017-03-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails