ckeditor5 1.31.0 → 1.31.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d4d221350919d57a7f3036caa8030667ebe2ce85e1524cc07056c8e117371e5b
|
4
|
+
data.tar.gz: 9bbc7f800b867add38920511923aa01dc02a1ba2741d84b4215c92fd4442dd46
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f5778454b1336fddbb72c812d4950b647ab300a30a810eba6c06d2676951ea39482bcf2d805cd2f6bea9e6fe0a0d71c57fd7d3812dbe3c43bbfe6a37100d4731
|
7
|
+
data.tar.gz: 75f4692d347dc3b410589d09123fcd94f3e378c759a334166cb727bcc19014c486c51e0d8ba8df9eaa3f5d0ae3e91b41de9f7d1d83f3d2de37dff8c887fe0dd8
|
@@ -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(
|
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
|
@@ -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.
|
4
|
+
version: 1.31.1
|
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
|
+
date: 2025-05-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|