lexxy 1.0.2 → 1.0.4
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 +4 -4
- data/app/assets/javascript/lexxy.js +2374 -388
- data/app/assets/javascript/lexxy.js.br +0 -0
- data/app/assets/javascript/lexxy.js.gz +0 -0
- data/app/assets/javascript/lexxy.js.map +1 -1
- data/app/assets/javascript/lexxy.min.js +4 -4
- data/app/assets/javascript/lexxy.min.js.br +0 -0
- data/app/assets/javascript/lexxy.min.js.gz +0 -0
- data/lib/lexxy/engine.rb +4 -2
- data/lib/lexxy/version.rb +1 -1
- metadata +1 -1
|
Binary file
|
|
Binary file
|
data/lib/lexxy/engine.rb
CHANGED
|
@@ -11,11 +11,13 @@ module Lexxy
|
|
|
11
11
|
|
|
12
12
|
# Rails versions that include Lexxy register it as an editor and allow its markup in
|
|
13
13
|
# Action Text content themselves, so sanitizer lists are left to the application there.
|
|
14
|
-
# This runs before Lexxy registers itself as an editor.
|
|
14
|
+
# This runs before Lexxy registers itself as an editor. The lists are set once the app
|
|
15
|
+
# has booted rather than when ActionText::Content loads, so code that sanitizes with them
|
|
16
|
+
# in a process without eager loading (development, test, rake tasks) sees Lexxy's markup.
|
|
15
17
|
initializer "lexxy.sanitization", before: "lexxy.action_text_editor" do |app|
|
|
16
18
|
next if app.config.action_text.editors&.key?(:lexxy)
|
|
17
19
|
|
|
18
|
-
|
|
20
|
+
app.config.after_initialize do
|
|
19
21
|
default_allowed_tags = Class.new.include(ActionText::ContentHelper).new.sanitizer_allowed_tags
|
|
20
22
|
ActionText::ContentHelper.allowed_tags = default_allowed_tags + %w[ s u video audio source embed table tbody tr th td ]
|
|
21
23
|
|
data/lib/lexxy/version.rb
CHANGED