trix
trix copied to clipboard
allow to add a classname for inline text attributes
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,
}
hello :) are there plans to introduce this feature?