Skip to content

Conversation

rockwellll
Copy link

@rockwellll rockwellll commented Dec 21, 2023

This was opened in #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,
}

@thiagomarinho
Copy link

hello :) are there plans to introduce this feature?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants