Skip to content
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

[5.x] Allow entry of hex colors without leading hash #10568

Merged
merged 1 commit into from
Aug 5, 2024

Conversation

daun
Copy link
Contributor

@daun daun commented Aug 4, 2024

Pasting colors into the color fieldtype requires they have a leading #. However, when copy-pasting from most layout apps, the colors come without the #, requiring editors to add it manually for each color field. This PR will make editors' lives a bit easier and sanitize any valid hex colors to the required format including the leading hash.

Before: requires adding # manually

Screen Recording 2024-08-04 at 15 16 58

After: adds # automatically on blur

Screen Recording 2024-08-04 at 15 17 33

@jasonvarga jasonvarga merged commit fa0c1f3 into statamic:5.x Aug 5, 2024
17 checks passed
@daun daun deleted the feature/color-field-simple-hex branch October 21, 2024 23:14
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.

2 participants