All threads / Administrate Custom Fields and the Trix Editor Discussion

Ask A Question

Notifications

You’re not receiving notifications from this thread.

Administrate Custom Fields and the Trix Editor Discussion

Alex Musayev ·

Chris, the picture of you remains frozen for few seconds on 0:09, and 0:55.

Reply
I am trying to figure out how to add a scroll bar to the textarea in Trix. Any suggestions? I'm using the gem. If there is a lot of content in the textarea, you have to scroll all the way back up just to change a word to bold or italic, etc., and then scroll all the way back to where you were, if you can find it. You can try it out yourself right here. 
You can use the overflow CSS style. Add a class to the trix body and style like so:

trix-content {  max-height: 800px !important;  overflow-y: auto; }

I hope that helps
Hey Chidozie, that is very helpful. I'm using the trix gem, though, I don't think I can edit the css. I may have to do it manually. 

I remembered posting about this. I found this article on how to make the Trix toolbar sticky, in case anyone is interested.
https://tosbourn.com/sticky-trix-toolbar/

Reply
Reply
Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 38,311+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2020 GoRails, LLC. All rights reserved.