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

Add CSS class to Trix container? For TailwindCSS #51

Open
camya opened this issue Jan 20, 2021 · 1 comment
Open

Add CSS class to Trix container? For TailwindCSS #51

camya opened this issue Jan 20, 2021 · 1 comment

Comments

@camya
Copy link

camya commented Jan 20, 2021

Hello,

I try to pass Tailwind CSS classes to the surrounding span (or div). Example: "col-span-6 sm:col-span-4"

I have to accomplish the following output.

<div class="col-span-6 sm:col-span-4" id="container-invoice-summary_markup-3" v-pre="">

Is this possible?

I saw that I can configure the @trix(), but unfortunately I can only change the containerElement. (span/div)

@camya
Copy link
Author

camya commented Jan 20, 2021

I found a way to pass the CSS classes, but I'm not sure, if this is the intended way. :)

@trix(\App\Post::class, 'content', ['containerElement' => 'div class="col-span-6 sm:col-span-4"']])

Maybe you can add the info to the documentation.

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

No branches or pull requests

1 participant