tiptap-ruby 0.9.11 → 0.9.12

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: e81bd62e43720f6f9510d267596fc57e67b67f20d8e2e7635246907d1254c30f
4
- data.tar.gz: 867acd048ad68499501bfc918b74ce27066c340ac2009cad27872b4daa2b2f61
3
+ metadata.gz: 4a0a40b9c23ed1c8eeb1c3647fa388a2d56bd0daf3c98312a9f58a653dca333f
4
+ data.tar.gz: 5a87ef32fb583d65aa93755be40f183837c924144e5a94eb5ceed3c7a3046dd7
5
5
  SHA512:
6
- metadata.gz: 72e78fff1a413763bd0e7c80b5e28c1e389acea93701c70d4c04bf954562069bf29d8a85ede323c887ffcdecd9ba06959eab308820109b2bde8dfd7df399f813
7
- data.tar.gz: abff7b2f6d187b066cd86fb988db6f69cc94a773db305f3c7b9f268069cb9497cfbda22d3cd9deffa7727a1d082a73cb2e88a33ec0fbe810a8b6331b8eebf7f5
6
+ metadata.gz: 595e2b238d23308e84794ad0f7a40ecfec32d0f080b271d7f3a0f33fba0b8f5426eb92e3e0cae1aa00354721cbdc9625821fcbc8bb943ee78a071f118e81c68a
7
+ data.tar.gz: d6f45b9c5ea6f699622906ea92ab06ee546ff131924906062c48d4813f223ac3f099659dc216fe5dce5b1f60ad2e34aca86d506080c7d0b7c793960b758bda2e
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.9.12] - 2024-12-20
4
+
5
+ - Add inline styles when converting headings and paragraphs to HTML
6
+
3
7
  ## [0.9.11] - 2024-09-19
4
8
 
5
9
  - Bump rails-html-sanitizer to 1.6.1 for CVE
@@ -54,7 +54,17 @@ module TipTap
54
54
  end
55
55
 
56
56
  def to_html
57
- content_tag(html_tag, safe_join(content.map(&:to_html)), class: html_class_name)
57
+ content_tag(html_tag, safe_join(content.map(&:to_html)), html_attributes)
58
+ end
59
+
60
+ def html_attributes
61
+ {style: inline_styles, class: html_class_name}.reject { |key, value| value.blank? }
62
+ end
63
+
64
+ def inline_styles
65
+ styles = []
66
+ styles << "text-align: #{attrs["textAlign"]};" if attrs["textAlign"]
67
+ styles.join(" ")
58
68
  end
59
69
  end
60
70
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TipTap
4
- VERSION = "0.9.11"
4
+ VERSION = "0.9.12"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tiptap-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.11
4
+ version: 0.9.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chad Wilken
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-12-05 00:00:00.000000000 Z
11
+ date: 2024-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionview