richer_text 0.3.0 → 0.3.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: 4015b9a354c480f94ac845846dc9fdee7d4f9402f42175ebe8080ce2b0e66d87
4
- data.tar.gz: 4ee8d41ce6076773f86d2703cac148fb41f8a98cdf0feedfc0da0e584575245d
3
+ metadata.gz: 59e668e5d18697e8b1c568ac541fc821d1a83538040d3464625c8ac91c53dcb5
4
+ data.tar.gz: 1a20ee315751b8165c4038e1f79183e120d44f7e867221b26a910693cdc004b1
5
5
  SHA512:
6
- metadata.gz: 8cfe5f6dc39db89cc2327a40aa0d4198b1785850cd2dd1d1f11a2fa941dea3a68cd771a8f40295c6f8ba8f6c6a0752ab9aa43382dc19fbd3a2261693bd5a27e9
7
- data.tar.gz: 5beab5c3cd4e36867b8d302f2cc3a08221dc739d2ab9f3812adf59f06ff1541faacd99be07947b0315f648e1bf0cfb469c3dfd1c4df5c9ac8af3551c58b6c75c
6
+ metadata.gz: 0dcc392bcfbed5598bfb4f902af9644d6cb75d54f2cffec27bedb6086fc96624b01227f46dfb0df07658fefe92859862ea60f7ae43d69ca34b8ed2a817238ca5
7
+ data.tar.gz: 881eb8e296ef1052e36a8c485d48e8d06ab73657ac98a3693abcaf24566a3111878e598cbf63fcff3fe2b39495fc0ae8eed8d13c66a78277f0f0b498f5a8eafe
@@ -30,3 +30,7 @@
30
30
  .richer-text p {
31
31
  margin: 0;
32
32
  }
33
+
34
+ .richer-text img {
35
+ width: 100%;
36
+ }
@@ -1,3 +1,3 @@
1
1
  <div class="richer-text">
2
- <%= sanitize(content.to_html, tags: %w(div h1 h2 blockquote s del strong i em br pre code ol ul li table tbody th td tr p), attributes: %w(id class style data-color colspan rowspan)) %>
2
+ <%= sanitize(content.to_html, tags: %w(div img h1 h2 blockquote s del strong i em br pre code ol ul li table tbody th td tr p), attributes: %w(id class style data-color src alt colspan rowspan)) %>
3
3
  </div>
@@ -1,5 +1,4 @@
1
1
  require "rails"
2
- require "nokogiri"
3
2
 
4
3
  module RicherText
5
4
  class Engine < ::Rails::Engine
@@ -12,8 +11,8 @@ module RicherText
12
11
  end
13
12
 
14
13
  initializer "richer_text.helper" do
15
- ActiveSupport.on_load(:action_controller_base) do
16
- helper RicherText::Engine.helpers
14
+ ActiveSupport.on_load(:action_controller) do
15
+ helper RicherText::TagHelper
17
16
  end
18
17
  end
19
18
  end
@@ -1,3 +1,3 @@
1
1
  module RicherText
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
data/lib/richer_text.rb CHANGED
@@ -12,4 +12,5 @@ module RicherText
12
12
  autoload :Rendering
13
13
  autoload :Fragment
14
14
  autoload :Serialization
15
+ autoload :TagHelper
15
16
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: richer_text
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrea Fomera
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-02 00:00:00.000000000 Z
11
+ date: 2023-08-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails