actiontext 6.1.4.1 → 7.0.0.rc2

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.

Potentially problematic release.


This version of actiontext might be problematic. Click here for more details.

Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +25 -81
  3. data/MIT-LICENSE +1 -1
  4. data/README.md +4 -0
  5. data/app/assets/javascripts/actiontext.js +900 -0
  6. data/app/assets/javascripts/trix.js +5278 -0
  7. data/app/assets/stylesheets/trix.css +375 -0
  8. data/app/helpers/action_text/content_helper.rb +17 -3
  9. data/app/helpers/action_text/tag_helper.rb +19 -9
  10. data/app/javascript/actiontext/attachment_upload.js +8 -1
  11. data/app/models/action_text/encrypted_rich_text.rb +9 -0
  12. data/app/models/action_text/record.rb +1 -1
  13. data/app/models/action_text/rich_text.rb +4 -0
  14. data/app/views/action_text/contents/_content.html.erb +1 -0
  15. data/app/views/layouts/action_text/contents/_content.html.erb +3 -0
  16. data/db/migrate/20180528164100_create_action_text_tables.rb +14 -2
  17. data/lib/action_text/attachable.rb +4 -0
  18. data/lib/action_text/attachment.rb +4 -4
  19. data/lib/action_text/attachment_gallery.rb +14 -9
  20. data/lib/action_text/attachments/caching.rb +1 -1
  21. data/lib/action_text/attachments/minification.rb +1 -1
  22. data/lib/action_text/attribute.rb +18 -2
  23. data/lib/action_text/content.rb +7 -3
  24. data/lib/action_text/encryption.rb +38 -0
  25. data/lib/action_text/engine.rb +14 -0
  26. data/lib/action_text/fixture_set.rb +55 -0
  27. data/lib/action_text/gem_version.rb +4 -4
  28. data/lib/action_text/plain_text_conversion.rb +31 -2
  29. data/lib/action_text/rendering.rb +1 -1
  30. data/lib/action_text/serialization.rb +2 -0
  31. data/lib/action_text/trix_attachment.rb +3 -3
  32. data/lib/action_text.rb +1 -0
  33. data/lib/generators/action_text/install/install_generator.rb +40 -35
  34. data/lib/generators/action_text/install/templates/actiontext.css +35 -0
  35. data/package.json +13 -3
  36. metadata +39 -18
  37. data/app/views/action_text/content/_layout.html.erb +0 -3
  38. data/lib/generators/action_text/install/templates/actiontext.scss +0 -36
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d5a7fb2811d060b4183dbac7e78b0999227e42c63271b32088c5212769191149
4
- data.tar.gz: 90be4c6c08a2af75f9dba432e9039b283b4fb4ee44ac3e2d26d9005a9c19a15d
3
+ metadata.gz: 49d5e198b905c75a519173f8f5eba80cf719c7b915ac259bfce87088951368a4
4
+ data.tar.gz: 107d20762e886dc9f179d6497455dd4b330c97dc455a407810c90392d85f3981
5
5
  SHA512:
6
- metadata.gz: e531afe3c6ad50674d091e9a086c724ff0676db35e84c65ec4a5f25f7a59f85509374318f0d421a3a8ad27d5fc5f6f6aeafbbc9c20fd7dcc98105dfd35e276a7
7
- data.tar.gz: 8c011da2ae1784bb8b3b67ea8a210dcc0068de5aaf8516a1d1e5c990efc99646afb1e0368930a82139f5c484ee76f634eab3f09fae82188b5600ec1007f10b50
6
+ metadata.gz: 7c677e7a9fc48d3311fd8b420d45a7eb775e58854aec7ba57782f4602faede73fca8e7df04941dff69f0e725d95fb94e74bc8c2f62b5aa494ed83e3963d5e12a
7
+ data.tar.gz: e2f6483cdddca35c63cee0e59f9e65c6199569f81ee71614066d3bffb1415fa4e2f70f5f263024b0436bb18d6dca7f27d5ba228719f9ff88d23f9dd4e43ecdd0
data/CHANGELOG.md CHANGED
@@ -1,106 +1,50 @@
1
- ## Rails 6.1.4.1 (August 19, 2021) ##
1
+ ## Rails 7.0.0.rc2 (December 14, 2021) ##
2
2
 
3
- * No changes.
4
-
5
-
6
- ## Rails 6.1.4 (June 24, 2021) ##
7
-
8
- * Always render attachment partials as HTML with `:html` format inside trix editor.
9
-
10
- *James Brooks*
11
-
12
-
13
- ## Rails 6.1.3.2 (May 05, 2021) ##
14
-
15
- * No changes.
16
-
17
-
18
- ## Rails 6.1.3.1 (March 26, 2021) ##
19
-
20
- * No changes.
21
-
22
-
23
- ## Rails 6.1.3 (February 17, 2021) ##
24
-
25
- * No changes.
26
-
27
-
28
- ## Rails 6.1.2.1 (February 10, 2021) ##
29
-
30
- * No changes.
3
+ * Fix an issue with how nested lists were displayed when converting to plain text
31
4
 
5
+ *Matt Swanson*
32
6
 
33
- ## Rails 6.1.2 (February 09, 2021) ##
7
+ * Allow passing in a custom `direct_upload_url` or `blob_url_template` to `rich_text_area_tag`.
34
8
 
35
- * No changes.
9
+ *Lucas Mansur*
36
10
 
37
11
 
38
- ## Rails 6.1.1 (January 07, 2021) ##
12
+ ## Rails 7.0.0.alpha2 (September 15, 2021) ##
39
13
 
40
14
  * No changes.
41
15
 
42
16
 
43
- ## Rails 6.1.0 (December 09, 2020) ##
17
+ ## Rails 7.0.0.alpha1 (September 15, 2021) ##
44
18
 
45
- * Declare `ActionText::FixtureSet.attachment` to generate an
46
- `<action-text-attachment sgid="..."></action-text-attachment>` element with
47
- a valid `sgid` attribute.
19
+ * Make the Action Text + Trix JavaScript and CSS available through the asset pipeline.
48
20
 
49
- ```ruby
50
- hello_world_review_content:
51
- record: hello_world (Review)
52
- name: content
53
- body: <p><%= ActionText::FixtureSet.attachment("messages", :hello_world) %> is great!</p>
54
- ```
21
+ *DHH*
55
22
 
56
- *Sean Doyle*
23
+ * OpenSSL constants are now used for Digest computations.
57
24
 
58
- * Locate `fill_in_rich_text_area` by `<label>` text
25
+ *Dirkjan Bussink*
59
26
 
60
- In addition to searching for `<trix-editor>` elements with the appropriate
61
- `aria-label` attribute, also support locating elements that match the
62
- corresponding `<label>` element's text.
27
+ * Add support for passing `form:` option to `rich_text_area_tag` and
28
+ `rich_text_area` helpers to specify the `<input type="hidden" form="...">`
29
+ value.
63
30
 
64
31
  *Sean Doyle*
65
32
 
66
- * Be able to add a default value to `rich_text_area`.
33
+ * Add `config.action_text.attachment_tag_name`, to specify the HTML tag that contains attachments.
67
34
 
68
- ```ruby
69
- form.rich_text_area :content, value: "<h1>Hello world</h1>"
70
- #=> <input type="hidden" name="message[content]" id="message_content_trix_input_message_1" value="<h1>Hello world</h1>">
71
- ```
35
+ *Mark VanLandingham*
72
36
 
73
- *Paulo Ancheta*
37
+ * Expose how we render the HTML _surrounding_ rich text content as an
38
+ extensible `layouts/action_view/contents/_content.html.erb` template to
39
+ encourage user-land customizations, while retaining private API control over how
40
+ the rich text itself is rendered by `action_text/contents/_content.html.erb`
41
+ partial.
74
42
 
75
- * Add method to confirm rich text content existence by adding `?` after rich
76
- text attribute.
77
-
78
- ```ruby
79
- message = Message.create!(body: "<h1>Funny times!</h1>")
80
- message.body? #=> true
81
- ```
82
-
83
- *Kyohei Toyoda*
84
-
85
- * The `fill_in_rich_text_area` system test helper locates a Trix editor
86
- and fills it in with the given HTML.
87
-
88
- ```ruby
89
- # <trix-editor id="message_content" ...></trix-editor>
90
- fill_in_rich_text_area "message_content", with: "Hello <em>world!</em>"
91
-
92
- # <trix-editor placeholder="Your message here" ...></trix-editor>
93
- fill_in_rich_text_area "Your message here", with: "Hello <em>world!</em>"
94
-
95
- # <trix-editor aria-label="Message content" ...></trix-editor>
96
- fill_in_rich_text_area "Message content", with: "Hello <em>world!</em>"
43
+ *Sean Doyle*
97
44
 
98
- # <input id="trix_input_1" name="message[content]" type="hidden">
99
- # <trix-editor input="trix_input_1"></trix-editor>
100
- fill_in_rich_text_area "message[content]", with: "Hello <em>world!</em>"
101
- ```
45
+ * Add `with_all_rich_text` method to eager load all rich text associations on a model at once.
102
46
 
103
- *George Claghorn*
47
+ *Matt Swanson*, *DHH*
104
48
 
105
49
 
106
- Please check [6-0-stable](https://github.com/rails/rails/blob/6-0-stable/actiontext/CHANGELOG.md) for previous changes.
50
+ Please check [6-1-stable](https://github.com/rails/rails/blob/6-1-stable/actiontext/CHANGELOG.md) for previous changes.
data/MIT-LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2020 Basecamp, LLC
3
+ Copyright (c) 2020-2021 Basecamp, LLC
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -4,6 +4,10 @@ Action Text brings rich text content and editing to Rails. It includes the [Trix
4
4
 
5
5
  You can read more about Action Text in the [Action Text Overview](https://edgeguides.rubyonrails.org/action_text_overview.html) guide.
6
6
 
7
+ ## Development
8
+
9
+ The JavaScript for Action Text is distributed both as a npm module under @rails/actiontext and via the asset pipeline as actiontext.js (and we mirror Trix as trix.js). To ensure that the latter remains in sync, you must run `yarn build` and checkin the artifacts whenever the JavaScript source or the Trix dependency is bumped. CSS changes must be brought over manually to app/assets/stylesheets/trix.css
10
+
7
11
  ## License
8
12
 
9
13
  Action Text is released under the [MIT License](https://opensource.org/licenses/MIT).