Does or will trix ever support font face or colors?
You can add your own formatting attributes and toolbar buttons. Here's an example: https://jsfiddle.net/javan/egg7fgvv/
Are there any examples of adding drop down lists to toolbar? Also does it support modals?
@vedmant You can use a standard details html element. Here's the updated example:
https://jsfiddle.net/dimarosenberg/fehotky2/1/
P.S. There is an issue with the summary tag styles, because Trix’s stylesheets query by tag names, not classes (trix-toolbar .button_group button), so you can’t use the Trix’s default styles on non-button elements and do things like <summary class=“button”>.
@rosendi thanks for the example - it works great! Here is the output after saving:
<div><span style=\"color: red;\"> red text here </span></div>
Was wondering how you would render the inline style back to the user after sanitizing?
```ruby
<%= simple_format @text %>
````
The above seems to sanitize inline styles while leaving the span tag. Was wondering how you all manage to render colors back to the user after sanitizing>? Any pointers in this direction would be most appreciated.
I found a gem which allows for the quick white listing of inline style elements. it may be useful to you all. here it is: https://github.com/rgrove/sanitize
chrs
Ben
Most helpful comment
You can add your own formatting attributes and toolbar buttons. Here's an example: https://jsfiddle.net/javan/egg7fgvv/