Merge pull request #41889 from stevepolitodesign/main

Add note regarding "trix-content" class. [ci-skip]
This commit is contained in:
Jonathan Hefner 2021-05-30 10:47:44 -05:00 committed by GitHub
commit c831dea915
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -11,7 +11,8 @@ module ActionText
# that Trix will write to on changes, so the content will be sent on form submissions.
#
# ==== Options
# * <tt>:class</tt> - Defaults to "trix-content" which ensures default styling is applied.
# * <tt>:class</tt> - Defaults to "trix-content" so that default styles will be applied.
# Setting this to a different value will prevent default styles from being applied.
#
# ==== Example
#

View File

@ -85,7 +85,7 @@ end
**Note:** you don't need to add a `content` field to your `messages` table.
Then refer to this field in the form for the model:
Then use [`rich_text_area`] to refer to this field in the form for the model:
```erb
<%# app/views/messages/_form.html.erb %>
@ -114,6 +114,8 @@ class MessagesController < ApplicationController
end
```
[`rich_text_area`]: https://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#method-i-rich_text_area
## Rendering Rich Text content
Action Text will sanitize and render rich content on your behalf.