In this post, we will see how to resolve Rails Trix editor throwing unexpected input field but not rendering expected (and rendered) field
Question:
The following image illustrate the state of a form:
- a first div with the
trix-toolbar
is injected, including a tag with namehref
that was automagically interpreted (nice to know) as having the requirement to be a URL, given it a placeholder and whatnot. Headscratcher: the field is rendered and disabled - the desired text area has its tag for
trix-editor
with a correct id
However that field is rendered as the tiny square seen at the top-left of the URL dialog div, with a 21×32 pixel dimension
the actiontext.css file is the gem generated one:
Adding:

The
display: block;
instruction appears to be ignored.

still have not investigated what the impact of inputting a raw url does, so am uncertain as to whether this dialog is pertinent
What should be done to ensure the trix-editor tag follows the trix-toolbar tag?
Best Answer:
Many sources of possible inheritance. The resolution of above matter was to editstylesheets/actiontext.css
as follows, given the trix-dialog is set as a block display and adjust the editor based on its position relative to the URL dialog’s heightIf you have better answer, please add a comment about this, thank you!
Source: Stackoverflow.com
Leave a Review