ckeditor5 1.24.0 → 1.24.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: 0ee1985934d17921821b5d298275a64b71154309e0492f8da8aaae33c7dab2bd
4
- data.tar.gz: 880ec9989cd23462c889b35e68c7b49bdc9842c826b19326095d6380550220b8
3
+ metadata.gz: 80009856e5d1548b4c74e6d17306213edf82cbad045af31c051fa7cdd8a2f82e
4
+ data.tar.gz: 67b02d03c42342a7ee8fe36d02d7c8d13e3c7765eb4f2bf96275389260050c74
5
5
  SHA512:
6
- metadata.gz: d7b01be500143a77b4457b50115daea67bc64351cb58b37e7f8cfe50f2c28cd0b8007633b85697ca90878a09b0c3a37df00fcae4d3927aff7bad57e27d21ca92
7
- data.tar.gz: 202ed9359e0b7b57d260f391c46bcd6a985eda11fb91df409bc345470c879a587487f8f7a23382d440b5963a797411dc6c58a60ddfe43e2ab24dc70b642a7fb0
6
+ metadata.gz: 28e347bb06d411fda5a66c37ff21785e8e558cd7b0724c674b2f8d55cdf5e3c5ef2f980f8ec95a952d69314f996d7c2379fb8291634b116a66b248dc6f42b19f
7
+ data.tar.gz: 1dbbc64df4d51d3ffb8f7192d3f7f0871217bfbe9e17168b8d4d6bedcfdb8f5cbb01b108542078fef4c9b77527b0ee293e4c2c6022606bc8bd488f88eb3dd164
@@ -39,6 +39,7 @@ module CKEditor5::Rails
39
39
  # toolbar :bold, :italic
40
40
  # end
41
41
  def initialize(&block)
42
+ @disallow_inline_plugin_compression = true
42
43
  @config = {
43
44
  plugins: []
44
45
  }
@@ -14,7 +14,7 @@ module CKEditor5::Rails
14
14
  class UnsupportedESModuleError < StandardError; end
15
15
 
16
16
  included do
17
- attr_reader :disallow_inline_plugins
17
+ attr_reader :disallow_inline_plugins, :disallow_inline_plugin_compression
18
18
  end
19
19
 
20
20
  # Registers an external plugin loaded from a URL
@@ -62,7 +62,11 @@ module CKEditor5::Rails
62
62
  end
63
63
 
64
64
  wrapped_code = "(async () => { #{code} })();"
65
- minified_code = Terser.new(compress: false, mangle: true).compile(wrapped_code)
65
+ minified_code = wrapped_code
66
+
67
+ unless disallow_inline_plugin_compression
68
+ minified_code = Terser.new(compress: false, mangle: true).compile(minified_code)
69
+ end
66
70
 
67
71
  register_plugin(Editor::PropsInlinePlugin.new(name, minified_code))
68
72
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  module CKEditor5
4
4
  module Rails
5
- VERSION = '1.24.0'
5
+ VERSION = '1.24.1'
6
6
 
7
7
  DEFAULT_CKEDITOR_VERSION = '44.1.0'
8
8
  end
@@ -102,9 +102,7 @@ RSpec.describe CKEditor5::Rails::Context::PresetBuilder do
102
102
  it 'accepts plugin options' do
103
103
  plugin = builder.inline_plugin('Test', plugin_code)
104
104
 
105
- expect(plugin.code).to eq(
106
- '(async()=>{const{Plugin:t}=await import("ckeditor5");return class n extends t{}})();'
107
- )
105
+ expect(plugin.code).to eq("(async () => { #{plugin_code} })();")
108
106
  end
109
107
  end
110
108
 
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.24.0
4
+ version: 1.24.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mateusz Bagiński