actiontext 6.1.4 → 7.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +24 -77
  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 +40 -19
  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: 28ae4d5f8c506c96e94a85709f00525a284c1cd0b78c7b88c6f1391d15cf8e21
4
- data.tar.gz: 615c11792e31c3612f6d48766f98d8850f269a31b7ce4822892c1be8b3de23e0
3
+ metadata.gz: 39c49e2382be3b158f503ab091dfd137d7b70d8169f0a5d3bf0a15f563abedfd
4
+ data.tar.gz: 14a99fd63b659a235cc62f8359948ede8a71223bedfff6fc3a41f5871d9bc9b3
5
5
  SHA512:
6
- metadata.gz: 77a5b1531484046244c182185cf576d71966f3f779d0fbb600d291daa7ec063f172da4bc9c72386178aa4e5acda97885d777cf02ad45d7a55e0a3ba58cfb19ce
7
- data.tar.gz: c9942e95f7ce00b664119ae6270b935b8a831fff16770ef8aaee1ff4102d56fc16d73a91f3aa3a3b97b15dcc8a724d9dd863dae12c3c539013abd653ccbacd0e
6
+ metadata.gz: bf2e8b05f1232635c2754ae18606137abb012b3d00ec15f03eab1e8f416040aae2fedd5a5aa93f5b8ce20cccb56da9e269c7d2b10989cbe7873235fd265d626d
7
+ data.tar.gz: ffd63158c7e3b41aa602e767325a489b08f76580a4940b324296205f9fb938eb00511907e77e033c4eea19dcc90722f11b4d8d858d65f176a2deb9e821240f62
data/CHANGELOG.md CHANGED
@@ -1,101 +1,48 @@
1
- ## Rails 6.1.4 (June 24, 2021) ##
1
+ * Fix an issue with how nested lists were displayed when converting to plain text
2
2
 
3
- * Always render attachment partials as HTML with `:html` format inside trix editor.
3
+ *Matt Swanson*
4
4
 
5
- *James Brooks*
5
+ * Allow passing in a custom `direct_upload_url` or `blob_url_template` to `rich_text_area_tag`.
6
6
 
7
+ *Lucas Mansur*
7
8
 
8
- ## Rails 6.1.3.2 (May 05, 2021) ##
9
9
 
10
- * No changes.
11
-
12
-
13
- ## Rails 6.1.3.1 (March 26, 2021) ##
14
-
15
- * No changes.
16
-
17
-
18
- ## Rails 6.1.3 (February 17, 2021) ##
10
+ ## Rails 7.0.0.alpha2 (September 15, 2021) ##
19
11
 
20
12
  * No changes.
21
13
 
22
14
 
23
- ## Rails 6.1.2.1 (February 10, 2021) ##
24
-
25
- * No changes.
15
+ ## Rails 7.0.0.alpha1 (September 15, 2021) ##
26
16
 
17
+ * Make the Action Text + Trix JavaScript and CSS available through the asset pipeline.
27
18
 
28
- ## Rails 6.1.2 (February 09, 2021) ##
29
-
30
- * No changes.
19
+ *DHH*
31
20
 
21
+ * OpenSSL constants are now used for Digest computations.
32
22
 
33
- ## Rails 6.1.1 (January 07, 2021) ##
34
-
35
- * No changes.
36
-
23
+ *Dirkjan Bussink*
37
24
 
38
- ## Rails 6.1.0 (December 09, 2020) ##
39
-
40
- * Declare `ActionText::FixtureSet.attachment` to generate an
41
- `<action-text-attachment sgid="..."></action-text-attachment>` element with
42
- a valid `sgid` attribute.
43
-
44
- ```ruby
45
- hello_world_review_content:
46
- record: hello_world (Review)
47
- name: content
48
- body: <p><%= ActionText::FixtureSet.attachment("messages", :hello_world) %> is great!</p>
49
- ```
25
+ * Add support for passing `form:` option to `rich_text_area_tag` and
26
+ `rich_text_area` helpers to specify the `<input type="hidden" form="...">`
27
+ value.
50
28
 
51
29
  *Sean Doyle*
52
30
 
53
- * Locate `fill_in_rich_text_area` by `<label>` text
54
-
55
- In addition to searching for `<trix-editor>` elements with the appropriate
56
- `aria-label` attribute, also support locating elements that match the
57
- corresponding `<label>` element's text.
58
-
59
- *Sean Doyle*
60
-
61
- * Be able to add a default value to `rich_text_area`.
62
-
63
- ```ruby
64
- form.rich_text_area :content, value: "<h1>Hello world</h1>"
65
- #=> <input type="hidden" name="message[content]" id="message_content_trix_input_message_1" value="<h1>Hello world</h1>">
66
- ```
31
+ * Add `config.action_text.attachment_tag_name`, to specify the HTML tag that contains attachments.
67
32
 
68
- *Paulo Ancheta*
33
+ *Mark VanLandingham*
69
34
 
70
- * Add method to confirm rich text content existence by adding `?` after rich
71
- text attribute.
35
+ * Expose how we render the HTML _surrounding_ rich text content as an
36
+ extensible `layouts/action_view/contents/_content.html.erb` template to
37
+ encourage user-land customizations, while retaining private API control over how
38
+ the rich text itself is rendered by `action_text/contents/_content.html.erb`
39
+ partial.
72
40
 
73
- ```ruby
74
- message = Message.create!(body: "<h1>Funny times!</h1>")
75
- message.body? #=> true
76
- ```
77
-
78
- *Kyohei Toyoda*
79
-
80
- * The `fill_in_rich_text_area` system test helper locates a Trix editor
81
- and fills it in with the given HTML.
82
-
83
- ```ruby
84
- # <trix-editor id="message_content" ...></trix-editor>
85
- fill_in_rich_text_area "message_content", with: "Hello <em>world!</em>"
86
-
87
- # <trix-editor placeholder="Your message here" ...></trix-editor>
88
- fill_in_rich_text_area "Your message here", with: "Hello <em>world!</em>"
89
-
90
- # <trix-editor aria-label="Message content" ...></trix-editor>
91
- fill_in_rich_text_area "Message content", with: "Hello <em>world!</em>"
41
+ *Sean Doyle*
92
42
 
93
- # <input id="trix_input_1" name="message[content]" type="hidden">
94
- # <trix-editor input="trix_input_1"></trix-editor>
95
- fill_in_rich_text_area "message[content]", with: "Hello <em>world!</em>"
96
- ```
43
+ * Add `with_all_rich_text` method to eager load all rich text associations on a model at once.
97
44
 
98
- *George Claghorn*
45
+ *Matt Swanson*, *DHH*
99
46
 
100
47
 
101
- Please check [6-0-stable](https://github.com/rails/rails/blob/6-0-stable/actiontext/CHANGELOG.md) for previous changes.
48
+ 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).