Skip to main content

Is it possible to remove formatting tools from the ActionText Trix editor?

Rails • Asked by HP

I looked at both the ActionText and Trix documentation and could not find anything on how to disable/remove formatting tools and disable file uploads for ActionText.

For the project I am working on, I need only text formatting (bold, italic, lists, etc.) but not file uploads and hyperlinks. I considered dealing with hyperlinks via Rails content formatting options (rendering them as text) but was hoping for a bit more elegant approach before going down that route. As for blocking uploads, no idea whether that is possible while also using ActionText.

Has anybody deal with this alredy or does anybody know where I could look up more information?

Thanks in advance.


I managed to temporarily remove the file upload icon with css.

trix-toolbar .trix-button--icon-attach {
  display: none;
}

Login or Create An Account to join the conversation.

Subscribe to the newsletter

Join 27,623+ developers who get early access to new screencasts, articles, guides, updates, and more.

    By clicking this button, you agree to the GoRails Terms of Service and Privacy Policy.

    More of a social being? We're also on Twitter and YouTube.