ckeditor5 1.24.0 → 1.24.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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 80009856e5d1548b4c74e6d17306213edf82cbad045af31c051fa7cdd8a2f82e
|
4
|
+
data.tar.gz: 67b02d03c42342a7ee8fe36d02d7c8d13e3c7765eb4f2bf96275389260050c74
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 28e347bb06d411fda5a66c37ff21785e8e558cd7b0724c674b2f8d55cdf5e3c5ef2f980f8ec95a952d69314f996d7c2379fb8291634b116a66b248dc6f42b19f
|
7
|
+
data.tar.gz: 1dbbc64df4d51d3ffb8f7192d3f7f0871217bfbe9e17168b8d4d6bedcfdb8f5cbb01b108542078fef4c9b77527b0ee293e4c2c6022606bc8bd488f88eb3dd164
|
@@ -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 =
|
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
|
@@ -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
|
|