Trix: Unable to Disable BlockQuote and Code Buttons

Created on 24 May 2017  路  2Comments  路  Source: basecamp/trix

I'm working with a trix editor in a Rails 5.0.1 application, and while the configuration talks in depth about adding buttons and a rather deep dive on changes, all I'm looking to do is (whether through coffeescript or in the bundled .js/coffee files) disable the Blockquote and Code buttons in the WYSIWYG editor so that they do not appear at all.

I will be checking this issue regularly and am happy to offer up any thoughts or feedback if anyone has any. Hope it's straightforward and I'm missing something obvious.

Most helpful comment

Easiest thing to do would be hiding them with CSS:

trix-toolbar [data-trix-attribute='quote'],
trix-toolbar [data-trix-attribute='code'] {
  display: none;
}

All 2 comments

Easiest thing to do would be hiding them with CSS:

trix-toolbar [data-trix-attribute='quote'],
trix-toolbar [data-trix-attribute='code'] {
  display: none;
}

Thank you, worked perfectly.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

WhatFreshHellIsThis picture WhatFreshHellIsThis  路  4Comments

lcsqlpete picture lcsqlpete  路  3Comments

adueck picture adueck  路  3Comments

binchentx picture binchentx  路  5Comments

divyenduz picture divyenduz  路  3Comments