Trix: Can I set height for trix-editor and force a vertical scroll-bar?

Created on 14 Oct 2016  Â·  5Comments  Â·  Source: basecamp/trix

Describe the bug or issue here…
When I set height or max-height for trix-editor, the border box got the height.
But the content elements are flown down continue to outside the border box.

Steps to Reproduce
  1. Using demo https://trix-editor.org/ with IE 11 on Windows 8.1 Pro
  2. Using F12 (Developer Tools) to set height: 400px; for trix-editor
  3. Expected (Wish): Show vertical scroll-bar within the box.
  4. Actual result: User's content flown down outside the trix-editor box
    Details
  • Trix version: Current (I believe is 0.9.9)
  • Browser name and version: IE 11
  • Operating system: Windows 8.1 Pro

Most helpful comment

I figured out that I can set with overflow-y: auto

All 5 comments

I figured out that I can set with overflow-y: auto

Hi, i was unsuccessfully trying to add overflow-y:auto to trix.css on trix-editor and content, can you point me in the right direction?

@ajrmzcs In case you still trying to solve this...

I added the "overflow-y:auto" in the style property of the element. Like this:
<trix-editor angular-trix ng-model="your model" class="trix-content" style="overflow-y:auto"></trix-editor>

@ajrmzcs , if you're still unsuccessful, just set in your CSS like so:

.trix-content {
  max-height: 800px !important;   #set whatever height you want
  overflow-y: auto;
}

In case anyone else has the same issue, I solved it with:

<style>
    trix-editor {
        height: 150px !important;
        max-height: 150px !important;
        overflow-y: auto !important;
    }
</style>
Was this page helpful?
0 / 5 - 0 ratings

Related issues

radcliff picture radcliff  Â·  5Comments

pars0097 picture pars0097  Â·  4Comments

javan picture javan  Â·  4Comments

marpstar picture marpstar  Â·  5Comments

madikarizma picture madikarizma  Â·  5Comments