Skip to content

Add resize to trix editor #3929

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 4, 2025
Merged

Conversation

mikiher
Copy link
Contributor

@mikiher mikiher commented Feb 4, 2025

Brief summary

Adds a resize handle to the rich text editor.

Which issue is fixed?

Fixes #3928

In-depth Description

  • Added resize: vertical to text-editor style
  • Set height and min-height properties (instead of max-height)

How have you tested this?

Resize handle now shows up where the rich text editor appears, and works as expected.

@mikiher mikiher marked this pull request as ready for review February 4, 2025 08:02
@advplyr
Copy link
Owner

advplyr commented Feb 4, 2025

The white resize handle doesn't look great but it works.

image

I remember a long time ago this used be an issue with Textarea but I think the browsers all use transparent handles now. I'm not sure what Trix is doing since there are no docs about it. It's not worth spending any additional time on right now.

Thanks!

@advplyr advplyr merged commit 0cf7a6a into advplyr:master Feb 4, 2025
5 checks passed
@mikiher
Copy link
Contributor Author

mikiher commented Feb 5, 2025

I don't think trix is doing anything special. As far as I've seen this is the same as with the old textarea.
Here's a screenshot from v2.18.1:
Screenshot 2025-02-05 080548

I tried tinkering with it for a little while but couldn't succeed in making it look right. I think it might have something to do with the non-standard scrollbar we use.

@nichwall
Copy link
Contributor

nichwall commented Feb 5, 2025

What browser are y'all using? From the referenced issue, the screenshot I shared was using Firefox and it does not have the little white box.

@advplyr
Copy link
Owner

advplyr commented Feb 5, 2025

Ah yeah it only happens when the textarea is scrollable. If you remove all the contents it is good.
image

And this is the same with our plaintext textarea.

@mikiher
Copy link
Contributor Author

mikiher commented Feb 5, 2025

It might be possible to fix by changing the (non-defalt) toolbar style we use. Where is that defined?

@advplyr
Copy link
Owner

advplyr commented Feb 5, 2025

Scrollbars are customized in app.css

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Resize Handle for Descriptions is No Longer Visible
3 participants