Removing unused Trix Editor buttons

How to quickly remove unused Trix Editor buttons from your site

There are some buttons that come with the Trix editor that aren’t going to have a use case in all applications. You can remove them with CSS.

It is a 2 step process, first, find the class of the button you want to remove. Right click on the button and inspect it, it will have a class like trix-button--icon-name-of-button

Then in CSS you can hide it from view with a display:none.

For example on project, we have no need for the following, so we removed them!

.trix-button--icon-increase-nesting-level,
.trix-button--icon-decrease-nesting-level,
.trix-button--icon-strike,
.trix-button--icon-code { display:none; }

Recent posts View all

Web DevProductivity

Keeping on top of website updates

Learn what website updates are, what they entail, why they are important, and how we can help

Freelancing

Getting the most out of your agency

Here are some tips based on years of working with, for, and as an agency on how to get the most out of any work you do.