ckeditor5 1.31.0 → 1.31.2

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
  SHA256:
3
- metadata.gz: a7597c46553e634d89338c3a5ef6a28ff03541645a9eab898e32f09b59a0f7cf
4
- data.tar.gz: 8ce954837b5b75472270ccc33672e02a04c0ab82db80498ed077f5cd9d8acde9
3
+ metadata.gz: fb62c0fd763e7d5ccc1a3d5a7fbfbe7e42f81f695ba3d81600500e797c2bab1d
4
+ data.tar.gz: 06cbf3847d081a2c75bd984d775ae878083df87eef76e4b65e1d63df712f1e5a
5
5
  SHA512:
6
- metadata.gz: 0c67de9f38b698d7010c4db93791d775cec8878324ddf029e91bb4cc04b7b4ce8660eb8841c027eb65b835be9f25443d52632d064d07854b14e153743167d941
7
- data.tar.gz: 9eb071ef2de50204b5f4e1122a5a0639a60a1dec02681bc772f21da49caa9eb3c16a947b366ec9462aa7d48912ecccf4fe681536024b52123eda29b5b4db35d5
6
+ metadata.gz: 608912e2c16c004ce1b36b388d8a48d3941ff8bda312cd1ba2448786f39ff73f92ed9a46b8d4c7089fc6aec237aaa4088b581fbaf915e5f7953616cd2dc22b78
7
+ data.tar.gz: 9c1bdea5fe47703e9b934e763607bc4aecbfffd290b17a04e3122056449f107cb259b166fb8dd9b6173ba00e0fcb423eb397e725ee9f7efa5e988f88e5489145
data/README.md CHANGED
@@ -10,6 +10,10 @@
10
10
 
11
11
  CKEditor 5 Ruby on Rails integration gem. Provides seamless integration of CKEditor 5 with Rails applications through web components and helper methods. This gem supports various editor types, including classic, inline, balloon, and decoupled editors. It also includes support for custom plugins, translations, and configuration options.
12
12
 
13
+ **Requirements:**
14
+ * Ruby >= 2.5
15
+ * Rails >= 5.0*
16
+
13
17
  > [!IMPORTANT]
