Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow to add a classname for inline text attributes #1114

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

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