2020-11-02 16:12:47 -05:00
|
|
|
## Rails 6.1.0.rc1 (November 02, 2020) ##
|
|
|
|
|
2020-10-30 15:53:35 -04:00
|
|
|
* Declare `ActionText::FixtureSet.attachment` to generate an
|
|
|
|
`<action-text-attachment sgid="..."></action-text-attachment>` element with
|
|
|
|
a valid `sgid` attribute.
|
|
|
|
|
|
|
|
```ruby
|
|
|
|
hello_world_review_content:
|
|
|
|
record: hello_world (Review)
|
|
|
|
name: content
|
|
|
|
body: <p><%= ActionText::FixtureSet.attachment("messages", :hello_world) %> is great!</p>
|
|
|
|
```
|
|
|
|
|
|
|
|
*Sean Doyle*
|
|
|
|
|
2020-02-22 12:20:23 -05:00
|
|
|
* Locate `fill_in_rich_text_area` by `<label>` text
|
|
|
|
|
|
|
|
In addition to searching for `<trix-editor>` elements with the appropriate
|
|
|
|
`aria-label` attribute, also support locating elements that match the
|
|
|
|
corresponding `<label>` element's text.
|
|
|
|
|
|
|
|
*Sean Doyle*
|
|
|
|
|
2020-09-01 21:43:07 -04:00
|
|
|
* Be able to add a default value to `rich_text_area`.
|
|
|
|
|
|
|
|
```ruby
|
|
|
|
form.rich_text_area :content, value: "<h1>Hello world</h1>"
|
|
|
|
#=> <input type="hidden" name="message[content]" id="message_content_trix_input_message_1" value="<h1>Hello world</h1>">
|
|
|
|
```
|
|
|
|
|
|
|
|
*Paulo Ancheta*
|
|
|
|
|
2020-05-11 13:43:33 -04:00
|
|
|
* Add method to confirm rich text content existence by adding `?` after rich
|
|
|
|
text attribute.
|
|
|
|
|
|
|
|
```ruby
|
|
|
|
message = Message.create!(body: "<h1>Funny times!</h1>")
|
|
|
|
message.body? #=> true
|
|
|
|
```
|
2019-12-04 22:12:26 -05:00
|
|
|
|
|
|
|
*Kyohei Toyoda*
|
|
|
|
|
2020-05-11 13:43:33 -04:00
|
|
|
* The `fill_in_rich_text_area` system test helper locates a Trix editor
|
|
|
|
and fills it in with the given HTML.
|
2019-05-13 12:44:06 -04:00
|
|
|
|
2019-06-04 16:47:33 -04:00
|
|
|
```ruby
|
|
|
|
# <trix-editor id="message_content" ...></trix-editor>
|
|
|
|
fill_in_rich_text_area "message_content", with: "Hello <em>world!</em>"
|
2019-05-13 12:44:06 -04:00
|
|
|
|
2019-06-04 16:47:33 -04:00
|
|
|
# <trix-editor placeholder="Your message here" ...></trix-editor>
|
|
|
|
fill_in_rich_text_area "Your message here", with: "Hello <em>world!</em>"
|
2019-05-13 12:44:06 -04:00
|
|
|
|
2019-06-04 16:47:33 -04:00
|
|
|
# <trix-editor aria-label="Message content" ...></trix-editor>
|
|
|
|
fill_in_rich_text_area "Message content", with: "Hello <em>world!</em>"
|
2019-05-13 12:44:06 -04:00
|
|
|
|
2019-06-04 16:47:33 -04:00
|
|
|
# <input id="trix_input_1" name="message[content]" type="hidden">
|
|
|
|
# <trix-editor input="trix_input_1"></trix-editor>
|
|
|
|
fill_in_rich_text_area "message[content]", with: "Hello <em>world!</em>"
|
|
|
|
```
|
2019-05-13 12:44:06 -04:00
|
|
|
|
2019-06-04 16:47:33 -04:00
|
|
|
*George Claghorn*
|
2019-03-11 11:58:15 -04:00
|
|
|
|
|
|
|
|
2019-04-24 15:57:14 -04:00
|
|
|
Please check [6-0-stable](https://github.com/rails/rails/blob/6-0-stable/actiontext/CHANGELOG.md) for previous changes.
|