trix icon indicating copy to clipboard operation
trix copied to clipboard

allow to add a classname for inline text attributes

Open rockwellll opened this issue 2 years ago • 1 comments

This was opened in https://github.com/basecamp/trix/pull/855 but seems abandoned since the migration from CoffeeScript to JavaScript.

Adds support for specifying a className option to custom text attributes.

Trix.config.textAttributes.background = {
  className: 'background-color',
  inheritable: false,
}

Multiple whitespace separated classes can be assigned as well,

Trix.config.textAttributes.background = {
  className: 'bg-red-500 text-white rounded-md', # class names courtesy of TailwindCSS
  inheritable: false,
}

rockwellll avatar Dec 21 '23 16:12 rockwellll

hello :) are there plans to introduce this feature?

thiagomarinho avatar May 09 '24 10:05 thiagomarinho