Skip to content

Conversation

@betsyecastro
Copy link
Contributor

@betsyecastro betsyecastro commented Jan 7, 2026

This PR adds support for superscript formatting in the Trix editor by applying a community-recommended fix (see basecamp/trix#368) to resolve issue #209.

Additionally, it updates the Purify configuration to use the stevebauman/purify package's definition structure. The previous config followed the underlying HTMLPurifier conventions without including the package's HTML5 definition class, causing <sub> and <sup> tags to be stripped during sanitization despite being allowed. This update, combined with the Trix editor configuration, ensures subscript and superscript formatting works end-to-end—from editor input to frontend rendering.

image image

@betsyecastro betsyecastro requested a review from wunc January 7, 2026 23:15
@betsyecastro betsyecastro self-assigned this Jan 7, 2026
@betsyecastro betsyecastro added ✨ enhancement New feature or request ☕️ javascript Pull requests that update Javascript code 🗑️ deprecated Fix or clean up deprecated code. labels Jan 8, 2026
@betsyecastro betsyecastro force-pushed the add-sub-and-sup-buttons-to-trix-toolbar branch from 192f849 to b68ef82 Compare January 8, 2026 17:40
@betsyecastro betsyecastro removed the 🗑️ deprecated Fix or clean up deprecated code. label Jan 8, 2026
wunc added 2 commits January 16, 2026 14:28
- uses Material Design icons for sub and sup for visual consistency. For reference, these are from Material Symbols, weight 500, size 20px, fill color black, and implemented as URL-encoded data objects in CSS.
- moves sub and sup buttons to 'text tools' button group
- moves JS code to app.js
@wunc wunc merged commit 710a3fe into develop Jan 16, 2026
1 of 2 checks passed
@wunc wunc deleted the add-sub-and-sup-buttons-to-trix-toolbar branch January 16, 2026 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ enhancement New feature or request ☕️ javascript Pull requests that update Javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants