Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Require Trix Javascript magic in `app/assets/javascripts/application.js`:
//= require trix
```

Finally, any place where you would like to use the Trix editor in your
Any place where you would like to use the Trix editor in your
forms, just use the `trix_editor` helper:

```ruby
Expand All @@ -48,6 +48,20 @@ f.input :body, as: :trix_editor
```


Finally, when you want to display the contents of your form element:


```ruby
@post.fancyText.html_safe
```

or something more secure:

```ruby
sanitize @post.fancyText, tags: %w(strong em p br div ul ol li)
```


## Trix

For the official Trix Github repository, go
Expand Down