1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Polish the Action Text guide [ci skip]

This commit is contained in:
Uģis Ozols 2019-12-27 03:23:48 +02:00 committed by George Claghorn
parent 3eb1f1dd10
commit e473eb392c

View file

@ -57,13 +57,13 @@ require("trix")
require("@rails/actiontext") require("@rails/actiontext")
``` ```
2. The`trix` stylesheet should be imported into `actiontext.scss`. 2. The `trix` stylesheet should be imported into `actiontext.scss`.
```scss ```scss
@import "trix/dist/trix"; @import "trix/dist/trix";
``` ```
Additionally this `actiontext.scss` file should be imported into your stylesheet pack. Additionally, this `actiontext.scss` file should be imported into your stylesheet pack.
``` ```
// application.scss // application.scss
@ -96,7 +96,7 @@ Then refer to this field in the form for the model:
<% end %> <% end %>
``` ```
And finally display the sanitized rich text on a page: And finally, display the sanitized rich text on a page:
```erb ```erb
<%= @message.content %> <%= @message.content %>
@ -134,7 +134,7 @@ On installation, Action Text will copy over a partial to
} }
``` ```
2. Take that attachable_sgid and ask your frontend to insert it in rich text content using an <action-text-attachment> tag: 2. Take that attachable_sgid and ask your frontend to insert it in rich text content using an `<action-text-attachment>` tag:
```html ```html
<action-text-attachment sgid="BAh7CEkiCG…"></action-text-attachment> <action-text-attachment sgid="BAh7CEkiCG…"></action-text-attachment>
``` ```