14
18
  > This gem is unofficial and not maintained by CKSource. For official CKEditor 5 documentation, visit [ckeditor.com](https://ckeditor.com/docs/ckeditor5/latest/). If you encounter any issues in editor, please report them on the [GitHub repository](https://github.com/ckeditor/ckeditor5/issues).
15
19
 
@@ -87,7 +91,7 @@ CKEditor5::Rails.configure do
87
91
 
88
92
  # Optionally, you can specify version of CKEditor 5 to use.
89
93
  # If it's not specified the default version specified in the gem will be used.
90
- # version '45.0.0'
94
+ # version '45.1.0'
91
95
 
92
96
  # Upload images to the server using the simple upload adapter, instead of Base64 encoding.
93
97
  # simple_upload_adapter
@@ -212,7 +216,7 @@ You can create your own by defining it in the `config/initializers/ckeditor5.rb`
212
216
 
213
217
  CKEditor5::Rails.configure do
214
218
  # It's possible to override the default preset right in the initializer.
215
- version '45.0.0'
219
+ version '45.1.0'
216
220
 
217
221
  # New presets inherit properties from the default preset defined in the initializer.
218
222
  # In this example, the custom preset inherits everything from default but disables the menubar:
@@ -222,7 +226,7 @@ CKEditor5::Rails.configure do
222
226
 
223
227
  # In order to define preset from scratch, you can use the `inherit: false` option.
224
228
  presets.define :blank_preset, inherit: false do
225
- version '45.0.0'
229
+ version '45.1.0'
226
230
 
227
231
  # It tells the integration to fetch the newest security patches and bug fixes.
228
232
  # It may be disabled, but it's highly recommended to keep it enabled to avoid
@@ -344,7 +348,7 @@ Defines the version of CKEditor 5 to be used. The example below shows how to set
344
348
  CKEditor5::Rails.configure do
345
349
  # ... other configuration
346
350
 
347
- version '45.0.0'
351
+ version '45.1.0'
348
352
  end
349
353
  ```
350
354
 
@@ -356,7 +360,7 @@ In order to disable default patches, you can pass the `apply_patches: false` key
356
360
  CKEditor5::Rails.configure do
357
361
  # ... other configuration
358
362
 
359
- version '44.3.0', apply_patches: false
363
+ version '45.1.0', apply_patches: false
360
364
  end
361
365
  ```
362
366
 
@@ -1336,7 +1340,7 @@ It may be useful when you want to define a preset based on the current user or r
1336
1340
  class ApplicationController < ActionController::Base
1337
1341
  def show
1338
1342
  @preset = ckeditor5_preset do
1339
- version '45.0.0'
1343
+ version '45.1.0'
1340
1344
 
1341
1345
  toolbar :sourceEditing, :|, :bold, :italic, :underline, :strikethrough,
1342
1346
  :subscript, :superscript, :removeFormat, :|, :bulletedList, :numberedList,
@@ -1371,7 +1375,7 @@ If you want to override the preset defined in the initializer, you can search fo
1371
1375
  class ApplicationController < ActionController::Base
1372
1376
  def show
1373
1377
  @preset = ckeditor5_preset(:default).override do
1374
- version '45.0.0'
1378
+ version '45.1.0'
1375
1379
 
1376
1380
  toolbar :sourceEditing, :|, :bold, :italic, :underline, :strikethrough,
1377
1381
  :subscript, :superscript, :removeFormat, :|, :bulletedList, :numberedList,
@@ -1544,7 +1548,7 @@ In that scenario it's recommended to add `gpl` method to the initializer along w
1544
1548
 
1545
1549
  CKEditor5::Rails.configure do
1546
1550
  gpl
1547
- version '45.0.0'
1551
+ version '45.1.0'
1548
1552
  end
1549
1553
  ```
1550
1554
 
@@ -30,9 +30,14 @@ module CKEditor5::Rails::Editor
30
30
 
31
31
  def to_attributes
32
32
  {
33
+ bundle: bundle.to_json,
34
+ plugins: serialize_plugins,
35
+ config: serialize_config,
36
+ watchdog: watchdog,
33
37
  type: EDITOR_TYPES[@type]
34
38
  }
35
- .merge(serialized_attributes)
39
+ .merge(editable_height ? { 'editable-height': editable_height } : {})
40
+ .transform_keys(&:to_sym)
36
41
  end
37
42
 
38
43
  def self.valid_editor_type?(type)
@@ -43,16 +48,6 @@ module CKEditor5::Rails::Editor
43
48
 
44
49
  attr_reader :bundle, :watchdog, :type, :config, :editable_height
45
50
 
46
- def serialized_attributes
47
- {
48
- bundle: bundle.to_json,
49
- plugins: serialize_plugins,
50
- config: serialize_config,
51
- watchdog: watchdog
52
- }
53
- .merge(editable_height ? { 'editable-height' => editable_height } : {})
54
- end
55
-
56
51
  def serialize_plugins
57
52
  (config[:plugins] || []).map { |plugin| PropsBasePlugin.normalize(plugin).to_h }.to_json
58
53
  end
@@ -2,8 +2,8 @@
2
2
 
3
3
  module CKEditor5
4
4
  module Rails
5
- VERSION = '1.31.0'
5
+ VERSION = '1.31.2'
6
6
 
7
- DEFAULT_CKEDITOR_VERSION = '45.0.0'
7
+ DEFAULT_CKEDITOR_VERSION = '45.1.0'
8
8
  end
9
9
  end
@@ -36,7 +36,7 @@ RSpec.describe CKEditor5::Rails::Editor::Props do
36
36
  subject(:props) { described_class.new(type, config, bundle: bundle, editable_height: '500px') }
37
37
 
38
38
  it 'includes editable-height attribute' do
39
- expect(props.to_attributes['editable-height']).to eq('500px')
39
+ expect(props.to_attributes[:'editable-height']).to eq('500px')
40
40
  end
41
41
  end
42
42
 
@@ -77,12 +77,12 @@ RSpec.describe CKEditor5::Rails::Editor::Props do
77
77
 
78
78
  it 'accepts integer values' do
79
79
  props = described_class.new(type, config, bundle: bundle, editable_height: 500)
80
- expect(props.to_attributes['editable-height']).to eq('500px')
80
+ expect(props.to_attributes[:'editable-height']).to eq('500px')
81
81
  end
82
82
 
83
83
  it 'accepts pixel string values' do
84
84
  props = described_class.new(type, config, bundle: bundle, editable_height: '500px')
85
- expect(props.to_attributes['editable-height']).to eq('500px')
85
+ expect(props.to_attributes[:'editable-height']).to eq('500px')
86
86
  end
87
87
 
88
88
  it 'raises error for invalid values' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ckeditor5
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.31.0
4
+ version: 1.31.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mateusz Bagiński
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2025-05-12 00:00:00.000000000 Z
12
+ date: 2025-05-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails